Example #1
26
/**
 * This function outputs a 404 "Not Found" error message
 *
 * @since 1.6
 */
function genesis_404()
{
    echo genesis_html5() ? '<article class="entry">' : '<div class="post hentry">';
    printf('<h1 class="entry-title">%s</h1>', apply_filters('genesis_404_entry_title', __('Not found, error 404', 'genesis')));
    echo '<div class="entry-content">';
    if (genesis_html5()) {
        echo apply_filters('genesis_404_entry_content', '<p>' . sprintf(__('The page you are looking for no longer exists. Perhaps you can return back to the site\'s <a href="%s">homepage</a> and see if you can find what you are looking for. Or, you can try finding it by using the search form below.', 'genesis'), trailingslashit(home_url())) . '</p>');
        get_search_form();
    } else {
        ?>

			<p><?php 
        printf(__('The page you are looking for no longer exists. Perhaps you can return back to the site\'s <a href="%s">homepage</a> and see if you can find what you are looking for. Or, you can try finding it with the information below.', 'genesis'), trailingslashit(home_url()));
        ?>
</p>



	<?php 
    }
    if (!genesis_html5()) {
        genesis_sitemap('h4');
    } elseif (genesis_a11y('404-page')) {
        echo '<h2>' . __('Sitemap', 'genesis') . '</h2>';
        genesis_sitemap('h3');
    }
    echo '</div>';
    echo genesis_html5() ? '</article>' : '</div>';
}
Example #2
2
 /**
  * Constructor for the Anthologize class
  *
  * This constructor does the following:
  * - Checks minimum PHP and WP version, and bails if they're not met
  * - Includes Anthologize's main files
  * - Sets up the basic hooks that initialize Anthologize's post types and UI
  *
  * @since 0.7
  */
 public function __construct()
 {
     // Bail if PHP version is not at least 5.0
     if (!self::check_minimum_php()) {
         add_action('admin_notices', array('Anthologize', 'phpversion_nag'));
         return;
     }
     // Bail if WP version is not at least 3.3
     if (!self::check_minimum_wp()) {
         add_action('admin_notices', array('Anthologize', 'wpversion_nag'));
     }
     // If we've made it this far, start initializing Anthologize
     register_activation_hook(__FILE__, array($this, 'activation'));
     register_deactivation_hook(__FILE__, array($this, 'deactivation'));
     // @todo WP's functions plugin_basename() etc don't work
     //   correctly on symlinked setups, so I'm implementing my own
     $bn = explode(DIRECTORY_SEPARATOR, dirname(__FILE__));
     $this->basename = array_pop($bn);
     $this->plugin_dir = plugin_dir_path(__FILE__);
     $this->plugin_url = plugin_dir_url(__FILE__);
     $this->includes_dir = trailingslashit($this->plugin_dir . 'includes');
     $upload_dir = wp_upload_dir();
     $this->cache_dir = trailingslashit($upload_dir['basedir'] . '/anthologize-cache');
     $this->cache_url = trailingslashit($upload_dir['baseurl'] . '/anthologize-cache');
     $this->setup_constants();
     $this->includes();
     $this->setup_hooks();
 }
Example #3
1
    /**
     * Display navigation to next/previous set of posts when applicable.
     *
     * @since Farmtoyou 1.0
     *
     * @global WP_Query   $wp_query   WordPress Query object.
     * @global WP_Rewrite $wp_rewrite WordPress Rewrite object.
     */
    function farmtoyou_paging_nav()
    {
        global $wp_query, $wp_rewrite;
        // Don't print empty markup if there's only one page.
        if ($wp_query->max_num_pages < 2) {
            return;
        }
        $paged = get_query_var('paged') ? intval(get_query_var('paged')) : 1;
        $pagenum_link = html_entity_decode(get_pagenum_link());
        $query_args = array();
        $url_parts = explode('?', $pagenum_link);
        if (isset($url_parts[1])) {
            wp_parse_str($url_parts[1], $query_args);
        }
        $pagenum_link = remove_query_arg(array_keys($query_args), $pagenum_link);
        $pagenum_link = trailingslashit($pagenum_link) . '%_%';
        $format = $wp_rewrite->using_index_permalinks() && !strpos($pagenum_link, 'index.php') ? 'index.php/' : '';
        $format .= $wp_rewrite->using_permalinks() ? user_trailingslashit($wp_rewrite->pagination_base . '/%#%', 'paged') : '?paged=%#%';
        // Set up paginated links.
        $links = paginate_links(array('base' => $pagenum_link, 'format' => $format, 'total' => $wp_query->max_num_pages, 'current' => $paged, 'mid_size' => 1, 'add_args' => array_map('urlencode', $query_args), 'prev_text' => __('&larr; Previous', 'farmtoyou'), 'next_text' => __('Next &rarr;', 'farmtoyou')));
        if ($links) {
            ?>
	<nav class="navigation paging-navigation" role="navigation">
		<div class="pagination loop-pagination">
			<?php 
            echo $links;
            ?>
		</div><!-- .pagination -->
	</nav><!-- .navigation -->
	<?php 
        }
    }
    /**
     * Display navigation to next/previous set of posts when applicable.
     *
     * @return void
     */
    function my_simone_paging_nav()
    {
        // Don't print empty markup if there's only one page.
        if ($GLOBALS['wp_query']->max_num_pages < 2) {
            return;
        }
        $paged = get_query_var('paged') ? intval(get_query_var('paged')) : 1;
        $pagenum_link = html_entity_decode(get_pagenum_link());
        $query_args = array();
        $url_parts = explode('?', $pagenum_link);
        if (isset($url_parts[1])) {
            wp_parse_str($url_parts[1], $query_args);
        }
        $pagenum_link = remove_query_arg(array_keys($query_args), $pagenum_link);
        $pagenum_link = trailingslashit($pagenum_link) . '%_%';
        $format = $GLOBALS['wp_rewrite']->using_index_permalinks() && !strpos($pagenum_link, 'index.php') ? 'index.php/' : '';
        $format .= $GLOBALS['wp_rewrite']->using_permalinks() ? user_trailingslashit('page/%#%', 'paged') : '?paged=%#%';
        // Set up paginated links.
        $links = paginate_links(array('base' => $pagenum_link, 'format' => $format, 'total' => $GLOBALS['wp_query']->max_num_pages, 'current' => $paged, 'mid_size' => 2, 'add_args' => array_map('urlencode', $query_args), 'prev_text' => __('← Previous', 'my-simone'), 'next_text' => __('Next →', 'my-simone'), 'type' => 'list'));
        if ($links) {
            ?>
	<nav class="navigation paging-navigation" role="navigation">
		<h1 class="screen-reader-text"><?php 
            _e('Posts navigation', 'my-simone');
            ?>
</h1>
			<?php 
            echo $links;
            ?>
	</nav><!-- .navigation -->
	<?php 
        }
    }
 function after()
 {
     if (empty($this->upgrader->result['destination_name'])) {
         return;
     }
     $theme_info = $this->upgrader->theme_info();
     if (empty($theme_info)) {
         return;
     }
     $name = $theme_info['Name'];
     $stylesheet = $this->upgrader->result['destination_name'];
     $template = !empty($theme_info['Template']) ? $theme_info['Template'] : $stylesheet;
     $preview_link = htmlspecialchars(add_query_arg(array('preview' => 1, 'template' => $template, 'stylesheet' => $stylesheet, 'preview_iframe' => 1, 'TB_iframe' => 'true'), trailingslashit(esc_url(get_option('home')))));
     $activate_link = wp_nonce_url("themes.php?action=activate&amp;template=" . urlencode($template) . "&amp;stylesheet=" . urlencode($stylesheet), 'switch-theme_' . $template);
     $install_actions = array('preview' => '<a href="' . $preview_link . '" class="thickbox thickbox-preview" title="' . esc_attr(sprintf(__('Preview &#8220;%s&#8221;'), $name)) . '">' . __('Preview') . '</a>', 'activate' => '<a href="' . $activate_link . '" class="activatelink" title="' . esc_attr(sprintf(__('Activate &#8220;%s&#8221;'), $name)) . '">' . __('Activate') . '</a>');
     if (is_network_admin() && current_user_can('manage_network_themes')) {
         $install_actions['network_enable'] = '<a href="' . esc_url(wp_nonce_url('themes.php?action=enable&amp;theme=' . $template, 'enable-theme_' . $template)) . '" title="' . esc_attr__('Enable this theme for all sites in this network') . '" target="_parent">' . __('Network Enable') . '</a>';
     }
     $install_actions['themes_page'] = '<a href="' . self_admin_url('themes.php') . '" title="' . esc_attr__('Themes page') . '" target="_parent">' . __('View Installed Themes', 'wp-app-store') . '</a>';
     if (!$this->result || is_wp_error($this->result) || is_network_admin()) {
         unset($install_actions['activate'], $install_actions['preview']);
     }
     $install_actions = apply_filters('install_theme_complete_actions', $install_actions, $this->api, $stylesheet, $theme_info);
     if (!empty($install_actions)) {
         $this->feedback(implode(' | ', (array) $install_actions));
     }
 }
 /**
  * Constructor function.
  * 
  * @access public
  * @since 1.0.0
  * @return void
  */
 public function __construct($file)
 {
     $this->dir = dirname($file);
     $this->file = $file;
     $this->assets_dir = trailingslashit($this->dir) . 'assets';
     $this->assets_url = esc_url(trailingslashit(plugins_url('/assets/', $file)));
     $this->token = 'feature';
     $this->load_plugin_textdomain();
     add_action('init', array(&$this, 'load_localisation'), 0);
     // Run this on activation.
     register_activation_hook($this->file, array(&$this, 'activation'));
     add_action('init', array(&$this, 'register_post_type'));
     if (is_admin()) {
         global $pagenow;
         add_action('admin_menu', array(&$this, 'meta_box_setup'), 20);
         add_action('save_post', array(&$this, 'meta_box_save'));
         add_filter('enter_title_here', array(&$this, 'enter_title_here'));
         add_action('admin_print_styles', array(&$this, 'enqueue_admin_styles'), 10);
         add_filter('post_updated_messages', array(&$this, 'updated_messages'));
         if ($pagenow == 'edit.php' && isset($_GET['post_type']) && esc_attr($_GET['post_type']) == $this->token) {
             add_filter('manage_edit-' . $this->token . '_columns', array(&$this, 'register_custom_column_headings'), 10, 1);
             add_action('manage_posts_custom_column', array(&$this, 'register_custom_columns'), 10, 2);
         }
     }
     add_action('after_setup_theme', array(&$this, 'ensure_post_thumbnails_support'));
     add_action('after_theme_setup', array(&$this, 'register_image_sizes'));
 }
Example #7
0
/**
 * Define constants.
 *
 * @ignore
 */
function beans_define_constants()
{
    // Define version.
    define('BEANS_VERSION', '1.2.4');
    // Define paths.
    define('BEANS_THEME_PATH', wp_normalize_path(trailingslashit(get_template_directory())));
    define('BEANS_PATH', BEANS_THEME_PATH . 'lib/');
    define('BEANS_ASSETS_PATH', BEANS_PATH . 'assets/');
    define('BEANS_LANGUAGES_PATH', BEANS_PATH . 'languages/');
    define('BEANS_RENDER_PATH', BEANS_PATH . 'render/');
    define('BEANS_TEMPLATES_PATH', BEANS_PATH . 'templates/');
    define('BEANS_STRUCTURE_PATH', BEANS_TEMPLATES_PATH . 'structure/');
    define('BEANS_FRAGMENTS_PATH', BEANS_TEMPLATES_PATH . 'fragments/');
    // Define urls.
    define('BEANS_THEME_URL', trailingslashit(get_template_directory_uri()));
    define('BEANS_URL', BEANS_THEME_URL . 'lib/');
    define('BEANS_ASSETS_URL', BEANS_URL . 'assets/');
    define('BEANS_LESS_URL', BEANS_ASSETS_URL . 'less/');
    define('BEANS_JS_URL', BEANS_ASSETS_URL . 'js/');
    define('BEANS_IMAGE_URL', BEANS_ASSETS_URL . 'images/');
    // Define admin paths.
    define('BEANS_ADMIN_PATH', BEANS_PATH . 'admin/');
    // Define admin url */
    define('BEANS_ADMIN_URL', BEANS_URL . 'admin/');
    define('BEANS_ADMIN_ASSETS_URL', BEANS_ADMIN_URL . 'assets/');
    define('BEANS_ADMIN_JS_URL', BEANS_ADMIN_ASSETS_URL . 'js/');
}
Example #8
0
 /**
  * Constructor for the gateway.
  *
  * @access public
  * @return void
  */
 public function __construct()
 {
     $this->id = 'ecpay';
     $this->icon = apply_filters('woocommerce_ecpay_icon', plugins_url('icon/green_log_40.gif', __FILE__));
     $this->has_fields = false;
     $this->method_title = __('ecpay', 'woocommerce');
     // Load the form fields.
     $this->init_form_fields();
     // Load the settings.
     $this->init_settings();
     // Define user set variables
     $this->title = $this->settings['title'];
     $this->description = $this->settings['description'];
     $this->mer_id = $this->settings['mer_id'];
     $this->check_code = $this->settings['check_code'];
     $this->notify_url = trailingslashit(home_url());
     $this->gateway = "https://ecpay.com.tw/form_Sc_to5.php";
     // Actions
     add_action('woocommerce_update_options_payment_gateways_' . $this->id, array($this, 'process_admin_options'));
     add_action('woocommerce_thankyou_ecpay', array($this, 'thankyou_page'));
     //需與id名稱大小寫相同
     add_action('woocommerce_receipt_ecpay', array($this, 'receipt_page'));
     //add_action('init', array(&$this, 'check_ecpay_response'));
     // Customer Emails
     //add_action('woocommerce_email_before_order_table', array(&$this, 'email_instructions'), 10, 2);
 }
Example #9
0
 /**
  *
  * add filter for Site option defaults
  *
  */
 public static function default_site_options()
 {
     //global
     add_site_option('backwpup_version', '0.0.0');
     //job default
     add_site_option('backwpup_jobs', array());
     //general
     add_site_option('backwpup_cfg_showadminbar', 1);
     add_site_option('backwpup_cfg_showfoldersize', 0);
     add_site_option('backwpup_cfg_protectfolders', 1);
     //job
     $max_execution_time = 0;
     if (strstr(PHP_SAPI, 'cgi')) {
         $max_execution_time = (int) ini_get('max_execution_time');
     }
     add_site_option('backwpup_cfg_jobmaxexecutiontime', $max_execution_time);
     add_site_option('backwpup_cfg_jobziparchivemethod', '');
     add_site_option('backwpup_cfg_jobstepretry', 3);
     add_site_option('backwpup_cfg_jobrunauthkey', substr(md5(BackWPup::get_plugin_data('hash')), 11, 8));
     add_site_option('backwpup_cfg_loglevel', 'normal_translated');
     add_site_option('backwpup_cfg_jobwaittimems', 0);
     add_site_option('backwpup_cfg_jobdooutput', 0);
     //Logs
     add_site_option('backwpup_cfg_maxlogs', 30);
     add_site_option('backwpup_cfg_gzlogs', 0);
     $upload_dir = wp_upload_dir();
     $logs_dir = trailingslashit(str_replace('\\', '/', $upload_dir['basedir'])) . 'backwpup-' . BackWPup::get_plugin_data('hash') . '-logs/';
     $content_path = trailingslashit(str_replace('\\', '/', WP_CONTENT_DIR));
     $logs_dir = str_replace($content_path, '', $logs_dir);
     add_site_option('backwpup_cfg_logfolder', $logs_dir);
     //Network Auth
     add_site_option('backwpup_cfg_httpauthuser', '');
     add_site_option('backwpup_cfg_httpauthpassword', '');
 }
 /**
  * Loads custom meta boxes on the "Add New Testimonial" and "Edit Testimonial" screens.
  *
  * @since 1.0.0
  */
 public function load_post_meta_boxes()
 {
     $screen = get_current_screen();
     if (!empty($screen->post_type) && 'testimonial' === $screen->post_type) {
         require_once trailingslashit(CHERRY_TESTI_DIR) . 'admin/includes/class-cherry-testimonials-meta-boxes.php';
     }
 }
