(string). * @var array */ public $_postStatus; /** * Filter by User Permissions. * * @since 0.3.0 * @var string */ public $_userPerm; /** * Operator for Author ID filter. * * @since 0.3.0 * @var string */ public $_postAuthorOperator; /** * Filter by Author ID. * * @since 0.3.0 * @var array */ public $_postAuthorIDs; /** * Filter Stickies. * * @since 0.3.0 * @var boolean */ public $_listIgnoreSticky; /** * Filter Posts. * * @since 0.3.0 * @var array */ public $_listExcludePosts; /** * Filter Duplicates. * * @since 0.3.0 * @var boolean */ public $_listExcludeDuplicates; /** * Filter Current Post/Page. * * @since 0.1.0 * @version 0.3.0 - changed (string) to (boolean). * @var boolean */ public $_listExcludeCurrent; /** * Design for Exit/Empty message. * * @since 0.3.0 * @var string */ public $_exit; /** * Design for Before Content/Loop. * * @since 0.1.0 * @var string */ public $_before; /** * Design for Content/Loop. * * @since 0.1.0 * @var string */ public $_content; /** * Design for Content/Loop. * * @since 0.1.0 * @var string */ public $_after; /** * Constructor. * * Object constructor. * * @since 0.1.0 * @since 0.3.0 - Changed: Filter for Page Parents, Post Status. * Added: Filter for Custom Post Type and Taxonomy support, * User Perms, Author IDs, Author Include/Exclude, * Ignore Sticky Posts, Exclude Duplicates, Exclude Posts. * Design for Empty Message. * * @return void */ public function __construct() { $this->_postParents = (array) array(); $this->_postTax = (object) new stdClass(); $this->_listCount = (int) 5; $this->_listOrderBy = (string) ''; $this->_listOrder = (string) ''; $this->_postVisibility = (array) array( 'public' ); $this->_postStatus = (array) array( 'publish' ); $this->_userPerm = (string) 'readable'; $this->_postAuthorOperator = (string) 'none'; $this->_postAuthorIDs = (array) array(); $this->_listIgnoreSticky = (bool) false; $this->_listExcludeCurrent = (bool) true; $this->_listExcludeDuplicates = (bool) false; $this->_listExcludePosts = array(); $this->_exit = (string) ''; $this->_before = (string) ''; $this->_content = (string) ''; $this->_after = (string) ''; } /** * Set Preset to Version. * * Sets Preset Object to a set version of variables. * * @since 0.3.0 * * @param string $version A previous version number. * @return void */ public function reset_to_version( $version ) { foreach ( $this as $key => &$value ) { $value = null; unset( $this->$key ); } if ( version_compare( '0.3.a1', $version, '>' ) ) { $this->reset_to_base(); } elseif ( version_compare( '0.3.a1', $version, '<=' ) && version_compare( '0.3.b5', $version, '>' ) ) { $this->reset_to_03a1(); } else { //if (version_compare('0.3.a1', $oldversion, '>')) $this->reset_to_03b5(); } } /** * Reset to initial/base. * * Resets the object to its initial verion values. * * @since 0.3.a * @access private * * @return void */ private function reset_to_base() { $this->_before = ''; $this->_content = ''; $this->_after = ''; // array( int ) - All. $this->_catsSelected = ''; // (string) - All. $this->_tagsSelected = ''; // (boolean) - Unchecked. $this->_catsInclude = 'false'; // (boolean) - Unchecked. $this->_tagsInclude = 'false'; // (boolean) - Unchecked. $this->_catsRequired = 'false'; // (boolean) - Unchecked. $this->_tagsRequired = 'false'; // (string) - Desc. $this->_listOrder = ''; // (string) - Type. $this->_listOrderBy = ''; // (int) - Number of Posts. $this->_listAmount = ''; // (string) - Post Type. Example: post or page. $this->_postType = ''; $this->_postParent = ''; // (boolean) - Unchecked. $this->_postExcludeCurrent = 'false'; } /** * Reset to 0.3.a1. * * Sets the object to version 0.3.a1 variables. * * @since 0.3.a1 * @access private * * @return void */ private function reset_to_03a1() { $this->_postParent = (array) array(); $this->_postTax = (object) new stdClass(); $this->_listAmount = (int) 5; $this->_listOrderBy = (string) ''; $this->_listOrder = (string) ''; $this->_postStatus = (string) ''; $this->_postExcludeCurrent = (bool) true; $this->_before = (string) ''; $this->_content = (string) ''; $this->_after = (string) ''; } /** * Reset to 0.3.a1. * * Sets the object to version 0.3.b5 variables. * * @since 0.3.b5 * @access private * * @return void */ private function reset_to_03b5() { $this->_postParents = (array) array(); $this->_postTax = (object) new stdClass(); $this->_listCount = (int) 5; $this->_listOrderBy = (string) ''; $this->_listOrder = (string) ''; $this->_postVisibility = (array) array( 'public' ); $this->_postStatus = (array) array( 'publish' ); $this->_userPerm = (string) 'readable'; $this->_postAuthorOperator = (string) 'none'; $this->_postAuthorIDs = (array) array(); $this->_listIgnoreSticky = (bool) false; $this->_listExcludeCurrent = (bool) true; $this->_listExcludeDuplicates = (bool) false; $this->_listExcludePosts = array(); $this->_exit = (string) ''; $this->_before = (string) ''; $this->_content = (string) ''; $this->_after = (string) ''; } }