Use filters for configurable settings instead
-
Plugin file advises users to edit it directly to change settings. These are wiped out any time the plugin updates, and is not portable across environments, etc. So, for example, you could/should do:
$ppn_post_types = apply_filters( 'ppn_post_types', array( 'post', 'page' ) );
Then one could do:
add_filter( 'ppn_post_types', 'my_ppn_post_types' ); function my_ppn_post_types( $post_types ) { $post_types[] = 'cpt-slug'; return $post_types; }
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Use filters for configurable settings instead’ is closed to new replies.