芝麻web文件管理V1.00
编辑当前文件:/home/pulsehostuk9/www/wp-content/plugins/leco-client-portal/includes/class-notifications.php
notifications[] = new Notification( 'client_created', esc_html__( 'Client Created', 'leco-cp' ) ); $this->notifications[] = new Notification( 'project_created', esc_html__( 'Portal Created', 'leco-cp' ) ); $this->notifications[] = new Notification( 'module_activated', esc_html__( 'Module Activated', 'leco-cp' ) ); $this->notifications[] = new Notification( 'module_completed', esc_html__( 'Module Completed', 'leco-cp' ) ); $this->notifications[] = new Notification( 'client_uploaded', esc_html__( 'Client Uploaded', 'leco-cp' ) ); } /** * Returns the running object. * * @since 4.15 * * @return Notifications **/ public static function instance() { if ( is_null( self::$instance ) ) { self::$instance = new self(); } return self::$instance; } /** * Add hooks. * * @since 4.15 * * @return void */ public function hooks() { new Hooks(); } /** * Get all notifications. * * @since 4.15 * * @return Notification[] */ public function get_all() { return $this->notifications; } /** * Get all events. * * @since 4.15 * * @return string[] */ public function get_events() { return array_map( function( $notification ) { return $notification->event(); }, $this->notifications ); } /** * Get a notification by event. * * @since 4.15 * * @param string $event The notification event. * * @return Notification */ public function get_by_event( $event ) { return $this->notifications[ array_search( $event, $this->get_events() ) ]; } /** * Get the notification delay time. * * @since 4.9.6 * @since 4.15 Moved to class LECO\Client_Portal\Notifications. * * @return int */ public function get_notification_delay() { // Set the default delay to 10 minutes. return apply_filters( 'leco_cp_wait_till_send_notification', MINUTE_IN_SECONDS * 10, 'client_uploaded' ); } }