PluginProbe ʕ •ᴥ•ʔ
Hustle – Email Marketing, Lead Generation, Optins, Popups / 7.8.9
Hustle – Email Marketing, Lead Generation, Optins, Popups v7.8.9
7.8.14 7.8.14.1 7.8.13 7.8.13.1 trunk 3.0 3.1 3.1.1 3.1.2 3.1.3 3.1.4 4.3.2 4.4.4 4.4.5 4.4.5.1 4.4.5.4 4.6 4.6.1.1 4.6.1.4 4.7.0.2 4.7.0.3 4.7.0.7 4.7.0.9 4.7.1.0 4.7.1.1 4.8.0.0 5.0.0 5.0.1 5.0.1.1 5.0.1.2 5.1 5.1.1 5.1.2 5.1.3 5.1.3.1 5.1.3.2 5.1.4 5.1.5 6.0 6.0.1 6.0.2 6.0.3 6.0.4.2 6.0.5 6.0.6.1 6.0.7 6.0.8.1 6.0.9 7.0.0.1 7.0.2 7.0.3 7.0.4 7.1.0 7.1.1 7.2.0 7.2.1 7.3.0 7.3.1 7.3.3 7.3.5 7.3.6 7.3.7 7.4.0 7.4.1 7.4.11 7.4.13 7.4.13.1 7.4.2 7.4.3 7.4.4 7.4.5 7.4.5.1 7.4.5.2 7.4.6 7.4.7 7.5.0 7.6.0 7.6.1 7.6.3 7.6.4 7.6.6 7.7.0 7.7.1 7.8.0 7.8.1 7.8.10 7.8.10.1 7.8.10.2 7.8.11 7.8.12 7.8.12.1 7.8.2 7.8.3 7.8.4 7.8.5 7.8.6 7.8.7 7.8.8 7.8.9 7.8.9.1 7.8.9.2 7.8.9.3
wordpress-popup / views / admin / global / components / select-units.php
wordpress-popup / views / admin / global / components Last commit date
select-units.php 3 years ago
select-units.php
49 lines
1 <?php
2 /**
3 * Select Units.
4 *
5 * @package Hustle
6 * @since 4.3.0
7 */
8
9 $label = ( isset( $label ) && ! empty( $label ) ) ? $label : __( 'Pick a unit', 'hustle' );
10 $units = array(
11 'px' => 'px',
12 '%' => '%',
13 'vw' => 'vw',
14 'vh' => 'vh',
15 );
16
17 if ( ! empty( $exclude_units ) ) {
18 foreach ( $exclude_units as $unit ) {
19 unset( $units[ $unit ] );
20 }
21 }
22
23 if ( ! empty( $extra_units ) ) {
24 $units = array_merge( $units, $extra_units );
25 }
26
27 echo '<label for="hustle-' . esc_attr( $name ) . '" id="hustle-' . esc_attr( $name ) . '-label" class="sui-label">';
28 echo esc_html( $label );
29
30 Hustle_Layout_Helper::get_html_for_options(
31 array(
32 array(
33 'type' => 'select',
34 'name' => $name,
35 'options' => $units,
36 'id' => 'hustle-' . $name,
37 'selected' => $selected,
38 'class' => 'sui-select sui-select-sm sui-select-inline sui-inlabel',
39 'attributes' => array(
40 'data-width' => '50',
41 'data-attribute' => $name,
42 'aria-labelledby' => 'hustle-' . $name . '-label',
43 ),
44 ),
45 )
46 );
47
48 echo '</label>';
49