本文整理汇总了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>';
}
}