bsaltd
Forum Replies Created
-
Forum: Plugins
In reply to: [Safe Redirect Manager] Redirect already exisits errorI 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
Forum: Plugins
In reply to: [Better WordPress Minify] bwp-minify – Disable only for Certain PagesHi,
I am trying to disable bwp-minifi for a single post
the cde I have added to the functions file isfunction 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
Forum: Plugins
In reply to: [WP Catalogue] Product sub-cat and main-catAny idea when the pro version will be available? I am working on a project where it would be useful.
Thanks