Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter bsaltd

    (@bsaltd)

    I have managed to fix this.

    The logic in the following code is redirects.js from line 111 was incorrectly returning false

    if ( 1 === data ) {
    $(‘#message’).html( ” ).hide();
    publishBtn.prop(‘disabled’, false);
    console.log(‘DATA =’, JSON.stringify(data));
    } else if ( 0 === data ) {
    $(‘#message’).html( <p>${redirectValidation.urlError}</p> ).show();
    } else {
    $(‘#message’).html( <p>${redirectValidation.fail.replace( '%s', data )}</p> ).show();
    }
    }
    });

    It seems that the variable data had a stray \r\n before it causing the === to fail. Changed the test to == and it fixed the issue.

    I couldnt work out where the stray characters were coming form though

    • This reply was modified 4 months ago by bsaltd.
    • This reply was modified 4 months ago by bsaltd.

    Hi,

    I am trying to disable bwp-minifi for a single post
    the cde I have added to the functions file is

    function checkPostID(){

    // grab post object
    $currentPost = get_post();
    // compare them
    if ( $currentPost->ID == <<–ThepostID–>>) {
    // we have a match, so let’s filter the content now
    add_filter(‘bwp_minify_is_loadable’, ‘__return_false’ );
    }
    }
    add_action( ‘the_posts’, ‘checkPostID’ );

    where <<–thepostid–>> is the ID of the relevant post

    whilst the function is firing, and identifying the correct post, the bwp_minify_is_loadable filter is not being applied.

    I suspect t is because the function is firing too late.

    Any suggestions

    Any idea when the pro version will be available? I am working on a project where it would be useful.

    Thanks

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