Created
December 21, 2021 19:05
-
-
Save wmacmill/e86817e8895597a033b341386b820b81 to your computer and use it in GitHub Desktop.
Setting DLM to public
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
| add_filter( 'register_post_type_args', 'dlm_change_cpt_args', 10, 2 ); | |
| function dlm_change_cpt_args( $args, $cpt_name ) { | |
| //error_log( "CPT Name: $cpt_name" ); | |
| if ( 'dlm_download' == $cpt_name ) { | |
| $args['public'] = true; | |
| //error_log( $cpt_name . ': ' . var_export( $args, true ) ); | |
| } | |
| return $args; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment