wpCentral - Version 1.4

Version Description

  • Added validation on TLS connections.
Download this release

Release Info

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

Code changes from version 1.3 to 1.4

Files changed (5) hide show
  1. actions.php +0 -2
  2. readme.txt +7 -4
  3. wpc_functions.php +10 -41
  4. wpcentral.php +5 -5
  5. wpcentral_lang.php +1 -1
actions.php CHANGED
@@ -159,7 +159,6 @@ function wpc_site_actions(){
159
@wpc_sunlink($download_dest);
160
161
// Lets visit the installation once to make the changes in the database
162
- //$resp = wpc_curl_call($site_url, 0, 5);
163
$resp = wp_remote_get($site_url);
164
165
if(!empty($error)){
@@ -249,7 +248,6 @@ function wpc_site_actions(){
249
@wpc_sunlink($download_dest);
250
251
// Lets visit the installation once to make the changes in the database
252
- //$resp = wpc_curl_call($site_url, 0, 5);
253
$resp = wp_remote_get($site_url);
254
255
if(!empty($error)){
159
@wpc_sunlink($download_dest);
160
161
// Lets visit the installation once to make the changes in the database
162
$resp = wp_remote_get($site_url);
163
164
if(!empty($error)){
248
@wpc_sunlink($download_dest);
249
250
// Lets visit the installation once to make the changes in the database
251
$resp = wp_remote_get($site_url);
252
253
if(!empty($error)){
readme.txt CHANGED
@@ -1,14 +1,14 @@
1
- === wpcentral ===
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: 4.9.8
6
Requires PHP: 5.3
7
- Stable tag: 1.3
8
License: GPLv2 or later
9
License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
11
- WPCentral provides a single-login centralized panel where you can manage tons of your WordPress websites efficiently, unitedly as well as singularly.
12
13
== Description ==
14
@@ -40,6 +40,9 @@ Should you have any suggestions to improve wpcentral, want to see some related f
40
41
== Changelog ==
42
43
= 1.3 =
44
* Resolved the bug in plugin activation after installation using Plugin Sets.
45
1
+ === wpCentral ===
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
8
License: GPLv2 or later
9
License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
11
+ wpCentral provides a single-login centralized panel where you can manage tons of your WordPress websites efficiently, unitedly as well as singularly.
12
13
== Description ==
14
40
41
== Changelog ==
42
43
+ = 1.4 =
44
+ * Added validation on TLS connections.
45
+
46
= 1.3 =
47
* Resolved the bug in plugin activation after installation using Plugin Sets.
48
wpc_functions.php CHANGED
@@ -4,10 +4,10 @@ if (!defined('ABSPATH')){
4
exit;
5
}
6
7
- function wpc_died(){
8
print_r(error_get_last());
9
}
10
- register_shutdown_function('wpc_died');
11
12
include_once('wpcentral_lang.php');
13
@@ -320,7 +320,6 @@ function wpc_get_outdated_plugins(){
320
$options = array('plugins' => serialize($to_send));
321
322
// Check the WordPress API to get the list of outdated plugins
323
- //$raw_response = wpc_curl_call('http://api.wordpress.org/plugins/update-check/1.0/', 0, 5, $options);
324
$raw_response = wp_remote_post('http://api.wordpress.org/plugins/update-check/1.0/', array('body' => $options));
325
$body = wp_remote_retrieve_body($raw_response);
326
$outdated_plugins = unserialize($body);
@@ -428,9 +427,6 @@ function wpc_get_themes_details($themes = array()){
428
$post_data = array(
429
'action' => 'theme_information',
430
'request' => serialize( (object) array( 'slug' => $current_theme )));
431
-
432
- //$api_data = wpc_curl_call($apiurl, 0, 5, $post_data);
433
- //$api_data = unserialize($api_data);
434
435
$raw_response = wp_remote_post($apiurl, array('body' => $post_data));
436
$body = wp_remote_retrieve_body($raw_response);
@@ -668,31 +664,8 @@ global $error;
668
*/
669
function wpc_get_web_file($url, $writefilename = ''){
670
671
- // Set the curl parameters.
672
- $ch = curl_init();
673
- curl_setopt($ch, CURLOPT_URL, $url);
674
-
675
- // Turn off the server and peer verification (TrustManager Concept).
676
- curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
677
- curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
678
-
679
- // Follow redirects
680
- curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);
681
-
682
- // UserAgent and Cookies
683
- curl_setopt($ch, CURLOPT_USERAGENT, 'wpcentral');
684
-
685
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
686
- curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 120); // Max time to connect
687
-
688
- curl_setopt($ch, CURLOPT_TIMEOUT, 5);
689
-
690
- // Get response from the server.
691
- $file = curl_exec($ch);
692
-
693
- $meta = curl_getinfo($ch);
694
-
695
- curl_close($ch);
696
697
//Are we to store the file
698
if(empty($writefilename)){
@@ -1890,7 +1863,7 @@ function wpc_sversion_compare($ver1, $ver2, $oper = NULL, $vr = array()){
1890
}
1891
1892
/**
1893
- * Deletes a file. This is meant to be used by install.php, upgrade.php, etc.
1894
*
1895
* @param string $path
1896
* @returns bool
@@ -1924,10 +1897,6 @@ function wpc_is_dir($path){
1924
function wpc_mkdir($path, $mode = 0755, $rec = 0){
1925
if(!is_dir($path)){
1926
$ret = mkdir($path);
1927
-
1928
- if(!empty($mode)){
1929
- chmod($path, $mode); // CHMOD to the given OCTAL
1930
- }
1931
return $ret;
1932
}
1933
return true;
@@ -1968,7 +1937,7 @@ function wpc_put($file, $data){
1968
}
1969
1970
/**
1971
- * Deletes a file. This is meant to be used by install.php, upgrade.php, etc.
1972
*
1973
* @param string $filename
1974
* @returns bool
@@ -2225,9 +2194,9 @@ function wpc_plugin_info_filter($plugins){
2225
return $plugins;
2226
}
2227
2228
- $plugins[$wpc_slug]['Name'] = 'wpcentral';
2229
- $plugins[$wpc_slug]['Title'] = 'wpcentral';
2230
- $plugins[$wpc_slug]['Description'] = 'wpcentral provides a centralized area where you can manage all your WordPress websites efficiently, unitedly as well as singularly.';
2231
$plugins[$wpc_slug]['AuthorURI'] = 'https://wpcentral.co';
2232
$plugins[$wpc_slug]['Author'] = 'Softaculous Ltd.';
2233
$plugins[$wpc_slug]['AuthorName'] = 'Softaculous Ltd.';
@@ -2528,7 +2497,7 @@ function wpc_admin_notice(){
2528
</div>
2529
<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>
2530
<div class="wpc_head"><br /><b>Website URL:</b></div><div>'.get_option('siteurl').'</div>
2531
- <div class="wpc_head"><br /><b>WPCentral Connection Key:</b></div><div>'.get_option('wpcentral_auth_key').'</div><br />
2532
<div><a class="wpc_flat-butt wpc_sub_head" href="https://wpcentral.co" target="_blank">Learn More</a></div>
2533
</div>
2534
</div>';
4
exit;
5
}
6
7
+ /* function wpc_died(){
8
print_r(error_get_last());
9
}
10
+ register_shutdown_function('wpc_died'); */
11
12
include_once('wpcentral_lang.php');
13
320
$options = array('plugins' => serialize($to_send));
321
322
// Check the WordPress API to get the list of outdated plugins
323
$raw_response = wp_remote_post('http://api.wordpress.org/plugins/update-check/1.0/', array('body' => $options));
324
$body = wp_remote_retrieve_body($raw_response);
325
$outdated_plugins = unserialize($body);
427
$post_data = array(
428
'action' => 'theme_information',
429
'request' => serialize( (object) array( 'slug' => $current_theme )));
430
431
$raw_response = wp_remote_post($apiurl, array('body' => $post_data));
432
$body = wp_remote_retrieve_body($raw_response);
664
*/
665
function wpc_get_web_file($url, $writefilename = ''){
666
667
+ $response = wp_remote_get($url);
668
+ $file = wp_remote_retrieve_body($response);
669
670
//Are we to store the file
671
if(empty($writefilename)){
1863
}
1864
1865
/**
1866
+ * Deletes a file.
1867
*
1868
* @param string $path
1869
* @returns bool
1897
function wpc_mkdir($path, $mode = 0755, $rec = 0){
1898
if(!is_dir($path)){
1899
$ret = mkdir($path);
1900
return $ret;
1901
}
1902
return true;
1937
}
1938
1939
/**
1940
+ * Deletes a file.
1941
*
1942
* @param string $filename
1943
* @returns bool
2194
return $plugins;
2195
}
2196
2197
+ $plugins[$wpc_slug]['Name'] = 'wpCentral';
2198
+ $plugins[$wpc_slug]['Title'] = 'wpCentral';
2199
+ $plugins[$wpc_slug]['Description'] = 'wpCentral provides a centralized area where you can manage all your WordPress websites efficiently, unitedly as well as singularly.';
2200
$plugins[$wpc_slug]['AuthorURI'] = 'https://wpcentral.co';
2201
$plugins[$wpc_slug]['Author'] = 'Softaculous Ltd.';
2202
$plugins[$wpc_slug]['AuthorName'] = 'Softaculous Ltd.';
2497
</div>
2498
<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>
2499
<div class="wpc_head"><br /><b>Website URL:</b></div><div>'.get_option('siteurl').'</div>
2500
+ <div class="wpc_head"><br /><b>wpCentral Connection Key:</b></div><div>'.get_option('wpcentral_auth_key').'</div><br />
2501
<div><a class="wpc_flat-butt wpc_sub_head" href="https://wpcentral.co" target="_blank">Learn More</a></div>
2502
</div>
2503
</div>';
wpcentral.php CHANGED
@@ -1,14 +1,14 @@
1
<?php
2
/*
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.3
7
Author: Softaculous Ltd.
8
- Author URI:
9
License: GPL2
10
License URI:
11
- Text Domain: wpcentral
12
*/
13
/*
14
* This file belongs to the wpcentral plugin.
1
<?php
2
/*
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
7
Author: Softaculous Ltd.
8
+ Author URI: https://wpcentral.co
9
License: GPL2
10
License URI:
11
+ Text Domain: wpCentral
12
*/
13
/*
14
* This file belongs to the wpcentral plugin.
wpcentral_lang.php CHANGED
@@ -1,5 +1,5 @@
1
<?php
2
- $l['<title>'] = 'wpcentral';
3
$l['unauth_access'] = 'Unauthorized Access!!';
4
$l['invalid_auth_key'] = 'Invalid Authorization Key!!';
5
$l['no_req_post'] = 'No Request Posted!!';
1
<?php
2
+ $l['<title>'] = 'wpCentral';
3
$l['unauth_access'] = 'Unauthorized Access!!';
4
$l['invalid_auth_key'] = 'Invalid Authorization Key!!';
5
$l['no_req_post'] = 'No Request Posted!!';