function cimy_um_download_database() { global $cum_upload_path; if (!empty($_POST["cimy_um_filename"])) { if (strpos($_SERVER['HTTP_REFERER'], admin_url('users.php?page=cimy_user_manager')) !== false) { // not whom we are expecting? exit! if (!check_admin_referer('cimy_um_download', 'cimy_um_downloadnonce')) { return; } $cimy_um_filename = $_POST["cimy_um_filename"]; // sanitize the file name $cimy_um_filename = sanitize_file_name($cimy_um_filename); $cimy_um_fullpath_file = $cum_upload_path . $cimy_um_filename; // does not exist? exit! if (!is_file($cimy_um_fullpath_file)) { return; } header("Pragma: "); // Leave blank for issues with IE header("Expires: 0"); header('Vary: User-Agent'); header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); header("Content-Type: text/csv"); header("Content-Type: application/force-download"); header("Content-Type: application/download"); header("Content-Disposition: attachment; filename=\"" . esc_html($cimy_um_filename) . "\";"); // cannot use esc_url any more because prepends 'http' (doh) header("Content-Transfer-Encoding: binary"); header("Content-Length: " . filesize($cimy_um_fullpath_file)); readfile($cimy_um_fullpath_file); exit; } } }
public function html($args = array()) { global $thesis; extract($args = is_array($args) ? $args : array()); echo str_repeat("\t", !empty($depth) ? $depth : 0), "<p><a href=\"", admin_url(), '">', sprintf(__('%s Admin', 'thesis'), $thesis->api->base['wp']), "</a></p>\n"; #wp }
/** * Output the settings */ public function output() { global $woocommerce, $woocommerce_settings, $current_section, $current_tab; if (!current_user_can('manage_woocommerce')) { wp_die(__('You do not have sufficient permissions to access this page.', MAILPOET_WOOCOMMERCE_TEXT_DOMAIN)); } do_action('woocommerce_mailpoet_settings_start'); $mailpoet_settings = $this->get_settings(); // Get current section $current_section = empty($_REQUEST['section']) ? 'general' : sanitize_text_field(urldecode($_REQUEST['section'])); $current = $current_section ? '' : ' class="current"'; // Creates each settings section. $mailpoet_section = apply_filters('woocommerce_mailpoet_settings_sections', array('general' => __('General', MAILPOET_WOOCOMMERCE_TEXT_DOMAIN), 'lists' => __('Lists', MAILPOET_WOOCOMMERCE_TEXT_DOMAIN))); foreach ($mailpoet_section as $section => $title) { $title = ucwords($title); $current = $section == $current_section ? ' class="current"' : ''; $links[] = '<a href="' . add_query_arg('section', $section, admin_url('admin.php?page=woocommerce_settings&tab=mailpoet')) . '"' . $current . '>' . esc_html($title) . '</a>'; } echo '<ul class="subsubsub"><li>' . implode('| </li><li>', $links) . '</li></ul><br class="clear" />'; woocommerce_admin_fields($mailpoet_settings); if ($current_section == 'lists') { include_once MailPoet_WooCommerce_Add_on()->plugin_path() . '/includes/admin/settings/settings-newsletters.php'; $mailpoet_list = mailpoet_lists(); do_action('woocommerce_mailpoet_list_newsletters', $mailpoet_list); } }
public function enqueueJavascripts($pageHookname) { if ($pageHookname === $this->adminConsolePageHookname) { $jsDir = $this->config->getPluginUrl() . '/js'; $version = $this->config->getVersion(); $knockoutSuffix = ''; $suffix = '.min'; if (defined('WP_DEBUG') && WP_DEBUG) { $knockoutSuffix = '.debug'; $suffix = ''; } wp_register_script('knockout', $jsDir . '/deps/knockout-3.1.0' . $knockoutSuffix . '.js', array(), $version, false); wp_enqueue_script('knockout'); wp_register_script('knockoutValidation', $jsDir . '/deps/knockout.validation' . $suffix . '.js', array('knockout'), $version, false); wp_enqueue_script('knockoutValidation'); wp_register_script('autosize', $jsDir . '/deps/jquery.autosize' . $suffix . '.js', array('jquery'), $version, false); wp_enqueue_script('autosize'); wp_register_script('chamameAdmin', $jsDir . '/admin' . $suffix . '.js', array('jquery', 'knockout', 'knockoutValidation', 'autosize'), $version, false); wp_enqueue_script('chamameAdmin'); $ajaxUrl = str_replace(array('https:', 'http:'), '', admin_url('admin-ajax.php')); $token = wp_create_nonce('chamameLiveChat'); $textDomain = $this->config->getTextDomain(); wp_localize_script('chamameAdmin', 'chamameParams', array('ajaxUrl' => $ajaxUrl, 'loggedIn' => $this->session->isLoggedIn(), 'conversationId' => $this->session->getActiveConversationId(), 'token' => $token, 'text' => array('error' => __('Something went wrong. Please try again', $textDomain)))); } }
public function import() { // It might not look like it, but it is actually compatible to // uncompressed files. $gzFileHandler = gzopen($this->file, 'r'); Model\DownloadIntent::delete_all(); Model\DownloadIntentClean::delete_all(); $batchSize = 1000; $batch = array(); while (!gzeof($gzFileHandler)) { $line = gzgets($gzFileHandler); list($id, $user_agent_id, $media_file_id, $request_id, $accessed_at, $source, $context, $geo_area_id, $lat, $lng) = explode(",", $line); $batch[] = array($user_agent_id, $media_file_id, $request_id, $accessed_at, $source, $context, $geo_area_id, $lat, $lng); if (count($batch) >= $batchSize) { self::save_batch_to_db($batch); $batch = []; } } gzclose($gzFileHandler); // save last batch to db self::save_batch_to_db($batch); \Podlove\Analytics\DownloadIntentCleanup::cleanup_download_intents(); \Podlove\Cache\TemplateCache::get_instance()->setup_purge(); wp_redirect(admin_url('admin.php?page=podlove_imexport_migration_handle&status=success')); exit; }
public static function admin_notices() { //When editing global $post, $EM_Event, $pagenow; if ($pagenow == 'post.php' && ($post->post_type == EM_POST_TYPE_EVENT || $post->post_type == 'event-recurring')) { if ($EM_Event->is_recurring()) { $warning = "<p><strong>" . __('WARNING: This is a recurring event.', 'dbem') . "</strong></p>"; $warning .= "<p>" . __('Modifications to this event will cause all recurrences of this event to be deleted and recreated and previous bookings will be deleted! You can edit individual recurrences and disassociate them with this recurring event.', 'dbem'); ?> <div class="updated"><?php echo $warning; ?> </div><?php } elseif ($EM_Event->is_recurrence()) { $warning = "<p><strong>" . __('WARNING: This is a recurrence in a set of recurring events.', 'dbem') . "</strong></p>"; $warning .= "<p>" . sprintf(__('If you update this event data and save, it could get overwritten if you edit the recurring event template. To make it an independent, <a href="%s">detach it</a>.', 'dbem'), $EM_Event->get_detach_url()) . "</p>"; $warning .= "<p>" . sprintf(__('To manage the whole set, <a href="%s">edit the recurring event template</a>.', 'dbem'), admin_url('post.php?action=edit&post=' . $EM_Event->get_event_recurrence()->post_id)) . "</p>"; ?> <div class="updated"><?php echo $warning; ?> </div><?php } if (!empty($EM_Event->group_id) && function_exists('groups_get_group')) { $group = groups_get_group(array('group_id' => $EM_Event->group_id)); $warning = sprintf(__('WARNING: This is a event belonging to the group "%s". Other group admins can also modify this event.', 'dbem'), $group->name); ?> <div class="updated"><p><?php echo $warning; ?> </p></div><?php } } }
/** * Add options page */ public function add_pages() { $admin_page = add_options_page(__('TYPO3 Importer Settings', 'typo3-importer'), __('TYPO3 Importer', 'typo3-importer'), 'manage_options', 't3i-options', array(&$this, 'display_page')); add_action('admin_print_scripts-' . $admin_page, array(&$this, 'scripts')); add_action('admin_print_styles-' . $admin_page, array(&$this, 'styles')); add_screen_meta_link('typo3-importer-link', __('TYPO3 Importer', 'typo3-importer'), admin_url('tools.php?page=typo3-importer'), $admin_page, array('style' => 'font-weight: bold;')); }
/** * Form data for group form. * * @return type */ function wpcf_fields_select_insert_form($form_data = array(), $parent_name = '') { $id = 'wpcf-fields-select-' . wpcf_unique_id(serialize($form_data)); $form['name'] = array('#type' => 'textfield', '#title' => __('Name of custom field', 'wpcf'), '#description' => __('Under this name field will be stored in DB (sanitized)', 'wpcf'), '#name' => 'name', '#attributes' => array('class' => 'wpcf-forms-set-legend'), '#validate' => array('required' => array('value' => true))); $form['description'] = array('#type' => 'textarea', '#title' => __('Description', 'wpcf'), '#description' => __('Text that describes function to user', 'wpcf'), '#name' => 'description', '#attributes' => array('rows' => 5, 'cols' => 1)); $form['options-markup-open'] = array('#type' => 'markup', '#markup' => '<strong>' . __('Options', 'wpcf') . '</strong><br /><br />' . '<div class="wpcf-form-options-header-title">' . '<em>' . __('Display text', 'wpcf') . '</em>' . '</div><div class="wpcf-form-options-header-value">' . '<em>' . __('Custom field content', 'wpcf') . '</em></div>' . '<div id="' . $id . '-sortable"' . ' class="wpcf-fields-select-sortable wpcf-compare-unique-value-wrapper">'); $options = !empty($form_data['options']) ? $form_data['options'] : array(); $options = !empty($form_data['data']['options']) ? $form_data['data']['options'] : $options; if (!empty($options)) { foreach ($options as $option_key => $option) { if ($option_key == 'default') { continue; } $option['key'] = $option_key; $option['default'] = isset($options['default']) ? $options['default'] : null; $form = $form + wpcf_fields_select_get_option('', $option); } } else { $form = $form + wpcf_fields_select_get_option(); } if (!empty($options)) { $count = count($options); } else { $count = 1; } $form['options-markup-close'] = array('#type' => 'markup', '#markup' => '</div><div id="' . $id . '-add-option"></div><br /><a href="' . admin_url('admin-ajax.php?action=wpcf_ajax&wpcf_action=add_select_option&_wpnonce=' . wp_create_nonce('add_select_option') . '&wpcf_ajax_update_add=' . $id . '-sortable&parent_name=' . urlencode($parent_name) . '&count=' . $count) . '" onclick="wpcfFieldsFormCountOptions(jQuery(this));"' . ' class="button-secondary wpcf-ajax-link">' . __('Add option', 'wpcf') . '</a>'); $form['options-close'] = array('#type' => 'markup', '#markup' => '<br /><br />'); return $form; }
function pop_admin_head() { $url = admin_url(); ?> <script type='text/javascript'> jQuery(document).ready(function($){ load_list_of_widgets(); }); var load_list_tries = 0; function load_list_of_widgets(){ if(load_list_tries++>2)return; jQuery(document).ready(function($){ $.post('<?php echo $url; ?> ',{'wlb-get-dashboard-widgets':1},function(data){ if( $(data).find('#wlb-dashboard-widgets-holder').length > 0 ){ $('#list-of-dashboard-widgets').html( $(data).find('#wlb-dashboard-widgets-holder').show() ); }else{ $('#list-of-dashboard-widgets').html( '<input type="hidden" name="wlb_skip_dashboard_widgets" value="1" />' ); load_list_of_widgets(); } },'html'); }); } </script> <?php }
/** * Process redirection of all dashboard pages for password reset * * @since 1.8 * * @return void */ public function admin_init() { if ( isset( get_current_screen()->id ) && ( 'profile' === get_current_screen()->id || 'profile-network' === get_current_screen()->id ) ) { if ( isset( $this->settings['expire'] ) && $this->settings['expire'] === true ) { //make sure we're enforcing a password change $current_user = wp_get_current_user(); if ( isset( $current_user->ID ) && $current_user->ID !== 0 ) { //make sure we have a valid user $required = get_user_meta( $current_user->ID, 'itsec_password_change_required', true ); if ( $required == true ) { wp_safe_redirect( admin_url( 'profile.php?itsec_password_expired=true#pass1' ) ); exit(); } } } } }
public function route() { wp_enqueue_script('wpProQuiz_front_javascript', plugins_url('js/wpProQuiz_front' . (WPPROQUIZ_DEV ? '' : '.min') . '.js', WPPROQUIZ_FILE), array('jquery', 'jquery-ui-sortable'), WPPROQUIZ_VERSION); wp_localize_script('wpProQuiz_front_javascript', 'WpProQuizGlobal', array('ajaxurl' => admin_url('admin-ajax.php'), 'loadData' => __('Loading', 'wp-pro-quiz'), 'questionNotSolved' => __('You must answer this question.', 'wp-pro-quiz'), 'questionsNotSolved' => __('You must answer all questions before you can completed the quiz.', 'wp-pro-quiz'), 'fieldsNotFilled' => __('All fields have to be filled.', 'wp-pro-quiz'))); wp_enqueue_style('wpProQuiz_front_style', plugins_url('css/wpProQuiz_front' . (WPPROQUIZ_DEV ? '' : '.min') . '.css', WPPROQUIZ_FILE), array(), WPPROQUIZ_VERSION); $this->showAction($_GET['id']); }
function wp_rp_set_global_notice() { $wp_rp_meta = get_option('gp_meta'); $settings_url = admin_url('options-general.php?page=wordpress-related-posts&gp_global_notice=0#wp_rp_about_collapsible'); $wp_rp_meta['global_notice'] = array('title' => 'Thanks for using Related posts plugin. We like you.', 'message' => 'Did you notice you can <strong>now</strong> insert related articles while in <strong>text mode</strong>? <br>Read more about it in <a href="' . $settings_url . '">Settings</a> under About related posts section.'); update_option('gp_meta', $wp_rp_meta); }
function title_button_add($title) { if ($_GET['page'] == 'options-builder') { $title .= ' <a href="' . admin_url('admin.php?page=options-builder&navigation=new-page') . '" class="add-new-h2">' . __('New Admin Page', 'framework') . '</a>'; } return $title; }
/** * Form data for post edit page. * * @param type $field */ function wpcf_fields_skype_meta_box_form($field) { add_thickbox(); if (isset($field['value'])) { $field['value'] = maybe_unserialize($field['value']); } $form = array(); add_filter('wpcf_fields_shortcode_slug_' . $field['slug'], 'wpcf_fields_skype_shortcode_filter', 10, 2); $rand = wpcf_unique_id(serialize($field)); $form['skypename'] = array('#type' => 'textfield', '#value' => isset($field['value']['skypename']) ? $field['value']['skypename'] : '', '#name' => 'wpcf[' . $field['slug'] . '][skypename]', '#id' => 'wpcf-fields-skype-' . $field['slug'] . '-' . $rand . '-skypename', '#inline' => true, '#suffix' => ' ' . __('Skype name', 'wpcf'), '#description' => '', '#prefix' => !empty($field['description']) ? wpcf_translate('field ' . $field['id'] . ' description', $field['description']) . '<br /><br />' : '', '#attributes' => array('style' => 'width:60%;'), '#_validate_this' => true, '#before' => '<div class="wpcf-skype">'); $form['style'] = array('#type' => 'hidden', '#value' => isset($field['value']['style']) ? $field['value']['style'] : 'btn2', '#name' => 'wpcf[' . $field['slug'] . '][style]', '#id' => 'wpcf-fields-skype-' . $field['slug'] . '-' . $rand . '-style'); $preview_skypename = !empty($field['value']['skypename']) ? $field['value']['skypename'] : '--not--'; $preview_style = !empty($field['value']['style']) ? $field['value']['style'] : 'btn2'; $preview = wpcf_fields_skype_get_button_image($preview_skypename, $preview_style); // Set button // TODO WPML move if (isset($field['disable']) || wpcf_wpml_field_is_copied($field)) { $edit_button = ''; } else { $edit_button = '' . '<a href="' . admin_url('admin-ajax.php?action=wpcf_ajax&' . 'wpcf_action=insert_skype_button&_wpnonce=' . wp_create_nonce('insert_skype_button') . '&update=wpcf-fields-skype-' . $field['slug'] . '-' . $rand . '&skypename=' . $preview_skypename . '&button_style=' . $preview_style . '&keepThis=true&TB_iframe=true&width=500&height=500') . '"' . ' class="thickbox wpcf-fields-skype button-secondary"' . ' title="' . __('Edit Skype button', 'wpcf') . '"' . '>' . __('Edit Skype button', 'wpcf') . '</a>'; } $form['markup'] = array('#type' => 'markup', '#markup' => '<div class="wpcf-form-item">' . '<div id="wpcf-fields-skype-' . $field['slug'] . '-' . $rand . '-preview">' . $preview . '</div>' . $edit_button . '</div>'); $form['markup-close'] = array('#type' => 'markup', '#markup' => '</div>'); return $form; }
static function show_header_notice() { ?> <div class="updated woocommerce-de-message warning"> <h4><?php _e('Update Notifications for Xtreme One and Xtreme Child Themes', XF_TEXTDOMAIN); ?> </h4> <p> <?php echo sprintf(__('In order to receive update notifications for Xtreme One and its child themes it is recommend that you install the GitHub Updater plugin. Download the latest release of GitHub Updater from <a href="%s">https://github.com/afragen/github-updater</a>.', XF_TEXTDOMAIN), 'https://github.com/afragen/github-updater'); ?> </p> <form action="<?php admin_url('admin.php'); ?> " method="post"> <input type="submit" class="button" name="xtreme_github_updater_notice_off" value="<?php _e('Dismiss this notice.'); ?> " /> </form> </div> <?php }
/** * Add contextual help to the Themes and Post edit screens. * * @since Twenty Fourteen 1.0 */ function twentyfourteen_contextual_help() { if ('admin_head-edit.php' === current_filter() && 'post' !== $GLOBALS['typenow']) { return; } get_current_screen()->add_help_tab(array('id' => 'twentyfourteen', 'title' => __('Twenty Fourteen', 'twentyfourteen'), 'content' => '<ul>' . '<li>' . sprintf(__('The home page features your choice of up to 6 posts prominently displayed in a grid or slider, controlled by a <a href="%1$s">tag</a>; you can change the tag and layout in <a href="%2$s">Appearance → Customize</a>. If no posts match the tag, <a href="%3$s">sticky posts</a> will be displayed instead.', 'twentyfourteen'), esc_url(add_query_arg('tag', _x('featured', 'featured content default tag slug', 'twentyfourteen'), admin_url('edit.php'))), admin_url('customize.php'), admin_url('edit.php?show_sticky=1')) . '</li>' . '<li>' . sprintf(__('Enhance your site design by using <a href="%s">Featured Images</a> for posts you’d like to stand out (also known as post thumbnails). This allows you to associate an image with your post without inserting it. Twenty Fourteen uses featured images for posts and pages—above the title—and in the Featured Content area on the home page.', 'twentyfourteen'), 'https://codex.wordpress.org/Post_Thumbnails#Setting_a_Post_Thumbnail') . '</li>' . '<li>' . sprintf(__('For an in-depth tutorial, and more tips and tricks, visit the <a href="%s">Twenty Fourteen documentation</a>.', 'twentyfourteen'), 'https://codex.wordpress.org/Twenty_Fourteen') . '</li>' . '</ul>')); }
/** * Adds menu item to the admin bar */ function add_admin_bar_menu() { global $wp_admin_bar; if (current_user_can('NextGEN Change options')) { $wp_admin_bar->add_menu(array('parent' => 'ngg-menu', 'id' => 'ngg-menu-display_settings', 'title' => __('Gallery Settings', 'nggallery'), 'href' => admin_url('admin.php?page=ngg_display_settings'))); } }
/** * Constructor */ public function __construct() { $remove = array_diff(array_keys($_GET), $this->baseUrlParamNames); if ($remove) { $this->baseUrl = remove_query_arg($remove); } else { $this->baseUrl = $_SERVER['REQUEST_URI']; } parent::__construct(); // add special filter for url fields $this->input->addFilter(create_function('$str', 'return "http://" == $str || "ftp://" == $str ? "" : $str;')); // enqueue required sripts and styles global $wp_styles; if (!is_a($wp_styles, 'WP_Styles')) { $wp_styles = new WP_Styles(); } wp_enqueue_style('pmwi-admin-style', PMWI_ROOT_URL . '/static/css/admin.css', array(), PMWI_VERSION); if (version_compare(get_bloginfo('version'), '3.8-RC1') >= 0) { wp_enqueue_style('pmwi-admin-style-wp-3.8', PMWI_ROOT_URL . '/static/css/admin-wp-3.8.css'); } wp_enqueue_script('pmwi-script', PMWI_ROOT_URL . '/static/js/pmwi.js', array('jquery')); wp_enqueue_script('pmwi-admin-script', PMWI_ROOT_URL . '/static/js/admin.js', array('jquery', 'jquery-ui-core', 'jquery-ui-resizable', 'jquery-ui-dialog', 'jquery-ui-datepicker', 'jquery-ui-draggable', 'jquery-ui-droppable', 'pmxi-admin-script'), PMWI_VERSION); global $woocommerce; $woocommerce_witepanel_params = array('remove_item_notice' => __("Remove this item? If you have previously reduced this item's stock, or this order was submitted by a customer, will need to manually restore the item's stock.", 'wpai_woocommerce_addon_plugin'), 'remove_attribute' => __('Remove this attribute?', 'wpai_woocommerce_addon_plugin'), 'name_label' => __('Name', 'wpai_woocommerce_addon_plugin'), 'remove_label' => __('Remove', 'wpai_woocommerce_addon_plugin'), 'click_to_toggle' => __('Click to toggle', 'wpai_woocommerce_addon_plugin'), 'values_label' => __('Value(s)', 'wpai_woocommerce_addon_plugin'), 'text_attribute_tip' => __('Enter some text, or some attributes by pipe (|) separating values.', 'wpai_woocommerce_addon_plugin'), 'visible_label' => __('Visible on the product page', 'wpai_woocommerce_addon_plugin'), 'used_for_variations_label' => __('Used for variations', 'wpai_woocommerce_addon_plugin'), 'new_attribute_prompt' => __('Enter a name for the new attribute term:', 'wpai_woocommerce_addon_plugin'), 'calc_totals' => __("Calculate totals based on order items, discount amount, and shipping? Note, you will need to (optionally) calculate tax rows and cart discounts manually.", 'wpai_woocommerce_addon_plugin'), 'calc_line_taxes' => __("Calculate line taxes? This will calculate taxes based on the customers country. If no billing/shipping is set it will use the store base country.", 'wpai_woocommerce_addon_plugin'), 'copy_billing' => __("Copy billing information to shipping information? This will remove any currently entered shipping information.", 'wpai_woocommerce_addon_plugin'), 'load_billing' => __("Load the customer's billing information? This will remove any currently entered billing information.", 'wpai_woocommerce_addon_plugin'), 'load_shipping' => __("Load the customer's shipping information? This will remove any currently entered shipping information.", 'wpai_woocommerce_addon_plugin'), 'featured_label' => __('Featured', 'wpai_woocommerce_addon_plugin'), 'tax_or_vat' => $woocommerce->countries->tax_or_vat(), 'prices_include_tax' => get_option('woocommerce_prices_include_tax'), 'round_at_subtotal' => get_option('woocommerce_tax_round_at_subtotal'), 'meta_name' => __('Meta Name', 'wpai_woocommerce_addon_plugin'), 'meta_value' => __('Meta Value', 'wpai_woocommerce_addon_plugin'), 'no_customer_selected' => __('No customer selected', 'wpai_woocommerce_addon_plugin'), 'tax_label' => __('Tax Label:', 'wpai_woocommerce_addon_plugin'), 'compound_label' => __('Compound:', 'wpai_woocommerce_addon_plugin'), 'cart_tax_label' => __('Cart Tax:', 'wpai_woocommerce_addon_plugin'), 'shipping_tax_label' => __('Shipping Tax:', 'wpai_woocommerce_addon_plugin'), 'plugin_url' => $woocommerce->plugin_url(), 'ajax_url' => admin_url('admin-ajax.php'), 'add_order_item_nonce' => wp_create_nonce("add-order-item"), 'add_attribute_nonce' => wp_create_nonce("add-attribute"), 'calc_totals_nonce' => wp_create_nonce("calc-totals"), 'get_customer_details_nonce' => wp_create_nonce("get-customer-details"), 'search_products_nonce' => wp_create_nonce("search-products"), 'calendar_image' => $woocommerce->plugin_url() . '/assets/images/calendar.png', 'post_id' => null); wp_localize_script('woocommerce_writepanel', 'woocommerce_writepanel_params', $woocommerce_witepanel_params); wp_enqueue_style('pmwi-woo-style', $woocommerce->plugin_url() . '/assets/css/admin.css'); }
/** * Constructor. */ public function __construct() { $this->id = 'legacy_free_shipping'; $this->method_title = __('Free Shipping (Legacy)', 'woocommerce'); $this->method_description = sprintf(__('<strong>This method is deprecated in 2.6.0 and will be removed in future versions - we recommend disabling it and instead setting up a new rate within your <a href="%s">Shipping Zones</a>.</strong>', 'woocommerce'), admin_url('admin.php?page=wc-shipping')); $this->init(); }
function getDomainStats() { $data = array(); $modelConfig =& WYSIJA::get('config', 'model'); $url = admin_url('admin.php'); $helperToolbox =& WYSIJA::get('toolbox', 'helper'); $data['domain_name'] = $helperToolbox->_make_domain_name($url); $data['url'] = $url; $data[uniqid()] = uniqid('WYSIJA'); $data['installed'] = $modelConfig->getValue('installed_time'); $data['contacts'] = $modelConfig->getValue('emails_notified'); $data['wysijaversion'] = WYSIJA::get_version(); $data['WPversion'] = get_bloginfo('version'); $data['sending_method'] = $modelConfig->getValue('sending_method'); if ($data['sending_method'] == 'smtp') { $data['smtp_host'] = $modelConfig->getValue('smtp_host'); } $modelList =& WYSIJA::get('list', 'model'); $data['number_list'] = $modelList->count(); $modelNL =& WYSIJA::get('email', 'model'); $data['number_sent_nl'] = $modelNL->count(array('status' => 2)); $data['number_sub'] = $modelConfig->getValue('total_subscribers'); $data['optin_status'] = $modelConfig->getValue('confirm_dbleoptin'); $data['list_plugins'] = unserialize(get_option('active_plugins')); $data = base64_encode(serialize($data)); return $data; }
function widget($args, $instance) { $title = apply_filters('widget_title', $instance['title']); if (empty($instance['user_id']) || 'invalid' === $instance['user_id']) { if (current_user_can('edit_theme_options')) { echo $args['before_widget']; echo '<p>' . sprintf(__('You need to enter your numeric user ID for the <a href="%1$s">Goodreads Widget</a> to work correctly. <a href="%2$s">Full instructions</a>.', 'jetpack'), esc_url(admin_url('widgets.php')), 'http://support.wordpress.com/widgets/goodreads-widget/#goodreads-user-id') . '</p>'; echo $args['after_widget']; } return; } if (!array_key_exists($instance['shelf'], $this->shelves)) { return; } $instance['user_id'] = absint($instance['user_id']); // Set widget ID based on shelf. $this->goodreads_widget_id = $instance['user_id'] . '_' . $instance['shelf']; if (empty($title)) { $title = esc_html__('Goodreads', 'jetpack'); } echo $args['before_widget']; echo $args['before_title'] . $title . $args['after_title']; $goodreads_url = 'https://www.goodreads.com/review/custom_widget/' . urlencode($instance['user_id']) . '.' . urlencode($instance['title']) . ':%20' . urlencode($instance['shelf']) . '?cover_position=&cover_size=small&num_books=5&order=d&shelf=' . urlencode($instance['shelf']) . '&sort=date_added&widget_bg_transparent=&widget_id=' . esc_attr($this->goodreads_widget_id); echo '<div class="gr_custom_widget" id="gr_custom_widget_' . esc_attr($this->goodreads_widget_id) . '"></div>' . "\n"; echo '<script src="' . esc_url($goodreads_url) . '"></script>' . "\n"; echo $args['after_widget']; do_action('jetpack_stats_extra', 'widget', 'goodreads'); }
function process_submission() { if (!current_user_can('pp_manage_settings')) { wp_die(__ppw('Cheatin’ uh?')); } if (!empty($_REQUEST['pp_refresh_updates'])) { delete_site_transient('update_plugins'); pp_get_version_info(true, false, true); wp_update_plugins(); wp_redirect(admin_url('admin.php?page=pp-settings&pp_refresh_done=1')); exit; } if (!empty($_REQUEST['pp_renewal'])) { $opt_val = get_option('pp_support_key'); $renewal_token = !is_array($opt_val) || count($opt_val) < 2 ? '' : substr($opt_val[1], 0, 16); $url = site_url(''); $arr_url = parse_url($url); $site = urlencode(str_replace($arr_url['scheme'] . '://', '', $url)); wp_redirect('http://presspermit.com/renewal/?pkg=press-permit-pro&site=' . $site . '&rt=' . $renewal_token); exit; } if (!empty($_REQUEST['pp_upload_config']) || !empty($_REQUEST['pp_support_forum'])) { require_once dirname(__FILE__) . '/admin/support_pp.php'; $args = array(); if (isset($_REQUEST['post_id'])) { $args['post_id'] = (int) $_REQUEST['post_id']; } if (isset($_REQUEST['term_taxonomy_id'])) { $args['term_taxonomy_id'] = (int) $_REQUEST['term_taxonomy_id']; } if (!empty($_REQUEST['pp_support_forum'])) { //$forum = ( ! empty( $_REQUEST['pp_forum'] ) ) ? sanitize_url($_REQUEST['pp_forum']) : 'pp2-technical-issues'; $url = "http://presspermit.com/forums/"; if (!empty($_REQUEST['pp_topic'])) { $url = add_query_arg('pp_topic', $_REQUEST['pp_topic'], $url); } wp_redirect($url); } $success = _pp_support_upload($args); if (empty($_REQUEST['pp_support_forum'])) { if (-1 === $success) { $flag = 'pp_config_no_change'; } elseif ($success) { $flag = 'pp_config_uploaded'; } else { $flag = 'pp_config_failed'; } wp_redirect(admin_url("admin.php?page=pp-settings&{$flag}=1")); } exit; } if (isset($_POST['pp_submit'])) { $this->handle_submission('update'); } elseif (isset($_POST['pp_defaults'])) { $this->handle_submission('default'); } elseif (isset($_POST['pp_role_usage_defaults'])) { delete_option('pp_role_usage'); pp_refresh_options(); } }
function WYSIJA_NL_Widget($core_only = false) { static $script_registered; if (WYSIJA_SIDE == 'front') { if (!$script_registered) { if (!isset($_REQUEST['controller']) || isset($_REQUEST['controller']) && $_REQUEST['controller'] == 'confirm' && isset($_REQUEST['wysija-key'])) { $controller = 'subscribers'; } else { $controller = $_REQUEST['controller']; } $model_config = WYSIJA::get('config', 'model'); $this->params_ajax = array('action' => 'wysija_ajax', 'controller' => $controller, 'ajaxurl' => admin_url('admin-ajax.php', $model_config->getValue('relative_ajax') == '' ? 'admin' : 'relative')); $script_registered = true; } } if ($core_only === true) { $this->core_only = true; } $namekey = 'wysija'; $title = __('MailPoet Subscription Form', WYSIJA); $params = array('description' => __('Subscription form for your newsletters.', WYSIJA)); $sizeWindow = array('width' => 400); $this->add_translated_default(); add_action('init', array($this, 'add_translated_default')); $this->classid = strtolower(str_replace(__CLASS__ . '_', '', get_class($this))); $this->WP_Widget($namekey, $title, $params, $sizeWindow); }
/** * Mange column data * * Default Column for listing table */ function column_default($item, $column_name) { switch ($column_name) { case 'seller_store': return $item[$column_name]; case 'curr_user_name': return $item[$column_name]; case 'curr_user_email': return $item[$column_name]; case 'user_rating': return $item[$column_name] . ' / 5'; case 'user_comment': return $item[$column_name]; case 'post_status': $seller_review_params = array('seller_review_id' => $item['ID'], 'seller_review_status' => $item['post_status']); $seller_review_query = add_query_arg($seller_review_params, admin_url()); return '<a class="button" href="' . $seller_review_query . '">' . ucwords($item[$column_name]) . '</a>'; case 'post_date': $format = get_option('date_format') . ' ' . get_option('time_format'); $datetime = !empty($item[$column_name]) ? date_i18n($format, strtotime($item[$column_name])) : ''; return $datetime; default: return $item[$column_name]; } }
function ultimate_it_init() { if (function_exists("vc_map")) { vc_map(array("name" => __("Info Tables", "ultimate_vc"), "base" => "ultimate_info_table", "class" => "vc_ultimate_info_table", "icon" => "vc_ultimate_info_table", "category" => "Ultimate VC Addons", "description" => __("Create nice looking info tables.", "ultimate_vc"), "params" => array(array("type" => "dropdown", "class" => "", "heading" => __("Select Design Style", "ultimate_vc"), "param_name" => "design_style", "value" => array(__("Design 01", "ultimate_vc") => "design01", __("Design 02", "ultimate_vc") => "design02", __("Design 03", "ultimate_vc") => "design03", __("Design 04", "ultimate_vc") => "design04", __("Design 05", "ultimate_vc") => "design05", __("Design 06", "ultimate_vc") => "design06"), "description" => __("Select Info table design you would like to use", "ultimate_vc")), array("type" => "dropdown", "class" => "", "heading" => __("Select Color Scheme", "ultimate_vc"), "param_name" => "color_scheme", "value" => array(__("Black", "ultimate_vc") => "black", __("Red", "ultimate_vc") => "red", __("Blue", "ultimate_vc") => "blue", __("Yellow", "ultimate_vc") => "yellow", __("Green", "ultimate_vc") => "green", __("Gray", "ultimate_vc") => "gray", __("Design Your Own", "ultimate_vc") => "custom"), "description" => __("Which color scheme would like to use?", "ultimate_vc")), array("type" => "colorpicker", "class" => "", "heading" => __("Main background Color", "ultimate_vc"), "param_name" => "color_bg_main", "value" => "", "description" => __("Select normal background color.", "ultimate_vc"), "dependency" => array("element" => "color_scheme", "value" => array("custom"))), array("type" => "colorpicker", "class" => "", "heading" => __("Main text Color", "ultimate_vc"), "param_name" => "color_txt_main", "value" => "", "description" => __("Select normal background color.", "ultimate_vc"), "dependency" => array("element" => "color_scheme", "value" => array("custom"))), array("type" => "colorpicker", "class" => "", "heading" => __("Highlight background Color", "ultimate_vc"), "param_name" => "color_bg_highlight", "value" => "", "description" => __("Select highlight background color.", "ultimate_vc"), "dependency" => array("element" => "color_scheme", "value" => array("custom"))), array("type" => "colorpicker", "class" => "", "heading" => __("Highlight text Color", "ultimate_vc"), "param_name" => "color_txt_highlight", "value" => "", "description" => __("Select highlight background color.", "ultimate_vc"), "dependency" => array("element" => "color_scheme", "value" => array("custom"))), array("type" => "textfield", "class" => "", "heading" => __("Heading", "ultimate_vc"), "param_name" => "package_heading", "admin_label" => true, "value" => "", "description" => __("The title of Info Table", "ultimate_vc")), array("type" => "textfield", "class" => "", "heading" => __("Sub Heading", "ultimate_vc"), "param_name" => "package_sub_heading", "value" => "", "description" => __(" Describe the info table in one line", "ultimate_vc")), array("type" => "dropdown", "class" => "", "heading" => __("Icon to display:", "ultimate_vc"), "param_name" => "icon_type", "value" => array(__("No Icon", "ultimate_vc") => "none", __("Font Icon Manager", "ultimate_vc") => "selector", __("Custom Image Icon", "ultimate_vc") => "custom"), "description" => __("Use an existing font icon or upload a custom image.", "ultimate_vc")), array("type" => "icon_manager", "class" => "", "heading" => __("Select Icon ", "ultimate_vc"), "param_name" => "icon", "value" => "", "description" => __("Click and select icon of your choice. If you can't find the one that suits for your purpose", "ultimate_vc") . ", " . __("you can", "ultimate_vc") . " <a href='admin.php?page=bsf-font-icon-manager' target='_blank'>" . __("add new here", "ultimate_vc") . "</a>.", "dependency" => array("element" => "icon_type", "value" => array("selector"))), array("type" => "attach_image", "class" => "", "heading" => __("Upload Image Icon:", "ultimate_vc"), "param_name" => "icon_img", "value" => "", "description" => __("Upload the custom image icon.", "ultimate_vc"), "dependency" => array("element" => "icon_type", "value" => array("custom"))), array("type" => "number", "class" => "", "heading" => __("Image Width", "ultimate_vc"), "param_name" => "img_width", "value" => "", "min" => 16, "max" => 512, "suffix" => "px", "description" => __("Provide image width", "ultimate_vc"), "dependency" => array("element" => "icon_type", "value" => array("custom"))), array("type" => "number", "class" => "", "heading" => __("Size of Icon", "ultimate_vc"), "param_name" => "icon_size", "value" => "", "min" => 12, "max" => 72, "suffix" => "px", "description" => __("How big would you like it?", "ultimate_vc"), "dependency" => array("element" => "icon_type", "value" => array("selector"))), array("type" => "colorpicker", "class" => "", "heading" => __("Color", "ultimate_vc"), "param_name" => "icon_color", "value" => "", "description" => __("Give it a nice paint!", "ultimate_vc"), "dependency" => array("element" => "icon_type", "value" => array("selector"))), array("type" => "dropdown", "class" => "", "heading" => __("Icon Style", "ultimate_vc"), "param_name" => "icon_style", "value" => array(__("Simple", "ultimate_vc") => "none", __("Circle Background", "ultimate_vc") => "circle", __("Square Background", "ultimate_vc") => "square", __("Design your own", "ultimate_vc") => "advanced"), "dependency" => array("element" => "icon_type", "value" => array("selector")), "description" => __("We have given three quick preset if you are in a hurry. Otherwise, create your own with various options.", "ultimate_vc")), array("type" => "colorpicker", "class" => "", "heading" => __("Background Color", "ultimate_vc"), "param_name" => "icon_color_bg", "value" => "", "description" => __("Select background color for icon.", "ultimate_vc"), "dependency" => array("element" => "icon_style", "value" => array("circle", "square", "advanced"))), array("type" => "dropdown", "class" => "", "heading" => __("Icon Border Style", "ultimate_vc"), "param_name" => "icon_border_style", "value" => array(__("None", "ultimate_vc") => "", __("Solid", "ultimate_vc") => "solid", __("Dashed", "ultimate_vc") => "dashed", __("Dotted", "ultimate_vc") => "dotted", __("Double", "ultimate_vc") => "double", __("Inset", "ultimate_vc") => "inset", __("Outset", "ultimate_vc") => "outset"), "description" => __("Select the border style for icon.", "ultimate_vc"), "dependency" => array("element" => "icon_style", "value" => array("advanced"))), array("type" => "colorpicker", "class" => "", "heading" => __("Border Color", "ultimate_vc"), "param_name" => "icon_color_border", "value" => "", "description" => __("Select border color for icon.", "ultimate_vc"), "dependency" => array("element" => "icon_border_style", "not_empty" => true)), array("type" => "number", "class" => "", "heading" => __("Border Width", "ultimate_vc"), "param_name" => "icon_border_size", "value" => "", "min" => 1, "max" => 10, "suffix" => "px", "description" => __("Thickness of the border.", "ultimate_vc"), "dependency" => array("element" => "icon_border_style", "not_empty" => true)), array("type" => "number", "class" => "", "heading" => __("Border Radius", "ultimate_vc"), "param_name" => "icon_border_radius", "value" => "", "min" => 1, "max" => 500, "suffix" => "px", "description" => __("0 pixel value will create a square border. As you increase the value, the shape convert in circle slowly. (e.g 500 pixels).", "ultimate_vc"), "dependency" => array("element" => "icon_border_style", "not_empty" => true)), array("type" => "number", "class" => "", "heading" => __("Background Size", "ultimate_vc"), "param_name" => "icon_border_spacing", "value" => "", "min" => 30, "max" => 500, "suffix" => "px", "description" => __("Spacing from center of the icon till the boundary of border / background", "ultimate_vc"), "dependency" => array("element" => "icon_style", "value" => array("advanced"))), array("type" => "textarea_html", "class" => "", "heading" => __("Features", "ultimate_vc"), "param_name" => "content", "value" => "", "description" => __("Describe the Info Table in brief.", "ultimate_vc"), "edit_field_class" => "ult_hide_editor_fullscreen vc_col-xs-12 vc_column wpb_el_type_textarea_html vc_wrapper-param-type-textarea_html vc_shortcode-param"), array("type" => "dropdown", "class" => "", "heading" => __("Add link", "ultimate_vc"), "param_name" => "use_cta_btn", "value" => array(__("No Link", "ultimate_vc") => "", __("Call to Action Button", "ultimate_vc") => "true", __("Link to Complete Box", "ultimate_vc") => "box"), "description" => __("Do you want to display call to action button?", "ultimate_vc")), array("type" => "textfield", "class" => "", "heading" => __("Call to action button text", "ultimate_vc"), "param_name" => "package_btn_text", "value" => "", "description" => __("Enter call to action button text", "ultimate_vc"), "dependency" => array("element" => "use_cta_btn", "value" => array("true"))), array("type" => "vc_link", "class" => "", "heading" => __("Call to action link", "ultimate_vc"), "param_name" => "package_link", "value" => "", "description" => __("Select / enter the link for call to action button", "ultimate_vc"), "dependency" => array("element" => "use_cta_btn", "value" => array("true", "box"))), array("type" => "ult_param_heading", "text" => __("Heading Settings", "ultimate_vc"), "param_name" => "heading_typograpy", "group" => "Typography", "class" => "ult-param-heading", 'edit_field_class' => 'ult-param-heading-wrapper no-top-margin vc_column vc_col-sm-12'), array("type" => "ultimate_google_fonts", "heading" => __("Font Family", "ultimate_vc"), "param_name" => "heading_font_family", "description" => __("Select the font of your choice.", "ultimate_vc") . " " . __("You can", "ultimate_vc") . " <a target='_blank' href='" . admin_url('admin.php?page=bsf-google-font-manager') . "'>" . __("add new in the collection here", "ultimate_vc") . "</a>.", "group" => "Typography"), array("type" => "ultimate_google_fonts_style", "heading" => __("Font Style", "ultimate_vc"), "param_name" => "heading_font_style", "group" => "Typography"), array("type" => "ultimate_responsive", "class" => "font-size", "heading" => __("Font size", 'ultimate_vc'), "param_name" => "heading_font_size", "unit" => "px", "media" => array("Desktop" => '', "Tablet" => '', "Tablet Portrait" => '', "Mobile Landscape" => '', "Mobile" => ''), "group" => "Typography"), array("type" => "ultimate_responsive", "class" => "", "heading" => __("Line Height", 'ultimate_vc'), "param_name" => "heading_line_height", "unit" => "px", "media" => array("Desktop" => '', "Tablet" => '', "Tablet Portrait" => '', "Mobile Landscape" => '', "Mobile" => ''), "group" => "Typography"), array("type" => "colorpicker", "class" => "", "heading" => __("Font Color", "ultimate_vc"), "param_name" => "heading_font_color", "value" => "", "group" => "Typography"), array("type" => "ult_param_heading", "text" => __("Sub-Heading Settings", "ultimate_vc"), "param_name" => "subheading_typograpy", "group" => "Typography", "class" => "ult-param-heading", 'edit_field_class' => 'ult-param-heading-wrapper vc_column vc_col-sm-12'), array("type" => "ultimate_google_fonts", "heading" => __("Font Family", "ultimate_vc"), "param_name" => "subheading_font_family", "description" => __("Select the font of your choice.", "ultimate_vc") . " " . __("You can", "ultimate_vc") . " <a target='_blank' href='" . admin_url('admin.php?page=bsf-google-font-manager') . "'>" . __("add new in the collection here", "ultimate_vc") . "</a>.", "group" => "Typography"), array("type" => "ultimate_google_fonts_style", "heading" => __("Font Style", "ultimate_vc"), "param_name" => "subheading_font_style", "group" => "Typography"), array("type" => "ultimate_responsive", "class" => "font-size", "heading" => __("Font size", 'ultimate_vc'), "param_name" => "subheading_font_size", "unit" => "px", "media" => array("Desktop" => '', "Tablet" => '', "Tablet Portrait" => '', "Mobile Landscape" => '', "Mobile" => ''), "group" => "Typography"), array("type" => "ultimate_responsive", "class" => "", "heading" => __("Line Height", 'ultimate_vc'), "param_name" => "subheading_line_height", "unit" => "px", "media" => array("Desktop" => '', "Tablet" => '', "Tablet Portrait" => '', "Mobile Landscape" => '', "Mobile" => ''), "group" => "Typography"), array("type" => "colorpicker", "class" => "", "heading" => __("Font Color", "ultimate_vc"), "param_name" => "subheading_font_color", "value" => "", "group" => "Typography"), array("type" => "ult_param_heading", "text" => __("Features Settings", "ultimate_vc"), "param_name" => "features_typograpy", "group" => "Typography", "class" => "ult-param-heading", 'edit_field_class' => 'ult-param-heading-wrapper vc_column vc_col-sm-12'), array("type" => "ultimate_google_fonts", "heading" => __("Font Family", "ultimate_vc"), "param_name" => "features_font_family", "description" => __("Select the font of your choice.", "ultimate_vc") . " " . __("You can", "ultimate_vc") . " <a target='_blank' href='" . admin_url('admin.php?page=bsf-google-font-manager') . "'>" . __("add new in the collection here", "ultimate_vc") . "</a>.", "group" => "Typography"), array("type" => "ultimate_google_fonts_style", "heading" => __("Font Style", "ultimate_vc"), "param_name" => "features_font_style", "group" => "Typography"), array("type" => "ultimate_responsive", "class" => "font-size", "heading" => __("Font size", 'ultimate_vc'), "param_name" => "features_font_size", "unit" => "px", "media" => array("Desktop" => '', "Tablet" => '', "Tablet Portrait" => '', "Mobile Landscape" => '', "Mobile" => ''), "group" => "Typography"), array("type" => "ultimate_responsive", "class" => "", "heading" => __("Line Height", 'ultimate_vc'), "param_name" => "features_line_height", "unit" => "px", "media" => array("Desktop" => '', "Tablet" => '', "Tablet Portrait" => '', "Mobile Landscape" => '', "Mobile" => ''), "group" => "Typography"), array("type" => "colorpicker", "class" => "", "heading" => __("Font Color", "ultimate_vc"), "param_name" => "features_font_color", "value" => "", "group" => "Typography"), array("type" => "ult_param_heading", "text" => __("Button Settings", "ultimate_vc"), "param_name" => "button_typograpy", "group" => "Typography", "class" => "ult-param-heading", 'edit_field_class' => 'ult-param-heading-wrapper vc_column vc_col-sm-12'), array("type" => "ultimate_google_fonts", "heading" => __("Font Family", "ultimate_vc"), "param_name" => "button_font_family", "description" => __("Select the font of your choice.", "ultimate_vc") . " " . __("You can", "ultimate_vc") . " <a target='_blank' href='" . admin_url('admin.php?page=bsf-google-font-manager') . "'>" . __("add new in the collection here", "ultimate_vc") . "</a>.", "group" => "Typography"), array("type" => "ultimate_google_fonts_style", "heading" => __("Font Style", "ultimate_vc"), "param_name" => "button_font_style", "group" => "Typography"), array("type" => "ultimate_responsive", "class" => "font-size", "heading" => __("Font size", 'ultimate_vc'), "param_name" => "button_font_size", "unit" => "px", "media" => array("Desktop" => '', "Tablet" => '', "Tablet Portrait" => '', "Mobile Landscape" => '', "Mobile" => ''), "group" => "Typography"), array("type" => "ultimate_responsive", "class" => "", "heading" => __("Line Height", 'ultimate_vc'), "param_name" => "button_line_height", "unit" => "px", "media" => array("Desktop" => '', "Tablet" => '', "Tablet Portrait" => '', "Mobile Landscape" => '', "Mobile" => ''), "group" => "Typography"), array("type" => "colorpicker", "class" => "", "heading" => __("Font Color", "ultimate_vc"), "param_name" => "button_font_color", "value" => "", "group" => "Typography"), array("type" => "number", "class" => "font-size", "heading" => __("Minimum Height For Info Table", "ultimate_vc"), "param_name" => "features_min_ht", "min" => 10, "suffix" => "px", "description" => __("Adjust height of your price Info Table.", "ultimate_vc")), array("type" => "textfield", "class" => "", "heading" => __("Extra Class", "ultimate_vc"), "param_name" => "el_class", "value" => "", "description" => __("Add extra class name that will be applied to the icon box, and you can use this class for your customizations.", "ultimate_vc")), array("type" => "ult_param_heading", "text" => "<span style='display: block;'><a href='http://bsf.io/t9vlh' target='_blank'>" . __("Watch Video Tutorial", "ultimate_vc") . " <span class='dashicons dashicons-video-alt3' style='font-size:30px;vertical-align: middle;color: #e52d27;'></span></a></span>", "param_name" => "notification", 'edit_field_class' => 'ult-param-important-wrapper ult-dashicon ult-align-right ult-bold-font ult-blue-font vc_column vc_col-sm-12')))); // vc_map } }
public function display() { if (isset($_GET['form_id'])) { if ('new' == $_GET['form_id']) { $form_id = 'tmp-' . time(); } else { $form_id = is_numeric($_GET['form_id']) ? absint($_GET['form_id']) : ''; } /* * FORM BUILDER */ Ninja_Forms::template('admin-menu-new-form.html.php'); $this->_enqueue_the_things($form_id); delete_user_option(get_current_user_id(), 'nf_form_preview_' . $form_id); if (!isset($_GET['ajax'])) { $this->_localize_form_data($form_id); $this->_localize_field_type_data(); $this->_localize_action_type_data(); $this->_localize_form_settings(); $this->_localize_merge_tags(); } } else { /* * ALL FORMS TABLE */ $this->table->prepare_items(); Ninja_Forms::template('admin-menu-all-forms.html.php', array('table' => $this->table, 'add_new_url' => admin_url('admin.php?page=ninja-forms&form_id=new'), 'add_new_text' => __('Add New Form', 'ninja-forms'))); } }
function collect($module) { $pager = new RE_Pager($_GET, admin_url('redirection.php'), 'created', 'DESC', 'log'); $pager->per_page = 100; $this->name = $module->name; $this->items = RE_Log::get_by_module($pager, $module->id); }
/** * Build the custom settings & update OptionTree. * * @return void * @since 2.3.0 */ function custom_theme_options() { /* OptionTree is not loaded yet */ if (!function_exists('ot_settings_id')) { return false; } /** * Get a copy of the saved settings array. */ $saved_settings = get_option(ot_settings_id(), array()); /** * Custom settings array that will eventually be * passes to the OptionTree Settings API Class. */ $custom_settings = array('contextual_help' => array('content' => array(array('id' => 'option_types_help', 'title' => __('Option Types', 'themecountry'), 'content' => '<p>' . __('Help content goes here!', 'themecountry') . '</p>')), 'sidebar' => '<p>' . __('Sidebar content goes here!', 'themecountry') . '</p>'), 'sections' => array(array('id' => 'option_general', 'title' => __('General', 'themecountry')), array('id' => 'option_style', 'title' => __('Styles', 'themecountry')), array('id' => 'option_header', 'title' => __('Header', 'themecountry')), array('id' => 'option_footer', 'title' => __('Footer', 'themecountry')), array('id' => 'option_blog', 'title' => __('Home Page', 'themecountry')), array('id' => 'option_home_slider', 'title' => __('Feature Slider', 'themecountry')), array('id' => 'option_single', 'title' => __('Single Post', 'themecountry')), array('id' => 'option_sidebar', 'title' => __('Sidebar', 'themecountry')), array('id' => 'option_social_button', 'title' => __('Social Buttons', 'themecountry')), array('id' => 'option_typography', 'title' => __('Typography', 'themecountry')), array('id' => 'option_ad_mangment', 'title' => __('Ad Managment', 'themecountry')), array('id' => 'option_import_export', 'title' => __('Import/Export', 'themecountry'))), 'settings' => array(array('id' => 'responsive', 'label' => __('Responsiveness', 'themecountry'), 'desc' => __('Wimple pro is responsive witch mean that the layout is adapt to Mobile and table screen. Using This option to enable or disable responsiveness.', 'themecountry'), 'std' => 'on', 'type' => 'on-off', 'section' => 'option_general'), array('id' => 'header-code', 'label' => __('Header Code', 'themecountry'), 'desc' => __('If you have any code you want to appear between and , Pastes it here. For example: Google Web Master Cool Code or Pinterest Verify Code.', 'themecountry'), 'type' => 'textarea-simple', 'section' => 'option_general', 'rows' => '3'), array('id' => 'tracking-code', 'label' => __('Footer Code (Tracing, JavaScript Code)', 'themecountry'), 'desc' => __('If you have tracking code (Google Analytic or other ), Pastes Your Code here which be inserted before the closing body tag of your theme.', 'themecountry'), 'type' => 'textarea-simple', 'section' => 'option_general', 'rows' => '3'), array('id' => 'page-comments', 'label' => __('Comment on Page', 'themecountry'), 'desc' => __('Use this option to to enable or completely Hide Comment and Comment form on Page', 'themecountry'), 'std' => 'off', 'type' => 'on-off', 'section' => 'option_general'), array('id' => 'back_to_top', 'label' => __('Back To Top Button', 'themecountry'), 'desc' => __('Use this option to hide or show "Back To Top" button.', 'themecountry'), 'std' => 'on', 'type' => 'on-off', 'section' => 'option_general'), array('id' => 'logo', 'label' => __('Custom Logo Image', 'themecountry'), 'desc' => __('Upload your custom logo image here.', 'themecountry'), 'type' => 'upload', 'section' => 'option_header'), array('id' => 'header_layout', 'label' => __('Header Layout', 'themecountry'), 'desc' => __('Use this option to Choose Header Design Style for your website.', 'themecountry'), 'std' => 'left', 'type' => 'radio-image', 'section' => 'option_header', 'class' => '', 'choices' => array(array('value' => 'left', 'label' => __('Header Content With Navigation', 'themecountry'), 'src' => get_template_directory_uri() . '/images/header-layout/header-menu.png'), array('value' => 'right', 'label' => __('Header Suppurate From Navigation', 'themecountry'), 'src' => get_template_directory_uri() . '/images/header-layout/menu-out-of-header.png'))), array('id' => 'fixed_menu', 'label' => __('Floating Navigation Menu', 'themecountry'), 'desc' => __('Use this option to enable Floating Navigation Menu.', 'themecountry'), 'std' => 'off', 'type' => 'on-off', 'section' => 'option_header'), array('id' => 'footer-widgets', 'label' => __('Footer Widget Columns', 'themecountry'), 'desc' => __('Select Number of Columns for your Footer area or Disable it.', 'themecountry'), 'std' => '3', 'type' => 'radio-image', 'section' => 'option_footer', 'class' => '', 'choices' => array(array('value' => '0', 'label' => __('Disable', 'themecountry'), 'src' => get_template_directory_uri() . '/images/layout/layout-off.png'), array('value' => '1', 'label' => __('1 Column', 'themecountry'), 'src' => get_template_directory_uri() . '/images/layout/footer-widgets-1.png'), array('value' => '2', 'label' => __('2 Columns', 'themecountry'), 'src' => get_template_directory_uri() . '/images/layout/footer-widgets-2.png'), array('value' => '3', 'label' => __('3 Columns', 'themecountry'), 'src' => get_template_directory_uri() . '/images/layout/footer-widgets-3.png'))), array('id' => 'copyright', 'label' => __('Footer Copyright Text', 'themecountry'), 'desc' => __('Add Text you want to show in "Copyright Sction" at Bottom Left of your Website.', 'themecountry'), 'type' => 'textarea-simple', 'rows' => '3', 'section' => 'option_footer'), array('id' => 'post-text', 'label' => __('Home Page Entry Text', 'themecountry'), 'desc' => __('Use this option to show Expert or Full Content from your each post show on Homepage and Archive Page.', 'themecountry'), 'std' => 'excerpt', 'type' => 'radio', 'section' => 'option_blog', 'choices' => array(array('value' => 'excerpt', 'label' => __('Show Excerpt', 'themecountry')), array('value' => 'content', 'label' => __('Show Content', 'themecountry')))), array('id' => 'home-post-read-more', 'label' => __('Read More Button', 'themecountry'), 'desc' => __('Enable or Disable Read More Button on Homepage for Each Post.', 'themecountry'), 'std' => 'on', 'type' => 'on-off', 'section' => 'option_blog'), array('id' => 'excerpt-length', 'label' => 'Excerpt Length', 'desc' => __('Number of word as Expert Length To be Shown in Homepage when you choose to show entry text as Excerpt.', 'themecountry'), 'std' => '34', 'type' => 'numeric-slider', 'section' => 'option_blog', 'min_max_step' => '0,100,1'), array('id' => 'home-post-meta', 'label' => __('HomePage & Single Post Meta Info', 'themecountry'), 'desc' => __('Use this button to Show or Hide Post Meta Info on HomePage. (Author name, Date etc.).', 'themecountry'), 'std' => 'on', 'type' => 'on-off', 'section' => 'option_blog'), array('id' => 'home-post-meta-show', 'label' => __('What To Hide in Meta Info', 'themecountry'), 'desc' => __('Choose What Meta Info to Hide.', 'themecountry'), 'type' => 'checkbox', 'section' => 'option_blog', 'choices' => array(array('value' => 'autho_name', 'label' => __('Author Name', 'themecountry')), array('value' => 'date', 'label' => __('Date', 'themecountry')), array('value' => 'category', 'label' => __('Category', 'themecountry')), array('value' => 'tag', 'label' => __('Tag', 'themecountry')), array('value' => 'comment_count', 'label' => __('Comment Count', 'themecountry')))), array('id' => 'pagination', 'label' => __('Pagination', 'themecountry', 'themecountry'), 'desc' => __('Choose your Preferred Pagination Style.', 'themecountry'), 'std' => 'default', 'type' => 'radio', 'section' => 'option_blog', 'choices' => array(array('value' => 'default', 'label' => __('Default (Older Posts/Newer Posts)', 'themecountry')), array('value' => 'numberal', 'label' => __('Numberal (1 2 3 ...)', 'themecountry')), array('value' => 'loading', 'label' => __('Load More...', 'themecountry')), array('value' => 'infinite', 'label' => __('Auto Infinite Scroll', 'themecountry')))), array('id' => 'enable-home-slider', 'label' => __('Featured Content Slider', 'themecountry'), 'desc' => __('use this option to enable or Disable Featured Content Slider.', 'themecountry'), 'std' => 'on', 'type' => 'on-off', 'section' => 'option_home_slider'), array('id' => 'number-of-post', 'label' => __('Number of Slides', 'themecountry'), 'desc' => __('Enter the number of Slides', 'themecountry'), 'std' => '5', 'type' => 'text', 'section' => 'option_home_slider'), array('id' => 'type-of-slider', 'label' => __('Use Categories Slider', 'themecountry'), 'desc' => __('Use Post from Category As Featured Content Sliders', 'themecountry'), 'std' => 'on', 'type' => 'on-off', 'section' => 'option_home_slider'), array('id' => 'category-slide-option', 'label' => __('Choose Categories', 'themecountry'), 'desc' => '', 'std' => '', 'type' => 'category-checkbox', 'section' => 'option_home_slider', 'operator' => 'and'), array('id' => 'customize_slider_option', 'label' => __('Custom Sliders', 'themecountry'), 'desc' => __('With this option you can set up a Sliders with custom image and text instead of the default slidshow automatically generated from your posts.', 'themecountry'), 'std' => '', 'type' => 'list-item', 'section' => 'option_home_slider', 'operator' => 'and', 'settings' => array(array('id' => 'slide_image', 'label' => __('Image', 'themecountry'), 'desc' => __('Upload or select an image for this slide', 'themecountry'), 'type' => 'upload'), array('id' => 'slide_url', 'label' => __('Link', 'themecountry'), 'desc' => __('URL of the slide', 'themecountry'), 'std' => '#', 'type' => 'text', 'operator' => 'and'))), array('id' => 'author-bio', 'label' => __('Author Bio', 'themecountry'), 'desc' => __('Display Author Bio below each Post.', 'themecountry'), 'std' => 'on', 'type' => 'on-off', 'section' => 'option_single'), array('id' => 'author-highlight', 'label' => __('Highlight Author Comment', 'themecountry'), 'desc' => __('Use this Option to highlight author comments.', 'themecountry'), 'std' => 'on', 'type' => 'on-off', 'section' => 'option_single'), array('id' => 'breadcrumb', 'label' => __('Breadcrumbs', 'themecountry'), 'desc' => __('Use This Option to enable or Disable breadcrumbs.', 'themecountry'), 'std' => 'off', 'type' => 'on-off', 'section' => 'option_single'), array('id' => 'yoast_breadcrumb', 'desc' => __('Check it if you install WordPress SEO by Yoast', 'themecountry'), 'type' => 'checkbox', 'section' => 'option_single', 'choices' => array(array('value' => 'yoast_breadcrumb_yes', 'label' => __('Use Yoast Breadcrumb', 'option-tree-theme')))), array('id' => 'post-nav', 'label' => __('Post Navigation', 'themecountry'), 'desc' => __('Shows links to the next and previous post', 'themecountry'), 'std' => 'on', 'type' => 'on-off', 'section' => 'option_single'), array('id' => 'post-related', 'label' => __('Related Posts', 'themecountry'), 'desc' => __('Use This Option to enable or Disable related Posts below your Post.', 'themecountry'), 'std' => 'on', 'type' => 'on-off', 'section' => 'option_single'), array('id' => 'related-posts-taxonomy', 'label' => __('Related Posts Taxonomy', 'themecountry'), 'desc' => __('Choose the Way Related Post Work.', 'themecountry'), 'std' => 'tag', 'type' => 'radio', 'section' => 'option_single', 'choices' => array(array('value' => 'tag', 'label' => 'Tags'), array('value' => 'category', 'label' => 'Categories'))), array('id' => 'number-related', 'std' => '3', 'label' => __('Number Related Posts', 'themecountry'), 'desc' => __('Enter the number of posts to show in the related posts section.', 'themecountry'), 'type' => 'text', 'section' => 'option_single'), array('id' => 'display-related-posts', 'label' => __('Display Related Posts', 'themecountry'), 'desc' => __('Related Posts type to display.'), 'std' => 'thumbnail', 'type' => 'radio', 'section' => 'option_single', 'choices' => array(array('value' => 'thumbnail', 'label' => __('Thumbnail and Title', 'themecountry')), array('value' => 'list', 'label' => __('Only Tittle, In List style.', 'themecountry')))), array('id' => 'pinterest', 'label' => __('Pinterest Pin In Button', 'themecountry'), 'desc' => __('Use This Option to enable or Disable Pinterest "Pin In" button which will be shown when visitor add mouse hover images in your post.', 'themecountry'), 'std' => 'on', 'type' => 'on-off', 'section' => 'option_single'), array('id' => 'sidebar-areas', 'label' => __('Create Sidebars', 'themecountry'), 'desc' => __('Create Custom Sidebars Here if you want to Have Different Sidebar for Homepage and Single Post and So on.', 'themecountry'), 'type' => 'list-item', 'section' => 'option_sidebar', 'choices' => array(), 'settings' => array(array('id' => 'id', 'label' => __('Sidebar ID', 'themecountry'), 'desc' => __('This ID must be unique, for example "sidebar-about"', 'themecountry'), 'std' => 'sidebar-select', 'type' => 'text', 'choices' => array()))), array('id' => 's1-home', 'label' => __('Home', 'themecountry'), 'desc' => __('Choose Sidebar to Show On Hompage.', 'themecountry'), 'type' => 'sidebar-select', 'section' => 'option_sidebar'), array('id' => 's1-single', 'label' => __('Single', 'themecountry'), 'desc' => __('Choose Sidebar to Show On Single Post.', 'themecountry'), 'type' => 'sidebar-select', 'section' => 'option_sidebar'), array('id' => 's1-archive', 'label' => __('Archive (Date Based)', 'themecountry'), 'desc' => __('Choose Sidebar to Show On Archive Page (Date Based Archive)', 'themecountry'), 'type' => 'sidebar-select', 'section' => 'option_sidebar'), array('id' => 's1-archive-category', 'label' => __('Archive Category', 'themecountry'), 'desc' => __('Choose Sidebar to Show On Category Page.', 'themecountry'), 'type' => 'sidebar-select', 'section' => 'option_sidebar'), array('id' => 's1-search', 'label' => __('Search', 'themecountry'), 'desc' => __('Choose Sidebar to Show On Search Page', 'themecountry'), 'type' => 'sidebar-select', 'section' => 'option_sidebar'), array('id' => 's1-404', 'label' => __('Error 404', 'themecountry'), 'desc' => __('Choose Sidebar to Show On "Error 404, Page Not Found" Page.', 'themecountry'), 'type' => 'sidebar-select', 'section' => 'option_sidebar'), array('id' => 's1-page', 'label' => __('Page', 'themecountry'), 'desc' => __('Choose Sidebar to Show On "Page".', 'themecountry'), 'type' => 'sidebar-select', 'section' => 'option_sidebar'), array('id' => 'tc-google-typography', 'label' => '', 'desc' => '', 'type' => 'typography-google', 'section' => 'option_typography'), array('id' => 'social-button-enable', 'label' => __('Social Sharing Button', 'themecountry'), 'desc' => __('Use This Option to Show Social Sharing Button.', 'themecountry'), 'std' => 'on', 'type' => 'on-off', 'section' => 'option_social_button'), array('id' => 'twitter-username', 'label' => __('Twitter Username', 'themecountry'), 'desc' => __('Your @username will be added to share-tweets of your posts (optional)', 'themecountry'), 'type' => 'text', 'section' => 'option_social_button'), array('id' => 'social-sharing-pos', 'label' => __('Social Sharing Buttons Position', 'themecountry'), 'desc' => __('Choose position for Social Sharing Buttons.', 'themecountry'), 'type' => 'checkbox', 'section' => 'option_social_button', 'std' => 'top', 'choices' => array(array('value' => 'top', 'label' => __('After Title', 'themecountry')), array('value' => 'bottom', 'label' => __('After Post', 'themecountry')), array('value' => 'float', 'label' => __('Float Social To Left', 'themecountry')))), array('id' => 'social-twitter', 'label' => __('Twitter', 'themecountry'), 'std' => 'on', 'type' => 'on-off', 'section' => 'option_social_button'), array('id' => 'social-facebook', 'label' => __('Facebook', 'themecountry'), 'std' => 'on', 'type' => 'on-off', 'section' => 'option_social_button'), array('id' => 'social-google-plus', 'label' => __('Google Plus', 'themecountry'), 'std' => 'on', 'type' => 'on-off', 'section' => 'option_social_button'), array('id' => 'social-linkedin', 'label' => __('Linkedin', 'themecountry'), 'std' => 'off', 'type' => 'on-off', 'section' => 'option_social_button'), array('id' => 'social-pinterest', 'label' => __('Pinterest', 'themecountry'), 'std' => 'off', 'type' => 'on-off', 'section' => 'option_social_button'), array('id' => 'ad-header-banner', 'label' => __('Header Banner Ads', 'themecountry'), 'desc' => __('Paste Your Ads Code Here ( Adsense, Buy Sell Ads ). It will be shown on the top of Header ( Note: This Ads won`t be shown If you choose the 1st design in Header Option )', 'themecountry'), 'type' => 'textarea-simple', 'section' => 'option_ad_mangment', 'rows' => '3'), array('id' => 'ad-after-post-title', 'label' => __('Below Post Title', 'themecountry'), 'desc' => __('Paste Your Ads Code Here ( Adsense, Buy Sell Ads ). It will be shown Below Each Post title.', 'themecountry'), 'type' => 'textarea-simple', 'section' => 'option_ad_mangment', 'rows' => '3'), array('id' => 'top-ads-position', 'label' => '', 'desc' => __('Choose Alignment Of your Ads.', 'themecountry'), 'type' => 'select', 'section' => 'option_ad_mangment', 'choices' => array(array('value' => 'ad-none', 'label' => __('None', 'themecountry')), array('value' => 'ad-left', 'label' => __('Left', 'themecountry')), array('value' => 'ad-center', 'label' => __('Center', 'themecountry')), array('value' => 'ad-right', 'label' => __('Right', 'themecountry')))), array('id' => 'ad-middle-post', 'label' => __('Middle Post Content', 'themecountry'), 'desc' => __('Paste Your Ads Code Here ( Adsense, Buy Sell Ads ). It will be shown right middle of your post.', 'themecountry'), 'type' => 'textarea-simple', 'section' => 'option_ad_mangment', 'rows' => '3'), array('id' => 'middle-ads-position', 'label' => '', 'desc' => __('Choose Alignment Of your Ads.', 'themecountry'), 'type' => 'select', 'section' => 'option_ad_mangment', 'choices' => array(array('value' => 'ad-none', 'label' => __('None', 'themecountry')), array('value' => 'ad-left', 'label' => __('Left', 'themecountry')), array('value' => 'ad-center', 'label' => __('Center', 'themecountry')), array('value' => 'ad-right', 'label' => __('Right', 'themecountry')))), array('id' => 'ad-below-post', 'label' => __('Below Post content', 'themecountry'), 'desc' => __('Paste Your Ads Code Here ( Adsense, Buy Sell Ads ). It will be shown Below Each Post.', 'themecountry'), 'type' => 'textarea-simple', 'section' => 'option_ad_mangment', 'rows' => '3'), array('id' => 'below-ads-position', 'label' => '', 'desc' => __('Choose Alignment Of your Ads.', 'themecountry'), 'type' => 'select', 'section' => 'option_ad_mangment', 'choices' => array(array('value' => 'ad-none', 'label' => __('None', 'themecountry')), array('value' => 'ad-left', 'label' => __('Left', 'themecountry')), array('value' => 'ad-center', 'label' => __('Center', 'themecountry')), array('value' => 'ad-right', 'label' => __('Right', 'themecountry')))), array('id' => 'duration-ads-top', 'label' => __('Ads and Post Age', 'themecountry'), 'desc' => __('Only Show Ads on Post Which is Older than number of days you choose.', 'themecountry'), 'type' => 'numeric-slider', 'std' => '100', 'section' => 'option_ad_mangment'), array('id' => 'layout-width-sidebar', 'label' => __('Layout', 'themecountry'), 'desc' => __('Choose To Show Sidebar On Left Or Right or No-Sidebar', 'themecountry'), 'std' => 'right', 'type' => 'radio-image', 'section' => 'option_style', 'class' => '', 'choices' => array(array('value' => 'left', 'label' => __('Sidebare Left', 'themecountry'), 'src' => get_template_directory_uri() . '/images/layout/col-2cr.png'), array('value' => 'right', 'label' => __('Sidebar Right', 'themecountry'), 'src' => get_template_directory_uri() . '/images/layout/col-2cl.png'), array('value' => 'no-sidebar', 'label' => __('No Sidebar', 'themecountry'), 'src' => get_template_directory_uri() . '/images/layout/col-1cl.png'))), array('id' => 'on-off-option-style', 'label' => __('Custom Header Color', 'themecountry'), 'desc' => __('Enable Custom Header Color Setting Or Use Our Ready Made Color Scheme.', 'themecountry'), 'std' => 'off', 'type' => 'on-off', 'section' => 'option_style'), array('id' => 'header_style', 'label' => __('Ready Made Header Color Scheme', 'themecountry'), 'desc' => __('Choose Color You Like.', 'themecountry'), 'std' => 'default', 'type' => 'radio-image', 'section' => 'option_style', 'class' => '', 'choices' => array(array('value' => 'default', 'label' => '', 'src' => get_template_directory_uri() . '/images/default.jpg'), array('value' => 'green-sea', 'label' => '', 'src' => get_template_directory_uri() . '/images/green-sea.jpg'), array('value' => 'belize-hole', 'label' => '', 'src' => get_template_directory_uri() . '/images/belize-hole.jpg'), array('value' => 'wisteria', 'label' => '', 'src' => get_template_directory_uri() . '/images/wisteria.jpg'), array('value' => 'midnight-blue', 'label' => '', 'src' => get_template_directory_uri() . '/images/midnight-blue.jpg'), array('value' => 'orange', 'label' => '', 'src' => get_template_directory_uri() . '/images/orange.jpg'), array('value' => 'pumkin', 'label' => '', 'src' => get_template_directory_uri() . '/images/pumkin.jpg'), array('value' => 'asbestos', 'label' => '', 'src' => get_template_directory_uri() . '/images/asbestos.jpg'), array('value' => 'pomegranate', 'label' => '', 'src' => get_template_directory_uri() . '/images/pomegranate.jpg'))), array('id' => 'primary_header_color', 'label' => __('Custom Primary Header Color', 'themecountry'), 'desc' => __('Pick the primary header color.', 'themecountry'), 'type' => 'colorpicker', 'std' => '', 'section' => 'option_style', 'operator' => 'and'), array('id' => 'secondary_header_color', 'label' => __('Custom Secondary Header Color', 'themecountry'), 'desc' => __('Pick the secondary header color.', 'themecountry'), 'type' => 'colorpicker', 'std' => '', 'section' => 'option_style', 'operator' => 'and'), array('id' => 'custom_style', 'label' => __('Custom CSS', 'themecountry'), 'desc' => __('Add you CSS Custom Code here. (Only For Advance User)', 'themecountry'), 'type' => 'css', 'section' => 'option_style', 'rows' => '3'), array('id' => 'text_desscription_import_export', 'desc' => sprintf(__('<b>Click link to <a href="%s">Import/Export</a></b>', 'themecountry'), admin_url('themes.php?page=tc-theme-backup')), 'std' => '', 'type' => 'textblock', 'section' => 'option_import_export'))); /* allow settings to be filtered before saving */ $custom_settings = apply_filters(ot_settings_id() . '_args', $custom_settings); /* settings are not the same update the DB */ if ($saved_settings !== $custom_settings) { update_option(ot_settings_id(), $custom_settings); } /* Lets OptionTree know the UI Builder is being overridden */ global $ot_has_custom_theme_options; $ot_has_custom_theme_options = true; }
function check_page() { if (get_option('zn_theme_needs_update') && (!isset($_GET['page']) || isset($_GET['page']) && $_GET['page'] != 'zn-update') && !ZN()->is_request('ajax')) { wp_redirect(admin_url('index.php?page=zn-update')); exit; } }
function cg_register_debug_js() { global $cg_live_preview; if (!is_admin()) { //Loading from unminified source wp_enqueue_script('cg_waypoints', CG_JS . '/dist/waypoints.min.js', array('jquery'), '', true); wp_enqueue_script('cg_bootstrap_js', CG_BOOTSTRAP_JS . '/bootstrap.min.js', array('jquery'), '', true); wp_enqueue_script('cg_magnific-popup', CG_JS . '/src/cond/jquery.magnific-popup.min.js', array('jquery'), '', true); wp_enqueue_script('cg_modernizr', CG_JS . '/src/cond/modernizr.custom.min.js', array('jquery'), '', false); wp_enqueue_script('cg_ticker', CG_JS . '/src/cond/inewsticker.js', array('jquery'), '', true); wp_enqueue_script('cg_quickview', CG_JS . '/src/cond/cg_quickview.js', array('jquery'), '', true); wp_localize_script('cg_quickview', 'cg_ajax', array('cg_ajax_url' => admin_url('admin-ajax.php'))); wp_enqueue_script('cg_chosen_js', CG_JS . '/src/plugins/chosen.js', array('jquery'), '', true); wp_enqueue_script('cg_classie_js', CG_JS . '/src/plugins/classie.js', array('jquery'), '', true); wp_enqueue_script('cg_uisearch_js', CG_JS . '/src/plugins/uisearch.js', array('jquery'), '', true); wp_enqueue_script('cg_bootstrap_select_js', CG_JS . '/src/plugins/bootstrap-select.js', array('jquery'), '', true); wp_enqueue_script('cg_owlcarousel', CG_JS . '/src/cond/owl.carousel.min.js', array('jquery'), '', false); wp_enqueue_script('cg_jrespond', CG_JS . '/src/plugins/jRespond.min.js', array('jquery'), '', true); wp_enqueue_script('cg_qtip', CG_JS . '/src/plugins/jquery.qtip.min.js', array('jquery'), '', true); wp_enqueue_script('cg_tipr', CG_JS . '/src/plugins/tipr.min.js', array('jquery'), '', true); wp_enqueue_script('cg_cookie', CG_JS . '/src/plugins/cookie.js', array('jquery'), '', true); wp_enqueue_script('cg_meanmenu', CG_JS . '/src/plugins/jquery.meanmenu.min.js', array('jquery'), '', true); wp_enqueue_script('cg_flexslider', CG_JS . '/src/plugins/jquery.flexslider-min.js', array('jquery'), '', true); wp_enqueue_script('cg_skrollr', CG_JS . '/src/plugins/skrollr.js', array('jquery'), '', true); if (isset($cg_live_preview)) { wp_enqueue_script('cg-dynamicjs', CG_JS . '/src/cond/capdynamic.php', array(), '', true); wp_enqueue_script('cg-jqueryui', CG_JS . '/src/cond/jquery-ui.min.js', array(), '', true); wp_enqueue_script('cg-livepreviewjs', CG_JS . '/src/cond/livepreview.js', array(), '', true); } // Full source commerceugurus.js call wp_enqueue_script('cg_commercegurus_js', CG_JS . '/src/commercegurus.js', array('jquery'), '', true); } }