v1.1.0
This commit is contained in:
parent
e6299a3e14
commit
47885eb7c3
6 changed files with 279 additions and 45 deletions
|
|
@ -138,12 +138,31 @@ class Plugin {
|
|||
// Load text domain for translations.
|
||||
add_action( 'plugins_loaded', array( $this, 'load_textdomain' ), 20 );
|
||||
|
||||
// Add custom cron interval.
|
||||
add_filter( 'cron_schedules', array( $this, 'add_cron_intervals' ) );
|
||||
|
||||
// Register component hooks.
|
||||
$this->admin_page->register();
|
||||
$this->media_uploader->register();
|
||||
$this->url_rewriter->register();
|
||||
}
|
||||
|
||||
/**
|
||||
* Add custom cron intervals.
|
||||
*
|
||||
* @since 1.0.1
|
||||
*
|
||||
* @param array<string, array<string, mixed>> $schedules Existing schedules.
|
||||
* @return array<string, array<string, mixed>> Modified schedules.
|
||||
*/
|
||||
public function add_cron_intervals( array $schedules ): array {
|
||||
$schedules['every_five_minutes'] = array(
|
||||
'interval' => 300,
|
||||
'display' => __( 'Every 5 Minutes', 'idrivee2-media-upload' ),
|
||||
);
|
||||
return $schedules;
|
||||
}
|
||||
|
||||
/**
|
||||
* Load the plugin text domain for translations.
|
||||
*
|
||||
|
|
|
|||
Loading…
Reference in a new issue