This commit is contained in:
ruben- 2014-11-30 18:16:04 +01:00
parent b3213ac491
commit 42a2fe61f0
3 changed files with 10 additions and 11 deletions

View file

@ -271,24 +271,19 @@ class MainWPChild
$child_menu_icon = "";
} else {
$child_menu_name = "MainWP Child";
$child_menu_icon = plugins_url('images/mainwpicon.png', dirname(plugin_basename(__FILE__)));
$child_menu_icon = 'data:image/png+xml;base64,' . base64_encode(file_get_contents($this->plugin_dir . '/images/mainwpicon.png'));
}
add_menu_page($child_menu_name, $child_menu_name, 'read', 'mainwp_child_tab', array($this, 'on_show_page'), $child_menu_icon, '80.00001');
add_menu_page($child_menu_name, $child_menu_name, 'read', 'mainwp_child_tab', false, $child_menu_icon, '80.00001');
if (!get_option('mainwp_branding_remove_setting') || $cancelled_branding)
{
// add_options_page('MainWPSettings', __($this->branding . ' Settings','mainwp-child'), 'manage_options', 'MainWPSettings', array(&$this, 'settings'));
// add_options_page('MainWPSettings', __($this->branding . ' Server Information','mainwp-child'), 'manage_options', 'MainWPChildServerInformation', array('MainWPChildServerInformation', 'renderPage'));
add_submenu_page('mainwp_child_tab', 'MainWPSettings', __($this->branding . ' Settings','mainwp-child') , 'manage_options', 'mainwp_child_tab', array(&$this, 'settings'));
add_submenu_page('mainwp_child_tab', 'MainWPSettings', __($this->branding . ' Server Information','mainwp-child') , 'manage_options', 'MainWPChildServerInformation', array('MainWPChildServerInformation', 'renderPage'));
}
if (!get_option('mainwp_branding_remove_restore') || $cancelled_branding) {
// $restorePage = add_submenu_page('import.php', $this->branding . ' Restore', $this->branding . ' Restore', 'read', 'mainwp-child-restore', array('MainWPClone', 'renderRestore'));
// $restorePage = add_submenu_page('mainwp_child_tab', $this->branding . ' Restore', $this->branding . ' Restore' , 'read', 'mainwp-child-restore', array('MainWPClone', 'renderRestore'));
// add_action('admin_print_scripts-'.$restorePage, array('MainWPClone', 'print_scripts'));
if (!get_option('mainwp_branding_remove_restore') || $cancelled_branding)
{
$sitesToClone = get_option('mainwp_child_clone_sites');
if ($sitesToClone != '0')
{

View file

@ -205,7 +205,9 @@ class MainWPHelper
//Save the post to the wp
remove_filter('content_save_pre', 'wp_filter_post_kses'); // to fix brake scripts or html
$new_post_id = wp_insert_post($new_post, $wp_error);
$post_status = $new_post['post_status'];
$new_post['post_status'] = 'auto-draft';
$new_post_id = wp_insert_post($new_post, $wp_error);
//Show errors if something went wrong
if (is_wp_error($wp_error))
@ -217,6 +219,8 @@ class MainWPHelper
return 'Undefined error';
}
wp_update_post( array('ID' => $new_post_id, 'post_status' => $post_status));
if (!empty($terms)) {
wp_set_object_terms($new_post_id, array_map( intval, $terms), 'category');
}

View file

@ -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: 1.4-beta6
Version: 1.4-rc1
*/
header('X-Frame-Options: ALLOWALL');
//header('X-Frame-Options: GOFORIT');