当前位置: 首页>>代码示例>>PHP>>正文


PHP SitePress::initialize_cache方法代码示例

本文整理汇总了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'));
 }
开发者ID:winyatasenjaya,项目名称:sitepress-multilingual-cms,代码行数:35,代码来源:cms-navigation.php


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