Example #1
1
function ewww_image_optimizer_webp_migrate_preview()
{
    ewwwio_debug_message('<b>' . __FUNCTION__ . '()</b>');
    ?>
	<div class="wrap"> 
	<h1><?php 
    esc_html_e('Migrate WebP Images', EWWW_IMAGE_OPTIMIZER_DOMAIN);
    ?>
</h1>
<?php 
    esc_html_e('The migration is split into two parts. First, the plugin needs to scan all folders for webp images. Once it has obtained the list of images to rename, it will proceed with the renaming');
    $button_text = esc_attr__('Start Migration', EWWW_IMAGE_OPTIMIZER_DOMAIN);
    $loading_image = plugins_url('/images/wpspin.gif', __FILE__);
    // create the html for the migration form and status divs
    ?>
		<div id="webp-loading">
		</div>
		<div id="webp-progressbar"></div>
		<div id="webp-counter"></div>
		<div id="webp-status"></div>
			<div id="bulk-forms">
			<form id="webp-start" class="webp-form" method="post" action="">
				<input id="webp-first" type="submit" class="button-secondary action" value="<?php 
    echo $button_text;
    ?>
" />
			</form>
	</div>
<?php 
}
Example #2
0
function satus_password_form()
{
    global $post;
    $label = 'pwbox-' . (empty($post->ID) ? rand() : $post->ID);
    $o = '<p>This post is password protected. To view it please enter your password below:</p><form class="protected-post-form" action="' . get_option('siteurl') . '/wp-login.php?action=postpass" method="post"><label class="pass-label" for="' . $label . '">' . __("Password:"******"satus") . ' </label><input id="' . $label . '"  name="post_password" type="password" placeholder="Password"><input class="button" type="submit" name="Submit" value="' . esc_attr__("Submit") . '"></form>';
    return $o;
}
Example #3
0
function uni_search_form($form)
{
    $data = getListCategory('news');
    $list = '';
    if ($data) {
        $list = '<ul id="searchAjax" class="dropdown-menu">';
        foreach ($data as $val) {
            $list .= '<li><span data-key="' . $val->slug . '">' . $val->name . '</span></li>';
        }
        $list .= '</ul>';
    }
    $keyword = '';
    if (isset($_GET['keyword'])) {
        $keyword = $_GET['keyword'];
    }
    $form = '
	<form class="navbar-form navbar-left form-inline" method="get" id="searchform" role="search" action="' . home_url('/tim-kiem') . '">
        <div class="form-group form-group-sp">
				<input type="text" class="form-control" value="' . $keyword . '" name="keyword" id="keyword">
					' . $list . '
            <button type="submit" id="searchsubmit" value="' . esc_attr__('Search') . '" class="btn btn-default">
                <i class="fa fa-search"></i>
            </button>
		</div>
	</form>';
    return $form;
}
function jetpack_instagram_handler($matches, $atts, $url)
{
    global $content_width;
    static $did_script;
    // keep a copy of the passed-in URL since it's modified below
    $passed_url = $url;
    $max_width = 698;
    $min_width = 320;
    if (is_feed()) {
        $media_url = sprintf('http://instagr.am/p/%s/media/?size=l', $matches[2]);
        return sprintf('<a href="%s" title="%s"><img src="%s" alt="Instagram Photo" /></a>', esc_url($url), esc_attr__('View on Instagram', 'jetpack'), esc_url($media_url));
    }
    $atts = shortcode_atts(array('width' => isset($content_width) ? $content_width : $max_width, 'hidecaption' => false), $atts);
    $atts['width'] = absint($atts['width']);
    if ($atts['width'] > $max_width || $min_width > $atts['width']) {
        $atts['width'] = $max_width;
    }
    // remove the modal param from the URL
    $url = remove_query_arg('modal', $url);
    // force .com instead of .am for https support
    $url = str_replace('instagr.am', 'instagram.com', $url);
    // The oembed endpoint expects HTTP, but HTTP requests 301 to HTTPS
    $instagram_http_url = str_replace('https://', 'http://', $url);
    $instagram_https_url = str_replace('http://', 'https://', $url);
    $url_args = array('url' => $instagram_http_url, 'maxwidth' => $atts['width']);
    if ($atts['hidecaption']) {
        $url_args['hidecaption'] = 'true';
    }
    $url = esc_url_raw(add_query_arg($url_args, 'https://api.instagram.com/oembed/'));
    // Don't use object caching here by default, but give themes ability to turn it on.
    $response_body_use_cache = apply_filters('instagram_cache_oembed_api_response_body', false, $matches, $atts, $passed_url);
    $response_body = false;
    if ($response_body_use_cache) {
        $cache_key = 'oembed_response_body_' . md5($url);
        $response_body = wp_cache_get($cache_key, 'instagram_embeds');
    }
    if (!$response_body) {
        // Not using cache (default case) or cache miss
        $instagram_response = wp_remote_get($url, array('redirection' => 0));
        if (is_wp_error($instagram_response) || 200 != $instagram_response['response']['code'] || empty($instagram_response['body'])) {
            return "<!-- instagram error: invalid oratv resource -->";
        }
        $response_body = json_decode($instagram_response['body']);
        if ($response_body_use_cache) {
            // if caching it is short-lived since this is a "Cache-Control: no-cache" resource
            wp_cache_set($cache_key, $response_body, 'instagram_embeds', HOUR_IN_SECONDS + mt_rand(0, HOUR_IN_SECONDS));
        }
    }
    if (!empty($response_body->html)) {
        if (!$did_script) {
            $did_script = true;
            add_action('wp_footer', 'jetpack_instagram_add_script');
        }
        // there's a script in the response, which we strip on purpose since it's added above
        $ig_embed = preg_replace('@<(script)[^>]*?>.*?</\\1>@si', '', $response_body->html);
    } else {
        $ig_embed = jetpack_instagram_iframe_embed($instagram_https_url, $atts);
    }
    return $ig_embed;
}
Example #5
0
/**
 * Sets up any functionality needed in the admin.
 *
 * @since 0.2.0
 */
function members_admin_setup()
{
    global $members;
    /* Add contextual help to the "Help" tab for the plugin's pages in the admin. */
    add_filter('contextual_help', 'members_admin_contextual_help', 10, 2);
    /* If the role manager feature is active, add its admin pages. */
    if (members_get_setting('role_manager')) {
        /**
         * The "Roles" page should be shown for anyone that has the 'list_roles', 'edit_roles', or 
         * 'delete_roles' caps, so we're checking against all three.
         */
        /* If the current user can 'edit_roles'. */
        if (current_user_can('edit_roles')) {
            $edit_roles_cap = 'edit_roles';
        } elseif (current_user_can('delete_roles')) {
            $edit_roles_cap = 'delete_roles';
        } else {
            $edit_roles_cap = 'list_roles';
        }
        /* Create the Manage Roles page. */
        $members->edit_roles_page = add_submenu_page('users.php', esc_attr__('Roles', 'members'), esc_attr__('Roles', 'members'), $edit_roles_cap, 'roles', 'members_edit_roles_page');
        /* Create the New Role page. */
        $members->new_roles_page = add_submenu_page('users.php', esc_attr__('Add New Role', 'members'), esc_attr__('Add New Role', 'members'), 'create_roles', 'role-new', 'members_new_role_page');
    }
    /* Load post meta boxes on the post editing screen. */
    add_action('load-post.php', 'members_admin_load_post_meta_boxes');
    add_action('load-post-new.php', 'members_admin_load_post_meta_boxes');
    /* Load stylesheets and scripts for our custom admin pages. */
    add_action('admin_enqueue_scripts', 'members_admin_enqueue_style');
    add_action('admin_enqueue_scripts', 'members_admin_enqueue_scripts');
}
Example #6
0
 /**
  * Set up the view with data and do things that are specific for this view.
  *
  * @since 1.0.0
  *
  * @param string $action Action for this view.
  * @param array  $data   Data for this view.
  */
 public function setup($action, array $data)
 {
     parent::setup($action, $data);
     add_thickbox();
     $this->admin_page->enqueue_script('list', array('jquery-core'), array('list' => array('shortcode_popup' => __('To embed this table into a post or page, use this Shortcode:', 'tablepress'), 'donation-message-already-donated' => __('Thank you very much! Your donation is highly appreciated. You just contributed to the further development of TablePress!', 'tablepress'), 'donation-message-maybe-later' => sprintf(__('No problem! I still hope you enjoy the benefits that TablePress adds to your site. If you should change your mind, you&#8217;ll always find the &#8220;Donate&#8221; button on the <a href="%s">TablePress website</a>.', 'tablepress'), 'https://tablepress.org/'))));
     if ($data['messages']['first_visit']) {
         $this->add_header_message('<strong><em>' . __('Welcome!', 'tablepress') . '</em></strong><br />' . __('Thank you for using TablePress for the first time!', 'tablepress') . ' ' . sprintf(__('If you encounter any questions or problems, please visit the <a href="%1$s">FAQ</a>, the <a href="%2$s">documentation</a>, and the <a href="%3$s">Support</a> section on the <a href="%4$s">plugin website</a>.', 'tablepress'), 'https://tablepress.org/faq/', 'https://tablepress.org/documentation/', 'https://tablepress.org/support/', 'https://tablepress.org/') . '<br /><br />' . $this->ajax_link(array('action' => 'hide_message', 'item' => 'first_visit', 'return' => 'list'), __('Hide this message', 'tablepress')), 'notice-info not-dismissible');
     }
     if ($data['messages']['wp_table_reloaded_warning']) {
         $this->add_header_message('<strong><em>' . __('Attention!', 'tablepress') . '</em></strong><br />' . __('You have activated the plugin WP-Table Reloaded, which can not be used together with TablePress.', 'tablepress') . '<br />' . __('It is strongly recommended that you switch from WP-Table Reloaded to TablePress, which not only fixes many problems, but also has more and better features than WP-Table Reloaded.', 'tablepress') . '<br />' . sprintf(__('Please follow the <a href="%s">migration guide</a> to move your tables and then deactivate WP-Table Reloaded!', 'tablepress'), 'https://tablepress.org/migration-from-wp-table-reloaded/') . '<br />' . '<a href="' . TablePress::url(array('action' => 'import')) . '" class="button button-primary button-large" style="color:#ffffff;margin-top:5px;">' . __('Import your tables from WP-Table Reloaded', 'tablepress') . '</a>', 'notice-error not-dismissible');
     }
     if ($data['messages']['donation_message']) {
         $this->add_header_message('<img alt="' . esc_attr__('Tobias Bäthge, developer of TablePress', 'tablepress') . '" src="https://secure.gravatar.com/avatar/50f1cff2e27a1f522b18ce229c057bc5?s=110" height="110" width="110" style="float:left;margin:1px 10px 40px 0;" />' . __('Hi, my name is Tobias, I&#8217;m the developer of the TablePress plugin.', 'tablepress') . '<br /><br />' . __('Thanks for using it! You&#8217;ve installed TablePress over a month ago.', 'tablepress') . ' ' . sprintf(_n('If everything works and you are satisfied with the results of managing your %s table, isn&#8217;t that worth a coffee or two?', 'If everything works and you are satisfied with the results of managing your %s tables, isn&#8217;t that worth a coffee or two?', $data['table_count'], 'tablepress'), $data['table_count']) . '<br />' . sprintf(__('<a href="%s">Donations</a> help me to continue user support and development of this <em>free</em> software &mdash; things for which I spend countless hours of my free time! Thank you very much!', 'tablepress'), 'https://tablepress.org/donate/') . '<br /><br />' . __('Sincerly, Tobias', 'tablepress') . '<br /><br />' . sprintf('<a href="%s" target="_blank"><strong>%s</strong></a>', 'https://tablepress.org/donate/', __('Sure, I&#8217;ll buy you a coffee and support TablePress!', 'tablepress')) . '&nbsp;&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;&nbsp;&nbsp;' . $this->ajax_link(array('action' => 'hide_message', 'item' => 'donation_nag', 'return' => 'list', 'target' => 'already-donated'), __('I already donated.', 'tablepress')) . '&nbsp;&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;&nbsp;&nbsp;' . $this->ajax_link(array('action' => 'hide_message', 'item' => 'donation_nag', 'return' => 'list', 'target' => 'maybe-later'), __('No, thanks. Don&#8217;t ask again.', 'tablepress')), 'notice-success not-dismissible');
     }
     if ($data['messages']['plugin_update_message']) {
         $this->add_header_message('<strong><em>' . sprintf(__('Thank you for updating to TablePress %s!', 'tablepress'), TablePress::version) . '</em></strong><br />' . sprintf(__('Please read the <a href="%s">release announcement</a> for more information.', 'tablepress'), 'https://tablepress.org/news/') . ' ' . sprintf(__('If you like the new features and enhancements, <a href="%s">giving a donation</a> towards the further support and development of TablePress is recommended. Thank you!', 'tablepress'), 'https://tablepress.org/donate/') . '<br /><br />' . $this->ajax_link(array('action' => 'hide_message', 'item' => 'plugin_update', 'return' => 'list'), __('Hide this message', 'tablepress')), 'notice-info not-dismissible');
     }
     $this->process_action_messages(array('success_delete' => _n('The table was deleted successfully.', 'The tables were deleted successfully.', 1, 'tablepress'), 'success_delete_plural' => _n('The table was deleted successfully.', 'The tables were deleted successfully.', 2, 'tablepress'), 'error_delete' => __('Error: The table could not be deleted.', 'tablepress'), 'error_save' => __('Error: The table could not be saved.', 'tablepress'), 'success_copy' => _n('The table was copied successfully.', 'The tables were copied successfully.', 1, 'tablepress') . (false !== $data['table_id'] ? ' ' . sprintf(__('The copied table has the table ID &#8220;%s&#8221;.', 'tablepress'), esc_html($data['table_id'])) : ''), 'success_copy_plural' => _n('The table was copied successfully.', 'The tables were copied successfully.', 2, 'tablepress'), 'error_copy' => __('Error: The table could not be copied.', 'tablepress'), 'error_no_table' => __('Error: You did not specify a valid table ID.', 'tablepress'), 'error_load_table' => __('Error: This table could not be loaded!', 'tablepress'), 'error_bulk_action_invalid' => __('Error: This bulk action is invalid!', 'tablepress'), 'error_no_selection' => __('Error: You did not select any tables!', 'tablepress'), 'error_delete_not_all_tables' => __('Notice: Not all selected tables could be deleted!', 'tablepress'), 'error_copy_not_all_tables' => __('Notice: Not all selected tables could be copied!', 'tablepress'), 'success_import' => __('The tables were imported successfully.', 'tablepress'), 'success_import_wp_table_reloaded' => __('The tables were imported successfully from WP-Table Reloaded.', 'tablepress')));
     $this->add_text_box('head', array($this, 'textbox_head'), 'normal');
     $this->add_text_box('tables-list', array($this, 'textbox_tables_list'), 'normal');
     add_screen_option('per_page', array('label' => __('Tables', 'tablepress'), 'default' => 20));
     // Admin_Controller contains function to allow changes to this in the Screen Options to be saved
     $this->wp_list_table = new TablePress_All_Tables_List_Table();
     $this->wp_list_table->set_items($this->data['table_ids']);
     $this->wp_list_table->prepare_items();
     // Cleanup Request URI string, which WP_List_Table uses to generate the sort URLs.
     $_SERVER['REQUEST_URI'] = remove_query_arg(array('message', 'table_id'), $_SERVER['REQUEST_URI']);
 }
Example #7
0
/**
 * Echo message about minimum WordPress Version
 */
function _pb_minimum_wp()
{
    global $pb_minimum_wp;
    echo '<div id="message" class="error fade"><p>';
    printf(esc_attr__('Pressbooks will not work with your version of WordPress. Pressbooks requires a dedicated install of WordPress Multi-Site, version %s or greater. Please upgrade WordPress if you would like to use Pressbooks.', 'pressbooks'), esc_attr($pb_minimum_wp));
    echo '</p></div>';
}
Example #8
0
 function after()
 {
     $plugin_file = $this->upgrader->plugin_info();
     $install_actions = array();
     $from = isset($_GET['from']) ? stripslashes($_GET['from']) : 'plugins';
     // One-Click flow
     if (!empty($_GET['also']) && $_GET['also'] == 'activate') {
         if (!$this->result || is_wp_error($this->result)) {
             show_message(__('Cannot activate plugin.', 'wpsc'));
         } else {
             show_message(__('Activating the plugin&#8230;', 'wpsc'));
             echo '<iframe style="border:0;overflow:hidden" width="100%" height="170px" src="' . wp_nonce_url('update.php?action=activate-plugin&networkwide=0&plugin=' . $plugin_file, 'activate-plugin_' . $plugin_file) . '"></iframe>';
         }
     } else {
         $install_actions['activate_plugin'] = '<a href="' . wp_nonce_url('plugins.php?action=activate&amp;plugin=' . $plugin_file, 'activate-plugin_' . $plugin_file) . '" title="' . esc_attr__('Activate this plugin', 'wpsc') . '" target="_parent">' . __('Activate Plugin', 'wpsc') . '</a>';
         if (is_multisite() && current_user_can('manage_network_plugins')) {
             $install_actions['network_activate'] = '<a href="' . wp_nonce_url('plugins.php?action=activate&amp;networkwide=1&amp;plugin=' . $plugin_file, 'activate-plugin_' . $plugin_file) . '" title="' . esc_attr__('Activate this plugin for all sites in this network', 'wpsc') . '" target="_parent">' . __('Network Activate', 'wpsc') . '</a>';
             unset($install_actions['activate_plugin']);
         }
     }
     $install_actions['store'] = '<a href="' . Sputnik_Admin::build_url() . '" title="' . esc_attr__('Return to Store', 'wpsc') . '" target="_parent" class="close">' . __('Return to Store', 'wpsc') . '</a>';
     if (!$this->result || is_wp_error($this->result)) {
         unset($install_actions['activate_plugin']);
         unset($install_actions['network_activate']);
     }
     $install_actions = apply_filters('install_plugin_complete_actions', $install_actions, $this->api, $plugin_file);
     if (!empty($install_actions)) {
         $this->feedback(implode(' | ', (array) $install_actions));
     }
 }
 function column_ATT_fname($item)
 {
     //Build row actions
     $actions = array();
     // edit attendee link
     if (EE_Registry::instance()->CAP->current_user_can('ee_edit_contacts', 'espresso_registrations_edit_attendee')) {
         $edit_lnk_url = EE_Admin_Page::add_query_args_and_nonce(array('action' => 'edit_attendee', 'post' => $item->ID()), REG_ADMIN_URL);
         $actions['edit'] = '<a href="' . $edit_lnk_url . '" title="' . esc_attr__('Edit Contact', 'event_espresso') . '">' . __('Edit', 'event_espresso') . '</a>';
     }
     if ($this->_view == 'in_use') {
         // trash attendee link
         if (EE_Registry::instance()->CAP->current_user_can('ee_delete_contacts', 'espresso_registrations_trash_attendees')) {
             $trash_lnk_url = EE_Admin_Page::add_query_args_and_nonce(array('action' => 'trash_attendees', 'ATT_ID' => $item->ID()), REG_ADMIN_URL);
             $actions['trash'] = '<a href="' . $trash_lnk_url . '" title="' . esc_attr__('Move Contact to Trash', 'event_espresso') . '">' . __('Trash', 'event_espresso') . '</a>';
         }
     } else {
         if (EE_Registry::instance()->CAP->current_user_can('ee_delete_contacts', 'espresso_registrations_restore_attendees')) {
             // restore attendee link
             $restore_lnk_url = EE_Admin_Page::add_query_args_and_nonce(array('action' => 'restore_attendees', 'ATT_ID' => $item->ID()), REG_ADMIN_URL);
             $actions['restore'] = '<a href="' . $restore_lnk_url . '" title="' . esc_attr__('Restore Contact', 'event_espresso') . '">' . __('Restore', 'event_espresso') . '</a>';
         }
     }
     $edit_lnk_url = EE_Admin_Page::add_query_args_and_nonce(array('action' => 'edit_attendee', 'post' => $item->ID()), REG_ADMIN_URL);
     $name_link = EE_Registry::instance()->CAP->current_user_can('ee_edit_contacts', 'espresso_registrations_edit_attendee') ? '<a href="' . $edit_lnk_url . '" title="' . esc_attr__('Edit Contact', 'event_espresso') . '">' . $item->fname() . '</a>' : $item->fname();
     //Return the name contents
     return sprintf('%1$s %2$s', $name_link, $this->row_actions($actions));
 }
function theme_passwordForm()
{
    global $post;
    $label = 'pwbox-' . (empty($post->ID) ? rand() : $post->ID);
    $output = '<div class="protected-post"><h4>' . __('Password Protected Page Content', THEME_NAME) . '</h4><p>' . __('This post is password protected. To view it please enter your password below.', THEME_NAME) . '</p><form class="protected-post-form" action="' . get_option('siteurl') . '/wp-login.php?action=postpass" method="post"><input name="post_password" id="' . $label . '" type="password" size="20" /><input type="submit" name="Submit" class="button" value="' . esc_attr__("Login") . '" /></form></div>';
    return $output;
}
 protected function __output()
 {
     $num = $this->property['num_posts'] ? $this->property['num_posts'] : 4;
     $url = $this->property['url'];
     while (stristr($url, 'http') != $url) {
         $url = substr($url, 1);
     }
     if (empty($url)) {
         return;
     }
     $rss = fetch_feed($url);
     $desc = '';
     $link = '';
     if (!is_wp_error($rss)) {
         $desc = esc_attr(strip_tags(@html_entity_decode($rss->get_description(), ENT_QUOTES, get_option('blog_charset'))));
         if (empty($title)) {
             $title = esc_html(strip_tags($rss->get_title()));
         }
         $link = esc_url(strip_tags($rss->get_permalink()));
         while (stristr($link, 'http') != $link) {
             $link = substr($link, 1);
         }
     }
     $icon = includes_url('images/rss.png');
     if ($title) {
         $title = "<a class='rsswidget' href='{$url}' title='" . esc_attr__('Assinar feed', 'tnb') . "'><img style='border:0' width='14' height='14' src='{$icon}' alt='RSS' /></a> <a class='rsswidget' href='{$link}' title='{$desc}'>{$title}</a>";
     }
     echo $title;
     $show_author = $this->property['exibir_autor'] == 1 ? 1 : 0;
     $show_date = $this->property['exibir_data'] == 1 ? 1 : 0;
     $show_summary = $this->property['exibir_resumo'] == 1 ? 1 : 0;
     $items = $this->property['num_posts'] ? $this->property['num_posts'] : 5;
     $default_args = array('show_author' => $show_author, 'show_date' => $show_date, 'show_summary' => $show_summary, 'items' => $items);
     wp_widget_rss_output($rss, $default_args);
 }
Example #12
0
/**
 * Numeric slider / Range
 *
 * @since    1.0
 * @version  1.2.2
 */
function wma_field_slider($field, $page_template = null)
{
    // Helper variables
    // Definition
    $field = wp_parse_args((array) $field, array('type' => 'slider', 'id' => 'id', 'label' => '', 'description' => '', 'class' => '', 'default' => '', 'min' => 0, 'max' => 10, 'step' => 1, 'zero' => true, 'conditional' => ''));
    // Value processing
    $value = wma_meta_option($field['id']);
    if ($value || $field['zero'] && 0 === intval($value)) {
        $value = esc_attr(intval($value));
    } else {
        $value = esc_attr(intval($field['default']));
    }
    // Field ID setup
    $field['id'] = WM_METABOX_FIELD_PREFIX . $field['id'];
    // Output
    $output = "\r\n\t" . '<tr class="option range-wrap option-' . esc_attr(trim(sanitize_html_class($field['id']) . ' ' . $field['class'])) . '" data-option="' . esc_attr($field['id']) . '"><th>';
    // Label
    $output .= "\r\n\t\t" . '<label for="' . esc_attr($field['id']) . '">' . trim(strip_tags($field['label'], WM_METABOX_LABEL_HTML)) . '</label>';
    $output .= "\r\n\t" . '</th><td>';
    // Input field
    $output .= "\r\n\t\t" . '<input type="number" name="' . esc_attr($field['id']) . '" id="' . esc_attr($field['id']) . '" value="' . esc_attr($value) . '" size="5" maxlength="5" />';
    $output .= "\r\n\t\t" . '<span class="fieldtype-range"><span id="' . esc_attr($field['id']) . '-slider" data-min="' . esc_attr(intval($field['min'])) . '" data-max="' . esc_attr(intval($field['max'])) . '" data-step="' . esc_attr(intval($field['step'])) . '" data-value="' . esc_attr($value) . '"></span></span>';
    // Description
    if (trim($field['description'])) {
        $output .= "\r\n\t\t" . '<p class="description">' . trim($field['description']) . '</p>';
    }
    // Reset default value button
    if (trim($field['default'])) {
        $output .= "\r\n\t\t" . '<a data-option="' . esc_attr($field['id']) . '" class="button-default-value default-slider" title="' . esc_attr__('Use a default value', 'webman-amplifier') . '"><span>' . esc_attr($field['default']) . '</span></a>';
    }
    echo $output;
    // Conditional display
    do_action('wmhook_metabox_' . 'conditional', $field, $field['id']);
    echo "\r\n\t" . '</td></tr>';
}
Example #13
0
    function rtmedia_login_register_modal_popup()
    {
        if (!is_user_logged_in()) {
            $uri = '';
            if (isset($_REQUEST['REQUEST_URI'])) {
                $uri = esc_url_raw(wp_unslash($_REQUEST['REQUEST_URI']));
            }
            ?>
			<div class="rtmedia-popup mfp-hide rtm-modal" id="rtmedia-login-register-modal">
				<div id="rtm-modal-container">
					<h2 class="rtm-modal-title"><?php 
            esc_html_e('Please login', 'buddypress-media');
            ?>
</h2>

					<p><?php 
            esc_html_e('You need to be logged in to upload Media or to create Album.', 'buddypress-media');
            ?>
</p>

					<p>
						<?php 
            echo esc_html__('Click', 'buddypress-media') . ' <a href="' . esc_url(wp_login_url($uri)) . '" title="' . esc_attr__('Login', 'buddypress-media') . '">' . esc_html__('HERE', 'buddypress-media') . '</a>' . esc_html__(' to login.', 'buddypress-media');
            ?>
					</p>
				</div>
			</div>
			<?php 
        }
    }
 /**
  * @access public
  */
 public function after()
 {
     $this->plugin = $this->upgrader->plugin_info();
     if (!empty($this->plugin) && !is_wp_error($this->result) && $this->plugin_active) {
         // Currently used only when JS is off for a single plugin update?
         echo '<iframe title="' . esc_attr__('Update progress') . '" style="border:0;overflow:hidden" width="100%" height="170" src="' . wp_nonce_url('update.php?action=activate-plugin&networkwide=' . $this->plugin_network_active . '&plugin=' . urlencode($this->plugin), 'activate-plugin_' . $this->plugin) . '"></iframe>';
     }
     $this->decrement_update_count('plugin');
     $update_actions = array('activate_plugin' => '<a href="' . wp_nonce_url('plugins.php?action=activate&amp;plugin=' . urlencode($this->plugin), 'activate-plugin_' . $this->plugin) . '" target="_parent">' . __('Activate Plugin') . '</a>', 'plugins_page' => '<a href="' . self_admin_url('plugins.php') . '" target="_parent">' . __('Return to Plugins page') . '</a>');
     if ($this->plugin_active || !$this->result || is_wp_error($this->result) || !current_user_can('activate_plugins')) {
         unset($update_actions['activate_plugin']);
     }
     /**
      * Filters the list of action links available following a single plugin update.
      *
      * @since 2.7.0
      *
      * @param array  $update_actions Array of plugin action links.
      * @param string $plugin         Path to the plugin file.
      */
     $update_actions = apply_filters('update_plugin_complete_actions', $update_actions, $this->plugin);
     if (!empty($update_actions)) {
         $this->feedback(implode(' | ', (array) $update_actions));
     }
 }
Example #15
0
function eps_pass_protected_form()
{
    global $post;
    $input_id = 'pwbox-' . (empty($post->ID) ? rand() : $post->ID);
    $form = '<form class="form-inline" action="' . esc_url(wp_login_url() . '?action=postpass') . '" method="post">' . '	<p>' . __('This content is password protected. To view it please enter your password below:', 'epsilon') . '</p>' . '	<div class="form-group">' . '		<label for="' . $input_id . '">' . __('Password:'******'epsilon') . '</label>' . '		<div class="input-group">' . '			<input type="password" class="form-control" id="' . $input_id . '" name="post_password">' . '			<span class="input-group-btn">' . '				<button class="btn btn-primary" type="submit" name="Submit">' . esc_attr__('Submit', 'epsilon') . '</button>' . '			</span>' . '		</div>' . '	</div>' . '</form>';
    return $form;
}
    /**
     * Callback for page output.
     *
     */
    public function render()
    {
        ?>
		<div class="wrap">
			<?php 
        print '<h2>' . $this->page_data->get_title() . '</h2>';
        $this->watcher->update('before_form');
        ?>
			<form action="<?php 
        echo $this->page_data->get_form_action();
        ?>
" method="post">
				<input type="hidden" name="action" value="<?php 
        echo $this->page_data->get_action_name();
        ?>
" />
				<input type="hidden" name="paged" value="<?php 
        echo $this->pagination_data->get_current_page();
        ?>
" />
			<?php 
        wp_nonce_field($this->page_data->get_nonce_action(), $this->page_data->get_nonce_name());
        $this->watcher->update('before_table');
        $this->watcher->update('show_table');
        $this->watcher->update('after_table');
        submit_button(esc_attr__('Save changes', 'multilingualpress'), 'primary', 'save', FALSE, array('style' => 'float:left'));
        $this->watcher->update('after_form_submit_button');
        ?>
			</form>
			<?php 
        $this->watcher->update('after_form');
        ?>
		</div>
		<?php 
    }
 /**
  * Makes sure the editor's height stays the same. Adds the placeholder attribute to the 
  * editor `<textarea>`.
  *
  * @since  1.0.0
  * @access public
  * @param  string  $html
  * @return string
  */
 public function the_editor($html)
 {
     $placeholder = esc_attr__('Enter forum description&hellip;', 'message-board');
     $html = preg_replace('/(<textarea.*?height:).*?px(.*?)/i', '${1}175px${2}', $html);
     $html = str_replace('<textarea', '<textarea placeholder="' . $placeholder . '"', $html);
     return $html;
 }
    /**
     * media_buttons function.
     *
     * @access public
     * @return void
     */
    public function media_buttons($editor_id = 'content')
    {
        global $download_monitor, $post;
        echo '<a href="#" class="button insert-download add_download" data-editor="' . esc_attr($editor_id) . '" title="' . esc_attr__('Insert Download', 'download_monitor') . '">' . __('Insert Download', 'download_monitor') . '</a>';
        ob_start();
        ?>
		jQuery(function(){
			// Browse for file
			jQuery('body').on('click', 'a.add_download', function(e){

				tb_show('<?php 
        esc_attr_e('Insert Download', 'download_monitor');
        ?>
', 'media-upload.php?post_id=<?php 
        echo $post->ID;
        ?>
&amp;type=add_download&amp;from=wpdlm01&amp;TB_iframe=true&amp;height=200');

				return false;
			});
		});
		<?php 
        $js_code = ob_get_clean();
        $download_monitor->add_inline_js($js_code);
    }
Example #19
0
    function add_builder_content_wrapper($content)
    {
        if (!et_pb_is_pagebuilder_used(get_the_ID()) && !is_et_pb_preview()) {
            return $content;
        }
        // Divi builder layout should only be used in singular template
        if (!is_singular()) {
            // get_the_excerpt() for excerpt retrieval causes infinite loop; thus we're using excerpt from global $post variable
            global $post;
            $read_more = sprintf(' <a href="%1$s" title="%2$s" class="more-link">%3$s</a>', esc_url(get_permalink()), sprintf(esc_attr__('Read more on %1%s', 'et_builder'), esc_html(get_the_title())), esc_html__('read more', 'et_builder'));
            // Use post excerpt if there's any. If there is no excerpt defined,
            // Generate from post content by stripping all shortcode first
            if (!empty($post->post_excerpt)) {
                return wpautop($post->post_excerpt . $read_more);
            } else {
                $shortcodeless_content = preg_replace('/\\[[^\\]]+\\]/', '', $content);
                return wpautop(et_wp_trim_words($shortcodeless_content, 270, $read_more));
            }
        }
        $outer_class = apply_filters('et_builder_outer_content_class', array('et_builder_outer_content'));
        $outer_classes = implode(' ', $outer_class);
        $outer_id = apply_filters("et_builder_outer_content_id", "et_builder_outer_content");
        $inner_class = apply_filters('et_builder_inner_content_class', array('et_builder_inner_content'));
        $inner_classes = implode(' ', $inner_class);
        $content = sprintf('<div class="%2$s" id="%4$s">
				<div class="%3$s">
					%1$s
				</div>
			</div>', $content, esc_attr($outer_classes), esc_attr($inner_classes), esc_attr($outer_id));
        return $content;
    }
    /**
     * Front-end display of widget.
     *
     * @see WP_Widget::widget()
     *
     * @param array $args     Widget arguments.
     * @param array $instance Saved values from database.
     */
    public function widget($args, $instance)
    {
        $title = !empty($instance['title']) ? $instance['title'] : '';
        $image_uri = !empty($instance['image_uri']) ? $instance['image_uri'] : '';
        $description = !empty($instance['description']) ? $instance['description'] : '';
        if (array_key_exists('before_widget', $args)) {
            echo $args['before_widget'];
        }
        ?>
		<!-- <div class="col-md-3 col-sm-6"> -->
			<h2><?php 
        echo esc_html(strtoupper($instance['title']));
        ?>
</h2>

			<img src="<?php 
        echo esc_url($instance['image_uri']);
        ?>
" alt="<?php 
        echo esc_attr__('Image', 'carolina');
        ?>
">
			<p><?php 
        echo esc_html($instance['description']);
        ?>
</p>
		<!-- </div>	 -->
		<?php 
        if (array_key_exists('after_widget', $args)) {
            echo $args['after_widget'];
        }
    }
/**
 * Set Theme Options
 */
function responsive_mobile_theme_options_set()
{
    /**
     * Creates and array of sections and each section again conatains array of options.
     *
     * @key This must match the id of the section you want the options to appear in
     *
     * Attributes of each sections :-
     * @title - Title of the section. This text is used to be displyed as the section name in the theme theme option page.
     * @fields - This is an array of option fields inside a section.
     *
     * Attributes of each fields :-
     * @title Title on the left hand side of the options
     * @subtitle Displays underneath main title on left hand side
     * @heading Right hand side above input
     * @type The type of input e.g. text, textarea, checkbox
     * @id The options id
     * @description Instructions on what to enter in input
     * @placeholder The placeholder for text and textarea
     * @options array used by select dropdown lists
     */
    $options = array('theme_elements' => array('title' => __('Theme Elements', 'responsive-mobile'), 'fields' => array(array('title' => __('Disable breadcrumb list?', 'responsive-mobile'), 'type' => 'checkbox', 'id' => 'breadcrumb', 'description' => __('Check to disable', 'responsive-mobile'), 'default' => false, 'validate' => 'checkbox'), array('title' => __('Use minified CSS', 'responsive-mobile'), 'type' => 'checkbox', 'id' => 'minified_css', 'description' => __('Check to disable', 'responsive-mobile'), 'default' => false, 'validate' => 'checkbox'), array('title' => __('Disable Call to Action Button?', 'responsive-mobile'), 'type' => 'checkbox', 'id' => 'cta_button', 'description' => __('Check to disable', 'responsive-mobile'), 'default' => false, 'validate' => 'checkbox'))), 'logo_upload' => array('title' => __('Logo Upload', 'responsive-mobile'), 'fields' => array(array('title' => __('Custom Header', 'responsive-mobile'), 'type' => 'description', 'id' => 'logo_upload_desc', 'description' => __('Need to replace or remove default logo?', 'responsive-mobile') . ' <a href="' . admin_url('themes.php?page=custom-header') . '">' . __('Click here', 'responsive-mobile') . '</a>', 'default' => ''))), 'home_page' => array('title' => __('Home Page', 'responsive-mobile'), 'fields' => array(array('title' => __('Enable Custom Front Page', 'responsive-mobile'), 'type' => 'checkbox', 'id' => 'front_page', 'description' => sprintf(__('Overrides the WordPress %1sfront page option%2s', 'responsive-mobile'), '<a href="options-reading.php">', '</a>'), 'default' => '', 'validate' => 'checkbox'), array('title' => __('Headline', 'responsive-mobile'), 'subtitle' => '', 'heading' => '', 'type' => 'text', 'id' => 'home_headline', 'description' => __('Enter your headline', 'responsive-mobile'), 'placeholder' => __('Hello, World!', 'responsive-mobile'), 'default' => '', 'validate' => 'text'), array('title' => __('Subheadline', 'responsive-mobile'), 'type' => 'text', 'id' => 'home_subheadline', 'description' => __('Enter your subheadline', 'responsive-mobile'), 'placeholder' => __('Your H2 subheadline here', 'responsive-mobile'), 'default' => '', 'validate' => 'text'), array('title' => __('Content Area', 'responsive-mobile'), 'type' => 'editor', 'id' => 'home_content_area', 'description' => __('Enter your content', 'responsive-mobile'), 'placeholder' => __('Your title, subtitle and this very content is editable from Theme Option. Call to Action button and its destination link as well. Image on your right can be an image or even YouTube video if you like.', 'responsive-mobile'), 'default' => '', 'validate' => 'editor'), array('title' => __('Call to Action (URL)', 'responsive-mobile'), 'type' => 'text', 'id' => 'cta_url', 'description' => __('Enter your call to action URL', 'responsive-mobile'), 'placeholder' => '#nogo', 'default' => '', 'validate' => 'url'), array('title' => __('Call to Action (Text)', 'responsive-mobile'), 'type' => 'text', 'id' => 'cta_text', 'description' => __('Enter your call to action text', 'responsive-mobile'), 'placeholder' => __('Call to Action', 'responsive-mobile'), 'default' => '', 'validate' => 'text'), array('title' => __('Featured Content', 'responsive-mobile'), 'subtitle' => '<a class="help-links" href="' . esc_url('http://cyberchimps.com/guide/responsive/') . '" title="' . esc_attr__('See Docs', 'responsive-mobile') . '" target="_blank">' . __('See Docs', 'responsive-mobile') . '</a>', 'type' => 'editor', 'id' => 'featured_content', 'description' => __('Paste your shortcode, video or image source', 'responsive-mobile'), 'placeholder' => '<img class="aligncenter" src="' . get_template_directory_uri() . '"/core/images/featured-image.png" width="440" height="300" alt="" />', 'default' => '', 'validate' => 'editor'))), 'layouts' => array('title' => __('Default Layouts', 'responsive-mobile'), 'fields' => array(array('title' => __('Default Static Page Layout', 'responsive-mobile'), 'type' => 'select', 'id' => 'static_page_layout_default', 'options' => responsive_mobile_valid_layouts(), 'default' => 'default', 'validate' => 'select'), array('title' => __('Default Single Blog Post Layout', 'responsive-mobile'), 'type' => 'select', 'id' => 'single_post_layout_default', 'options' => responsive_mobile_valid_layouts(), 'default' => 'default', 'validate' => 'select'), array('title' => __('Default Blog Posts Index Layout', 'responsive-mobile'), 'type' => 'select', 'id' => 'blog_posts_index_layout_default', 'options' => responsive_mobile_valid_layouts(), 'default' => 'default', 'validate' => 'select'))), 'social' => array('title' => __('Social Icons', 'responsive-mobile'), 'fields' => array(array('title' => __('Twitter', 'responsive-mobile'), 'type' => 'text', 'id' => 'twitter_uid', 'description' => __('Enter your Twitter URL', 'responsive-mobile'), 'default' => '', 'validate' => 'url'), array('title' => __('Facebook', 'responsive-mobile'), 'type' => 'text', 'id' => 'facebook_uid', 'description' => __('Enter your Facebook URL', 'responsive-mobile'), 'default' => '', 'validate' => 'url'), array('title' => __('LinkedIn', 'responsive-mobile'), 'type' => 'text', 'id' => 'linkedin_uid', 'description' => __('Enter your LinkedIn URL', 'responsive-mobile'), 'default' => '', 'validate' => 'url'), array('title' => __('YouTube', 'responsive-mobile'), 'type' => 'text', 'id' => 'youtube_uid', 'description' => __('Enter your YouTube URL', 'responsive-mobile'), 'default' => '', 'validate' => 'url'), array('title' => __('StumbleUpon', 'responsive-mobile'), 'type' => 'text', 'id' => 'stumbleupon_uid', 'description' => __('Enter your StumbleUpon URL', 'responsive-mobile'), 'default' => '', 'validate' => 'url'), array('title' => __('RSS Feed', 'responsive-mobile'), 'type' => 'text', 'id' => 'rss_uid', 'description' => __('Enter your RSS Feed URL', 'responsive-mobile'), 'default' => '', 'validate' => 'checkbox'), array('title' => __('Google+', 'responsive-mobile'), 'type' => 'text', 'id' => 'googleplus_uid', 'description' => __('Enter your Google+ URL', 'responsive-mobile'), 'default' => '', 'validate' => 'url'), array('title' => __('Instagram', 'responsive-mobile'), 'type' => 'text', 'id' => 'instagram_uid', 'description' => __('Enter your Instagram URL', 'responsive-mobile'), 'default' => '', 'validate' => 'url'), array('title' => __('Pinterest', 'responsive-mobile'), 'type' => 'text', 'id' => 'pinterest_uid', 'description' => __('Enter your Pinterest URL', 'responsive-mobile'), 'default' => '', 'validate' => 'url'), array('title' => __('Vimeo', 'responsive-mobile'), 'type' => 'text', 'id' => 'vimeo_uid', 'description' => __('Enter your Vimeo URL', 'responsive-mobile'), 'default' => '', 'validate' => 'url'), array('title' => __('foursquare', 'responsive-mobile'), 'type' => 'text', 'id' => 'foursquare_uid', 'description' => __('Enter your foursquare URL', 'responsive-mobile'), 'default' => '', 'validate' => 'url'))), 'css' => array('title' => __('CSS Styles', 'responsive-mobile'), 'fields' => array(array('title' => __('Custom CSS Styles', 'responsive-mobile'), 'subtitle' => '<a class="help-links" href="https://developer.mozilla.org/en/CSS" title="CSS Tutorial" target="_blank">' . __('CSS Tutorial', 'responsive-mobile') . '</a>', 'type' => 'textarea', 'id' => 'responsive_mobile_inline_css', 'description' => __('Enter your custom CSS styles.', 'responsive-mobile'), 'default' => '', 'validate' => 'css'))), 'scripts' => array('title' => __('Scripts', 'responsive-mobile'), 'fields' => array(array('title' => __('Custom Scripts for Header and Footer', 'responsive-mobile'), 'subtitle' => '<a class="help-links" href="http://codex.wordpress.org/Using_Javascript" title="Quick Tutorial" target="_blank">' . __('Quick Tutorial', 'responsive-mobile') . '</a>', 'heading' => __('Embeds to header.php &darr;', 'responsive-mobile'), 'type' => 'textarea', 'id' => 'responsive_mobile_inline_js_head', 'description' => __('Enter your custom header script.', 'responsive-mobile'), 'default' => '', 'validate' => 'js'), array('heading' => __('Embeds to footer.php &darr;', 'responsive-mobile'), 'type' => 'textarea', 'id' => 'responsive_mobile_inline_js_footer', 'description' => __('Enter your custom footer script.', 'responsive-mobile'), 'default' => '', 'validate' => 'js'))));
    $options = apply_filters('responsive_mobile_option_options_filter', $options);
    $theme_options = new Responsive_Options($options);
    return $theme_options;
}
/**
 * Sets up the default arguments.
 *
 * @since  0.9.4
 */
function rpwe_get_default_args()
{
    $css_defaults = ".rpwe-block ul{\nlist-style: none !important;\nmargin-left: 0 !important;\npadding-left: 0 !important;\n}\n\n.rpwe-block li{\nborder-bottom: 1px solid #eee;\nmargin-bottom: 10px;\npadding-bottom: 10px;\nlist-style-type: none;\n}\n\n.rpwe-block a{\ndisplay: inline !important;\ntext-decoration: none;\n}\n\n.rpwe-block h3{\nbackground: none !important;\nclear: none;\nmargin-bottom: 0 !important;\nmargin-top: 0 !important;\nfont-weight: 400;\nfont-size: 12px !important;\nline-height: 1.5em;\n}\n\n.rpwe-thumb{\nborder: 1px solid #eee !important;\nbox-shadow: none !important;\nmargin: 2px 10px 2px 0;\npadding: 3px !important;\n}\n\n.rpwe-summary{\nfont-size: 12px;\n}\n\n.rpwe-time{\ncolor: #bbb;\nfont-size: 11px;\n}\n\n.rpwe-comment{\ncolor: #bbb;\nfont-size: 11px;\npadding-left: 5px;\n}\n\n.rpwe-alignleft{\ndisplay: inline;\nfloat: left;\n}\n\n.rpwe-alignright{\ndisplay: inline;\nfloat: right;\n}\n\n.rpwe-aligncenter{\ndisplay: block;\nmargin-left: auto;\nmargin-right: auto;\n}\n\n.rpwe-clearfix:before,\n.rpwe-clearfix:after{\ncontent: \"\";\ndisplay: table !important;\n}\n\n.rpwe-clearfix:after{\nclear: both;\n}\n\n.rpwe-clearfix{\nzoom: 1;\n}\n";
    $defaults = array('title' => esc_attr__('Recent Posts', 'rpwe'), 'title_url' => '', 'limit' => 5, 'offset' => 0, 'order' => 'DESC', 'orderby' => 'date', 'cat' => array(), 'tag' => array(), 'taxonomy' => '', 'post_type' => array('post'), 'post_status' => 'publish', 'ignore_sticky' => 1, 'exclude_current' => 1, 'excerpt' => false, 'length' => 10, 'thumb' => true, 'thumb_height' => 45, 'thumb_width' => 45, 'thumb_default' => 'http://placehold.it/45x45/f0f0f0/ccc', 'thumb_align' => 'rpwe-alignleft', 'date' => true, 'date_relative' => false, 'date_modified' => false, 'readmore' => false, 'readmore_text' => __('Read More &raquo;', 'recent-posts-widget-extended'), 'comment_count' => false, 'styles_default' => true, 'css' => $css_defaults, 'cssID' => '', 'css_class' => '', 'before' => '', 'after' => '', 'share_icons' => false);
    // Allow plugins/themes developer to filter the default arguments.
    return apply_filters('rpwe_default_args', $defaults);
}
Example #23
0
 function shortcode_post_left_grid($atts, $content = null)
 {
     extract(shortcode_atts(array('type' => 'portfolio_cat', 'columns' => '4', 'counts' => '12', 'cats' => '', 'posts' => '', 'order' => 'DESC', 'orderby' => 'date', 'paging' => 'yes'), $atts));
     if (!in_array($type, array('portfolio_cat', 'portfolio_tag', 'product_cat', 'product_tag', 'blog_cat', 'blog_tag'), true)) {
         return $html = '<div class="the-not-posts">' . esc_attr__('Hi, please check the type option, the current type is not match!', 'Twoot_Toolkit') . '</div>';
     }
     switch ($type) {
         case 'blog_cat':
             $post_type = 'post';
             $taxonomy = 'category';
             break;
         case 'blog_tag':
             $post_type = 'post';
             $taxonomy = 'post_tag';
             break;
         case 'portfolio_cat':
             $post_type = 'portfolio';
             $taxonomy = 'portfolio_cat';
             break;
         case 'portfolio_tag':
             $post_type = 'portfolio';
             $taxonomy = 'portfolio_tag';
             break;
         case 'product_cat':
             $post_type = 'product';
             $taxonomy = 'product_cat';
             break;
         case 'product_tag':
             $post_type = 'product';
             $taxonomy = 'product_tag';
             break;
     }
     $q = new Twoot_Template_Grid(array('columns' => $columns, 'counts' => $counts, 'cats' => $cats, 'posts' => $posts, 'order' => $order, 'orderby' => $orderby, 'paging' => $paging, 'post_type' => $post_type, 'taxonomy' => $taxonomy));
     return $q->left_grid();
 }
Example #24
0
/**
 * Enqueue scripts and stylesheets
 *
 * Enqueue stylesheets in the following order:
 * 1. /theme/assets/css/bootstrap.css
 * 2. /theme/assets/css/bootstrap-responsive.css
 * 3. /theme/assets/css/virtue.css
 * 4. /theme/assets/css/skin.css
 *
 * Enqueue scripts in the following order:
 * 1. jquery-1.9.1.min.js via Google CDN
 * 2. /theme/assets/js/vendor/modernizr-2.6.2.min.js
 * 3. /theme/assets/js/plugins.js (in footer)
 * 4. /theme/assets/js/main.js    (in footer)
 */
function kadence_scripts()
{
    wp_enqueue_style('kadence_bootstrap', get_template_directory_uri() . '/assets/css/bootstrap.css', false, "204");
    wp_enqueue_style('kadence_theme', get_template_directory_uri() . '/assets/css/virtue.css', false, "204");
    global $virtue;
    if (isset($virtue['skin_stylesheet'])) {
        $skin = $virtue['skin_stylesheet'];
    } else {
        $skin = 'default.css';
    }
    wp_enqueue_style('virtue_skin', get_template_directory_uri() . '/assets/css/skins/' . $skin . '', false, null);
    if (is_child_theme()) {
        wp_enqueue_style('roots_child', get_stylesheet_uri(), false, null);
    }
    if (is_single() && comments_open() && get_option('thread_comments')) {
        wp_enqueue_script('comment-reply');
    }
    wp_register_script('modernizr', get_template_directory_uri() . '/assets/js/vendor/modernizr-2.6.2.min.js', false, null, false);
    wp_register_script('kadence_plugins', get_template_directory_uri() . '/assets/js/plugins.js', false, '200', true);
    wp_register_script('kadence_main', get_template_directory_uri() . '/assets/js/main.js', false, null, true);
    wp_enqueue_script('jquery');
    wp_enqueue_script('modernizr');
    wp_enqueue_script('kadence_plugins');
    wp_enqueue_script('kadence_main');
    if (class_exists('woocommerce')) {
        wp_deregister_script('wc-add-to-cart-variation');
        wp_register_script('wc-add-to-cart-variation', get_template_directory_uri() . '/assets/js/add-to-cart-variation-ck.js', array('jquery'), false, '200', true);
        wp_localize_script('wc-add-to-cart-variation', 'wc_add_to_cart_variation_params', apply_filters('wc_add_to_cart_variation_params', array('i18n_no_matching_variations_text' => esc_attr__('Sorry, no products matched your selection. Please choose a different combination.', 'woocommerce'), 'i18n_unavailable_text' => esc_attr__('Sorry, this product is unavailable. Please choose a different combination.', 'woocommerce'))));
        wp_enqueue_script('wc-add-to-cart-variation');
    }
}
 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));
     }
 }
