Esempio n. 1
0
 * ======================================================================
 */
/**
 * Metabox object
 * 
 * @package AAM
 * @author Vasyl Martyniuk <*****@*****.**>
 */
class AAM_Core_Object_Metabox extends AAM_Core_Object
{
Esempio n. 2
0
 /**
  * Constructor
  *
  * @param AAM_Core_Subject $subject
  * @param WP_Post|Int      $post
  *
  * @return void
  *
  * @access public
  */
 public function __construct(AAM_Core_Subject $subject, $post)
 {
     parent::__construct($subject);
     //make sure that we are dealing with WP_Post object
     if ($post instanceof WP_Post) {
         $this->setPost($post);
     } elseif (intval($post)) {
         $this->setPost(get_post($post));
     }
     if ($this->getPost()) {
         $this->read();
     }
 }
Esempio n. 3
0
 /**
  * Constructor
  *
  * @param AAM_Core_Subject $subject
  *
  * @return void
  *
  * @access public
  */
 public function __construct(AAM_Core_Subject $subject)
 {
     parent::__construct($subject);
     $this->setOption($this->getSubject()->getCapabilities());
 }