WPIntell

Source evidence

Use plugin hooks

Publish Date DatePicker · support · 2016-11-19T07:37:00+00:00

mixedsentiment
lowseverity
0.56relevance
2replies
Evidence linked to opportunitycommercial context

Proof Health

Open evidence

Commercial opportunities need traceable source links before they are treated as build-worthy.

7 / 29 rows with source links

24.1% of this page's analysis has direct source links.

0 build-decision rows missing links

0 rows here require auditable proof before promotion.

22 rows with no attached evidence

0 rows have source counts but still need direct links.

Conversation

support
killexx resolved
How can I use plugin hooks to control plugin load? I want to disable plugin load on all post types except certain Custom Post Type. Made it with “ load-post.php ” action: function make_filter_false(){ return false; } function my_edit_cpt() { $screen = get_current_screen(); if(is_admin() && $screen->post_type!='some_cpt_name'){ add_filter('add_pddp_timepicker_js', 'make_filter_false'); add_filter('add_pddp_js', 'make_filter_false'); add_filter('add_pddp_css', 'make_filter_false'); } } add_action( 'load-post.php', 'my_edit_cpt' ); Awesome great to see you got that made. Please advise if you have more questions. Have a fantastic day!

Comments

2 shown
killexx 2016-11-19T15:52:00+00:00

Made it with “ load-post.php ” action: function make_filter_false(){ return false; } function my_edit_cpt() { $screen = get_current_screen(); if(is_admin() && $screen->post_type!='some_cpt_name'){ add_filter('add_pddp_timepicker_js', 'make_filter_false'); add_filter('add_pddp_js', 'make_filter_false'); add_filter('add_pddp_css', 'make_filter_false'); } } add_action( 'load-post.php', 'my_edit_cpt' );

Vinod Dalvi 2016-11-25T15:23:00+00:00

Awesome great to see you got that made. Please advise if you have more questions. Have a fantastic day!