:: **Zploit** v1.0 | Current Path: **/opt/a2-optimized/wordpress/**
:: Editing File: cron-job.php
<?php function a2opt_daily_cron_run(){ /* Jobs we want to run once per day go here... to be filled in at a later date */ } /* Hook the a2opt_daily_cron_run function above with the a2opt_daily_cron schedule */ add_action( 'a2opt_daily_cron', 'a2opt_daily_cron_run' ); function a2opt_update_check() { $a2opt_plugin_data = get_plugin_data( WP_PLUGIN_DIR . '/a2-optimized-wp/a2-optimized.php'); if (get_site_option('a2_optimized_plugin_upgrade__version') != $a2opt_plugin_data['Version']) { a2opt_upgrade(); } } /* Check to see if the A2 Optimized plugin has been updated, and run operations if so */ add_action('plugins_loaded', 'a2opt_update_check'); function a2opt_upgrade(){ $a2opt_plugin_data = get_plugin_data( WP_PLUGIN_DIR . '/a2-optimized-wp/a2-optimized.php'); /* We want to scheduel this cron for everyone, regardless of installed version, but only once */ if(!get_site_option('a2_daily_cron_scheduled')){ $args = array( false ); if( !wp_next_scheduled( 'a2opt_daily_cron', $args ) ) { wp_schedule_event( time(), 'daily', 'a2opt_daily_cron', $args ); update_option('a2_daily_cron_scheduled', true); } } /* Version specific updates go below: DB changes, etc */ if(version_compare($a2opt_plugin_data['Version'], '2.0.8.6') < 0){ /* Example for versions older than 2.0.8.6 */ } if(version_compare($a2opt_plugin_data['Version'], '2.0.10.7.5') < 0){ /* Updated login URL plugin If user has the old version installed we need to migrate them to the new one */ if(is_plugin_active('rename-wp-login/rename-wp-login.php')){ deactivate_plugins('rename-wp-login/rename-wp-login.php'); $api = plugins_api('plugin_information', array('slug' => 'easy-hide-login')); $upgrader = new Plugin_Upgrader(new A2_Plugin_Installer_Skin(compact('title', 'url', 'nonce', 'plugin', 'api'))); $upgrader->install($api->download_link); activate_plugin('easy-hide-login/wp-hide-login.php'); $rwl_page = get_option('a2_login_page'); update_option('wpseh_l01gnhdlwp', $rwl_page); } } /* Store current plugin version so this doesn't run again for this version */ update_option('a2_optimized_plugin_upgrade__version', $a2opt_plugin_data['Version']); }