本文整理匯總了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'));
}