function powerpressplayer_videojs_info()
{
    $plugin_link = '';
    if (!function_exists('add_videojs_header') && file_exists(WP_PLUGIN_DIR . '/' . 'videojs-html5-video-player-for-wordpress')) {
        $plugin_file = 'videojs-html5-video-player-for-wordpress' . '/' . 'video-js.php';
        $plugin_link = '<a href="' . esc_url(wp_nonce_url(admin_url('plugins.php?plugin_status=active&action=activate&plugin=' . $plugin_file), 'activate-plugin_' . $plugin_file)) . '"title="' . esc_attr__('Activate Plugin') . '"">' . __('VideoJS - HTML5 Video Player for WordPress plugin', 'powerpress') . '</a>';
    } else {
        $plugin_link = '<a href="' . esc_url(network_admin_url('plugin-install.php?tab=plugin-information&plugin=' . 'videojs-html5-video-player-for-wordpress' . '&TB_iframe=true&width=600&height=550')) . '" class="thickbox" title="' . esc_attr__('Install Plugin') . '">' . __('VideoJS - HTML5 Video Player for WordPress plugin', 'powerpress') . '</a>';
    }
    ?>
	<p>
		<?php 
    echo __('VideoJS is a HTML5 JavaScript and CSS video player with fallback to Flash. ', 'powerpress');
    ?>
	</p>
	
	<?php 
    if ($plugin_link) {
        ?>
	<p <?php 
        echo function_exists('add_videojs_header') ? '' : ' style="background-color: #FFFFE0; border: 1px solid #E6DB55; padding: 8px 12px; line-height: 29px; font-weight: bold; font-size: 14px; display:inline;"';
        ?>
>
		<?php 
        echo sprintf(__('The %s must be installed and activated in order to enable this feature.', 'powerpress'), $plugin_link);
        ?>
	</p>
	<?php 
    }
}
Example #27
0
/**
 * Replace the default search form with a Genesis-specific form.
 *
 * The exact output depends on whether the child theme supports HTML5 or not.
 *
 * Applies the `genesis_search_text`, `genesis_search_button_text`, `genesis_search_form_label` and
 * `genesis_search_form` filters.
 *
 * @since 0.2.0
 *
 * @uses genesis_html5() Check for HTML5 support.
 *
 * @return string HTML markup.
 */
function genesis_search_form()
{
    $search_text = get_search_query() ? apply_filters('the_search_query', get_search_query()) : apply_filters('genesis_search_text', __('Search this website', 'genesis') . ' &#x02026;');
    $button_text = apply_filters('genesis_search_button_text', esc_attr__('Search', 'genesis'));
    $onfocus = "if ('" . esc_js($search_text) . "' === this.value) {this.value = '';}";
    $onblur = "if ('' === this.value) {this.value = '" . esc_js($search_text) . "';}";
    //* Empty label, by default. Filterable.
    $label = apply_filters('genesis_search_form_label', '');
    $value_or_placeholder = get_search_query() == '' ? 'placeholder' : 'value';
    if (genesis_html5()) {
        $form = sprintf('<form %s>', genesis_attr('search-form'));
        if (genesis_a11y('search-form')) {
            if ('' == $label) {
                $label = apply_filters('genesis_search_text', __('Search this website', 'genesis'));
            }
            $form_id = uniqid('searchform-');
            $form .= sprintf('<meta itemprop="target" content="%s"/><label class="search-form-label screen-reader-text" for="%s">%s</label><input itemprop="query-input" type="search" name="s" id="%s" %s="%s" /><input type="submit" value="%s" /></form>', home_url('/?s={s}'), esc_attr($form_id), esc_html($label), esc_attr($form_id), $value_or_placeholder, esc_attr($search_text), esc_attr($button_text));
        } else {
            $form .= sprintf('%s<meta itemprop="target" content="%s"/><input itemprop="query-input" type="search" name="s" %s="%s" /><input type="submit" value="%s"  /></form>', esc_html($label), home_url('/?s={s}'), $value_or_placeholder, esc_attr($search_text), esc_attr($button_text));
        }
    } else {
        $form = sprintf('<form method="get" class="searchform search-form" action="%s" role="search" >%s<input type="text" value="%s" name="s" class="s search-input" onfocus="%s" onblur="%s" /><input type="submit" class="searchsubmit search-submit" value="%s" /></form>', home_url('/'), esc_html($label), esc_attr($search_text), esc_attr($onfocus), esc_attr($onblur), esc_attr($button_text));
    }
    return apply_filters('genesis_search_form', $form, $search_text, $button_text, $label);
}
Example #28
0
function vc_menu_func($atts, $content)
{
    ob_start();
    ?>
	<nav class="navbar navbar-default" id="menunav">
				<div class="container">
					<div class="row">
						<ul class="nav navbar-nav pull-right margin-right-15">
							<li class="dropdown resv-dropdown" id="ibe-dropdown">
								<a class="resv-link dropdown-toggle" href="#back-to-reserve" id="ibe-dropdown-button"><?php 
    echo esc_html(get_theme_mod('booking_button_text', esc_attr__('Reservations', 'Property Theme')));
    ?>
								</a>
							</li>
						</ul>

						<?php 
    if (has_nav_menu('primary_navigation')) {
        wp_nav_menu(['theme_location' => 'primary_navigation', 'menu_class' => 'nav navbar-nav navbar-right']);
    }
    ?>
					</div>
				</div>
			</nav>
	<?php 
    $returnvariable = ob_get_clean();
    return $returnvariable;
}
	function  Widget_Class_Name_Widget(){

		/* Check if Hybrid-core framework is active */
		if( class_exists( 'Hybrid' ) ){
			/* Set the widget prefix */
			$this->prefix = hybrid_get_prefix();
			
			/* Set the widget textdomain. */
			$this->textdomain = hybrid_get_parent_textdomain();
		} else {
			$this->prefix = 'prefix';
			$this->textdomain = 'prefix';
		}
		
		$this->widget_id = 'widget-id';
		
		$widget_options = array(
						'classname' => "{$this->prefix}-{$this->widget_id}",
						'description' => esc_html__( 'Description of the widget', $this->textdomain )
					);
		
		$control_options = array(
						'height' => '300',
						'width' => '240',
						'id_base' => "{$this->prefix}-{$this->widget_id}"
					);
		
		$this->WP_Widget( "{$this->prefix}-{$this->widget_id}", esc_attr__( 'Widget Name', $this->textdomain ), $widget_options, $control_options );
		
	}
