Title: The plugin need hooks!!!!
Last modified: May 10, 2018

---

# The plugin need hooks!!!!

 *  [lucasviewup](https://wordpress.org/support/users/lucasviewup/)
 * (@lucasviewup)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/the-plugin-need-hooks/)
 * Hello [@westonruter](https://wordpress.org/support/users/westonruter/)! The plugin
   is very useful indeed, but reading the code I observed the lack of hooks, I think
   the hooks will solve the most part of problems of integrations with another plugins
   like ACF and Kirki (Customizer). Let other developers help you, when you use 
   hooks (actions and filters) you are giving the prompt they need to extend your
   plugin to a new level and the most part of problems will disappear.
 * Thank you!

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

 *  Plugin Author [Weston Ruter](https://wordpress.org/support/users/westonruter/)
 * (@westonruter)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/the-plugin-need-hooks/#post-10267510)
 * I’m not sure what hooks you are referring to as being needed. The Customizer’s
   own hooks are what you should be using to extend Customize Posts with new functionality.
 *  Thread Starter [lucasviewup](https://wordpress.org/support/users/lucasviewup/)
 * (@lucasviewup)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/the-plugin-need-hooks/#post-10268086)
 * First of all I have some points to discuss:
 * 1) Why the plugin uses the Customizer Javascript API over the PHP API for creating
   sections, panels and controls?
 * The JS API is not so extensible and very documented as the PHP is. I’m not saying
   that the JS API is bad, but in most cases, is used only in live preview.
 * 2) Why the plugin can’t have custom hooks? I mean customize_posts hooks. Why 
   not?
 * For example, if I want to add a custom field in ‘page’ section, I would do something
   like this:
 *     ```
       add_action('customize_posts_add_field', function($section, $wp_customize){
         $wp_customize->add_setting( 'header_textcolor' , array(
           'default'   => '#000000',
           'transport' => 'refresh',
         ) );
   
         $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 
           'link_color', array(
       	'label'      => __( 'Header Color', 'mytheme' ),
       	'section'    => $section->id,
       	'settings'   => 'your_setting_id',
          ) ) );
   
         ...
   
       });
       ```
   
 * This is way is so much clearer than the gist you paste here:
    [https://gist.github.com/westonruter/f8473159e48fbacbef9dcd6498155846](https://gist.github.com/westonruter/f8473159e48fbacbef9dcd6498155846)

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

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

 * ![](https://ps.w.org/customize-posts/assets/icon.svg?rev=1406938)
 * [Customize Posts](https://wordpress.org/plugins/customize-posts/)
 * [Support Threads](https://wordpress.org/support/plugin/customize-posts/)
 * [Active Topics](https://wordpress.org/support/plugin/customize-posts/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/customize-posts/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/customize-posts/reviews/)

## Tags

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

 * 2 replies
 * 2 participants
 * Last reply from: [lucasviewup](https://wordpress.org/support/users/lucasviewup/)
 * Last activity: [8 years, 1 month ago](https://wordpress.org/support/topic/the-plugin-need-hooks/#post-10268086)
 * Status: not a support question