AnonSec Team
Server IP : 10.128.40.6  /  Your IP : 216.73.216.233
Web Server : Apache
System : Linux webd006.cluster128.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64
User : logmcpe ( 111175)
PHP Version : 7.3.33
Disable Function : _dyuweyrj4,_dyuweyrj4r,dl
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0755) :  /home/logmcpe/www/TEST/www/wp-content/plugins/wp/../../themes/cleanmate/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/logmcpe/www/TEST/www/wp-content/plugins/wp/../../themes/cleanmate/meta-box.php
<?php
//Adds a box to the main column on the Page edit screens
function cm_theme_add_custom_box() 
{
    add_meta_box( 
        "page-custom-options",
        __("Options", 'cleanmate'),
        "cm_theme_inner_custom_box",
        "page",
		"normal",
		"core"
    );
}
add_action("add_meta_boxes", "cm_theme_add_custom_box");

// Prints the box content
function cm_theme_inner_custom_box($post)
{
	//Use nonce for verification
	wp_nonce_field(plugin_basename( __FILE__ ), "cm_noncename");
}

//When the post is saved, saves our custom data
function cm_theme_save_postdata($post_id) 
{
	// verify if this is an auto save routine. 
	// If it is our form has not been submitted, so we dont want to do anything
	if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) 
		return;
		
	//verify this came from the our screen and with proper authorization,
	//because save_post can be triggered at other times
	if((isset($_POST['cm_noncename']) && !wp_verify_nonce($_POST['cm_noncename'], plugin_basename( __FILE__ ))) || !isset($_POST['cm_noncename']))
		return;

	// Check permissions
	if(!current_user_can('edit_post', $post_id))
		return;
		
	//OK, we're authenticated: we need to find and save the data
	//sidebars
	update_post_meta($post_id, "page_sidebar_footer_top", (isset($_POST["page_sidebar_footer_top"]) ? $_POST["page_sidebar_footer_top"] : ''));
	update_post_meta($post_id, "page_sidebar_footer_bottom", (isset($_POST["page_sidebar_footer_bottom"]) ? $_POST["page_sidebar_footer_bottom"] : ''));
	update_post_meta($post_id, "cm_page_sidebars", array_values(array_filter(array(
		(!empty($_POST["page_sidebar_footer_top"]) ? $_POST["page_sidebar_footer_top"] : NULL),
		(!empty($_POST["page_sidebar_footer_bottom"]) ? $_POST["page_sidebar_footer_bottom"] : NULL)
	))));
	//header type
	update_post_meta($post_id, "header_type", (isset($_POST["header_type"]) ? $_POST["header_type"] : 'default'));
	//main slider
	update_post_meta($post_id, "main_slider", (isset($_POST["main_slider"]) ? $_POST["main_slider"] : ''));
}
add_action("save_post", "cm_theme_save_postdata");
?>

AnonSec - 2021