本文整理汇总了PHP中esc_attr__函数的典型用法代码示例。如果您正苦于以下问题:PHP esc_attr__函数的具体用法?PHP esc_attr__怎么用?PHP esc_attr__使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了esc_attr__函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: ewww_image_optimizer_webp_migrate_preview
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
}
示例2: satus_password_form
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;
}
示例3: uni_search_form
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;
}
示例4: jetpack_instagram_handler
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;
}
示例5: members_admin_setup
/**
* 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');
}
示例6: setup
/**
* 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’ll always find the “Donate” 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’m the developer of the TablePress plugin.', 'tablepress') . '<br /><br />' . __('Thanks for using it! You’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’t that worth a coffee or two?', 'If everything works and you are satisfied with the results of managing your %s tables, isn’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 — 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’ll buy you a coffee and support TablePress!', 'tablepress')) . ' · ' . $this->ajax_link(array('action' => 'hide_message', 'item' => 'donation_nag', 'return' => 'list', 'target' => 'already-donated'), __('I already donated.', 'tablepress')) . ' · ' . $this->ajax_link(array('action' => 'hide_message', 'item' => 'donation_nag', 'return' => 'list', 'target' => 'maybe-later'), __('No, thanks. Don’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 “%s”.', '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']);
}
示例7: _pb_minimum_wp
/**
* 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>';
}
示例8: after
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…', '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&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&networkwide=1&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));
}
}
示例9: column_ATT_fname
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));
}
开发者ID:DavidSteinbauer,项目名称:event-espresso-core,代码行数:27,代码来源:EE_Attendee_Contact_List_Table.class.php
示例10: theme_passwordForm
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;
}
示例11: __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);
}
示例12: wma_field_slider
/**
* 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>';
}
示例13: rtmedia_login_register_modal_popup
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
}
}
示例14: after
/**
* @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&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));
}
}
示例15: eps_pass_protected_form
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;
}