• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP wp_nonce_url函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中wp_nonce_url函数的典型用法代码示例。如果您正苦于以下问题:PHP wp_nonce_url函数的具体用法?PHP wp_nonce_url怎么用?PHP wp_nonce_url使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了wp_nonce_url函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: _validate_form

 protected function _validate_form()
 {
     $url = wp_nonce_url('admin.php?page=vimeography-my-themes');
     if (false === ($creds = request_filesystem_credentials($url))) {
         // if we get here, then we don't have credentials yet,
         // but have just produced a form for the user to fill in,
         // so stop processing for now
         return true;
         // stop the normal page form from displaying
     }
     // now we have some credentials, try to get the wp_filesystem running
     if (!WP_Filesystem($creds)) {
         // our credentials were no good, ask the user for them again
         request_filesystem_credentials($url);
         return true;
     }
     if (empty($_FILES)) {
         return;
     }
     // if this fails, check_admin_referer() will automatically print a "failed" page and die.
     if (!empty($_FILES) && check_admin_referer('vimeography-install-theme', 'vimeography-theme-verification')) {
         $name = substr(wp_filter_nohtml_kses($_FILES['vimeography-theme']['name']), 0, -4);
         if ($_FILES['vimeography-theme']['type'] != 'application/zip') {
             $this->messages[] = array('type' => 'error', 'heading' => 'Ruh Roh.', 'message' => 'Make sure you are uploading the actual .zip file, not a subfolder or file.');
         } else {
             global $wp_filesystem;
             if (!unzip_file($_FILES['vimeography-theme']['tmp_name'], VIMEOGRAPHY_THEME_PATH)) {
                 $this->messages[] = array('type' => 'error', 'heading' => 'Ruh Roh.', 'message' => 'The theme could not be installed.');
             } else {
                 $this->messages[] = array('type' => 'success', 'heading' => 'Theme installed.', 'message' => 'You can now use the "' . $name . '" theme in your galleries.');
             }
         }
     }
 }
开发者ID:robjcordes,项目名称:nexnewwp,代码行数:34,代码来源:list.php


示例2: get_actions

 /**
  * @see CPAC_Column_Actions::get_actions()
  * @since 2.4.7
  */
 public function get_actions($id)
 {
     $actions = array();
     $user_object = new WP_User($id);
     $screen = get_current_screen();
     if ('site-users-network' == $screen->id) {
         $url = "site-users.php?id={$this->site_id}&";
     } else {
         $url = 'users.php?';
     }
     if (get_current_user_id() == $user_object->ID) {
         $edit_link = 'profile.php';
     } else {
         $edit_link = esc_url(add_query_arg('wp_http_referer', urlencode(stripslashes($_SERVER['REQUEST_URI'])), "user-edit.php?user_id={$user_object->ID}"));
     }
     if (current_user_can('edit_user', $user_object->ID)) {
         $edit = "<strong><a href=\"{$edit_link}\">{$user_object->user_login}</a></strong><br />";
         $actions['edit'] = '<a href="' . $edit_link . '">' . __('Edit') . '</a>';
     } else {
         $edit = "<strong>{$user_object->user_login}</strong><br />";
     }
     if (!is_multisite() && get_current_user_id() != $user_object->ID && current_user_can('delete_user', $user_object->ID)) {
         $actions['delete'] = "<a class='submitdelete' href='" . wp_nonce_url("users.php?action=delete&amp;user={$user_object->ID}", 'bulk-users') . "'>" . __('Delete') . "</a>";
     }
     if (is_multisite() && get_current_user_id() != $user_object->ID && current_user_can('remove_user', $user_object->ID)) {
         $actions['remove'] = "<a class='submitdelete' href='" . wp_nonce_url($url . "action=remove&amp;user={$user_object->ID}", 'bulk-users') . "'>" . __('Remove') . "</a>";
     }
     return $actions;
 }
