Forked from DrewAPicture/class-wp-docs-collection.php
Last active
December 21, 2015 23:49
-
-
Save johnpbloch/6384802 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* WP Docs Collection Class | |
* | |
* Stores commonly | |
* | |
* @access public | |
* @since 3.7.0 | |
*/ | |
class WP_Docs_Collection { | |
/** | |
* Post Columns | |
* | |
* @access public | |
* @since 3.7.0 | |
*/ | |
private static $post_columns = array( | |
'ID', 'post_author', 'post_date', 'post_date_gmt', | |
'post_content', 'post_title', 'post_excerpt', | |
'post_status', 'comment_status', 'ping_status', | |
'post_password', 'post_name', 'to_ping', 'pinged', | |
'post_modified', 'post_modified_gmt', | |
'post_content_filtered', 'post_parent', 'guid', | |
'menu_order', 'post_type', 'post_mime_type','comment_count' | |
); | |
public static get_post_columns(){ | |
return self::$post_columns; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function get_post_columns(){ | |
static $columns = null; | |
if(!$columns){ | |
$columns = array( | |
'ID', 'post_author', 'post_date', 'post_date_gmt', | |
'post_content', 'post_title', 'post_excerpt', | |
'post_status', 'comment_status', 'ping_status', | |
'post_password', 'post_name', 'to_ping', 'pinged', | |
'post_modified', 'post_modified_gmt', | |
'post_content_filtered', 'post_parent', 'guid', | |
'menu_order', 'post_type', 'post_mime_type','comment_count' | |
); | |
} | |
return $columns; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment