PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 6.32.1
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v6.32.1
6.35 6.34 6.33.1 6.33 6.32.1 6.32 6.31 6.25 6.25.1 6.26 6.26.1 6.27 6.28 6.29 6.3 6.3.1 6.3.2 6.30 6.4 6.4.1 6.4.2 6.5 6.5.1 6.5.2 6.5.3 All 141 releases
formidable / classes / views / addons / categories.php

categories.php in Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More 6.32.1, at classes/views/addons/categories.php

42 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Add-Ons categories.
4 *
5 * @package Formidable
6 *
7 * @var array<string, array{name: string, count: int}> $categories Categories keyed by slug.
8 */
9
10 if ( ! defined( 'ABSPATH' ) ) {
11 die( 'You are not allowed to call this page directly.' );
12 }
13 ?>
14 <ul class="frm-page-skeleton-categories frm-flex-col frm-gap-xs" aria-label="<?php esc_attr_e( 'Categories', 'formidable' ); ?>">
15 <?php foreach ( $categories as $category_slug => $category_data ) { ?>
16 <?php
17 $classes = 'frm-page-skeleton-cat frm-flex-box frm-justify-between frm-font-medium';
18 $aria_label = sprintf(
19 // translators: %1$s: category name, %2$d: number of items in the category
20 esc_html__( '%1$s category, %2$d items', 'formidable' ),
21 esc_html( $category_data['name'] ),
22 esc_html( $category_data['count'] )
23 );
24
25 if ( 'all-items' === $category_slug || 'basic' === $category_slug ) {
26 echo '<li class="frm-page-skeleton-divider frm-mt-xs frm-mb-xs"></li>';
27 }
28
29 if ( 'all-items' === $category_slug ) {
30 $classes .= ' frm-current';
31 }
32 ?>
33
34 <li class="<?php echo esc_attr( $classes ); ?>" data-category="<?php echo esc_attr( $category_slug ); ?>" tabindex="0" aria-label="<?php echo esc_attr( $aria_label ); ?>">
35 <span class="frm-page-skeleton-cat-text"><?php echo esc_html( $category_data['name'] ); ?></span>
36 <span class="frm-page-skeleton-cat-count"><?php echo esc_html( $category_data['count'] ); ?></span>
37 </li>
38 <?php
39 }//end foreach
40 ?>
41 </ul>
42