开发者ID:ltdat287,项目名称:id.nhomdichvu,代码行数:33,代码来源:actions.php


示例3: get_return_url

 /**
  * Creates a nonce'd URL to redirect back to
  * @param  APP_Order $order Order being redirected back to
  * @return string           Return URL
  */
 protected function get_return_url($order)
 {
     if (!$order instanceof APP_Order && !$order instanceof APP_Order_Receipt) {
         trigger_error('Order must be an instance of APP_Order or APP_Order_Receipt', E_USER_WARNING);
     }
     return wp_nonce_url($order->get_return_url(), $this->identifier());
 }
开发者ID:kalushta,项目名称:darom,代码行数:12,代码来源:boomerang-class.php


示例4: show_update_details

        /**
         * Show update link.
         * Opens Thickbox with Changelog.
         */
        public function show_update_details()
        {
            $update_data = $this->get_update_data();
            // only show if an update is available
            if ($update_data === false) {
                return;
            }
            $update_url = wp_nonce_url('update.php?action=upgrade-theme&amp;theme=' . urlencode($this->product->get_slug()), 'upgrade-theme_' . $this->product->get_slug());
            $update_onclick = ' onclick="if ( confirm(\'' . esc_js(__("Updating this theme will lose any customizations you have made. 'Cancel' to stop, 'OK' to update.")) . '\') ) {return true;}return false;"';
            ?>
			<div id="update-nag">
				<?php 
            /* translators: %1$s expands to product name, %2$s expands to version, %3$s expands to changelog HTML link, %4$s expands to closing HTML link tag, %5$s expands to update HTML link */
            printf(__('<strong>%1$s version %2$s</strong> is available. %3$sCheck out what\'s new%4$s or %5$supdate now%4$s.'), $this->product->get_item_name(), $update_data->new_version, '<a href="#TB_inline?width=640&amp;inlineId=' . $this->product->get_slug() . '_changelog" class="thickbox" title="' . $this->get_item_name() . '">', '</a>', '<a href="' . $update_url . '" ' . $update_onclick . '>');
            ?>
			</div>
			<div id="<?php 
            echo $this->product->get_slug();
            ?>
_changelog" style="display: none;">
				<?php 
            echo wpautop($update_data->sections['changelog']);
            ?>
			</div>
			<?php 
        }
开发者ID:yoast,项目名称:license-manager,代码行数:30,代码来源:class-theme-update-manager.php


示例5: pmpro_addon_pmpro_international_addresses_widget

function pmpro_addon_pmpro_international_addresses_widget($addon)
{
    /* <img class="addon-thumb" src="<?php echo PMPRO_URL?>/adminpages/addons/images/pmpro-international-addresses.jpg" /> */
    ?>
<div class="info">							
	<p>Adds long form addresses to the PMPro checkout.</p>
	<div class="actions">							
		<?php 
    if ($addon['enabled']) {
        ?>
			<a href="https://github.com/strangerstudios/pmpro-international-addresses/" class="button">Enabled</a>
		<?php 
    } elseif (file_exists(dirname(__FILE__) . "/../../../pmpro-international-addresses/pmpro-international-addresses.php")) {
        ?>
			<a href="<?php 
        echo wp_nonce_url(self_admin_url('plugins.php?action=activate&plugin=pmpro-international-addresses/pmpro-international-addresses.php'), 'activate-plugin_pmpro-international-addresses/pmpro-international-addresses.php');
        ?>
" class="button button-primary">Activate</a>
		<?php 
    } else {
        ?>
			<a href="http://www.paidmembershipspro.com/wp-content/uploads/plugins/pmpro-international-addresses.zip" class="button button-primary">Download</a>
		<?php 
    }
    ?>
	</div>						
</div> <!-- end info -->
<?php 
}
开发者ID:danielcoats,项目名称:schoolpress,代码行数:29,代码来源:pmpro-international-addresses.php


示例6: bbp_format_buddypress_notifications

/**
 * Format the BuddyBar/Toolbar notifications
 *
 * @since 2.5.0 bbPress (r5155)
 *
 * @package bbPress
 *
 * @param string $action The kind of notification being rendered
 * @param int $item_id The primary item id
 * @param int $secondary_item_id The secondary item id
 * @param int $total_items The total number of messaging-related notifications waiting for the user
 * @param string $format 'string' for BuddyBar-compatible notifications; 'array' for WP Toolbar
 */
function bbp_format_buddypress_notifications($action, $item_id, $secondary_item_id, $total_items, $format = 'string')
{
    // Bail if not the notification action we are looking for
    if ('bbp_new_reply' !== $action) {
        return $action;
    }
    // New reply notifications
    $topic_id = bbp_get_reply_topic_id($item_id);
    $topic_title = bbp_get_topic_title($topic_id);
    $topic_link = wp_nonce_url(add_query_arg(array('action' => 'bbp_mark_read', 'topic_id' => $topic_id), bbp_get_reply_url($item_id)), 'bbp_mark_topic_' . $topic_id);
    $title_attr = __('Topic Replies', 'bbpress');
    if ((int) $total_items > 1) {
        $text = sprintf(__('You have %d new replies', 'bbpress'), (int) $total_items);
        $filter = 'bbp_multiple_new_subscription_notification';
    } else {
        if (!empty($secondary_item_id)) {
            $text = sprintf(__('You have %d new reply to %2$s from %3$s', 'bbpress'), (int) $total_items, $topic_title, bp_core_get_user_displayname($secondary_item_id));
        } else {
            $text = sprintf(__('You have %d new reply to %s', 'bbpress'), (int) $total_items, $topic_title);
        }
        $filter = 'bbp_single_new_subscription_notification';
    }
    // WordPress Toolbar
    if ('string' === $format) {
        $return = apply_filters($filter, '<a href="' . esc_url($topic_link) . '" title="' . esc_attr($title_attr) . '">' . esc_html($text) . '</a>', (int) $total_items, $text, $topic_link);
        // Deprecated BuddyBar
    } else {
        $return = apply_filters($filter, array('text' => $text, 'link' => $topic_link), $topic_link, (int) $total_items, $text, $topic_title);
    }
    do_action('bbp_format_buddypress_notifications', $action, $item_id, $secondary_item_id, $total_items);
    return $return;
}
开发者ID:joeyblake,项目名称:bbpress,代码行数:45,代码来源:notifications.php


示例7: upgrade_anchor

	function upgrade_anchor($title = '')
	{
		//Assemble our url, nonce and all
		$url = wp_nonce_url($this->admin_url() . '&' . $this->unique_prefix . '_admin_upgrade=true', $this->unique_prefix . '_admin_upgrade');
		//Return a valid Undo anchor
		return ' <a title="' . $title . '" href="' . $url . '">' . __('Migrate now.', $this->identifier) . '</a>';
	}
开发者ID:realfluid,项目名称:umbaugh,代码行数:7,代码来源:mtekk_admin_class.php


示例8: getLicensingPageUrl

 private function getLicensingPageUrl()
 {
     $url = add_query_arg('action', $this->getAjaxActionName(), admin_url('admin-ajax.php'));
     $url = wp_nonce_url($url, 'show_license');
     //Assumes the default license action = "show_license".
     return $url;
 }
开发者ID:rafabrutaldrums,项目名称:siclo,代码行数:7,代码来源:BasicPluginLicensingUi.php


示例9: pmpro_addon_pmpro_affiliates_widget

