|
Server IP : 10.2.73.233 / Your IP : 216.73.216.59 Web Server : Apache/2.4.59 (Debian) System : Linux polon 4.19.0-27-amd64 #1 SMP Debian 4.19.316-1 (2024-06-25) x86_64 User : www-data ( 33) PHP Version : 5.6.40-64+0~20230107.71+debian10~1.gbp673146 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0755) : /home/ilpnowa/../ilpnowa/web/wp-includes/ |
| [ Home ] | [ C0mmand ] | [ Upload File ] |
|---|
<?php
/**
* Module WPGlobus Editor
*
* @since 1.1.0
*
* @package WPGlobus Plus
* @subpackage Administration
*/
/**
* @see include_once( 'class-wpglobus-plus-wpglobeditor.php' ) in wpglobus-plus-main.php
*/
if ( ! class_exists('WPGlobus_Editor') ) :
class WPGlobus_Editor {
var $option_key = 'wpglobus_plus_wpglobeditor';
var $opts = array();
function __construct() {
if ( ! empty( $_GET['page'] ) && WPGlobusPlus::WPGLOBUS_PLUS_OPTIONS_PAGE == $_GET['page'] )
{
/**
* Don't run at WPGLOBUS_PLUS_OPTIONS_PAGE page
*/
return;
}
$this->opts = get_option( $this->option_key );
add_filter( 'wpglobus_enabled_pages', array( $this, 'enable_pages' ) );
add_filter( 'admin_print_scripts', array( $this, 'on_admin_scripts' ) );
}
/**
* Enqueue admin scripts
*
* @since 1.1.0
* @return void
*/
public function on_admin_scripts() {
global $pagenow;
$elements = array();
if ( ! empty( $this->opts['page_list'][$pagenow] ) ) {
$elements = $this->opts['page_list'][$pagenow];
} else if ( ! empty($_GET['page']) && ! empty( $this->opts[ 'page_list' ][ $_GET['page'] ] ) ) {
$elements = $this->opts[ 'page_list' ][ $_GET['page'] ];
}
if ( empty( $elements ) ) {
return;
}
/**
* Module WPGlobus Editor
*/
wp_register_script(
'wpglobus-plus-wpglobeditor',
plugin_dir_url( __FILE__ ) . 'js/wpglobus-plus-wpglobeditor' . WPGlobus::SCRIPT_SUFFIX() . ".js",
array( 'jquery', 'wpglobus-admin' ),
WPGLOBUS_PLUS_VERSION,
true
);
wp_enqueue_script( 'wpglobus-plus-wpglobeditor' );
wp_localize_script(
'wpglobus-plus-wpglobeditor',
'WPGlobusPlusEditor',
array(
'version' => WPGLOBUS_PLUS_VERSION,
'mode' => 'ueditor',
'process_ajax' => __CLASS__ . '_process_ajax',
'module' => 'wpglobeditor',
'pagenow' => $pagenow,
'page' => empty( $_GET['page'] ) ? '' : $_GET['page'],
'elements' => $elements
)
);
}
function enable_pages( $pages ) {
if ( ! empty( $this->opts['page_list'] ) ) {
foreach( $this->opts['page_list'] as $page=>$elements ) {
$pages[] = $page;
}
}
return $pages;
}
}
$WPGlobus_Editor = new WPGlobus_Editor();
endif;