This file contains hidden or 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 | |
// Customize the OrganizeWP debug directory. | |
add_filter( 'organizewp/debug/dir', function( $dir ) { | |
return wp_upload_dir()['basedir']; | |
} ); |
This file contains hidden or 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 | |
// Tell OrganizeWP about our custom Smart Group. | |
// @link https://organizewp.com/docs/smart-groups/ | |
// @link https://gist.github.com/jchristopher/8488c91eb6c0d90922ec686865e23a2f | |
add_filter( 'organizewp/smart_groups', function( $smart_groups ) { | |
$smart_groups['my_owp_posts_no_comments'] = new MyOwpPostsNoComments(); | |
return $smart_groups; | |
} ); |
This file contains hidden or 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 | |
// Custom OrganizeWP Smart Group to lists Posts with no Comments. | |
// @link https://organizewp.com/docs/smart-groups/ | |
class MyOwpPostsNoComments extends \OrganizeWP\SmartGroup { | |
function __construct() { | |
$this->name = 'no_comments'; | |
$this->label = 'No Comments'; | |
} |
This file contains hidden or 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 | |
// Tell OrganizeWP to use our Comments Info Column | |
// @link https://gist.github.com/jchristopher/6892032eeec8d0ad3087ea166eb97b45 | |
// @link https://organizewp.com/docs/info-columns/ | |
add_filter( 'organizewp/post_type/info_columns', function( $info_columns, \OrganizeWP\PostType $post_type ) { | |
$info_columns['my_owp_comments'] = new MyOwpInfoColumnComments( $post_type ); | |
return $info_columns; | |
}, 10, 2 ); |
This file contains hidden or 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 | |
// Custom OrganizeWP Info Column to display Comment count for each entry. | |
// @link https://organizewp.com/docs/info-columns/ | |
class MyOwpInfoColumnComments extends \OrganizeWP\PostTypeInfoColumn { | |
function __construct( \OrganizeWP\PostType $post_type ) { | |
$this->assets(); | |
} |
This file contains hidden or 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 | |
// Enable Modified Info Column in OrganizeWP. | |
// @link https://organizewp.com/docs/info-columns/ | |
add_filter( 'organizewp/post_type/info_columns/modified', '__return_true' ); |
This file contains hidden or 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 | |
// Enable Author Info Column in OrganizeWP. | |
// @link https://organizewp.com/docs/info-columns/ | |
add_filter( 'organizewp/post_type/info_columns/author', '__return_true' ); |
This file contains hidden or 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 | |
// Insert our OrganizeWP comment count Entry Panel Pane. | |
// @link https://organizewp.com/docs/entry-panel/ | |
// @link https://gist.github.com/jchristopher/922d0a9396f72a44090c2af64561d71f | |
// @link https://gist.github.com/jchristopher/94d0c4c565ef32d5a419ba857bd27b5f | |
add_filter( 'organizewp/entry_panel/panes', function( $panes, $panel ) { | |
$panes['my_owp_comment_count'] = new MyOwpPaneEntryComments( $panel ); | |
return $panes; |
This file contains hidden or 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 | |
// Define the OrganizeWP Entry Panel Pane for our comment count Pane Item. | |
// @link https://organizewp.com/docs/entry-panel/ | |
// @link https://gist.github.com/jchristopher/922d0a9396f72a44090c2af64561d71f | |
class MyOwpPaneEntryComments extends \OrganizeWP\EntryPanelPane { | |
function init() { | |
$this->name = 'comments'; | |
$this->label = 'Comments'; | |
$this->show_label = false; |
This file contains hidden or 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 | |
// Define an OrganizeWP Entry Pane Item to output the comment count for the current entry. | |
// @link https://organizewp.com/docs/entry-panel/ | |
class MyOwpPaneEntryCommentsCount extends \OrganizeWP\EntryPanelPaneItem { | |
function init() { | |
$this->name = 'entry_comments'; | |
$this->label = 'Comments'; | |
} |