function pmpro_addon_pmpro_affiliates_widget($addon)
{
    ?>
<div class="info">							
	<p>Lightweight Affiliate system. Create affiliate accounts and codes; tracks checkouts by affiliate account.</p>
	<div class="actions">							
		<?php 
    if ($addon['enabled']) {
        ?>
			<a href="https://github.com/strangerstudios/pmpro-affiliates/blob/master/readme.txt" class="button">Enabled</a>
		<?php 
    } elseif (file_exists(dirname(__FILE__) . "/../../../pmpro-affiliates/pmpro-affiliates.php")) {
        ?>
			<a href="<?php 
        echo wp_nonce_url(self_admin_url('plugins.php?action=activate&plugin=pmpro-affiliates/pmpro-affiliates.php'), 'activate-plugin_pmpro-affiliates/pmpro-affiliates.php');
        ?>
" class="button button-primary">Activate</a>
		<?php 
    } else {
        ?>
			<a href="https://github.com/strangerstudios/pmpro-affiliates/archive/master.zip" class="button button-primary">Download</a>
		<?php 
    }
    ?>
	</div>						
</div> <!-- end info -->
<?php 
}
开发者ID:Willislahav,项目名称:paid-memberships-pro,代码行数:28,代码来源:pmpro-affiliates.php


