Title: New filter hook
Last modified: March 12, 2017

---

# New filter hook

 *  Resolved [esemlabel](https://wordpress.org/support/users/esemlabel/)
 * (@esemlabel)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/new-filter-hook/)
 * Hi,
 * Can you, please, add this must have filter and hook to plugin:
 * in public function maintenance() before wp_die()
 *     ```
       if ( apply_filters( 'ljmm_is_custom_template', false ) && has_action( 'ljmm_load_custom_template' ) ) {
           do_action( 'ljmm_load_custom_template' );
           die();
       }
       ```
   
 * …
    than you can use custom template file or html code
 *     ```
       add_filter( 'ljmm_is_custom_template', '__return_true' );
       add_action( 'ljmm_load_custom_template', function() {
           //require_once template or echo some content
       });
       ```
   
 * I am already using it)
    Thanks.

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

 *  Thread Starter [esemlabel](https://wordpress.org/support/users/esemlabel/)
 * (@esemlabel)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/new-filter-hook/#post-8905756)
 * Or even shorter:
 *     ```
       if ( has_action( 'ljmm_load_custom_template' ) ) {
           do_action( 'ljmm_load_custom_template' );
           die();
       }
       ```
   
 * an then
 *     ```
       add_action( 'ljmm_load_custom_template', function() {
           //require_once template or echo some content
       });
       ```
   
 *  Plugin Author [Lukas Juhas](https://wordpress.org/support/users/lukasneptun/)
 * (@lukasneptun)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/new-filter-hook/#post-8906730)
 * Hey!
 * Thanks for the suggestions, I’m actually in process of adding new hooks and filters,
 * You can see some of them here:
 * [https://github.com/lukasjuhas/lj-maintenance-mode/blob/2.3dev/lj-maintenance-mode.php](https://github.com/lukasjuhas/lj-maintenance-mode/blob/2.3dev/lj-maintenance-mode.php)
 * I’m hoping to add more and release this soon.
 * Thanks for your patience.
 * Lukas
 *  Thread Starter [esemlabel](https://wordpress.org/support/users/esemlabel/)
 * (@esemlabel)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/new-filter-hook/#post-8910967)
 * I missed already available hook do_action(‘ljmm_before_mm’) 🙂
    This hook i quite
   enough for load custom template.php and die() to stop processing.
 * Thank you. You can close topic.
 *  Plugin Author [Lukas Juhas](https://wordpress.org/support/users/lukasneptun/)
 * (@lukasneptun)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/new-filter-hook/#post-8911357)
 * Hey,
 * Cool, I’m glad that hook will be helpful,
 * Although bearing in mind, this is going to be released in 2.3 hopefully sometime
   this or next week.
 * Lukas

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

The topic ‘New filter hook’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/lj-maintenance-mode_c05e6b.svg)
 * [Maintenance Mode](https://wordpress.org/plugins/lj-maintenance-mode/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/lj-maintenance-mode/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/lj-maintenance-mode/)
 * [Active Topics](https://wordpress.org/support/plugin/lj-maintenance-mode/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/lj-maintenance-mode/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/lj-maintenance-mode/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [Lukas Juhas](https://wordpress.org/support/users/lukasneptun/)
 * Last activity: [9 years, 3 months ago](https://wordpress.org/support/topic/new-filter-hook/#post-8911357)
 * Status: resolved