Example #11
0
function wpef7_upload_dir($type = false)
{
    $siteurl = get_option('siteurl');
    $upload_path = trim(get_option('upload_path'));
    if (empty($upload_path)) {
        $dir = WP_CONTENT_DIR . '/uploads';
    } else {
        $dir = $upload_path;
    }
    $dir = path_join(ABSPATH, $dir);
    if (!($url = get_option('upload_url_path'))) {
        if (empty($upload_path) || $upload_path == $dir) {
            $url = WP_CONTENT_URL . '/uploads';
        } else {
            $url = trailingslashit($siteurl) . $upload_path;
        }
    }
    if (defined('UPLOADS')) {
        $dir = ABSPATH . UPLOADS;
        $url = trailingslashit($siteurl) . UPLOADS;
    }
    if ('dir' == $type) {
        return $dir;
    }
    if ('url' == $type) {
        return $url;
    }
    return array('dir' => $dir, 'url' => $url);
}
Example #12
0
/**
 * Loads the admin JavaScript for the required pages based off the $hook_suffix parameter.
 *
 * @since 0.2.0
 * @param string $hook_suffix The hook for the current page in the admin.
 */
function members_admin_enqueue_scripts($hook_suffix)
{
    $pages = array('users_page_roles', 'users_page_role-new');
    if (in_array($hook_suffix, $pages)) {
        wp_enqueue_script('members-admin', trailingslashit(MEMBERS_URI) . 'js/admin.js', array('jquery'), '20110525', true);
    }
}
 /**
  * __construct function.
  *
  * @access public
  * @return void
  * @since 1.0.0
  */
 public function __construct($file)
 {
     // Default values
     $this->plugin_url = trailingslashit(plugins_url('', $file));
     $this->plugin_path = plugin_dir_path($file);
     $this->token = 'sensei-certificate-templates';
     // Setup post type
     add_action('init', array($this, 'setup_certificate_templates_post_type'), 110);
     /**
      * FRONTEND
      */
     add_action('sensei_additional_styles', array($this, 'enqueue_styles'));
     /**
      * BACKEND
      */
     if (is_admin()) {
         // Admin section
         include $this->plugin_path . 'admin/woothemes-sensei-certificate-templates-admin-init.php';
         // Custom Write Panel Columns
         add_filter('manage_edit-course_columns', array($this, 'add_column_headings'), 11, 1);
         add_action('manage_posts_custom_column', array($this, 'add_column_data'), 11, 2);
     }
     // End If Statement
     // Preview Template
     add_filter('single_template', array($this, 'certificate_templates_locate_preview_template'));
 }
 public function filter_the_content($content)
 {
     $ww_problem = false;
     if (is_page('webwork')) {
         $ww_problem = true;
     } else {
         $ww_problem = get_query_var('ww_problem');
     }
     if ($ww_problem) {
         $content = '<div id="webwork-app"></div>';
         wp_enqueue_script('webwork-app', plugins_url() . '/webwork/build/index.js');
         $route_base = get_option('home');
         $route_base = preg_replace('|https?://[^/]+/|', '', $route_base);
         // @todo Centralize this logic.
         $main_site_url = get_blog_option(1, 'home');
         $rest_api_endpoint = trailingslashit($main_site_url) . 'wp-json/webwork/v1/';
         // @todo Abstract.
         $post_data = null;
         $ww_problem_text = '';
         if (!empty($_GET['post_data_key'])) {
             $post_data = get_blog_option(1, $_GET['post_data_key']);
             $ww_problem_text = base64_decode($post_data['pg_object']);
         }
         // @todo This is awful.
         $clients = get_blog_option(1, 'webwork_clients');
         $remote_course_url = array_search(get_current_blog_id(), $clients);
         wp_localize_script('webwork-app', 'WWData', array('problem_id' => $ww_problem, 'problem_text' => $ww_problem_text, 'remote_course_url' => $remote_course_url, 'rest_api_nonce' => wp_create_nonce('wp_rest'), 'rest_api_endpoint' => $rest_api_endpoint, 'route_base' => trailingslashit($route_base) . 'webwork/', 'user_can_ask_question' => is_user_logged_in(), 'user_can_post_response' => is_user_logged_in(), 'user_can_vote' => is_user_logged_in()));
         wp_enqueue_style('webwork-app', plugins_url() . '/webwork/assets/css/app.css');
         wp_register_script('webwork-mathjax-loader', WEBWORK_PLUGIN_URL . '/assets/js/webwork-mathjax-loader.js');
         $webwork_mathjax_loader_strings = array('mathjax_src' => esc_url('https://cdn.mathjax.org/mathjax/latest/unpacked/MathJax.js?config=TeX-MML-AM_HTMLorMML-full'));
         wp_localize_script('webwork-mathjax-loader', 'WeBWorK_MathJax', $webwork_mathjax_loader_strings);
         wp_enqueue_script('webwork-mathjax-loader');
     }
     return $content;
 }
Example #15
0
 function get_style()
 {
     /*
      * Shared settings and properties
      */
     $config = array('settings' => array('membership' => 'YjowOw==', 'theme' => 'YToyOntzOjQ6InR5cGUiO3M6NzoibGFuZGluZyI7czozOiJkaXIiO3M6MToiMiI7fQ==', 'header_layout' => 'YjowOw==', 'feature_area' => 'YTozOntzOjQ6InR5cGUiO2k6MTtzOjc6ImVuYWJsZWQiO3M6MToiWSI7czo4OiJzZXR0aW5ncyI7YTo1OntzOjEwOiJ0aXRsZV9sb2dvIjthOjE6e3M6NToidGl0bGUiO3M6MDoiIjt9czo3OiJjb250ZW50IjthOjI6e3M6NToidGl0bGUiO3M6MDoiIjtzOjc6ImNvbnRlbnQiO3M6MDoiIjt9czo1OiJvcHRpbiI7YTo0OntzOjc6ImVuYWJsZWQiO3M6MToiTiI7czo5OiJmb3JtX2h0bWwiO2E6MjM6e3M6MTA6ImVtYWlsX2RhdGEiO3M6MDoiIjtzOjEzOiJlbWFpbF9hZGRyZXNzIjtzOjA6IiI7czoxMjoicmVkaXJlY3RfdXJsIjtzOjA6IiI7czoxMjoiZXh0cmFfZmllbGRzIjtzOjA6IiI7czoxODoiZW1haWxfZXh0cmFfZmllbGRzIjtzOjA6IiI7czox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footer_area' => 'YTo3OntzOjc6ImVuYWJsZWQiO3M6MToiTiI7czozOiJuYXYiO3M6MDoiIjtzOjExOiJmb250X3NoYWRvdyI7czowOiIiO3M6MTE6ImZvbnRfd2VpZ2h0IjtzOjA6IiI7czo5OiJmb250X3NpemUiO3M6MDoiIjtzOjExOiJmb250X2ZhbWlseSI7czoxNToiU291cmNlIFNhbnMgUHJvIjtzOjE3OiJmb290ZXJfZGlzY2xhaW1lciI7YToyOntzOjc6ImVuYWJsZWQiO3M6MToiTiI7czo3OiJtZXNzYWdlIjtzOjA6IiI7fX0=', 'color_scheme_template' => 'YjowOw==', 'typography' => 'YToyOntzOjEzOiJmb250X2VsZW1lbnRzIjthOjk6e3M6MTA6InNpdGVfdGl0bGUiO2E6NDp7czo0OiJzaXplIjtzOjI6IjE3IjtzOjQ6ImZvbnQiO3M6MTU6IlNvdXJjZSBTYW5zIFBybyI7czo1OiJzdHlsZSI7czo2OiJub3JtYWwiO3M6NToiY29sb3IiO3M6NDoiIzQ0NCI7fXM6NzoidGFnbGluZSI7YTo0OntzOjQ6InNpemUiO3M6MjoiMTciO3M6NDoiZm9udCI7czoxNToiU291cmNlIFNhbnMgUHJvIjtzOjU6InN0eWxlIjtzOjY6Im5vcm1hbCI7czo1OiJjb2xvciI7czo0OiIjNDQ0Ijt9czo3OiJkZWZhdWx0IjthOjQ6e3M6NDoic2l6ZSI7czoyOiIxNyI7czo0OiJmb250IjtzOjE1OiJTb3VyY2UgU2FucyBQcm8iO3M6NToic3R5bGUiO3M6Njoibm9ybWFsIjtzOjU6ImNvbG9yIjtzOjQ6IiM0NDQiO31zOjI6ImgxIjthOjQ6e3M6NDoic2l6ZSI7czoyOiIxNyI7czo0OiJmb250IjtzOjE1OiJTb3VyY2UgU2FucyBQcm8iO3M6NToic3R5bGUiO3M6Njoibm9ybWFsIjtzOjU6ImNvbG9yIjtzOjQ6IiM0NDQiO31zOjI6ImgyIjthOjQ6e3M6NDoic2l6ZSI7czoyOiIxNyI7czo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YjowOw==', 'seo' => 'YjowOw==', 'scripts' => 'YjowOw==', 'fb_share' => 'YjowOw==', 'lightbox' => 'YjowOw==', 'exit_redirect' => 'YjowOw==', 'one_time_offer' => 'YjowOw==', 'launch_gateway' => 'YjowOw==', 'launch_funnel' => 'YjowOw==', 'landing_bg' => 'YToxOntzOjU6ImltYWdlIjtzOjA6IiI7fQ=='), 'settings_images' => 'YTowOnt9');
     /*
      * Custom settings and properties
      */
     switch ($this->style) {
         case 'A':
             $config['settings']['size_color'] = 'YTozOntzOjk6ImJveF93aWR0aCI7czozOiIzMDAiO3M6MTU6ImJveF9jb2xvcl9zdGFydCI7czo3OiIjZjlmOWY5IjtzOjEzOiJib3hfY29sb3JfZW5kIjtzOjc6IiNkYWRhZGEiO30=';
             $config['layouts'] = 'YToxOntzOjQ6ImJvZHkiO2E6MTp7aTowO2E6NDp7czo5OiJyb3dfY2xhc3MiO3M6MjY6InJvdyBvbmUtY29sIGNmIHVpLXNvcnRhYmxlIjtzOjk6InJvd19zdHlsZSI7czowOiIiO3M6MTQ6InJvd19kYXRhX3N0eWxlIjtzOjA6IiI7czo4OiJjaGlsZHJlbiI7YToxOntpOjA7YToyOntzOjk6ImNvbF9jbGFzcyI7czoxNToib25lIGNvbHVtbiBjb2xzIjtzOjg6ImNoaWxkcmVuIjthOjQ6e2k6MDthOjQ6e3M6NDoidHlwZSI7czo3OiJlbGVtZW50IjtzOjY6Im9iamVjdCI7czoxNjU6IltpbWFnZXMgc3R5bGU9IjAiIGltYWdlPSJ7b3BfZmlsZW5hbWU9IndwLWNvbnRlbnQvdXBsb2Fkcy8yMDEzLzEwL1NhbXBsZUxvZ28tRGFyay5wbmcifSIgd2lkdGg9IjI2MyIgYWxpZ249ImNlbnRlciIgdG9wX21hcmdpbj0iMCIgYm90dG9tX21hcmdpbj0iNTAiIGZ1bGxfd2lkdGg9IlkiXSI7czoxMzoiZWxlbWVudF9jbGFzcyI7czoyMDoiZWxlbWVudC1jb250YWluZXIgY2YiO3M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W1wbGVMb2dvLURhcmsucG5nIjtzOjE5OiJTYW1wbGVMb2dvLURhcmsucG5nIjt9';
             break;
         case 'B':
             $config['settings']['size_color'] = 'YTozOntzOjk6ImJveF93aWR0aCI7czozOiIzMDAiO3M6MTU6ImJveF9jb2xvcl9zdGFydCI7czo3OiIjMDAwMDAwIjtzOjEzOiJib3hfY29sb3JfZW5kIjtzOjc6IiMwMDAwMDAiO30=';
             $config['layouts'] = 'YToxOntzOjQ6ImJvZHkiO2E6MTp7aTowO2E6NDp7czo5OiJyb3dfY2xhc3MiO3M6MjY6InJvdyBvbmUtY29sIGNmIHVpLXNvcnRhYmxlIjtzOjk6InJvd19zdHlsZSI7czowOiIiO3M6MTQ6InJvd19kYXRhX3N0eWxlIjtzOjA6IiI7czo4OiJjaGlsZHJlbiI7YToxOntpOjA7YToyOntzOjk6ImNvbF9jbGFzcyI7czoxNToib25lIGNvbHVtbiBjb2xzIjtzOjg6ImNoaWxkcmVuIjthOjQ6e2k6MDthOjQ6e3M6NDoidHlwZSI7czo3OiJlbGVtZW50IjtzOjY6Im9iamVjdCI7czoxNjY6IltpbWFnZXMgc3R5bGU9IjAiIGltYWdlPSJ7b3BfZmlsZW5hbWU9IndwLWNvbnRlbnQvdXBsb2Fkcy8yMDEzLzEwL1NhbXBsZUxvZ28tTGlnaHQucG5nIn0iIHdpZHRoPSIyNjMiIGFsaWduPSJjZW50ZXIiIHRvcF9tYXJnaW49IjAiIGJvdHRvbV9tYXJnaW49IjUwIiBmdWxsX3dpZHRoPSJZIl0iO3M6MTM6ImVsZW1lbnRfY2xhc3MiO3M6MjA6ImVsZW1lbnQtY29udGFpbmVyIGNmIjtzOjE4OiJlbGVtZW50X2RhdGFfc3R5bGUiO3M6MDoiIjt9aToxO2E6NDp7czo0OiJ0eXBlIjtzOjc6ImVsZW1lbnQiO3M6Njoib2JqZWN0IjtzOjEyODoiW2hlYWRsaW5lIHN0eWxlPSIxIiBmb250X2NvbG9yPSIjZmZmZmZmIiBhbGl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m94X2NvZGVdW29wdGluX2JveF9maWVsZCBuYW1lPSJoZWFkbGluZSJdSGVyZSdzIFRoZSBIZWFkbGluZSBGb3IgVGhlIEJveFsvb3B0aW5fYm94X2ZpZWxkXVtvcHRpbl9ib3hfZmllbGQgbmFtZT0icGFyYWdyYXBoIl1URzl5WlcwZ2FYQnpkVzBnWkc5c2IzSWdjMmwwSUdGdFpYUXNJR052Ym5ObFkzUmxkSFZ5SUdGa2FYQnBjMk5wYm1jZ1pXeHBkQzRnUkc5dVpXTWdkbVZzSUc1MWJtTWdibTl1SUd4aFkzVnpJSFpsYm1WdVlYUnBjeUJqYjIxdGIyUnZMZz09Wy9vcHRpbl9ib3hfZmllbGRdW29wdGluX2JveF9maWVsZCBuYW1lPSJwcml2YWN5Il1XZSB2YWx1ZSB5b3VyIHByaXZhY3kgYW5kIHdvdWxkIG5ldmVyIHNwYW0geW91Wy9vcHRpbl9ib3hfZmllbGRdW29wdGluX2JveF9maWVsZCBuYW1lPSJ0b3BfY29sb3IiXXVuZGVmaW5lZFsvb3B0aW5fYm94X2ZpZWxkXVtvcHRpbl9ib3hfYnV0dG9uIHR5cGU9IjAiIGJ1dHRvbl9iZWxvdz0iWSJdR2V0IEluc3RhbnQgQWNjZXNzIVsvb3B0aW5fYm94X2J1dHRvbl0gWy9vcHRpbl9ib3hdIjtzOjEzOiJlbGVtZW50X2NsYXNzIjtzOjIwOiJlbGVtZW50LWNvbnRhaW5lciBjZiI7czoxODoiZWxlbWVudF9kYXRhX3N0eWxlIjtzOjA6IiI7fX19fX19fQ==';
             $config['images'] = 'YToxOntzOjQ3OiJ3cC1jb250ZW50L3VwbG9hZHMvMjAxMy8xMC9TYW1wbGVMb2dvLUxpZ2h0LnBuZyI7czoyMDoiU2FtcGxlTG9nby1MaWdodC5wbmciO30=';
             break;
         default:
             return;
     }
     /*
      * Fixing image paths, switching {op_filename:"wp-content/uploads/10/SampleLogo-Dark.png"} with
      * path to real file location (inside of page image collection)
      */
     $config = $this->fix_image_paths($config, trailingslashit(OP_PAGES_URL . 'landing/2/styles'));
     $settings = op_get_var($config, 'settings', array());
     $settings = base64_encode(serialize($settings));
     $this->config->settings = $settings;
     $this->config->layouts = op_get_var($config, 'layouts', array());
     op_page_set_saved_settings($this->config, array());
 }
