54 lines
1.4 KiB
PHP
54 lines
1.4 KiB
PHP
<?php
|
|
|
|
/*-----------------------------------------------------------------------------------*/
|
|
/* BUILD AN ARRAY WITH OPTIONS FOR JQUERY
|
|
/*-----------------------------------------------------------------------------------*/
|
|
|
|
|
|
defined( 'ABSPATH' ) || exit;
|
|
|
|
if ( !class_exists( 'KkGetOptions' ) ) {
|
|
|
|
class KkGetOptions {
|
|
|
|
private static $data_ = array();
|
|
|
|
public static function TplConditions() {
|
|
return self::$data_;
|
|
}
|
|
|
|
public static function init() {
|
|
|
|
// NO RIGHT CLICK
|
|
self::$data_['kk_right_click'] = array(
|
|
'kk_click_check' => get_option('toppic_theme_content_protection')
|
|
);
|
|
|
|
// ANIMATION BETWEEN PAGES
|
|
self::$data_['kk_page_anim'] = get_option('toppic_theme_kk_page_anim');
|
|
|
|
// MENU STYLE
|
|
self::$data_['kk_menu_type'] = get_option( 'toppic_theme_menu_style' );
|
|
|
|
// CONTENT STYLE
|
|
self::$data_['kk_content_type'] = get_option( 'toppic_theme_content_style' );
|
|
|
|
// Ajax Url
|
|
self::$data_['ajax_url'] = esc_url( admin_url( 'admin-ajax.php' ) );
|
|
|
|
// Proofing nonce
|
|
if ( rwmb_meta( 'kk_proof' ) === 'proofing' ) {
|
|
self::$data_['proofing_nonce'] = wp_create_nonce( 'proof-nonce' );
|
|
}
|
|
|
|
// 404 page error
|
|
$error_bg = get_option('toppic_theme_404_image');
|
|
|
|
if ( !empty($error_bg) ) {
|
|
self::$data_['errorImg'] = esc_url( $error_bg );
|
|
}
|
|
|
|
return self::$data_;
|
|
}
|
|
}
|
|
} |