function twentyten_posted_on()
{
    $meta = array();
    $meta['author'] = sprintf(__('%1$s <span class="meta-sep">by</span> %2$s', 'wordcampbase'), sprintf('<a href="%1$s" title="%2$s" rel="bookmark"><span class="entry-date">%3$s</span></a>', get_permalink(), esc_attr(get_the_time()), get_the_date()), sprintf('<span class="author vcard"><a class="url fn n" href="%1$s" title="%2$s">%3$s</a></span>', get_author_posts_url(get_the_author_meta('ID')), sprintf(esc_attr__('View all posts by %s', 'wordcampbase'), get_the_author()), get_the_author()));
    $meta['sep'] = ' <span class="meta-sep meta-sep-bull">&bull;</span> ';
    $meta['comments'] = array('before' => '<span class="comments-link">', 'after' => '</span>', 'zero' => __('Leave a comment', 'wordcampbase'), 'one' => __('1 Comment', 'wordcampbase'), 'many' => __('% Comments', 'wordcampbase'));
    $meta['edit'] = array('title' => __('Edit', 'wordcampbase'), 'before' => '<span class="edit-link">', 'after' => '</span>');
    $meta['br'] = '<br />';
    // Just to have.
    $meta['order'] = array('author', 'sep', 'comments', 'edit');
    $meta = apply_filters('wcb_entry_meta', $meta);
    if (!is_array($meta) || !isset($meta['order'])) {
        return;
    }
    foreach ($meta['order'] as $type) {
        $content = $meta[$type];
        switch ($type) {
            case 'comments':
                echo $content['before'];
                comments_popup_link($content['zero'], $content['one'], $content['many']);
                echo $content['after'];
                break;
            case 'edit':
                if (isset($meta['sep'])) {
                    $content['before'] = $meta['sep'] . $content['before'];
                }
                edit_post_link($content['title'], $content['before'], $content['after']);
                break;
            default:
                echo $content;
        }
    }
}