ty($option[$property]['enabled']); } } return $result; } /** * Determine if property is defined * * This is useful for managing access to commenting system * * @param string $property * * @return boolean * * @access public * @see AAM_Service_Content::initializeHooks * * @version 6.0.1 */ public function isDefined($property) { return array_key_exists($property, $this->getOption()); } /** * Check if particular action is allowed * * This is alias for the AAM_Core_Object_Post::is($property) method and is used * only to improve code readability. Example of such action is "edit", "publish", * etc. * * @param string $property * * @return boolean * * @access public * @version 6.0.0 */ public function isAllowedTo($property) { return !$this->is($property); } /** * Check if particular access option is enabled * * This is alias for the AAM_Core_Object_Post::is($property) method and is used * only to improve code readability. Example of such action is "teaser", * "origin", etc. * * @param string $property * * @return boolean * * @access public * @version 6.0.0 */ public function has($property) { return $this->is($property); } /** * Get WP Post * * @return WP_Post * * @access public * @version 6.0.0 */ public function getPost() { return $this->_post; } /** * Save access settings * * @return boolean * * @since 6.1.0 Using explicit options to store settings * @since 6.0.0 Initial implementation of the method * * @access public * @version 6.1.0 */ public function save() { return $this->getSubject()->updateOption( $this->getExplicitOption(), self::OBJECT_TYPE, $this->ID . '|' . $this->post_type ); } /** * Reset access settings * * @return boolean * * @access public * @version 6.0.0 */ public function reset() { return $this->getSubject()->deleteOption( self::OBJECT_TYPE, $this->ID . '|' . $this->post_type ); } }