本文整理汇总了PHP中SitePress::initialize_cache方法的典型用法代码示例。如果您正苦于以下问题:PHP SitePress::initialize_cache方法的具体用法?PHP SitePress::initialize_cache怎么用?PHP SitePress::initialize_cache使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SitePress
的用法示例。
在下文中一共展示了SitePress::initialize_cache方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: SitePress
function __construct()
{
global $cms_nav_ie_ver, $sitepress;
if (!isset($sitepress)) {
$sitepress = new SitePress();
$sitepress->initialize_cache();
}
$sitepress_settings = $sitepress->get_settings();
$this->settings = $sitepress_settings['modules']['cms-navigation'];
$cms_nav_user_agent = $_SERVER['HTTP_USER_AGENT'];
if (preg_match('#MSIE ([0-9]+)\\.[0-9]#', $cms_nav_user_agent, $matches)) {
$cms_nav_ie_ver = $matches[1];
}
add_action('icl_navigation_breadcrumb', array($this, 'cms_navigation_breadcrumb'));
add_action('icl_navigation_menu', array($this, 'cms_navigation_menu_nav'));
add_action('icl_navigation_sidebar', array($this, 'cms_navigation_page_navigation'));
add_action('save_post', array($this, 'cms_navigation_update_post_settings'));
add_action('admin_head', array($this, 'cms_navigation_page_edit_options'));
add_action('admin_head', array($this, 'cms_navigation_js'));
add_action('init', array($this, 'cms_navigation_css'));
add_action('plugins_loaded', array($this, 'sidebar_navigation_widget_init'));
add_filter('page_link', array($this, 'rewrite_page_link'), 15, 2);
add_action('parse_query', array($this, 'redirect_offsite_urls'));
add_filter('permalink_structure_changed', array($this, 'clear_cache'));
add_filter('update_option_show_on_front', array($this, 'clear_cache'));
add_filter('update_option_page_on_front', array($this, 'clear_cache'));
add_filter('update_option_page_for_posts', array($this, 'clear_cache'));
add_action('delete_post', array($this, 'clear_cache'));
add_action('delete_category', array($this, 'clear_cache'));
add_action('create_category', array($this, 'clear_cache'));
add_action('edited_category', array($this, 'clear_cache'));
// not needed - save_post handles this
//add_action('trashed_post', array($this,'clear_cache'));
//add_action('untrashed_post', array($this,'clear_cache'));
}