本文整理匯總了PHP中WP_Upgrader_Skin::bulk_footer方法的典型用法代碼示例。如果您正苦於以下問題:PHP WP_Upgrader_Skin::bulk_footer方法的具體用法?PHP WP_Upgrader_Skin::bulk_footer怎麽用?PHP WP_Upgrader_Skin::bulk_footer使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類WP_Upgrader_Skin
的用法示例。
在下文中一共展示了WP_Upgrader_Skin::bulk_footer方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: bulk_footer
/**
* Outputs links after bulk plugin installation is complete.
*
* @since 2.2.0
*/
public function bulk_footer()
{
/** Serve up the string to say installations (and possibly activations) are complete */
parent::bulk_footer();
/** Flush plugins cache so we can make sure that the installed plugins list is always up to date */
wp_cache_flush();
/** Display message based on if all plugins are now active or not */
$complete = array();
foreach (TGM_Plugin_Activation::$instance->plugins as $plugin) {
if (!is_plugin_active($plugin['file_path'])) {
echo '<p><a href="' . add_query_arg('page', TGM_Plugin_Activation::$instance->menu, admin_url(TGM_Plugin_Activation::$instance->parent_url_slug)) . '" title="' . esc_attr(TGM_Plugin_Activation::$instance->strings['return']) . '" target="_parent">' . __(TGM_Plugin_Activation::$instance->strings['return'], TGM_Plugin_Activation::$instance->domain) . '</a></p>';
$complete[] = $plugin;
break;
} else {
$complete[] = '';
}
}
/** Filter out any empty entries */
$complete = array_filter($complete);
/** All plugins are active, so we display the complete string and hide the menu to protect users */
if (empty($complete)) {
echo '<p>' . sprintf(TGM_Plugin_Activation::$instance->strings['complete'], '<a href="' . admin_url() . '" title="' . __('Return to the Dashboard', TGM_Plugin_Activation::$instance->domain) . '">' . __('Return to the Dashboard', TGM_Plugin_Activation::$instance->domain) . '</a>') . '</p>';
echo '<style type="text/css">#adminmenu .wp-submenu li.current { display: none !important; }</style>';
}
}