wpCentral - Version 1.4.2

Version Description

  • Added 1-click website connection utility.
  • Added rename file function.
Download this release

Release Info

Developer softacpriya
Plugin Icon 128x128 wpCentral
Version 1.4.2
Comparing to
See all releases

Code changes from version 1.4.1 to 1.4.2

Files changed (3) hide show
  1. readme.txt +6 -2
  2. wpc_functions.php +124 -77
  3. wpcentral.php +1 -1
readme.txt CHANGED
@@ -2,9 +2,9 @@
2
Contributors: softaculous
3
Tags: wpcentral, softaculous, sites, manage sites, backup, plugins, themes, manage wordpress,
4
Requires at least: 4.4
5
- Tested up to: 5.0.3
6
Requires PHP: 5.3
7
- Stable tag: 1.4.1
8
License: GPLv2 or later
9
License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
@@ -40,6 +40,10 @@ Should you have any suggestions to improve wpcentral, want to see some related f
40
41
== Changelog ==
42
43
= 1.4.1 =
44
* Added support and documentation links to the plugin notice.
45
* Activate Plugins after installation
2
Contributors: softaculous
3
Tags: wpcentral, softaculous, sites, manage sites, backup, plugins, themes, manage wordpress,
4
Requires at least: 4.4
5
+ Tested up to: 5.1
6
Requires PHP: 5.3
7
+ Stable tag: 1.4.2
8
License: GPLv2 or later
9
License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
40
41
== Changelog ==
42
43
+ = 1.4.2 =
44
+ * Added 1-click website connection utility.
45
+ * Added rename file function.
46
+
47
= 1.4.1 =
48
* Added support and documentation links to the plugin notice.
49
* Activate Plugins after installation
wpc_functions.php CHANGED
@@ -700,7 +700,7 @@ function wpc_get_web_file($url, $writefilename = ''){
700
* @return boolean
701
* @since 1.0
702
*/
703
- function wpc_unzip($file, $destination, $overwrite = 0){
704
705
include_once('wpc_soft_pclzip.php');
706
$archive = new softpclzip($file);
@@ -1969,6 +1969,18 @@ function wpc_file_exists($file){
1969
return file_exists($file);
1970
}
1971
1972
/**
1973
* Fetch the connection key for the WPC plugin to add the website in WPC panel
1974
*
@@ -2094,7 +2106,7 @@ function wpc_modal_open_script(){
2094
modal: true,
2095
width: "1070px",
2096
height: "auto",
2097
- title: "wpcentral Connection Key",
2098
close: function() {
2099
$(this).dialog("destroy");
2100
}
@@ -2126,7 +2138,7 @@ function wpc_modal_dialog(){
2126
2127
<p style="font-weight:bold;">Note: Contact wpCentral Team at support@wpcentral.co for any issues</p>
2128
2129
- <div style="text-align:center; font-weight:bold;"><p style="margin-bottom: 4px;margin-top: 20px;">wpcentral Connection Key</p></div>
2130
<div style="padding: 10px;background-color: #fafafa;border: 1px solid black;border-radius: 10px;font-weight: bold;font-size: 14px;text-align: center;">'.wpc_get_connection_key().'</div>
2131
</div>';
2132
@@ -2475,7 +2487,7 @@ function wpc_get_curr_user_role(){
2475
}
2476
2477
/**
2478
- * Display WPCentral notice in dashboard
2479
*
2480
* @since 1.0
2481
*/
@@ -2485,85 +2497,120 @@ function wpc_admin_notice(){
2485
2486
if($role == 'administrator' && !wpc_get_option('wpcentral_connected')){
2487
2488
- echo '
2489
- <style>
2490
- .wpc_sub_head{
2491
- font-size: 16px !important;
2492
- color: #676a6c !important;
2493
- font-weight: bold !important;
2494
- font-family: OpenSans,Verdana,Tahoma,Arial,Georgia,sans-serif,serif !important;
2495
- margin-top: 10px !important;
2496
- }
2497
-
2498
- .wpc_main_head{
2499
- font-size: 20px;
2500
- color: #676a6c;
2501
- font-family: OpenSans,Verdana,Tahoma,Arial,Georgia,sans-serif,serif;
2502
- }
2503
-
2504
- .wpc_flat-butt{
2505
- text-decoration: none !important;
2506
- display: inline-block !important;
2507
- border-radius: 3px !important;
2508
- font-family: OpenSans, sans-serif !important;
2509
- font-size: 15px !important;
2510
- padding: 10px !important;
2511
- text-align: center !important;
2512
- border: 0 !important;
2513
- background: #00a0d2 !important;
2514
- color: #FFF !important;
2515
- cursor: pointer !important;
2516
- outline: 0 !important;
2517
- font-weight: 400 !important;
2518
- line-height: 1.42857 !important;
2519
- text-align: center !important;
2520
- white-space: nowrap !important;
2521
- vertical-align: middle !important;
2522
- -moz-user-select: none !important;
2523
- border: 1px solid transparent !important;
2524
- }
2525
-
2526
- .wpc_flat-butt:hover{
2527
- background: #46B8DA !important;
2528
- }
2529
-
2530
- .wpc_head{
2531
- font-weight: bold;
2532
- color: #676a6c;
2533
- font-family: OpenSans,Verdana,Tahoma,Arial,Georgia,sans-serif,serif;
2534
- font-size: 13px;
2535
- }
2536
-
2537
- .wpc_notice{
2538
- background-color: #fff;
2539
- height: 320px;
2540
- align-items: center;
2541
- display: flex;
2542
- text-align: center;
2543
- border-radius: 6px;
2544
- box-shadow: 0px 10px 12px -7px #777;
2545
- border-left-color: unset !important;
2546
- border-left: unset !important;
2547
- }
2548
- </style>
2549
2550
<div class="updated wpc_notice">
2551
- <div style="width:100%;"><br />
2552
<div class="wpc_main_head">
2553
<img src="http://wpcentral.co/images/icon_dark.png" style="height:40px; padding:5px 0;">
2554
<img src="http://wpcentral.co/images/logo_dark.png" alt="wpcentral" title="wpcentral" style="height:40px; padding:5px 0;">
2555
- </div>
2556
- <div class="wpc_sub_head"><b>Go to <a href="https://panel.wpcentral.co" target="_blank">panel.wpcentral.co</a> and add your website with the following details: </b></div>
2557
- <div class="wpc_head"><br /><b>Website URL:</b></div><div>'.get_option('siteurl').'</div>
2558
- <div class="wpc_head"><br /><b>wpCentral Connection Key:</b></div><div>'.get_option('wpcentral_auth_key').'</div><br />
2559
- <div class="wpc_sub_head">
2560
- <b>Note: Contact wpCentral Team for any issues at support@wpcentral.co</b>
2561
- </div>
2562
- <div>
2563
- <p style="display:inline-block; padding:0 20px;"><a class="wpc_flat-butt wpc_sub_head" href="https://wpcentral.co" target="_blank">Visit Website</a></p>
2564
2565
- <p style="display:inline-block; padding:0 20px;"><a class="wpc_flat-butt wpc_sub_head" href="https://wpcentral.co/docs/getting-started/adding-website-in-wpcentral/" target="_blank">View Connection Guide</a></p>
2566
- </div><br />
2567
</div>
2568
</div>';
2569
}
700
* @return boolean
701
* @since 1.0
702
*/
703
+ function wpc_unzip($file, $destination, $overwrite = 0, $include = array(), $exclude = array()){
704
705
include_once('wpc_soft_pclzip.php');
706
$archive = new softpclzip($file);
1969
return file_exists($file);
1970
}
1971
1972
+ /**
1973
+ * Renames a file/folder.
1974
+ *
1975
+ * @param string $from oldname
1976
+ * @param string $to newname
1977
+ * @returns bool
1978
+ * @since 1.4.2
1979
+ */
1980
+ function wpc_rename($from, $to){
1981
+ return rename($from, $to);
1982
+ }
1983
+
1984
/**
1985
* Fetch the connection key for the WPC plugin to add the website in WPC panel
1986
*
2106
modal: true,
2107
width: "1070px",
2108
height: "auto",
2109
+ title: "wpCentral Connection Key",
2110
close: function() {
2111
$(this).dialog("destroy");
2112
}
2138
2139
<p style="font-weight:bold;">Note: Contact wpCentral Team at support@wpcentral.co for any issues</p>
2140
2141
+ <div style="text-align:center; font-weight:bold;"><p style="margin-bottom: 4px;margin-top: 20px;">wpCentral Connection Key</p></div>
2142
<div style="padding: 10px;background-color: #fafafa;border: 1px solid black;border-radius: 10px;font-weight: bold;font-size: 14px;text-align: center;">'.wpc_get_connection_key().'</div>
2143
</div>';
2144
2487
}
2488
2489
/**
2490
+ * Display wpCentral notice in dashboard
2491
*
2492
* @since 1.0
2493
*/
2497
2498
if($role == 'administrator' && !wpc_get_option('wpcentral_connected')){
2499
2500
+ echo '
2501
+ <style>
2502
+ .wpc_sub_head{
2503
+ font-size: 20px !important;
2504
+ color: #676a6c !important;
2505
+ font-weight: bold !important;
2506
+ font-family: OpenSans, sans-serif !important;
2507
+ text-align: center;
2508
+ }
2509
+
2510
+ .wpc_main_head{
2511
+ font-size: 20px;
2512
+ color: #676a6c;
2513
+ font-family: OpenSans, sans-serif;
2514
+ text-align: center;
2515
+ }
2516
+
2517
+ .wpc_flat-butt{
2518
+ text-decoration: none !important;
2519
+ display: inline-block !important;
2520
+ border-radius: 3px !important;
2521
+ font-family: OpenSans, sans-serif !important;
2522
+ font-size: 15px !important;
2523
+ padding: 10px !important;
2524
+ text-align: center !important;
2525
+ border: 0 !important;
2526
+ background: #00a0d2 !important;
2527
+ color: #FFF !important;
2528
+ cursor: pointer !important;
2529
+ outline: 0 !important;
2530
+ font-weight: 400 !important;
2531
+ line-height: 1.42857 !important;
2532
+ text-align: center !important;
2533
+ white-space: nowrap !important;
2534
+ vertical-align: middle !important;
2535
+ -moz-user-select: none !important;
2536
+ border: 1px solid transparent !important;
2537
+ }
2538
+
2539
+ .wpc_flat-butt:hover{
2540
+ background: #46B8DA !important;
2541
+ }
2542
+
2543
+ .wpc_head{
2544
+ color: #676a6c;
2545
+ font-family: OpenSans, sans-serif;
2546
+ font-size: 15px;
2547
+ }
2548
+
2549
+ .wpc_notice{
2550
+ background-color: #fff;
2551
+ height: 335px;
2552
+ align-items: left;
2553
+ display: flex;
2554
+ text-align: left;
2555
+ border-radius: 6px;
2556
+ box-shadow: 0px 10px 12px -7px #777;
2557
+ border-left-color: unset !important;
2558
+ border-left: unset !important;
2559
+ }
2560
+
2561
+ .wpc_row {
2562
+ margin-right: -15px;
2563
+ margin-left: -15px;
2564
+ }
2565
+
2566
+ .wpc_col-sm-3, .wpc_col-sm-8 {
2567
+ position: relative;
2568
+ min-height: 1px;
2569
+ padding-right: 15px;
2570
+ padding-left: 15px;
2571
+ }
2572
+
2573
+ .wpc_col-sm-3, .wpc_col-sm-8 {
2574
+ float: left;
2575
+ }
2576
+ .wpc_col-sm-8 {
2577
+ width: 66.66666667%;
2578
+ }
2579
+ .wpc_col-sm-3 {
2580
+ width: 25%;
2581
+ }
2582
+ </style>
2583
2584
<div class="updated wpc_notice">
2585
+ <div style="width:100%; padding-top:10px;">
2586
<div class="wpc_main_head">
2587
<img src="http://wpcentral.co/images/icon_dark.png" style="height:40px; padding:5px 0;">
2588
<img src="http://wpcentral.co/images/logo_dark.png" alt="wpcentral" title="wpcentral" style="height:40px; padding:5px 0;">
2589
+ </div><br />
2590
+ <div class="wpc_row">
2591
+ <div class="wpc_head wpc_col-sm-3"><b>Website URL:</b></div>
2592
+ <div class="wpc_col-sm-8">'.get_option('siteurl').'</div>
2593
+ </div><br /><br />
2594
+ <div class="wpc_row">
2595
+ <div class="wpc_head wpc_col-sm-3"><b>wpCentral Connection Key:</b></div>
2596
+ <div class="wpc_col-sm-8" style="word-wrap:break-word;">'.get_option('wpcentral_auth_key').'</div>
2597
+ </div><br /><br /><br />
2598
+
2599
+ <div class="wpc_sub_head"><br /><b>Click <a href="https://panel.wpcentral.co/index.php?act=wpc_addsite&siteurl='.get_option('siteurl').'&conn_key='.get_option('wpcentral_auth_key').'" target="_blank">here</a> to connect your website directly to wpCentral panel.</b></div>
2600
+
2601
+ <div style="text-align: center;"><br />
2602
+ <p style="display:inline-block; padding:0 20px;"><a class="wpc_flat-butt wpc_sub_head" href="https://panel.wpcentral.co/index.php?act=wpc_addsite&siteurl='.get_option('siteurl').'&conn_key='.get_option('wpcentral_auth_key').'" target="_blank">1-Click Connect</a></p>
2603
2604
+ <p style="display:inline-block; padding:0 20px;"><a class="wpc_flat-butt wpc_sub_head" href="https://wpcentral.co" target="_blank">Visit Website</a></p>
2605
+
2606
+ <p style="display:inline-block; padding:0 20px;"><a class="wpc_flat-butt wpc_sub_head" href="https://wpcentral.co/docs/getting-started/adding-website-in-wpcentral/" target="_blank">Manual Connection Guide</a></p>
2607
+
2608
+ <p style="display:inline-block; padding:0 20px;"><a class="wpc_flat-butt wpc_sub_head" href="https://wpcentral.co/docs/getting-started/1-click-website-connection/" target="_blank">1-Click Connection Guide</a></p>
2609
+ </div><br />
2610
+
2611
+ <div class="wpc_head" style="text-align:center;">
2612
+ <b>Note:</b> Contact wpCentral Team for any issues at <a href="mailto:support@wpcentral.co" style="text-decoration:none;">support@wpcentral.co</a>
2613
+ </div><br />
2614
</div>
2615
</div>';
2616
}
wpcentral.php CHANGED
@@ -3,7 +3,7 @@
3
Plugin Name: wpCentral
4
Plugin URI: https://wpcentral.co
5
Description: wpCentral provides a centralized area where you can manage all your WordPress websites singularly, unitedly as well as efficiently.
6
- Version: 1.4.1
7
Author: Softaculous Ltd.
8
Author URI: https://wpcentral.co
9
License: GPL2
3
Plugin Name: wpCentral
4
Plugin URI: https://wpcentral.co
5
Description: wpCentral provides a centralized area where you can manage all your WordPress websites singularly, unitedly as well as efficiently.
6
+ Version: 1.4.2
7
Author: Softaculous Ltd.
8
Author URI: https://wpcentral.co
9
License: GPL2