Example #16
0
 function load_scripts()
 {
     if (BON_TOOLKIT_USE_CSS) {
         wp_register_style('bon-toolkit-poll', trailingslashit(BON_TOOLKIT_CSS) . 'poll.css', '', '1.0.0');
         wp_enqueue_style('bon-toolkit-poll');
     }
 }
function um_access_global_settings()
{
    global $post, $ultimatemember;
    $access = um_get_option('accessible');
    if ($access == 2 && !is_user_logged_in()) {
        $redirect = um_get_option('access_redirect');
        if (!$redirect) {
            $redirect = um_get_core_page('login');
        }
        $redirects[] = untrailingslashit(um_get_core_page('login'));
        $redirects[] = untrailingslashit(um_get_option('access_redirect'));
        $exclude_uris = um_get_option('access_exclude_uris');
        if ($exclude_uris) {
            $redirects = array_merge($redirects, $exclude_uris);
        }
        $redirects = array_unique($redirects);
        $current_url = $ultimatemember->permalinks->get_current_url(get_option('permalink_structure'));
        $current_url = untrailingslashit($current_url);
        $current_url_slash = trailingslashit($current_url);
        if ((isset($post->ID) || is_home()) && (in_array($current_url, $redirects) || in_array($current_url_slash, $redirects))) {
            // allow
        } else {
            $ultimatemember->access->redirect_handler = $redirect;
        }
    }
}
Example #18
0
 /**
  * The autoloader class
  *
  * @param string $class_name
  *
  * @return bool
  * @since 1.0
  */
 function wpbgdc_autoloader($class_name)
 {
     // do not include classes that already exist
     if (class_exists($class_name)) {
         return true;
     }
     $file = trailingslashit(dirname(__FILE__)) . 'classes/' . strtolower($class_name) . '.php';
     if (is_file($file)) {
         require_once $file;
         return true;
     }
     if (false === stripos($class_name, 'Google')) {
         return false;
     }
     $file = trailingslashit(dirname(__FILE__)) . 'classes/' . str_replace('_', '/', $class_name) . '.php';
     if (is_file($file)) {
         try {
             require_once $file;
         } catch (Exception $e) {
             $message = '<div class="error"><p>' . $e->getMessage() . '</p></div>';
             wp_die($message);
         }
         return true;
     }
     return false;
 }
/**
 * Retrieve the name of the highest priority template file that exists.
 *
 * Searches in the STYLESHEETPATH before TEMPLATEPATH so that themes which
 * inherit from a parent theme can just overload one file. If the template is
 * not found in either of those, it looks in the theme-compat folder last.
 *
 * Taken from bbPress
 *
 * @since v2.5
 *
 * @param string|array $template_names Template file(s) to search for, in order.
 * @param bool $load If true the template file will be loaded if it is found.
 * @param bool $require_once Whether to require_once or require. Default true.
 *                            Has no effect if $load is false.
 * @return string The template filename if one is located.
 */
function mr_locate_template($template_names, $load = false, $require_once = true, $template_vars)
{
    // No file found yet
    $located = false;
    // Try to find a template file
    foreach ((array) $template_names as $template_name) {
        // Continue if template is empty
        if (empty($template_name)) {
            continue;
        }
        // Trim off any slashes from the template name
        $template_name = ltrim($template_name, '/');
        // Check child theme first
        if (file_exists(trailingslashit(get_stylesheet_directory()) . 'multi-rating/' . $template_name)) {
            $located = trailingslashit(get_stylesheet_directory()) . 'multi-rating/' . $template_name;
            break;
            // Check parent theme next
        } elseif (file_exists(trailingslashit(get_template_directory()) . 'multi-rating/' . $template_name)) {
            $located = trailingslashit(get_template_directory()) . 'multi-rating/' . $template_name;
            break;
            // Check theme compatibility last
        } elseif (file_exists(trailingslashit(mr_get_templates_dir()) . $template_name)) {
            $located = trailingslashit(mr_get_templates_dir()) . $template_name;
            break;
        }
    }
    if (true == $load && !empty($located)) {
        mr_load_template($located, $require_once, $template_vars);
    }
    return $located;
}
 /**
  * Register core taxonomies.
  */
 public static function register_taxonomies()
 {
     if (taxonomy_exists('product_type')) {
         return;
     }
     do_action('woocommerce_register_taxonomy');
     $permalinks = get_option('woocommerce_permalinks');
     register_taxonomy('product_type', apply_filters('woocommerce_taxonomy_objects_product_type', array('product')), apply_filters('woocommerce_taxonomy_args_product_type', array('hierarchical' => false, 'show_ui' => false, 'show_in_nav_menus' => false, 'query_var' => is_admin(), 'rewrite' => false, 'public' => false)));
     register_taxonomy('product_cat', apply_filters('woocommerce_taxonomy_objects_product_cat', array('product')), apply_filters('woocommerce_taxonomy_args_product_cat', array('hierarchical' => true, 'update_count_callback' => '_wc_term_recount', 'label' => __('Product Categories', 'woocommerce'), 'labels' => array('name' => __('Product Categories', 'woocommerce'), 'singular_name' => __('Product Category', 'woocommerce'), 'menu_name' => _x('Categories', 'Admin menu name', 'woocommerce'), 'search_items' => __('Search Product Categories', 'woocommerce'), 'all_items' => __('All Product Categories', 'woocommerce'), 'parent_item' => __('Parent Product Category', 'woocommerce'), 'parent_item_colon' => __('Parent Product Category:', 'woocommerce'), 'edit_item' => __('Edit Product Category', 'woocommerce'), 'update_item' => __('Update Product Category', 'woocommerce'), 'add_new_item' => __('Add New Product Category', 'woocommerce'), 'new_item_name' => __('New Product Category Name', 'woocommerce')), 'show_ui' => true, 'query_var' => true, 'capabilities' => array('manage_terms' => 'manage_product_terms', 'edit_terms' => 'edit_product_terms', 'delete_terms' => 'delete_product_terms', 'assign_terms' => 'assign_product_terms'), 'rewrite' => array('slug' => empty($permalinks['category_base']) ? _x('product-category', 'slug', 'woocommerce') : $permalinks['category_base'], 'with_front' => false, 'hierarchical' => true))));
     register_taxonomy('product_tag', apply_filters('woocommerce_taxonomy_objects_product_tag', array('product')), apply_filters('woocommerce_taxonomy_args_product_tag', array('hierarchical' => false, 'update_count_callback' => '_wc_term_recount', 'label' => __('Product Tags', 'woocommerce'), 'labels' => array('name' => __('Product Tags', 'woocommerce'), 'singular_name' => __('Product Tag', 'woocommerce'), 'menu_name' => _x('Tags', 'Admin menu name', 'woocommerce'), 'search_items' => __('Search Product Tags', 'woocommerce'), 'all_items' => __('All Product Tags', 'woocommerce'), 'edit_item' => __('Edit Product Tag', 'woocommerce'), 'update_item' => __('Update Product Tag', 'woocommerce'), 'add_new_item' => __('Add New Product Tag', 'woocommerce'), 'new_item_name' => __('New Product Tag Name', 'woocommerce'), 'popular_items' => __('Popular Product Tags', 'woocommerce'), 'separate_items_with_commas' => __('Separate Product Tags with commas', 'woocommerce'), 'add_or_remove_items' => __('Add or remove Product Tags', 'woocommerce'), 'choose_from_most_used' => __('Choose from the most used Product tags', 'woocommerce'), 'not_found' => __('No Product Tags found', 'woocommerce')), 'show_ui' => true, 'query_var' => true, 'capabilities' => array('manage_terms' => 'manage_product_terms', 'edit_terms' => 'edit_product_terms', 'delete_terms' => 'delete_product_terms', 'assign_terms' => 'assign_product_terms'), 'rewrite' => array('slug' => empty($permalinks['tag_base']) ? _x('product-tag', 'slug', 'woocommerce') : $permalinks['tag_base'], 'with_front' => false))));
     register_taxonomy('product_shipping_class', apply_filters('woocommerce_taxonomy_objects_product_shipping_class', array('product', 'product_variation')), apply_filters('woocommerce_taxonomy_args_product_shipping_class', array('hierarchical' => true, 'update_count_callback' => '_update_post_term_count', 'label' => __('Shipping Classes', 'woocommerce'), 'labels' => array('name' => __('Shipping Classes', 'woocommerce'), 'singular_name' => __('Shipping Class', 'woocommerce'), 'menu_name' => _x('Shipping Classes', 'Admin menu name', 'woocommerce'), 'search_items' => __('Search Shipping Classes', 'woocommerce'), 'all_items' => __('All Shipping Classes', 'woocommerce'), 'parent_item' => __('Parent Shipping Class', 'woocommerce'), 'parent_item_colon' => __('Parent Shipping Class:', 'woocommerce'), 'edit_item' => __('Edit Shipping Class', 'woocommerce'), 'update_item' => __('Update Shipping Class', 'woocommerce'), 'add_new_item' => __('Add New Shipping Class', 'woocommerce'), 'new_item_name' => __('New Shipping Class Name', 'woocommerce')), 'show_ui' => false, 'show_in_nav_menus' => false, 'query_var' => is_admin(), 'capabilities' => array('manage_terms' => 'manage_product_terms', 'edit_terms' => 'edit_product_terms', 'delete_terms' => 'delete_product_terms', 'assign_terms' => 'assign_product_terms'), 'rewrite' => false)));
     global $wc_product_attributes;
     $wc_product_attributes = array();
     if ($attribute_taxonomies = wc_get_attribute_taxonomies()) {
         foreach ($attribute_taxonomies as $tax) {
             if ($name = wc_attribute_taxonomy_name($tax->attribute_name)) {
                 $tax->attribute_public = absint(isset($tax->attribute_public) ? $tax->attribute_public : 1);
                 $label = !empty($tax->attribute_label) ? $tax->attribute_label : $tax->attribute_name;
                 $wc_product_attributes[$name] = $tax;
                 $taxonomy_data = array('hierarchical' => true, 'update_count_callback' => '_update_post_term_count', 'labels' => array('name' => $label, 'singular_name' => $label, 'search_items' => sprintf(__('Search %s', 'woocommerce'), $label), 'all_items' => sprintf(__('All %s', 'woocommerce'), $label), 'parent_item' => sprintf(__('Parent %s', 'woocommerce'), $label), 'parent_item_colon' => sprintf(__('Parent %s:', 'woocommerce'), $label), 'edit_item' => sprintf(__('Edit %s', 'woocommerce'), $label), 'update_item' => sprintf(__('Update %s', 'woocommerce'), $label), 'add_new_item' => sprintf(__('Add New %s', 'woocommerce'), $label), 'new_item_name' => sprintf(__('New %s', 'woocommerce'), $label)), 'show_ui' => false, 'query_var' => 1 === $tax->attribute_public, 'rewrite' => false, 'sort' => false, 'public' => 1 === $tax->attribute_public, 'show_in_nav_menus' => 1 === $tax->attribute_public && apply_filters('woocommerce_attribute_show_in_nav_menus', false, $name), 'capabilities' => array('manage_terms' => 'manage_product_terms', 'edit_terms' => 'edit_product_terms', 'delete_terms' => 'delete_product_terms', 'assign_terms' => 'assign_product_terms'));
                 if (1 === $tax->attribute_public) {
                     $taxonomy_data['rewrite'] = array('slug' => empty($permalinks['attribute_base']) ? '' : trailingslashit($permalinks['attribute_base']) . sanitize_title($tax->attribute_name), 'with_front' => false, 'hierarchical' => true);
                 }
                 register_taxonomy($name, apply_filters("woocommerce_taxonomy_objects_{$name}", array('product')), apply_filters("woocommerce_taxonomy_args_{$name}", $taxonomy_data));
             }
         }
         do_action('woocommerce_after_register_taxonomy');
     }
 }
Example #21
0
 /**
  * Scans the template files of the active theme, and returns an
  * array of [Template Name => {file}.php]
  *
  * @since 0.2.0
  *
  * @return array
  */
 function get_post_templates()
 {
     $themes = get_themes();
     $theme = get_current_theme();
     $templates = $themes[$theme]['Template Files'];
     $post_templates = array();
     $base = array(trailingslashit(get_template_directory()), trailingslashit(get_stylesheet_directory()));
     foreach ((array) $templates as $template) {
         $template = WP_CONTENT_DIR . str_replace(WP_CONTENT_DIR, '', $template);
         $basename = str_replace($base, '', $template);
         /** Don't allow template files in subdirectories */
         if (false !== strpos($basename, '/')) {
             continue;
         }
         $template_data = implode('', file($template));
         $name = '';
         if (preg_match('|Single Post Template:(.*)$|mi', $template_data, $name)) {
             $name = _cleanup_header_comment($name[1]);
         }
         if (!empty($name)) {
             if (basename($template) != basename(__FILE__)) {
                 $post_templates[trim($name)] = $basename;
             }
         }
     }
     return $post_templates;
 }
