'page slug' ); /** * Used post types. */ static public $aPostTypes = array( ); /** * Used post types by meta boxes. */ static public $aMetaBoxPostTypes = array( // 'page' => 'page', // 'post' => 'post', ); /** * Used taxonomies. */ static public $aTaxonomies = array( // Used to be stored in the `TagSlug` class constant. // 'tag' => 'taxonomy_slug', ); /** * Used shortcode slugs */ static public $aShortcodes = array( // 'key' => 'my_short_code', ); /** * Stores custom database table names. * @remark The below is the structure * array( * 'slug (part of database wrapper class file name)' => array( * 'version' => '0.1', * 'name' => 'table_name', // serves as the table name suffix * ), * ... * ) */ static public $aDatabaseTables = array( // 'key' => array( // 'name' => 'some_name_key', // serves as the table name suffix // 'version' => '1.0.0', // 'across_network' => true, // 'class_name' => 'LateCachingForFeeds_DatabaseTable_some_name_key', // ), ); /** * Sets up class properties. * @return void */ static function setUp() { self::$sDirPath = dirname( self::$sFilePath ); } /** * @return string */ static public function getPluginURL( $sRelativePath='' ) { return plugins_url( $sRelativePath, self::$sFilePath ); } /** * Requirements. */ static public $aRequirements = array( 'php' => array( 'version' => '5.2.4', 'error' => 'The plugin requires the PHP version %1$s or higher.', ), 'wordpress' => array( 'version' => '3.5', // SimplePie 1.3.1 'error' => 'The plugin requires the WordPress version %1$s or higher.', ), // 'mysql' => array( // 'version' => '5.0.3', // uses VARCHAR(2083) // 'error' => 'The plugin requires the MySQL version %1$s or higher.', // ), 'functions' => '', // disabled // array( // e.g. 'mblang' => 'The plugin requires the mbstring extension.', // ), 'classes' => array( // 'DOMDocument' => 'The plugin requires the DOMXML extension.', ), 'constants' => '', // disabled // array( // e.g. 'THEADDONFILE' => 'The plugin requires the ... addon to be installed.', // e.g. 'APSPATH' => 'The script cannot be loaded directly.', // ), 'files' => '', // disabled // array( // e.g. 'home/my_user_name/my_dir/scripts/my_scripts.php' => 'The required script could not be found.', // ), ); static public $aAdminNotices = array(); static public function setAdminNotice( $sMessage, $sType ) { self::$aAdminNotices[] = array( 'message' => $sMessage, 'type' => $sType ); add_action( 'admin_notices', array( __CLASS__, 'replyToShowAdminNotices' ) ); } static public function replyToShowAdminNotices() { foreach( self::$aAdminNotices as $_aNotice ) { $_sType = esc_attr( $_aNotice[ 'type' ] ); echo "
" . $_aNotice[ 'message' ] . "
" . "