コード例 #1
0
 /**
  * @param WP_User|object|null $user
  * @param array               $args
  */
 function __construct($user, $args = array())
 {
     /*
      * Find the user if possible
      */
     $this->_user = WPLib_Users::get_user($user);
     /*
      * Let our parent class capture whatever properties where passed in as $args
      */
     parent::__construct($args);
 }
コード例 #2
0
 /**
  * @param WP_Post|object|null $post
  * @param array               $args
  */
 function __construct($post, $args = array())
 {
     /*
      * Find the post if possible
      */
     $this->_post = WPLib::get_post($post);
     /*
      * Let our parent class capture whatever properties where passed in as $args
      */
     parent::__construct($args);
 }
コード例 #3
0
 /**
  * @param object|int|string|null $term
  * @param array $args
  *
  */
 function __construct($term, $args = array())
 {
     $this->_term = WPLib::get_term($term, static::item_taxonomy());
     parent::__construct($args);
 }
コード例 #4
0
ファイル: class-term-model-base.php プロジェクト: wplib/wplib
 /**
  * @param object|int|string|null $term
  * @param array $args
  *
  */
 function __construct($term, $args = array())
 {
     $this->_term = WPLib::get_term($term, $args);
     parent::__construct($args);
 }