Conversation
supportHow 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!
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!