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


PHP SucomUtil::get_req_val方法代码示例

本文整理汇总了PHP中SucomUtil::get_req_val方法的典型用法代码示例。如果您正苦于以下问题:PHP SucomUtil::get_req_val方法的具体用法?PHP SucomUtil::get_req_val怎么用?PHP SucomUtil::get_req_val使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SucomUtil的用法示例。


在下文中一共展示了SucomUtil::get_req_val方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: add_actions

 protected function add_actions()
 {
     add_filter('user_contactmethods', array(&$this, 'add_contact_methods'), 20, 2);
     if (is_admin()) {
         /**
          * Hook a minimum number of admin actions to maximize performance.
          * The user_id argument is always present when we're editing a user,
          * but missing when viewing our own profile page.
          */
         // common to the show profile and user editing pages
         add_action('admin_init', array(&$this, 'add_metaboxes'));
         // load_meta_page() priorities: 100 post, 200 user, 300 taxonomy
         add_action('admin_head', array(&$this, 'load_meta_page'), 200);
         add_action('show_user_profile', array(&$this, 'show_metaboxes'), 20);
         // your profile
         if (!empty($this->p->options['plugin_columns_user'])) {
             add_filter('manage_users_columns', array($this, 'add_column_headings'), 10, 1);
             add_filter('manage_users_custom_column', array($this, 'get_user_column_content'), 10, 3);
             $this->p->util->add_plugin_filters($this, array('og_image_user_column_content' => 4, 'og_desc_user_column_content' => 4));
         }
         // exit here if not a user page, or showing the profile page
         $user_id = SucomUtil::get_req_val('user_id');
         if (empty($user_id)) {
             return;
         }
         // hooks for user and profile editing
         add_action('edit_user_profile', array(&$this, 'show_metaboxes'), 20);
         add_action('edit_user_profile_update', array(&$this, 'sanitize_contact_methods'), 5);
         add_action('edit_user_profile_update', array(&$this, 'save_options'), WPSSO_META_SAVE_PRIORITY);
         add_action('edit_user_profile_update', array(&$this, 'clear_cache'), WPSSO_META_CACHE_PRIORITY);
         add_action('personal_options_update', array(&$this, 'sanitize_contact_methods'), 5);
         add_action('personal_options_update', array(&$this, 'save_options'), WPSSO_META_SAVE_PRIORITY);
         add_action('personal_options_update', array(&$this, 'clear_cache'), WPSSO_META_CACHE_PRIORITY);
     }
 }
开发者ID:sonvq,项目名称:passioninvestment,代码行数:35,代码来源:user.php

示例2: add_actions

 protected function add_actions()
 {
     if (is_admin()) {
         /**
          * Hook a minimum number of admin actions to maximize performance.
          * The taxonomy and tag_ID arguments are always present when we're
          * editing a category and/or tag page, so return immediately if
          * they're not present.
          */
         if (($this->tax_slug = SucomUtil::get_req_val('taxonomy')) === '') {
             return;
         }
         $this->tax_obj = get_taxonomy($this->tax_slug);
         if (!$this->tax_obj->public) {
             return;
         }
         if (!empty($this->p->options['plugin_columns_taxonomy'])) {
             add_filter('manage_edit-' . $this->tax_slug . '_columns', array($this, 'add_column_headings'), 10, 1);
             add_filter('manage_' . $this->tax_slug . '_custom_column', array($this, 'get_taxonomy_column_content'), 10, 3);
             $this->p->util->add_plugin_filters($this, array('og_image_taxonomy_column_content' => 4, 'og_desc_taxonomy_column_content' => 4));
         }
         if (($this->term_id = SucomUtil::get_req_val('tag_ID')) === '') {
             return;
         }
         if ($this->p->debug->enabled) {
             $this->p->debug->log('tax_slug/term_id values: ' . $this->tax_slug . '/' . $this->term_id);
         }
         /**
          * Available term and taxonomy actions:
          *
          * do_action( "create_term",       $term_id, $tt_id, $taxonomy );
          * do_action( "created_term",      $term_id, $tt_id, $taxonomy );
          * do_action( "edited_term",       $term_id, $tt_id, $taxonomy );
          * do_action( 'delete_term',       $term_id, $tt_id, $taxonomy, $deleted_term );
          * do_action( "create_$taxonomy",  $term_id, $tt_id );
          * do_action( "created_$taxonomy", $term_id, $tt_id );
          * do_action( "edited_$taxonomy",  $term_id, $tt_id );
          * do_action( "delete_$taxonomy",  $term_id, $tt_id, $deleted_term );
          */
         add_action('admin_init', array(&$this, 'add_metaboxes'));
         // load_meta_page() priorities: 100 post, 200 user, 300 taxonomy
         add_action('current_screen', array(&$this, 'load_meta_page'), 300, 1);
         add_action($this->tax_slug . '_edit_form', array(&$this, 'show_metaboxes'), 100, 1);
         add_action('created_' . $this->tax_slug, array(&$this, 'save_options'), NGFB_META_SAVE_PRIORITY, 2);
         add_action('created_' . $this->tax_slug, array(&$this, 'clear_cache'), NGFB_META_CACHE_PRIORITY, 2);
         add_action('edited_' . $this->tax_slug, array(&$this, 'save_options'), NGFB_META_SAVE_PRIORITY, 2);
         add_action('edited_' . $this->tax_slug, array(&$this, 'clear_cache'), NGFB_META_CACHE_PRIORITY, 2);
         add_action('delete_' . $this->tax_slug, array(&$this, 'delete_options'), NGFB_META_SAVE_PRIORITY, 2);
         add_action('delete_' . $this->tax_slug, array(&$this, 'clear_cache'), NGFB_META_CACHE_PRIORITY, 2);
     }
 }
开发者ID:leotaillard,项目名称:btws2016,代码行数:51,代码来源:taxonomy.php

示例3: is_product_tag

 public static function is_product_tag()
 {
     if (isset(self::$is['product_tag'])) {
         return self::$is['product_tag'];
     }
     $ret = false;
     if (function_exists('is_product_tag') && is_product_tag()) {
         $ret = true;
     } elseif (is_admin()) {
         if (SucomUtil::get_req_val('taxonomy') === 'product_tag' && SucomUtil::get_req_val('post_type') === 'product') {
             $ret = true;
         }
     }
     return self::$is['product_tag'] = apply_filters('sucom_is_product_tag', $ret);
 }
开发者ID:eugene-gromky-co,项目名称:mindfulnesssummit,代码行数:15,代码来源:util.php


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