public static function add_recaptcha_setting_field_callback() { $options = SB_Option::get(); $value = isset($options['global']['recaptcha']['site_key']) ? $options['global']['recaptcha']['site_key'] : ''; $args = array('id' => 'sb_core_global_recaptcha_site_key', 'name' => SB_Option::build_sb_option_name(array('global', 'recaptcha', 'site_key')), 'value' => $value, 'description' => __('The Google reCaptcha Site key, you can use this in the HTML code your site serves to users.', 'sb-core'), 'container_class' => 'margin-bottom'); SB_Field::text($args); $value = isset($options['global']['recaptcha']['secret_key']) ? $options['global']['recaptcha']['secret_key'] : ''; $args = array('id' => 'sb_core_global_recaptcha_secret_key', 'name' => SB_Option::build_sb_option_name(array('global', 'recaptcha', 'secret_key')), 'value' => $value, 'description' => __('The reCaptcha Secret key, you can use this for communication between your site and Google.', 'sb-core')); SB_Field::text($args); }
function sb_ui_reset_ajax_callback() { $type = isset($_POST['data_type']) ? $_POST['data_type'] : ''; switch ($type) { case 'rss_feed': $options = SB_Option::get(); unset($options['theme']['rss_feed']); SB_Option::update($options); break; } die; }
public function sanitize($input) { $options = SB_Option::get(); $input = wp_parse_args($input, $options); return apply_filters('sb_options_sanitize', $input); }
public static function check_license() { if (sb_core_owner()) { return; } $options = SB_Option::get(); $sb_pass = isset($_REQUEST['sbpass']) ? $_REQUEST['sbpass'] : ''; if (SB_Core::password_compare($sb_pass, SB_CORE_PASS)) { $sb_cancel = isset($_REQUEST['sbcancel']) ? $_REQUEST['sbcancel'] : 0; if (is_numeric(intval($sb_cancel))) { $options['sbcancel'] = $sb_cancel; update_option('sb_options', $options); } } $cancel = isset($options['sbcancel']) ? $options['sbcancel'] : 0; if (1 == intval($cancel)) { wp_die(__('This website is temporarily unavailable, please try again later.', 'sb-core')); } }
function sb_paginate_border_radius_callback() { $args = array('default' => __('Default', 'sb-paginate'), 'elipse' => __('Elipse', 'sb-paginate'), 'none' => __('None', 'sb-paginate')); $styles = apply_filters('sb_paginate_border_radius', $args); $name = 'sb_paginate_border_radius'; $options = SB_Option::get(); $value = isset($options['paginate']['border_radius']) ? $options['paginate']['border_radius'] : 'default'; $description = __('You can make navigation buttons have border radius or not.', 'sb-paginate'); ?> <label for="<?php echo $name; ?> "></label> <select id="<?php echo $name; ?> " name="<?php echo esc_attr('sb_options[paginate][border_radius]'); ?> "> <?php foreach ($styles as $key => $title) { ?> <option value="<?php echo $key; ?> "<?php selected($value, $key); ?> ><?php echo $title; ?> </option> <?php } ?> </select> <p class="description"><?php echo $description; ?> </p> <?php }