Skip to content

Commit

Permalink
cron now WORKS!
Browse files Browse the repository at this point in the history
  • Loading branch information
Mte90 committed Jun 3, 2016
1 parent 5066d9f commit fcc158c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions cronplus.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,13 @@ function __construct( $args ) {
$defaults = array(
'recurrence' => 'hourly', // Hourly,daily,twicedaily,weekly,monthly
'name' => 'cronplus',
'schedule' => 'schedule' // Schedule or single
'schedule' => 'schedule', // Schedule or single,
'cb' => ''
);

$this->args = wp_parse_args( $args, $defaults );
if ( isset( $this->cb ) && isset( $this->name ) ) {
add_action( $this->args[ 'name' ], $this->cb );
if ( isset( $this->args['cb'] ) && isset( $this->args['name'] ) ) {
add_action( $this->args[ 'name' ], $this->args['cb'] );
}
}

Expand Down

0 comments on commit fcc158c

Please sign in to comment.