) {
$current = get_site_transient( 'update_themes' );
if ( isset( $current->last_checked )
&& 12 * HOUR_IN_SECONDS > ( time() - $current->last_checked )
) {
return;
}
wp_update_themes();
}
/**
* Schedules core, theme, and plugin update checks.
*
* @since 3.1.0
*/
function wp_schedule_update_checks() {
if ( ! wp_next_scheduled( 'wp_version_check' ) && ! wp_installing() ) {
wp_schedule_event( time(), 'twicedaily', 'wp_version_check' );
}
if ( ! wp_next_scheduled( 'wp_update_plugins' ) && ! wp_installing() ) {
wp_schedule_event( time(), 'twicedaily', 'wp_update_plugins' );
}
if ( ! wp_next_scheduled( 'wp_update_themes' ) && ! wp_installing() ) {
wp_schedule_event( time(), 'twicedaily', 'wp_update_themes' );
}
}
/**
* Clears existing update caches for plugins, themes, and core.
*
* @since 4.1.0
*/
function wp_clean_update_cache() {
if ( function_exists( 'wp_clean_plugins_cache' ) ) {
wp_clean_plugins_cache();
} else {
delete_site_transient( 'update_plugins' );
}
wp_clean_themes_cache();
delete_site_transient( 'update_core' );
}
/**
* Schedules the removal of all contents in the temporary backup directory.
*
* @since 6.3.0
*/
function wp_delete_all_temp_backups() {
/*
* Check if there is a lock, or if currently performing an Ajax request,
* in which case there is a chance an update is running.
* Reschedule for an hour from now and exit early.
*/
if ( get_option( 'core_updater.lock' ) || get_option( 'auto_updater.lock' ) || wp_doing_ajax() ) {
wp_schedule_single_event( time() + HOUR_IN_SECONDS, 'wp_delete_temp_updater_backups' );
return;
}
// This action runs on shutdown to make sure there are no plugin updates currently running.
add_action( 'shutdown', '_wp_delete_all_temp_backups' );
}
/**
* Deletes all contents in the temporary backup directory.
*
* @since 6.3.0
*
* @access private
*
* @global WP_Filesystem_Base $wp_filesystem WordPress filesystem subclass.
*
* @return void|WP_Error Void on success, or a WP_Error object on failure.
*/
function _wp_delete_all_temp_backups() {
global $wp_filesystem;
if ( ! function_exists( 'WP_Filesystem' ) ) {
require_once ABSPATH . '/wp-admin/includes/file.php';
}
ob_start();
$credentials = request_filesystem_credentials( '' );
ob_end_clean();
if ( false === $credentials || ! WP_Filesystem( $credentials ) ) {
return new WP_Error( 'fs_unavailable', __( 'Could not access filesystem.' ) );
}
if ( ! $wp_filesystem->wp_content_dir() ) {
return new WP_Error(
'fs_no_content_dir',
/* translators: %s: Directory name. */
sprintf( __( 'Unable to locate WordPress content directory (%s).' ), 'wp-content' )
);
}
$temp_backup_dir = $wp_filesystem->wp_content_dir() . 'upgrade-temp-backup/';
$dirlist = $wp_filesystem->dirlist( $temp_backup_dir );
$dirlist = $dirlist ? $dirlist : array();
foreach ( array_keys( $dirlist ) as $dir ) {
if ( '.' === $dir || '..' === $dir ) {
continue;
}
$wp_filesystem->delete( $temp_backup_dir . $dir, true );
}
}
if ( ( ! is_main_site() && ! is_network_admin() ) || wp_doing_ajax() ) {
return;
}
add_action( 'admin_init', '_maybe_update_core' );
add_action( 'wp_version_check', 'wp_version_check' );
add_action( 'load-plugins.php', 'wp_update_plugins' );
add_action( 'load-update.php', 'wp_update_plugins' );
add_action( 'load-update-core.php', 'wp_update_plugins' );
add_action( 'admin_init', '_maybe_update_plugins' );
add_action( 'wp_update_plugins', 'wp_update_plugins' );
add_action( 'load-themes.php', 'wp_update_themes' );
add_action( 'load-update.php', 'wp_update_themes' );
add_action( 'load-update-core.php', 'wp_update_themes' );
add_action( 'admin_init', '_maybe_update_themes' );
add_action( 'wp_update_themes', 'wp_update_themes' );
add_action( 'update_option_WPLANG', 'wp_clean_update_cache', 10, 0 );
add_action( 'wp_maybe_auto_update', 'wp_maybe_auto_update' );
add_action( 'init', 'wp_schedule_update_checks' );
add_action( 'wp_delete_temp_updater_backups', 'wp_delete_all_temp_backups' );
( 'query_control_value_titles_deprecated', [ $this, 'ajax_posts_control_value_titles_deprecated' ] );
$ajax_manager->register_ajax_action( 'pro_panel_posts_control_filter_autocomplete_deprecated', [ $this, 'ajax_posts_filter_autocomplete_deprecated' ] );
}
/**
* @deprecated 3.1.0
*/
public function localize_settings() {
Plugin::elementor()->modules_manager->get_modules( 'dev-tools' )->deprecation->deprecated_function( __METHOD__, '3.1.0' );
return [];
}
protected function add_actions() {
add_action( 'elementor/ajax/register_actions', [ $this, 'register_ajax_actions' ] );
add_action( 'elementor/controls/register', [ $this, 'register_controls' ] );
}
/**
* In WordPress 5.9 the 'who' query param was deprecated, this method
* adding the new `capability` query param to the query and still support old versions of WordPress.
*
* @param $query
*
* @return mixed
*/
private function add_edit_capability_to_user_query( $query ) {
// Capability queries were only introduced in WP 5.9.
if ( version_compare( $GLOBALS['wp_version'], '5.9-alpha', '>=' ) ) {
$query['capability'] = [ 'edit_posts' ];
} else {
$query['who'] = 'authors';
}
return $query;
}
}
Fatal error: Uncaught Error: Class '\ElementorPro\Modules\QueryControl\Module' not found in /home/sportuga/public_html/wp-content/plugins/pro-elements/core/modules-manager.php:82
Stack trace:
#0 /home/sportuga/public_html/wp-content/plugins/pro-elements/plugin.php(356): ElementorPro\Core\Modules_Manager->__construct()
#1 /home/sportuga/public_html/wp-includes/class-wp-hook.php(324): ElementorPro\Plugin->on_elementor_init('')
#2 /home/sportuga/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array)
#3 /home/sportuga/public_html/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
#4 /home/sportuga/public_html/wp-content/plugins/elementor/includes/plugin.php(658): do_action('elementor/init')
#5 /home/sportuga/public_html/wp-includes/class-wp-hook.php(324): Elementor\Plugin->init('')
#6 /home/sportuga/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array)
#7 /home/sportuga/public_html/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
#8 /home/sportuga/public_htm in /home/sportuga/public_html/wp-content/plugins/pro-elements/core/modules-manager.php on line 82