Skip to content

Instantly share code, notes, and snippets.

@jchristopher
jchristopher / functions.php
Created Aug 11, 2022
Increase the default max limit for OrganizeWP Post Type entry limit
View functions.php
<?php
// Increase the default max limit for OrganizeWP Post Type entry limit.
// @link https://organizewp.com/docs/hooks/organizewp-post_type_entry_max/
add_filter( 'organizewp/post_type_entry_max', function( $max ) {
return 5000;
} );
@jchristopher
jchristopher / functions.php
Created Aug 5, 2022
Customize the OrganizeWP Admin Menu entry position
View functions.php
<?php
// Customize the OrganizeWP Admin Menu entry position.
add_filter( 'organizewp/menu/position', function( $position ) {
return 1;
} );
@jchristopher
jchristopher / functions.php
Created Aug 5, 2022
Customize the OrganizeWP Admin Menu label
View functions.php
<?php
// Customize the OrganizeWP Admin Menu label.
add_filter( 'organizewp/menu/label', function( $icon ) {
return 'Site Content';
} );
@jchristopher
jchristopher / functions.php
Created Aug 5, 2022
Customize the OrganizeWP Admin Menu icon
View functions.php
<?php
// Customize the OrganizeWP Admin Menu icon.
add_filter( 'organizewp/menu/icon', function( $icon ) {
return 'dashicons-generic';
} );
@jchristopher
jchristopher / functions.php
Created Aug 5, 2022
Programmatically define your OrganizeWP license key
View functions.php
<?php
// Programmatically define your OrganizeWP license key.
add_filter( 'organizewp\license\key', function( $key ) {
return '--------------------------------';
} );
@jchristopher
jchristopher / functions.php
Created Aug 5, 2022
Disable Quick Info in OrganizeWP's Entry Panel
View functions.php
<?php
// Disable Quick Info in OrganizeWP's Entry Panel
add_filter( 'organizewp/entry_panel/panes/quick_info', '__return_false' );
@jchristopher
jchristopher / functions.php
Created Aug 5, 2022
Disable the Actions in OrganizeWP's Entry Panel
View functions.php
<?php
// Disable the Actions in OrganizeWP's Entry Panel.
add_filter( 'organizewp/entry_panel/panes/actions', '__return_false' );
@jchristopher
jchristopher / functions.php
Created Aug 5, 2022
Enable debugging in OrganizeWP
View functions.php
<?php
// Enable debugging in OrganizeWP.
add_filter( 'organizewp/debug', '__return_true' );
@jchristopher
jchristopher / functions.php
Created Aug 5, 2022
Customize the OrganizeWP debug directory.
View functions.php
<?php
// Customize the OrganizeWP debug directory.
add_filter( 'organizewp/debug/dir', function( $dir ) {
return wp_upload_dir()['basedir'];
} );
@jchristopher
jchristopher / functions.php
Created Aug 5, 2022
Tell OrganizeWP about our custom Smart Group
View functions.php
<?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;
} );