@@ -232,7 +232,7 @@ discard block |
||
| 232 | 232 | 'description' => esc_html__( 'Just add your email address and you\'ll get 30+ free form templates to your account.', 'formidable' ), |
| 233 | 233 | 'submit_button_text' => esc_html_x( 'Get Templates', 'get free templates modal submit button text', 'formidable' ), |
| 234 | 234 | ); |
| 235 | - $view_parts[] = 'modals/leave-email-modal.php'; |
|
| 235 | + $view_parts[] = 'modals/leave-email-modal.php'; |
|
| 236 | 236 | } |
| 237 | 237 | |
| 238 | 238 | // Add 'upgrade' modal view for non-elite users. |
@@ -331,11 +331,11 @@ discard block |
||
| 331 | 331 | |
| 332 | 332 | // Perform add or remove operation. |
| 333 | 333 | if ( 'add' === $operation ) { |
| 334 | - self::$favorite_templates[ $key ][] = $template_id; |
|
| 334 | + self::$favorite_templates[$key][] = $template_id; |
|
| 335 | 335 | } elseif ( 'remove' === $operation ) { |
| 336 | - $position = array_search( $template_id, self::$favorite_templates[ $key ], true ); |
|
| 336 | + $position = array_search( $template_id, self::$favorite_templates[$key], true ); |
|
| 337 | 337 | if ( $position !== false ) { |
| 338 | - unset( self::$favorite_templates[ $key ][ $position ] ); |
|
| 338 | + unset( self::$favorite_templates[$key][$position] ); |
|
| 339 | 339 | } |
| 340 | 340 | } |
| 341 | 341 | |
@@ -486,7 +486,7 @@ discard block |
||
| 486 | 486 | foreach ( self::$templates as $key => &$template ) { |
| 487 | 487 | // Skip the template if the categories are not set. |
| 488 | 488 | if ( ! isset( $template['categories'] ) || ! isset( $template['id'] ) ) { |
| 489 | - unset( self::$templates[ $key ] ); |
|
| 489 | + unset( self::$templates[$key] ); |
|
| 490 | 490 | continue; |
| 491 | 491 | } |
| 492 | 492 | |
@@ -500,14 +500,12 @@ discard block |
||
| 500 | 500 | // Add the slug to the new array. |
| 501 | 501 | $template['category_slugs'][] = $category_slug; |
| 502 | 502 | |
| 503 | - if ( ! isset( self::$categories[ $category_slug ] ) ) { |
|
| 504 | - self::$categories[ $category_slug ] = array( |
|
| 503 | + if ( ! isset( self::$categories[$category_slug] ) ) { |
|
| 504 | + self::$categories[$category_slug] = array( |
|
| 505 | 505 | 'name' => $category, |
| 506 | 506 | 'count' => 0, |
| 507 | 507 | ); |
| 508 | - } |
|
| 509 | - |
|
| 510 | - ++self::$categories[ $category_slug ]['count']; |
|
| 508 | + } ++self::$categories[$category_slug]['count']; |
|
| 511 | 509 | } |
| 512 | 510 | |
| 513 | 511 | // Mark the template as favorite if it's in the favorite templates list. |
@@ -522,7 +520,7 @@ discard block |
||
| 522 | 520 | $redundant_cats = array_merge( array( 'PayPal', 'Stripe', 'Twilio' ), FrmFormsHelper::get_license_types() ); |
| 523 | 521 | foreach ( $redundant_cats as $redundant_cat ) { |
| 524 | 522 | $category_slug = sanitize_title( $redundant_cat ); |
| 525 | - unset( self::$categories[ $category_slug ] ); |
|
| 523 | + unset( self::$categories[$category_slug] ); |
|
| 526 | 524 | } |
| 527 | 525 | |
| 528 | 526 | // Sort the categories by keys alphabetically. |
@@ -547,7 +545,7 @@ discard block |
||
| 547 | 545 | 'count' => 0, |
| 548 | 546 | ); |
| 549 | 547 | } |
| 550 | - $special_categories['all-items'] = array( |
|
| 548 | + $special_categories['all-items'] = array( |
|
| 551 | 549 | 'name' => __( 'All Templates', 'formidable' ), |
| 552 | 550 | 'count' => self::get_template_count(), |
| 553 | 551 | ); |
@@ -570,9 +568,9 @@ discard block |
||
| 570 | 568 | */ |
| 571 | 569 | private static function assign_featured_templates() { |
| 572 | 570 | foreach ( self::FEATURED_TEMPLATES_KEYS as $key ) { |
| 573 | - if ( isset( self::$templates[ $key ] ) ) { |
|
| 574 | - self::$templates[ $key ]['is_featured'] = true; |
|
| 575 | - self::$featured_templates[] = self::$templates[ $key ]; |
|
| 571 | + if ( isset( self::$templates[$key] ) ) { |
|
| 572 | + self::$templates[$key]['is_featured'] = true; |
|
| 573 | + self::$featured_templates[] = self::$templates[$key]; |
|
| 576 | 574 | } |
| 577 | 575 | } |
| 578 | 576 | } |
@@ -89,8 +89,8 @@ discard block |
||
| 89 | 89 | public function __construct( $data ) { |
| 90 | 90 | $sections = array( 'counters', 'license', 'get_free_templates', 'payments', 'entries', 'inbox', 'video', 'payments' ); |
| 91 | 91 | foreach ( $sections as $section ) { |
| 92 | - if ( isset( $data[ $section ] ) ) { |
|
| 93 | - $this->view[ $section ] = $data[ $section ]; |
|
| 92 | + if ( isset( $data[$section] ) ) { |
|
| 93 | + $this->view[$section] = $data[$section]; |
|
| 94 | 94 | } |
| 95 | 95 | } |
| 96 | 96 | } |
@@ -365,7 +365,7 @@ discard block |
||
| 365 | 365 | private static function load_entries_list_template( $template ) { |
| 366 | 366 | add_filter( |
| 367 | 367 | 'formidable_page_formidable_entries_per_page', |
| 368 | - function () { |
|
| 368 | + function() { |
|
| 369 | 369 | return 7; |
| 370 | 370 | } |
| 371 | 371 | ); |