Example #22
0
 /**
  * Define Meta Slider constants
  */
 private function define_constants()
 {
     define('METASLIDER_VERSION', $this->version);
     define('METASLIDER_BASE_URL', trailingslashit(plugins_url('ml-slider')));
     define('METASLIDER_ASSETS_URL', trailingslashit(METASLIDER_BASE_URL . 'assets'));
     define('METASLIDER_PATH', plugin_dir_path(__FILE__));
 }
Example #23
0
 public static function get_vendor_store_url($user = false)
 {
     if (!is_object($user)) {
         if ($user === false) {
             $user = get_current_user_id();
         }
         $user = new WP_User($user);
     }
     if (!$user || !is_object($user)) {
         $user = new WP_User(get_current_user_id());
     }
     $archive_page = EDD_FES()->vendors->use_author_archives();
     $name = get_userdata($user->ID);
     $user_nicename = apply_filters('fes_user_nicename_to_lower', strtolower($name->user_nicename), $user);
     if (empty($archive_page)) {
         $vendor_url = get_permalink(EDD_FES()->helper->get_option('fes-vendor-page', ''));
         $permalink = apply_filters('fes_adjust_vendor_url', untrailingslashit('vendor/'));
         $vendor_url = str_replace('fes-vendor/', $permalink, $vendor_url);
         $vendor_url = str_replace('vendor/', $permalink, $vendor_url);
         if (get_option('permalink_structure')) {
             $vendor_url = trailingslashit($vendor_url) . $user_nicename;
         } else {
             $vendor_url = add_query_arg('vendor', $user_nicename, $vendor_url);
         }
     } else {
         $vendor_url = get_author_posts_url($user->ID, $user_nicename);
     }
     return $vendor_url;
 }
Example #24
0
 static function init()
 {
     // Windows-proof constants: replace backward by forward slashes. Thanks to: @peterbouwmeester
     self::$_dir = trailingslashit(Redux_Helpers::cleanFilePath(dirname(__FILE__)));
     $wp_content_dir = trailingslashit(Redux_Helpers::cleanFilePath(WP_CONTENT_DIR));
     $wp_content_dir = trailingslashit(str_replace('//', '/', $wp_content_dir));
     $relative_url = str_replace($wp_content_dir, '', self::$_dir);
     $wp_content_url = Redux_Helpers::cleanFilePath(is_ssl() ? str_replace('http://', 'https://', WP_CONTENT_URL) : WP_CONTENT_URL);
     self::$_url = trailingslashit($wp_content_url) . $relative_url;
     // See if Redux is a plugin or not
     if (strpos(Redux_Helpers::cleanFilePath(__FILE__), Redux_Helpers::cleanFilePath(get_stylesheet_directory())) !== false) {
         self::$_is_plugin = false;
     }
     /**
             Still need to port these.
     
                 $defaults['footer_credit']      = '<span id="footer-thankyou">' . __( 'Options panel created using', 'redux-framework') . ' <a href="' . $this->framework_url . '" target="_blank">' . __('Redux Framework', 'redux-framework') . '</a> v' . self::$_version . '</span>';
                 $defaults['help_tabs']          = array();
                 $defaults['help_sidebar']       = ''; // __( '', 'redux-framework' );
                 $defaults['database']           = ''; // possible: options, theme_mods, theme_mods_expanded, transient
                 $defaults['customizer']         = false; // setting to true forces get_theme_mod_expanded
                 $defaults['global_variable']    = '';
                 $defaults['output']             = true; // Dynamically generate CSS
                 $defaults['transient_time']     = 60 * MINUTE_IN_SECONDS;
     
                 // The defaults are set so it will preserve the old behavior.
                 $defaults['default_show']       = false; // If true, it shows the default value
                 $defaults['default_mark']       = ''; // What to print by the field's title if the value shown is default
     **/
     self::$_properties = array('args' => array('opt_name' => array('required', 'data_type' => 'string', 'label' => 'Option Name', 'desc' => 'Must be defined by theme/plugin. Is the unique key allowing multiple instance of Redux within a single Wordpress instance.', 'default' => ''), 'google_api_key' => array('data_type' => 'string', 'label' => 'Google Web Fonts API Key', 'desc' => 'Key used to request Google Webfonts. Google fonts are omitted without this.', 'default' => ''), 'last_tab' => array('data_type' => 'string', 'label' => 'Last Tab', 'desc' => 'Last tab used.', 'default' => '0'), 'menu_icon' => array('data_type' => 'string', 'label' => 'Default Menu Icon', 'desc' => 'Default menu icon used by sections when one is not specified.', 'default' => self::$_url . 'assets/img/menu_icon.png'), 'menu_title' => array('data_type' => 'string', 'label' => 'Menu Title', 'desc' => 'Label displayed when the admin menu is available.', 'default' => __('Options', 'redux-framework')), 'page_title' => array('data_type' => 'string', 'label' => 'Page Title', 'desc' => 'Title used on the panel page.', 'default' => __('Options', 'redux-framework')), 'page_icon' => array('data_type' => 'string', 'label' => 'Page Title', 'desc' => 'Icon class to be used on the options page.', 'default' => 'icon-themes'), 'page_slug' => array('required', 'data_type' => 'string', 'label' => 'Page Slug', 'desc' => 'Slug used to access options panel.', 'default' => '_options'), 'page_permissions' => array('required', 'data_type' => 'string', 'label' => 'Page Capabilities', 'desc' => 'Permissions needed to access the options panel.', 'default' => 'manage_options'), 'menu_type' => array('required', 'data_type' => 'varchar', 'label' => 'Page Type', 'desc' => 'Specify if the admin menu should appear or not.', 'default' => 'menu', 'form' => array('type' => 'select', 'options' => array('menu' => 'Admin Menu', 'submenu' => 'Submenu Only')), 'validation' => array('required')), 'page_parent' => array('required', 'data_type' => 'varchar', 'label' => 'Page Parent', 'desc' => 'Specify if the admin menu should appear or not.', 'default' => 'themes.php', 'form' => array('type' => 'select', 'options' => array('index.php' => 'Dashboard', 'edit.php' => 'Posts', 'upload.php' => 'Media', 'link-manager.php' => 'Links', 'edit.php?post_type=page' => 'pages', 'edit-comments.php' => 'Comments', 'themes.php' => 'Appearance', 'plugins.php' => 'Plugins', 'users.php' => 'Users', 'tools.php' => 'Tools', 'options-general.php' => 'Settings')), 'validation' => array('required')), 'page_priority' => array('type' => 'int', 'label' => 'Page Position', 'desc' => 'Location where this menu item will appear in the admin menu. Warning, beware of overrides.', 'default' => null), 'output' => array('required', 'data_type' => 'bool', 'form' => array('type' => 'radio', 'options' => array(true => 'Enabled', false => 'Disabled')), 'label' => 'Output/Generate CSS', 'desc' => 'Global shut-off for dynamic CSS output by the framework', 'default' => true), 'allow_sub_menu' => array('data_type' => 'bool', 'form' => array('type' => 'radio', 'options' => array(true => 'Enabled', false => 'Disabled')), 'label' => 'Allow Submenu', 'desc' => 'Turn on or off the submenu that will typically be shown under Appearance.', 'default' => true), 'show_import_export' => array('data_type' => 'bool', 'form' => array('type' => 'radio', 'options' => array(true => 'Show', false => 'Hide')), 'label' => 'Show Import/Export', 'desc' => 'Show/Hide the import/export tab.', 'default' => true), 'dev_mode' => array('data_type' => 'bool', 'form' => array('type' => 'radio', 'options' => array(true => 'Enabled', false => 'Disabled')), 'label' => 'Developer Mode', 'desc' => 'Turn on or off the dev mode tab.', 'default' => false), 'system_info' => array('data_type' => 'bool', 'form' => array('type' => 'radio', 'options' => array(true => 'Enabled', false => 'Disabled')), 'label' => 'System Info', 'desc' => 'Turn on or off the system info tab.', 'default' => false)));
 }
