WordPress.org

Make WordPress Core

Ticket #38024: test.php

File test.php, 930 bytes (added by dd32, 4 years ago)
Line 
1<?php
2
3echo `grunt copy:files`;
4
5include './build/wp-includes/plugin.php';
6
7add_filter( 'automatic_updates_is_vcs_checkout', '__return_false' );
8add_filter( 'auto_update_plugin', '__return_true' );
9
10// Display the email locally rather than going to the inbox..
11function wp_mail( $to, $subject, $message, $headers = '', $attachments = array() ) {
12        echo "Subject: {$subject}\n";
13        echo $message;
14}
15
16include './build/wp-load.php';
17
18include_once( ABSPATH . '/wp-admin/includes/admin.php' );
19include_once( ABSPATH . '/wp-admin/includes/class-wp-upgrader.php' );
20
21// Make sure all updates are available.
22wp_update_plugins();
23
24var_dump( get_site_transient( 'update_plugins' ) );
25
26// Clear lock if it fataled..
27WP_Upgrader::release_lock( 'auto_updater' );
28
29
30$upgrader = new WP_Automatic_Updater;
31$upgrader->run();
32//var_dump( $upgrader );
33
34// Check there were translations installed as expected
35echo `ls -R ./build/wp-content/languages/`;