示例10: column_title

    function column_title($item)
    {
        $actions = array();
        $view_link = add_query_arg(array('page' => 'cf7_storage', 'action' => 'view', 'post_id' => absint($item->ID)), wp_nonce_url('admin.php', 'bulk-posts'));
        $actions['quick-preview'] = sprintf('<a href="#entry-preview-%d">%s</a>', $item->ID, __('Preview', 'cf7-storage'));
        if ($this->is_trash) {
            $actions['untrash'] = sprintf('<a href="%s">%s</a>', add_query_arg('action', 'untrash', $view_link), __('Restore', 'cf7-storage'));
            $actions['export'] = sprintf('<a href="%s">%s</a>', add_query_arg('action', 'export', $view_link), __('Export as CSV', 'cf7-storage'));
            $actions['delete'] = sprintf('<a href="%s">%s</a>', add_query_arg('action', 'delete', $view_link), __('Delete Permanently', 'cf7-storage'));
        } else {
            $actions['view'] = sprintf('<a href="%s">%s</a>', $view_link, __('View', 'cf7-storage'));
            $actions['export'] = sprintf('<a href="%s">%s</a>', add_query_arg('action', 'export', $view_link), __('Export as CSV', 'cf7-storage'));
            $actions['trash'] = sprintf('<a href="%s">%s</a>', add_query_arg('action', 'trash', $view_link), __('Trash', 'cf7-storage'));
        }
        $cf7_edit_url = add_query_arg(array('page' => 'wpcf7', 'action' => 'view', 'post' => absint($item->post_parent)), admin_url('admin.php'));
        return sprintf('<a class="row-entry-title" href="%s" title="%s">
					<h3 class="entry-from">%s</h3>
					<h4 class="entry-subject">%s</h4>
				</a>
				%s
				<div id="entry-preview-%d" class="row-entry-preview">
					<div class="entry-preview-wrap">
						%s
					</div>
				</div>', $view_link, esc_attr(sprintf(__('View this submission from %s', 'cf7-storage'), $item->post_title)), esc_html($item->post_title), esc_html(get_post_meta($item->ID, 'mail_subject', true)), $this->row_actions($actions), esc_attr($item->ID), apply_filters('the_content', get_post_meta($item->ID, 'mail_body', true)));
    }
开发者ID:abcode619,项目名称:wpstuff,代码行数:26,代码来源:admin-list-view.php


示例11: widget

 function widget()
 {
     if (!is_user_logged_in()) {
         return;
     }
     $post = get_post();
     switch ($this->post_type) {
         case 'page':
             if ($post->post_type !== 'page') {
                 return;
             }
             break;
         default:
             if ($post->post_type !== $this->post_type && !is_post_type_archive($this->post_type)) {
                 return;
             }
             break;
     }
     $watchlist = get_post_meta($post->ID, '_wporg_watchlist', true);
     if ($watchlist && in_array(get_current_user_id(), $watchlist)) {
         printf('<p>You are watching this page. <a href="%s">Unwatch</a></p>', wp_nonce_url(admin_url('admin-post.php?action=wporg_watchlist&post_id=' . $post->ID), 'unwatch-' . $post->ID));
     } else {
         printf('<p><a href="%s">Watch this page</a></p>', wp_nonce_url(admin_url('admin-post.php?action=wporg_watchlist&watch=1&post_id=' . $post->ID), 'watch-' . $post->ID));
     }
 }
开发者ID:serhi,项目名称:wordpress-sites,代码行数:25,代码来源:widgets.php


示例12: pmpro_addon_pmpro_register_helper_widget

function pmpro_addon_pmpro_register_helper_widget($addon)
{
    ?>
<img class="addon-thumb" src="<?php 
    echo PMPRO_URL;
    ?>
/adminpages/addons/images/pmpro-register-helper.gif" />
<div class="info">							
	<p>Add additional meta fields to your PMPro checkout page and/or "Your Profile" pages. Support for text, select, multi-select, textarea, hidden, and custom HTML. Loop into existing checkout/profile field sections or add new ones.</p>
	<div class="actions">							
		<?php 
    if ($addon['enabled']) {
        ?>
			<a href="https://github.com/strangerstudios/pmpro-register-helper/blob/master/readme.txt" class="button">Enabled</a>
		<?php 
    } elseif (file_exists(dirname(__FILE__) . "/../../../pmpro-register-helper/pmpro-register-helper.php")) {
        ?>
			<a href="<?php 
        echo wp_nonce_url(self_admin_url('plugins.php?action=activate&plugin=pmpro-register-helper/pmpro-register-helper.php'), 'activate-plugin_pmpro-register-helper/pmpro-register-helper.php');
        ?>
" class="button button-primary">Activate</a>
		<?php 
    } else {
        ?>
			<a href="http://www.paidmembershipspro.com/wp-content/uploads/plugins/pmpro-register-helper.zip" class="button button-primary">Download</a>
		<?php 
    }
    ?>
	</div>						
</div> <!-- end info -->
<?php 
}
开发者ID:danielcoats,项目名称:schoolpress,代码行数:32,代码来源:pmpro-register-helper.php


示例13: add_admin_bar_purge

 /**
  * Adds a purge buttion in the admin bar menu
  *
  * @param $wp_admin_bar WP_Admin_Bar
  * @since 2.2.1
  */
 function add_admin_bar_purge($wp_admin_bar)
 {
     $args = array('id' => 'SG_CachePress_Supercacher_Purge', 'title' => 'Purge SG Cache', 'href' => wp_nonce_url(admin_url('admin-post.php?action=sg-cachepress-purge'), 'sg-cachepress-purge'), 'meta' => array('class' => 'sg-cachepress-admin-bar-purge'));
     if (current_user_can('manage_options')) {
         $wp_admin_bar->add_node($args);
     }
 }
开发者ID:hoitomt,项目名称:shamrocks_wordpress_site,代码行数:13,代码来源:class-sg-cachepress-admin.php


示例14: post_submitbox_start

 /**
  * Display Purge from cache on Page/Post post.php.
  */
 function post_submitbox_start()
 {
     if (current_user_can('manage_options')) {
         global $post;
         echo '<div>', sprintf('<a href="%s">' . __('Purge from cache', 'w3-total-cache') . '</a>', wp_nonce_url(sprintf('admin.php?page=w3tc_dashboard&w3tc_flush_pgcache_purge_page&post_id=%d', $post->ID), 'w3tc')), '</div>';
     }
 }
开发者ID:rongandat,项目名称:sallumeh,代码行数:10,代码来源:GeneralActions.php


示例15: activate

 /**
  * Activate plugin action
  */
 function activate()
 {
     require_once W3TC_INC_DIR . '/functions/activation.php';
     if ($this->_config->get_boolean('pgcache.enabled') && $this->_config->get_string('pgcache.engine') == 'file_generic') {
         /**
          * Disable enhanced mode if permalink structure is disabled
          */
         $permalink_structure = get_option('permalink_structure');
         if ($permalink_structure == '') {
             $this->_config->set('pgcache.engine', 'file');
             $this->_config->save();
         } else {
             if (w3_can_modify_rules(w3_get_pgcache_rules_core_path())) {
                 $this->write_rules_core();
             }
             if (w3_can_modify_rules(w3_get_pgcache_rules_cache_path())) {
                 $this->write_rules_cache();
             }
         }
     }
     if (!$this->locked()) {
         if (!@copy(W3TC_INSTALL_FILE_ADVANCED_CACHE, W3TC_ADDIN_FILE_ADVANCED_CACHE)) {
             w3_writable_error(W3TC_ADDIN_FILE_ADVANCED_CACHE);
         }
         if ((!defined('WP_CACHE') || !WP_CACHE) && !$this->enable_wp_cache()) {
             $reactivate_url = wp_nonce_url('plugins.php?action=activate&plugin=' . W3TC_FILE, 'activate-plugin_' . W3TC_FILE);
             $reactivate_button = sprintf('<input type="button" value="re-activate plugin" onclick="top.location.href = \'%s\'" />', addslashes($reactivate_url));
             $error = sprintf('<strong>%swp-config.php</strong> could not be written, please edit config and add:<br /><strong style="color:#f00;">define(\'WP_CACHE\', true);</strong> before <strong style="color:#f00;">require_once(ABSPATH . \'wp-settings.php\');</strong><br />then %s.', ABSPATH, $reactivate_button);
             w3_activate_error($error);
         }
     }
     $this->schedule();
     $this->schedule_prime();
 }
开发者ID:nuevomediagroup,项目名称:nmg-code,代码行数:37,代码来源:PgCacheAdmin.php


示例16: powerpressplayer_videojs_info

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 
    }
}
开发者ID:KimcoBlogSC,项目名称:Blog,代码行数:30,代码来源:powerpressadmin-player-page.php


示例17: pmpro_addon_pmpro_series_widget

function pmpro_addon_pmpro_series_widget($addon)
{
    ?>
<img class="addon-thumb" src="<?php 
    echo PMPRO_URL;
    ?>
/adminpages/addons/images/pmpro-series.gif" />
<div class="info">						
	<p>"Drip feed" content to your members over the course of their membership. Serializes content by # of days post-registration.</p>
	<div class="actions">									
		<?php 
    if ($addon['enabled']) {
        ?>
			<a href="<?php 
        echo admin_url("edit.php?post_type=pmpro_series");
        ?>
" class="button">Enabled</a>
		<?php 
    } elseif (file_exists(dirname(__FILE__) . "/../../../pmpro-series/pmpro-series.php")) {
        ?>
			<a href="<?php 
        echo wp_nonce_url(self_admin_url('plugins.php?action=activate&plugin=pmpro-series/pmpro-series.php'), 'activate-plugin_pmpro-series/pmpro-series.php');
        ?>
" class="button button-primary">Activate</a>
		<?php 
    } else {
        ?>
			<a href="http://www.paidmembershipspro.com/wp-content/uploads/plugins/pmpro-series.zip" class="button button-primary">Download</a>
		<?php 
    }
    ?>
	</div>						
</div> <!-- end info -->
<?php 
}
开发者ID:danielcoats,项目名称:schoolpress,代码行数:35,代码来源:pmpro-series.php


示例18: pmpro_addon_pmpro_wp_affiliate_widget

function pmpro_addon_pmpro_wp_affiliate_widget($addon)
{
    ?>
<img class="addon-thumb" src="<?php 
    echo PMPRO_URL;
    ?>
/adminpages/addons/images/pmpro-wp-affiliate-platform.jpg" />
<div class="info">							
	<p>Process an affiliate via WP Affiliate Platform after a PMPro checkout.</p>
	<div class="actions">							
		<?php 
    if ($addon['enabled']) {
        ?>
			<a href="https://github.com/strangerstudios/pmpro-wp-affiliate-platform/" class="button">Enabled</a>
		<?php 
    } elseif (file_exists(dirname(__FILE__) . "/../../../pmpro-wp-affiliate-platform/pmpro-wp-affiliate-platform.php")) {
        ?>
			<a href="<?php 
        echo wp_nonce_url(self_admin_url('plugins.php?action=activate&plugin=pmpro-wp-affiliate-platform/pmpro-wp-affiliate-platform.php'), 'activate-plugin_pmpro-wp-affiliate-platform/pmpro-wp-affiliate-platform.php');
        ?>
" class="button button-primary">Activate</a>
		<?php 
    } else {
        ?>
			<a href="http://www.paidmembershipspro.com/wp-content/uploads/plugins/pmpro-wp-affiliate-platform.zip" class="button button-primary">Download</a>
		<?php 
    }
    ?>
				
	</div>							
</div> <!-- end info -->
<?php 
}
开发者ID:nwmcinc,项目名称:paid-memberships-pro,代码行数:33,代码来源:pmpro-wp-affiliate.php


示例19: pmpro_addon_pmpro_shipping_widget

function pmpro_addon_pmpro_shipping_widget($addon)
{
    /* <img class="addon-thumb" src="<?php echo PMPRO_URL?>/adminpages/addons/images/pmpro-shipping.jpg" /> */
    ?>
<div class="info">							
	<p>Adds shipping fields to the checkout page, confirmation page, confirmation emails, member's list and edit user profile pages.</p>
	<div class="actions">							
		<?php 
    if ($addon['enabled']) {
        ?>
			<a href="https://github.com/strangerstudios/pmpro-shipping/" class="button">Enabled</a>
		<?php 
    } elseif (file_exists(dirname(__FILE__) . "/../../../pmpro-shipping/pmpro-shipping.php")) {
        ?>
			<a href="<?php 
        echo wp_nonce_url(self_admin_url('plugins.php?action=activate&plugin=pmpro-shipping/pmpro-shipping.php'), 'activate-plugin_pmpro-shipping/pmpro-shipping.php');
        ?>
" class="button button-primary">Activate</a>
		<?php 
    } else {
        ?>
			<a href="http://www.paidmembershipspro.com/wp-content/uploads/plugins/pmpro-shipping.zip" class="button button-primary">Download</a>
		<?php 
    }
    ?>
	</div>						
</div> <!-- end info -->
<?php 
}
开发者ID:Willislahav,项目名称:paid-memberships-pro,代码行数:29,代码来源:pmpro-shipping.php


示例20: column_ccode

 public function column_ccode($item)
 {
     $actions = array();
     $actions['edit'] = sprintf('<a href="?page=%s&action=%s&coupon_id=%s">%s</a>', esc_attr($_REQUEST['page']), 'edit', esc_attr($item->id), __('Edit', 'membership2'));
     $actions['delete'] = sprintf('<span class="delete"><a href="%s">%s</a></span>', wp_nonce_url(sprintf('?page=%s&coupon_id=%s&action=%s', esc_attr($_REQUEST['page']), esc_attr($item->id), 'delete'), 'delete'), __('Delete', 'membership2'));
     return sprintf('<code>%1$s</code> %2$s', $item->name, $this->row_actions($actions));
 }
开发者ID:nayabbukhari,项目名称:circulocristiano,代码行数:7,代码来源:class-ms-addon-coupon-helper-listtable.php



注:本文中的wp_nonce_url函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP wp_normalize_path函数代码示例发布时间:2022-05-23
下一篇:
PHP wp_nonce_tick函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap