Uname:Linux EDL-STRETCH 4.19.0-27-amd64 #1 SMP Debian 4.19.316-1 (2024-06-25) x86_64

403WebShell
403Webshell
Server IP : 188.114.97.2  /  Your IP : 104.23.243.201
Web Server : Apache/2.4.59 (Debian)
System : Linux EDL-STRETCH 4.19.0-27-amd64 #1 SMP Debian 4.19.316-1 (2024-06-25) x86_64
User : edlftp ( 1002)
PHP Version : 7.4.33
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/nicolasj/www/blog.ecoledelangues.be/wp-content/themes/metro/functions/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/nicolasj/www/blog.ecoledelangues.be/wp-content/themes/metro/functions/homepage-meta.php
<?php

/*************************************************************************************
 *	Add MetaBox to Homepage edit page
 *************************************************************************************/

$om_homepage_meta_box=array (
	'type' => array (
		'id' => 'om-homepage-meta-box-size',
		'name' =>  __('Box Size', 'om_theme'),
		'callback' => 'om_homepage_meta_box_size',
		'context' => 'side',
		'priority' => 'default',
		'fields' => array (
			array ( "name" => __('Box&nbsp;size','om_theme'),
					"desc" => __('Choose&nbsp;the&nbsp;size of the block','om_theme'),
					"id" => OM_THEME_SHORT_PREFIX."homepage_size",
					"type" => "select",
					"std" => '9',
					'options' => array(
						'9' => __('9x (full width)', 'om_theme'),
						'8' => __('8x', 'om_theme'),
						'7' => __('7x', 'om_theme'),
						'6' => __('6x', 'om_theme'),
						'5' => __('5x', 'om_theme'),
						'4' => __('4x', 'om_theme'),
						'3' => __('3x', 'om_theme'),
						'2' => __('2x', 'om_theme'),
						'1' => __('1x', 'om_theme'),
					)
			),
			array ( "name" => __('Inner&nbsp;box paddings','om_theme'),
					"desc" => '',
					"id" => OM_THEME_SHORT_PREFIX."homepage_paddings",
					"type" => "select",
					"std" => '',
					'options' => array(
						'' => __('Standard', 'om_theme'),
						'no' => __('No paddings', 'om_theme'),
					)
			),
		),
	),
);
 
function om_add_homepage_meta_box() {
	global $om_homepage_meta_box;
	
	foreach($om_homepage_meta_box as $metabox) {
		add_meta_box(
			$metabox['id'],
			$metabox['name'],
			$metabox['callback'],
			'homepage',
			@$metabox['context']?$metabox['context']:'advanced',
			@$metabox['priority']?$metabox['priority']:'default'
		);
	}
}
add_action('add_meta_boxes', 'om_add_homepage_meta_box');

/*************************************************************************************
 *	MetaBox Callbacks Functions
 *************************************************************************************/

function om_homepage_meta_box_size() {
	global $om_homepage_meta_box;

	echo om_generate_meta_box($om_homepage_meta_box['type']['fields']);
}

/*************************************************************************************
 *	Save MetaBox data
 *************************************************************************************/

function om_save_homepage_metabox($post_id) {
	global $om_homepage_meta_box;
 
	om_save_metabox($post_id, $om_homepage_meta_box);

}
add_action('save_post', 'om_save_homepage_metabox');

Youez - 2016 - github.com/yon3zu
LinuXploit