• Resolved esemlabel

    (@esemlabel)


    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

    (@esemlabel)

    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

    (@lukasneptun)

    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

    I’m hoping to add more and release this soon.

    Thanks for your patience.

    Lukas

    Thread Starter esemlabel

    (@esemlabel)

    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

    (@lukasneptun)

    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.