Example #25
0
 public function uploads($command = array(), $args = array())
 {
     if (count($command) == 1 && reset($command) == 'help') {
         return $this->uploads_help();
     }
     $dir = wp_upload_dir();
     $defaults = array('ssh_host' => defined('IMPORT_UPLOADS_SSH_HOST') ? IMPORT_UPLOADS_SSH_HOST : '', 'ssh_user' => defined('IMPORT_UPLOADS_SSH_USER') ? IMPORT_UPLOADS_SSH_USER : '', 'remote_path' => defined('IMPORT_UPLOADS_REMOTE_PATH') ? IMPORT_UPLOADS_REMOTE_PATH : '', 'uploads_dir' => '', 'local_path' => $dir['basedir']);
     $args = wp_parse_args($args, $defaults);
     if ($args['uploads_dir']) {
         $args['remote_path'] = $args['remote_path'] ? trailingslashit($args['remote_path']) . trailingslashit(ltrim($args['uploads_dir'], '/')) : '';
         $args['local_path'] = trailingslashit($args['local_path']) . untrailingslashit(ltrim($args['uploads_dir'], '/'));
     } else {
         $args['remote_path'] = $args['remote_path'] ? trailingslashit($args['remote_path']) : '';
         $args['local_path'] = untrailingslashit($args['local_path']);
     }
     if (empty($args['remote_path'])) {
         WP_CLI::error('You must specify a remote path. Use --remote_path=~/foo/bar');
         return;
     }
     if (empty($args['ssh_host'])) {
         WP_CLI::error('You must specify a ssh host. Use --ssh_host=example.com');
         return;
     }
     if (empty($args['ssh_user'])) {
         WP_CLI::error('You must specify a ssh user. Use --ssh_user=root');
         return;
     }
     WP_CLI::line(sprintf('Running rsync from %s:%s to %s', $args['ssh_host'], $args['remote_path'], $args['local_path']));
     WP_CLI::launch(sprintf("rsync -avz -e ssh %s@%s:%s %s --exclude 'cache' --exclude '*backup*'", $args['ssh_user'], $args['ssh_host'], $args['remote_path'], $args['local_path']));
 }
Example #26
0
 public static function init()
 {
     global $wp_filesystem;
     // Windows-proof constants: replace backward by forward slashes. Thanks to: @peterbouwmeester
     self::$_dir = trailingslashit(Redux_Helpers::cleanFilePath(dirname(__FILE__)));
     $wp_content_dir = trailingslashit(Redux_Helpers::cleanFilePath(WP_CONTENT_DIR));
     $wp_content_dir = trailingslashit(str_replace('//', '/', $wp_content_dir));
     $relative_url = str_replace($wp_content_dir, '', self::$_dir);
     self::$wp_content_url = trailingslashit(Redux_Helpers::cleanFilePath(is_ssl() ? str_replace('http://', 'https://', WP_CONTENT_URL) : WP_CONTENT_URL));
     self::$_url = self::$wp_content_url . $relative_url;
     // See if Redux is a plugin or not
     if (strpos(Redux_Helpers::cleanFilePath(__FILE__), Redux_Helpers::cleanFilePath(get_stylesheet_directory())) !== false) {
         self::$_is_plugin = false;
     }
     // Create our private upload directory
     Redux_Functions::initWpFilesystem();
     self::$_upload_dir = trailingslashit($wp_filesystem->wp_content_dir()) . '/redux/';
     self::$_upload_url = trailingslashit(content_url()) . '/redux/';
     if (function_exists('sys_get_temp_dir')) {
         $tmp = sys_get_temp_dir();
         if (empty($tmp)) {
             $tmpDir = self::$_upload_url . 'tmp';
             if (file_exists($tmpDir)) {
                 Redux_Helpers::rmdir($tmpDir);
             }
             putenv('TMPDIR=' . self::$_upload_dir . 'tmp');
         }
     }
     // Ensure it exists
     if (!is_dir(self::$_upload_dir)) {
         // Create the directory
         $wp_filesystem->mkdir(self::$_upload_dir);
     }
 }
Example #27
0
/**
 * Returns the author rewrite slug used for author archives.
 *
 * @since  1.0.0
 * @access public
 * @return string
 */
function thds_get_author_rewrite_slug()
{
    $rewrite_base = thds_get_rewrite_base();
    $author_base = thds_get_author_rewrite_base();
    $slug = $author_base ? trailingslashit($rewrite_base) . $author_base : $rewrite_base;
    return apply_filters('thds_get_author_rewrite_slug', $slug);
}
 function CoolVideoGallery()
 {
     $this->plugin_url = trailingslashit(WP_PLUGIN_URL . '/' . dirname(plugin_basename(__FILE__)));
     $this->video_player_url = trailingslashit(WP_PLUGIN_URL . '/' . dirname(plugin_basename(__FILE__)) . '/cvg-player');
     $this->video_player_path = trailingslashit(WP_CONTENT_DIR . '/plugins/' . dirname(plugin_basename(__FILE__)) . '/cvg-player/');
     $this->table_gallery = '';
     $this->table_videos = '';
     $this->video_id = '';
     if (function_exists('is_multisite') && is_multisite()) {
         $this->default_gallery_path = get_option('upload_path') . '/video-gallery/';
     } else {
         $this->default_gallery_path = 'wp-content/uploads/video-gallery/';
     }
     $this->winabspath = str_replace("\\", "/", ABSPATH);
     $this->load_video_files();
     //adds scripts and css stylesheets
     add_action('wp_print_scripts', array(&$this, 'gallery_script'));
     //adds admin menu options to manage
     add_action('admin_menu', array(&$this, 'admin_menu'));
     //adds contextual help for all menus of plugin
     add_action('admin_init', array(&$this, 'add_gallery_contextual_help'));
     //adds player options to head
     add_action('wp_head', array(&$this, 'addPlayerHeader'));
     add_action('admin_head', array(&$this, 'addPlayerHeader'));
     //adds filter for post/page content
     add_filter('the_content', array(&$this, 'CVGVideo_Parse'));
     add_filter('the_content', array(&$this, 'CVGGallery_Parse'));
     add_action('wp_dashboard_setup', array(&$this, 'cvg_custom_dashboard_widgets'));
 }
Example #29
0
 /**
  * Enqueue Function.
  * If this field requires any scripts, or css define this function and register/enqueue the scripts/css
  *
  * @since AvadaReduxFramework 1.0.0
  */
 function enqueue()
 {
     wp_enqueue_script('avadaredux-field-dimensions-js', trailingslashit(get_template_directory_uri()) . 'includes/avadaredux/custom-fields/dimensions/field_dimensions.js', array('jquery', 'avadaredux-js'), time(), true);
     if ($this->parent->args['dev_mode']) {
         wp_enqueue_style('avadaredux-field-dimensions-css', trailingslashit(get_template_directory_uri()) . 'includes/avadaredux/custom-fields/dimensions/field_dimensions.css', array(), time(), 'all');
     }
 }
 /**
  * Load the plugin text domain for translation.
  *
  * @since 1.7.0
  */
 public function load_plugin_textdomain()
 {
     $domain = 'optionsframework';
     $locale = apply_filters('plugin_locale', get_locale(), $domain);
     load_textdomain($domain, trailingslashit(WP_LANG_DIR) . $domain . '/' . $domain . '-' . $locale . '.mo');
     load_plugin_textdomain($domain, FALSE, basename(dirname(__FILE__)) . '/languages');
 }