Skip to content

Instantly share code, notes, and snippets.

@froger-me
froger-me / wp-request-update.php
Last active August 24, 2018 02:59
WordPress force request update - emulate wp-cron
<?php
require dirname( __FILE__ ) . '/wp-load.php';
add_filter( 'wp_doing_cron', '__return_true' );
wp_maybe_auto_update();
remove_filter( 'wp_doing_cron', '__return_true' );
die();
?>
@froger-me
froger-me / wp-specific-auto-updates.php
Last active November 19, 2021 10:19
WordPress auto updates for specific plugins and themes
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
}
function auto_update_specific_plugins( $update, $item ) {
// Array of plugin slugs to always auto-update
$plugins = array(
'dummy-plugin',