mirror of
https://github.com/mainwp/mainwp-child.git
synced 2025-08-30 02:32:07 +08:00
This commit is contained in:
parent
2505c48c2f
commit
af45d928a4
4 changed files with 18 additions and 25 deletions
|
@ -494,26 +494,11 @@ class MainWPChild
|
|||
|
||||
if (isset($_GET['test']))
|
||||
{
|
||||
error_reporting(E_ALL);
|
||||
ini_set('display_errors', TRUE);
|
||||
ini_set('display_startup_errors', TRUE);
|
||||
echo '<pre>';
|
||||
$excludes = (isset($_POST['exclude']) ? explode(',', $_POST['exclude']) : array());
|
||||
$excludes[] = str_replace(ABSPATH, '', WP_CONTENT_DIR) . '/uploads/mainwp';
|
||||
$excludes[] = str_replace(ABSPATH, '', WP_CONTENT_DIR) . '/object-cache.php';
|
||||
if (!ini_get('safe_mode')) set_time_limit(600);
|
||||
|
||||
$file_descriptors = 0;
|
||||
|
||||
$newExcludes = array();
|
||||
foreach ($excludes as $exclude)
|
||||
{
|
||||
$newExcludes[] = rtrim($exclude, '/');
|
||||
}
|
||||
|
||||
$res = MainWPBackup::get()->createFullBackup($newExcludes, '', false, false, $file_descriptors);
|
||||
print_r($res);
|
||||
die('</pre>');
|
||||
// error_reporting(E_ALL);
|
||||
// ini_set('display_errors', TRUE);
|
||||
// ini_set('display_startup_errors', TRUE);
|
||||
// echo '<pre>';
|
||||
// die('</pre>');
|
||||
}
|
||||
|
||||
//Register does not require auth, so we register here..
|
||||
|
@ -3223,7 +3208,7 @@ class MainWPChild
|
|||
MainWPChildBranding::Instance()->action();
|
||||
}
|
||||
|
||||
public function code_snippet() {
|
||||
public function code_snippet() {
|
||||
$action = $_POST['action'];
|
||||
$information = array('status' => 'FAIL');
|
||||
if ($action === 'run_snippet' || $action === 'save_snippet') {
|
||||
|
@ -3266,6 +3251,8 @@ class MainWPChild
|
|||
}
|
||||
|
||||
function run_saved_snippets() {
|
||||
if (!isset($_POST['action']))
|
||||
return;
|
||||
$action = $_POST['action'];
|
||||
if ($action === "run_snippet" || $action === "save_snippet" || $action === "delete_snippet")
|
||||
return; // do not run saved snippets if in do action snippet
|
||||
|
|
|
@ -130,7 +130,7 @@ class MainWPChildBranding
|
|||
add_submenu_page( null, $this->settings['contact_support_label'], $this->settings['contact_support_label'] , 'read', "ContactSupport", array($this, "contact_support") );
|
||||
add_action('admin_bar_menu', array($this, 'add_support_button'), 100);
|
||||
}
|
||||
add_filter('update_footer', array(&$this, 'update_footer'), 15);
|
||||
add_filter('update_footer', array(&$this, 'update_footer'), 10);
|
||||
}
|
||||
|
||||
public function send_support_mail()
|
||||
|
@ -253,7 +253,7 @@ class MainWPChildBranding
|
|||
return false;
|
||||
}
|
||||
|
||||
function update_footer(){
|
||||
function update_footer($text){
|
||||
if (stripos($_SERVER['REQUEST_URI'], 'update-core.php') !== false && $this->is_branding())
|
||||
{
|
||||
?>
|
||||
|
@ -264,6 +264,8 @@ class MainWPChildBranding
|
|||
</script>
|
||||
<?php
|
||||
}
|
||||
|
||||
return $text;
|
||||
}
|
||||
|
||||
public function branding_map_meta_cap($caps, $cap, $user_id, $args)
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
Description: Child Plugin for MainWP. The plugin is used so the installed blog can be securely managed remotely by your network. Plugin documentation and options can be found here http://docs.mainwp.com
|
||||
Author: MainWP
|
||||
Author URI: http://mainwp.com
|
||||
Version: 0.27.2
|
||||
Version: 0.28.2
|
||||
*/
|
||||
header('X-Frame-Options: ALLOWALL');
|
||||
//header('X-Frame-Options: GOFORIT');
|
||||
|
|
|
@ -7,7 +7,7 @@ Author URI: http://mainwp.com
|
|||
Plugin URI: http://mainwp.com
|
||||
Requires at least: 3.6
|
||||
Tested up to: 3.9
|
||||
Stable tag: 0.28.1
|
||||
Stable tag: 0.28.2
|
||||
License: GPLv2 or later
|
||||
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
|
@ -57,6 +57,10 @@ To see full documentation and FAQs please visit [MainWP Documentation](http://do
|
|||
10. The Extension Screen
|
||||
|
||||
== Changelog ==
|
||||
= 0.28.2 =
|
||||
* Fixed update conflict with child plugin installed on dashboard
|
||||
* Fixed some warnings with debug enabled
|
||||
|
||||
= 0.28.1 =
|
||||
* Fixed a bug on line 3269 when debug is on
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue