Skip to content

Commit

Permalink
merge master
Browse files Browse the repository at this point in the history
  • Loading branch information
rrennick committed Feb 25, 2020
2 parents f06310f + 04eb262 commit 76a3475
Show file tree
Hide file tree
Showing 5 changed files with 158 additions and 181 deletions.
9 changes: 1 addition & 8 deletions action-scheduler.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,7 @@ function action_scheduler_register_3_dot_1_dot_1() {
}

function action_scheduler_initialize_3_dot_1_dot_1() {
$autoloader = __DIR__ . '/vendor/autoload.php';
if ( is_readable( $autoloader ) ) {
require_once( $autoloader );
define( 'AS_COMPOSER_AUTOLOADING', true );
} else {
define( 'AS_COMPOSER_AUTOLOADING', false );
require_once( 'classes/abstracts/ActionScheduler.php' );
}
require_once( 'classes/abstracts/ActionScheduler.php' );
ActionScheduler::init( __FILE__ );
}

Expand Down
5 changes: 0 additions & 5 deletions classes/ActionScheduler_wcSystemStatus.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ protected function get_action_status_date( $status, $date_type = 'oldest' ) {
*/
protected function get_template( $status_labels, $action_counts, $oldest_and_newest ) {
$as_version = ActionScheduler_Versions::instance()->latest_version();
$autoloader = AS_COMPOSER_AUTOLOADING ? __( 'Composer', 'action-scheduler' ) : __( 'Internal', 'action-scheduler' );
?>

<table class="wc_status_table widefat" cellspacing="0">
Expand All @@ -105,10 +104,6 @@ protected function get_template( $status_labels, $action_counts, $oldest_and_new
<td colspan="2" data-export-label="Version"><?php esc_html_e( 'Version:', 'action-scheduler' ); ?></td>
<td colspan="3"><?php echo esc_html( $as_version ); ?></td>
</tr>
<tr>
<td colspan="2" data-export-label="Version"><?php esc_html_e( 'Autoloader:', 'action-scheduler' ); ?></td>
<td colspan="3"><?php echo esc_html( $autoloader ); ?></td>
</tr>
<tr>
<td><strong><?php esc_html_e( 'Action Status', 'action-scheduler' ); ?></strong></td>
<td class="help">&nbsp;</td>
Expand Down
4 changes: 1 addition & 3 deletions classes/abstracts/ActionScheduler.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,7 @@ public static function autoload( $class ) {
*/
public static function init( $plugin_file ) {
self::$plugin_file = $plugin_file;
if ( ! AS_COMPOSER_AUTOLOADING ) {
spl_autoload_register( array( __CLASS__, 'autoload' ) );
}
spl_autoload_register( array( __CLASS__, 'autoload' ) );

/**
* Fires in the early stages of Action Scheduler init hook.
Expand Down
7 changes: 0 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,5 @@
"phpcs": "Analyze code against the WordPress coding standards with PHP_CodeSniffer",
"phpcbf": "Fix coding standards warnings/errors automatically with PHP Code Beautifier"
}
},
"autoload": {
"classmap": [
"classes/",
"deprecated/",
"lib/"
]
}
}
Loading

0 comments on commit 76a3475

Please sign in to comment.