esemlabel
Forum Replies Created
-
I have the same error.
PHP 7.1I have the same error every time scheduled backup is running.
Error appears after last update 1.13.16It might me wrong documented. Because you won’t be able to return false without not passing ”, array(), null, 0 or false, whereas checking false as object will produce error.
// A plugin disallowed this event if ( ! $event ) return false;
Or the code should be like this, where you can pass any of “false” values to $event->hook:
$event = apply_filters( 'schedule_event', $event->hook, $event ); if ( ! $event->hook ) return false;
Forum: Plugins
In reply to: [Maintenance Mode] New filter hookI 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.
Forum: Plugins
In reply to: [Maintenance Mode] New filter hookOr 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 });
Forum: Plugins
In reply to: [Maintenance Mode] Serious issue when EnabledMaybe you can use one of these solutions?
1. The plugin can change the active theme to any temporary one with just a single empty index.php in it on a fly when enabling, and reactivate main theme when disabling maintenance. BUT it is not a good idea since many themes do a lot on ‘after_switch_theme’ hook. Unless you can bypass all main theme functions that uses this or similar hooks, grab their names – then temporary remove_action in foreach() when restoring main theme.
2. Generate a copy of maintenance page from its settings page into /wp-content/maintenance.php file (delete on plugin deactivating). The WP will use this file not only when plugin’s maintenance mode is enabled, but for its plugins and core updates too, instead of boring ‘Briefly unavailable for scheduled maintenance. Check back in a minute.’ message. One more thing you need is creat .maintenance file with
<?php $upgrading = time(); ?>
in it, and delete on disabling maintenance mode. But remember to recreat .maintenance file on load if it was deleted after core or any other wp updates has finished, if ‘ljmm-enabled’ is still enabled. After creating /wp-content/maintenance.php file you will see active Drop-in on plugins page:
I prefer the 2 one, it looks more simple and fast.
Forum: Plugins
In reply to: [qTranslate X] Malware ScanIt is related to .htaccess configuration directives of your server or missing php codes, that are unrelated to qtranslate plugin or even wordpress itself.
You have chosen the wrong support section.Forum: Plugins
In reply to: [Autoptimize] 404 topic again2. There is no problem to get string that contains ‘?ver=’ from buffer on each .css or .js file, I think (strpos, substr..).
3. There is possibility to get all scripts and styles connected to page ($wp_scripts, $wp_styles), so hash can be checked for each file to decide if we need to change ?ver= for final minified file autoptimize_<blognamescripts_numberofminifieduniqfile>.<ext>?ver=newversion.I clearly understand how AO works, but I’m assured that there is way to deal with 404 once for all, but maybe not the way as described. I’m planning to make some working code of such realization, and will keep you update if I can.
Thank you!
Forum: Plugins
In reply to: [Autoptimize] Change Directoryhappy holidays ??
Forum: Plugins
In reply to: [Autoptimize] Change DirectoryThere is small error log appers, when ‘AUTOPTIMIZE_CACHEFILE_PREFIX’ is set to ”, when you want files names to contain only md5 hash:
"strpos(): Empty needle" in file "classes\autoptimizeCache.php on line 131" ( strpos($file,AUTOPTIMIZE_CACHEFILE_PREFIX) !== false) )
So you have to pass at least ‘_’ for ‘AUTOPTIMIZE_CACHEFILE_PREFIX’.
- This reply was modified 8 years, 3 months ago by esemlabel.
Forum: Plugins
In reply to: [Autoptimize] Autoptimize wp-login.phpnice work!
Forum: Plugins
In reply to: [Autoptimize] Autoptimize wp-login.phpSome low prpiority additional notes about.
It would be great not just set AUTOPTIMIZE_INIT_EARLIER for earlier optimizing, but have possibility to choose the needed hook, for example, ‘login_init’; Or have possibility to limit earlier optimizing for certain pages, as wp-login.php or others.- This reply was modified 8 years, 3 months ago by esemlabel.
Forum: Plugins
In reply to: [Autoptimize] Autoptimize wp-login.phpMuch obliged!
You can close topic.Forum: Plugins
In reply to: [qTranslate X] Taxonomy Term translate filter in Editor Raw Mode in AdminIt is doubtful whether dublicator or other plugin can “copy” issue, when it might be related to php version really. If you won’t be able ever test on lower version of php, I will make a copy of website.