| @@ -20,9 +20,9 @@ | ||
| 20 | 20 | * |
| 21 | 21 | * @return void |
| 22 | 22 | */ |
| 23 | 23 | public static function load_admin_hooks() { |
| 24 | - add_action( 'admin_menu', self::class . '::menu', 9 ); | |
| 24 | + add_action( 'admin_menu', __CLASS__ . '::menu', 9 ); | |
| 25 | 25 | } |
| 26 | 26 | |
| 27 | 27 | /** |
| 28 | 28 | * Register Dashboard page tp Formidable admin menu. |
| @@ -79,15 +79,14 @@ | ||
| 79 | 79 | ); |
| 80 | 80 | |
| 81 | 81 | return new FrmDashboardHelper( |
| 82 | 82 | array( |
| 83 | - 'counters' => array( | |
| 83 | + 'counters' => array( | |
| 84 | 84 | 'counters' => self::view_args_counters( $latest_available_form, $counters_value ), |
| 85 | 85 | ), |
| 86 | - 'license' => array(), | |
| 87 | - 'get_free_templates' => array(), | |
| 88 | - 'inbox' => self::view_args_inbox(), | |
| 89 | - 'entries' => array( | |
| 86 | + 'license' => array(), | |
| 87 | + 'inbox' => self::view_args_inbox(), | |
| 88 | + 'entries' => array( | |
| 90 | 89 | 'widget-heading' => __( 'Latest Entries', 'formidable' ), |
| 91 | 90 | 'cta' => array( |
| 92 | 91 | 'label' => __( 'View All Entries', 'formidable' ), |
| 93 | 92 | 'link' => admin_url( 'admin.php?page=formidable-entries' ), |
| @@ -95,9 +94,9 @@ | ||
| 95 | 94 | 'show-placeholder' => 0 >= (int) $counters_value['entries'], |
| 96 | 95 | 'count' => $counters_value['entries'], |
| 97 | 96 | 'placeholder' => self::view_args_entries_placeholder( $counters_value['forms'] ), |
| 98 | 97 | ), |
| 99 | - 'payments' => array( | |
| 98 | + 'payments' => array( | |
| 100 | 99 | 'show-placeholder' => empty( $total_payments ), |
| 101 | 100 | 'placeholder' => array( |
| 102 | 101 | 'copy' => __( 'You don\'t have a payment form setup yet.', 'formidable' ), |
| 103 | 102 | 'cta' => array( |
| @@ -112,9 +111,9 @@ | ||
| 112 | 111 | 'items' => $total_payments, |
| 113 | 112 | ), |
| 114 | 113 | ), |
| 115 | 114 | ), |
| 116 | - 'video' => array( 'id' => self::get_youtube_embed_video( $counters_value['entries'] ) ), | |
| 115 | + 'video' => array( 'id' => self::get_youtube_embed_video( $counters_value['entries'] ) ), | |
| 117 | 116 | ) |
| 118 | 117 | ); |
| 119 | 118 | } |
| 120 | 119 | |
| @@ -462,15 +461,15 @@ | ||
| 462 | 461 | if ( 0 === (int) $entries_count && false === $welcome_video && false === $featured_video ) { |
| 463 | 462 | return null; |
| 464 | 463 | } |
| 465 | 464 | if ( 0 === (int) $entries_count && false !== $welcome_video ) { |
| 466 | - return $welcome_video['video-id'] ?? null; | |
| 465 | + return isset( $welcome_video['video-id'] ) ? $welcome_video['video-id'] : null; | |
| 467 | 466 | } |
| 468 | 467 | // We might receive the most recent video feed as the featured selection. |
| 469 | 468 | if ( isset( $featured_video[0] ) ) { |
| 470 | 469 | return $featured_video[0]['video-id']; |
| 471 | 470 | } |
| 472 | - return $featured_video['video-id'] ?? null; | |
| 471 | + return isset( $featured_video['video-id'] ) ? $featured_video['video-id'] : null; | |
| 473 | 472 | } |
| 474 | 473 | |
| 475 | 474 | /** |
| 476 | 475 | * Save subscribed user's email to dashboard options. |