Title: Use plugin hooks
Last modified: November 19, 2016

---

# Use plugin hooks

 *  Resolved [killexx](https://wordpress.org/support/users/killexx/)
 * (@killexx)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/use-plugin-hooks/)
 * 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.

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Thread Starter [killexx](https://wordpress.org/support/users/killexx/)
 * (@killexx)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/use-plugin-hooks/#post-8457902)
 * 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' );
       ```
   
 *  Plugin Author [Vinod Dalvi](https://wordpress.org/support/users/vinod-dalvi/)
 * (@vinod-dalvi)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/use-plugin-hooks/#post-8481140)
 * Awesome great to see you got that made.
 * Please advise if you have more questions.
 * Have a fantastic day!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Use plugin hooks’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/publish-date-datepicker_fdfdfd.svg)
 * [Publish Date DatePicker](https://wordpress.org/plugins/publish-date-datepicker/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/publish-date-datepicker/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/publish-date-datepicker/)
 * [Active Topics](https://wordpress.org/support/plugin/publish-date-datepicker/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/publish-date-datepicker/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/publish-date-datepicker/reviews/)

## Tags

 * [hook](https://wordpress.org/support/topic-tag/hook/)

 * 2 replies
 * 2 participants
 * Last reply from: [Vinod Dalvi](https://wordpress.org/support/users/vinod-dalvi/)
 * Last activity: [9 years, 6 months ago](https://wordpress.org/support/topic/use-plugin-hooks/#post-8481140)
 * Status: resolved