FlexibleContent
2 months ago
class-acf-field-accordion.php
2 months ago
class-acf-field-button-group.php
2 months ago
class-acf-field-checkbox.php
3 days ago
class-acf-field-clone.php
2 months ago
class-acf-field-color_picker.php
2 months ago
class-acf-field-date_picker.php
2 months ago
class-acf-field-date_time_picker.php
2 months ago
class-acf-field-email.php
2 months ago
class-acf-field-file.php
2 months ago
class-acf-field-flexible-content.php
1 week ago
class-acf-field-gallery.php
3 weeks ago
class-acf-field-google-map.php
2 months ago
class-acf-field-group.php
2 months ago
class-acf-field-icon_picker.php
7 months ago
class-acf-field-image.php
2 months ago
class-acf-field-link.php
2 months ago
class-acf-field-message.php
1 year ago
class-acf-field-nav-menu.php
1 week ago
class-acf-field-number.php
2 months ago
class-acf-field-oembed.php
3 weeks ago
class-acf-field-output.php
1 year ago
class-acf-field-page_link.php
3 weeks ago
class-acf-field-password.php
2 months ago
class-acf-field-post_object.php
3 weeks ago
class-acf-field-radio.php
3 days ago
class-acf-field-range.php
2 months ago
class-acf-field-relationship.php
3 weeks ago
class-acf-field-repeater.php
3 weeks ago
class-acf-field-select.php
3 days ago
class-acf-field-separator.php
1 year ago
class-acf-field-tab.php
1 year ago
class-acf-field-taxonomy.php
3 weeks ago
class-acf-field-text.php
3 weeks ago
class-acf-field-textarea.php
3 weeks ago
class-acf-field-time_picker.php
2 months ago
class-acf-field-true_false.php
2 months ago
class-acf-field-url.php
3 weeks ago
class-acf-field-user.php
3 weeks ago
class-acf-field-wysiwyg.php
2 months ago
class-acf-field.php
2 months ago
class-acf-repeater-table.php
1 year ago
index.php
1 year ago
class-acf-field-icon_picker.php
837 lines
| 1 | <?php |
| 2 | /** |
| 3 | * This is a PHP file containing the code for the acf_field_icon_picker class. |
| 4 | * |
| 5 | * @package Advanced_Custom_Fields_Pro |
| 6 | */ |
| 7 | |
| 8 | if ( ! class_exists( 'acf_field_icon_picker' ) ) : |
| 9 | |
| 10 | /** |
| 11 | * Class acf_field_icon_picker. |
| 12 | */ |
| 13 | class acf_field_icon_picker extends acf_field { |
| 14 | /** |
| 15 | * Initialize icon picker field |
| 16 | * |
| 17 | * @since ACF 6.3 |
| 18 | * |
| 19 | * @return void |
| 20 | */ |
| 21 | public function initialize() { |
| 22 | $this->name = 'icon_picker'; |
| 23 | $this->label = __( 'Icon Picker', 'secure-custom-fields' ); |
| 24 | $this->public = true; |
| 25 | $this->category = 'advanced'; |
| 26 | $this->description = __( 'An interactive UI for selecting an icon. Select from Dashicons, the media library, or a standalone URL input.', 'secure-custom-fields' ); |
| 27 | $this->preview_image = acf_get_url() . '/assets/images/field-type-previews/field-preview-icon-picker.png'; |
| 28 | $this->doc_url = 'https://developer.wordpress.org/secure-custom-fields/features/fields/icon-picker/'; |
| 29 | $this->tutorial_url = 'https://developer.wordpress.org/secure-custom-fields/features/fields/icon-picker/icon-picker-tutorial/'; |
| 30 | $this->defaults = array( |
| 31 | 'library' => 'all', |
| 32 | 'tabs' => array_keys( $this->get_tabs() ), |
| 33 | 'return_format' => 'string', |
| 34 | 'default_value' => array( |
| 35 | 'type' => null, |
| 36 | 'value' => null, |
| 37 | ), |
| 38 | ); |
| 39 | } |
| 40 | |
| 41 | /** |
| 42 | * Gets the available tabs for the icon picker field. |
| 43 | * |
| 44 | * @since ACF 6.3 |
| 45 | * |
| 46 | * @return array |
| 47 | */ |
| 48 | public function get_tabs() { |
| 49 | $tabs = array( |
| 50 | 'dashicons' => esc_html__( 'Dashicons', 'secure-custom-fields' ), |
| 51 | ); |
| 52 | |
| 53 | if ( current_user_can( 'upload_files' ) ) { |
| 54 | $tabs['media_library'] = esc_html__( 'Media Library', 'secure-custom-fields' ); |
| 55 | } |
| 56 | |
| 57 | $tabs['url'] = esc_html__( 'URL', 'secure-custom-fields' ); |
| 58 | |
| 59 | /** |
| 60 | * Allows filtering the tabs used by the icon picker. |
| 61 | * |
| 62 | * @since ACF 6.3 |
| 63 | * |
| 64 | * @param array $tabs An associative array of tabs in key => label format. |
| 65 | * @return array |
| 66 | */ |
| 67 | return apply_filters( 'acf/fields/icon_picker/tabs', $tabs ); |
| 68 | } |
| 69 | |
| 70 | /** |
| 71 | * Renders an icon list tab (i.e. dashicons, custom icons). |
| 72 | * |
| 73 | * @since ACF 6.4 |
| 74 | * |
| 75 | * @param string $tab_name The name of the tab being rendered. |
| 76 | * @param array $field The Icon Picker field being rendered. |
| 77 | * @return void |
| 78 | */ |
| 79 | public function render_icon_list_tab( $tab_name, $field ) { |
| 80 | $custom_icons = ''; |
| 81 | |
| 82 | if ( 'dashicons' !== $tab_name ) { |
| 83 | $custom_icons = apply_filters( 'acf/fields/icon_picker/' . $tab_name . '/icons', array(), $field ); |
| 84 | |
| 85 | // Bail if this is a custom tab and no icons are provided. |
| 86 | if ( ! is_array( $custom_icons ) || empty( $custom_icons ) ) { |
| 87 | return; |
| 88 | } |
| 89 | } |
| 90 | ?> |
| 91 | <div class="acf-icon-list-search-wrap"> |
| 92 | <?php |
| 93 | acf_text_input( |
| 94 | array( |
| 95 | 'class' => 'acf-icon-list-search-input', |
| 96 | 'placeholder' => esc_html__( 'Search icons...', 'secure-custom-fields' ), |
| 97 | 'type' => 'search', |
| 98 | ) |
| 99 | ); |
| 100 | ?> |
| 101 | </div> |
| 102 | <div |
| 103 | class="acf-icon-list" |
| 104 | role="radiogroup" |
| 105 | data-parent-tab="<?php echo esc_attr( $tab_name ); ?>" |
| 106 | <?php if ( ! empty( $custom_icons ) ) : ?> |
| 107 | <?php printf( 'data-icons="%s"', esc_attr( wp_json_encode( $custom_icons ) ) ); ?> |
| 108 | <?php endif; ?> |
| 109 | ></div> |
| 110 | <div class="acf-icon-list-empty"> |
| 111 | <img src="<?php echo esc_url( acf_get_url( 'assets/images/face-sad.svg' ) ); ?>" /> |
| 112 | <p class="acf-no-results-text"> |
| 113 | <?php |
| 114 | printf( |
| 115 | /* translators: %s: The invalid search term */ |
| 116 | esc_html__( "No search results for '%s'", 'secure-custom-fields' ), |
| 117 | '<span class="acf-invalid-icon-list-search-term"></span>' |
| 118 | ); |
| 119 | ?> |
| 120 | </p> |
| 121 | </div> |
| 122 | <?php |
| 123 | } |
| 124 | |
| 125 | /** |
| 126 | * Renders icon picker field |
| 127 | * |
| 128 | * @since ACF 6.3 |
| 129 | * |
| 130 | * @param object $field The ACF Field |
| 131 | * @return void |
| 132 | */ |
| 133 | public function render_field( $field ) { |
| 134 | $uploader = acf_get_setting( 'uploader' ); |
| 135 | |
| 136 | // Enqueue uploader scripts |
| 137 | if ( $uploader === 'wp' ) { |
| 138 | acf_enqueue_uploader(); |
| 139 | } |
| 140 | |
| 141 | $div = array( |
| 142 | 'id' => $field['id'], |
| 143 | 'class' => $field['class'] . ' acf-icon-picker', |
| 144 | ); |
| 145 | |
| 146 | echo '<div ' . acf_esc_attrs( $div ) . '>'; |
| 147 | |
| 148 | acf_hidden_input( |
| 149 | array( |
| 150 | 'name' => $field['name'] . '[type]', |
| 151 | 'value' => $field['value']['type'], |
| 152 | 'data-hidden-type' => 'type', |
| 153 | ) |
| 154 | ); |
| 155 | acf_hidden_input( |
| 156 | array( |
| 157 | 'name' => $field['name'] . '[value]', |
| 158 | 'value' => $field['value']['value'], |
| 159 | 'data-hidden-type' => 'value', |
| 160 | ) |
| 161 | ); |
| 162 | |
| 163 | if ( ! is_array( $field['tabs'] ) ) { |
| 164 | $field['tabs'] = array(); |
| 165 | } |
| 166 | |
| 167 | $tabs = $this->get_tabs(); |
| 168 | $shown = array_filter( |
| 169 | $tabs, |
| 170 | function ( $tab ) use ( $field ) { |
| 171 | return in_array( $tab, $field['tabs'], true ); |
| 172 | }, |
| 173 | ARRAY_FILTER_USE_KEY |
| 174 | ); |
| 175 | |
| 176 | foreach ( $shown as $name => $label ) { |
| 177 | if ( count( $shown ) > 1 ) { |
| 178 | acf_render_field_wrap( |
| 179 | array( |
| 180 | 'type' => 'tab', |
| 181 | 'label' => $label, |
| 182 | 'key' => 'acf_icon_picker_tabs', |
| 183 | 'selected' => $name === $field['value']['type'], |
| 184 | 'unique_tab_key' => $name, |
| 185 | ) |
| 186 | ); |
| 187 | } |
| 188 | |
| 189 | $wrapper_class = str_replace( '_', '-', $name ); |
| 190 | echo '<div class="acf-icon-picker-tabs acf-icon-picker-' . esc_attr( $wrapper_class ) . '-tabs" data-tab="' . esc_attr( $name ) . '">'; |
| 191 | |
| 192 | switch ( $name ) { |
| 193 | case 'dashicons': |
| 194 | $this->render_icon_list_tab( $name, $field ); |
| 195 | break; |
| 196 | case 'media_library': |
| 197 | ?> |
| 198 | <div class="acf-icon-picker-tab" data-category="<?php echo esc_attr( $name ); ?>"> |
| 199 | <div class="acf-icon-picker-media-library"> |
| 200 | <?php |
| 201 | $button_style = 'display: none;'; |
| 202 | |
| 203 | if ( in_array( $field['value']['type'], array( 'media_library', 'dashicons' ), true ) && ! empty( $field['value']['value'] ) ) { |
| 204 | $button_style = ''; |
| 205 | } |
| 206 | ?> |
| 207 | <button |
| 208 | aria-label="<?php esc_attr_e( 'Click to change the icon in the Media Library', 'secure-custom-fields' ); ?>" |
| 209 | class="acf-icon-picker-media-library-preview" |
| 210 | style="<?php echo esc_attr( $button_style ); ?>" |
| 211 | > |
| 212 | <div class="acf-icon-picker-media-library-preview-img" style="<?php echo esc_attr( 'media_library' !== $field['value']['type'] ? 'display: none;' : '' ); ?>"> |
| 213 | <?php |
| 214 | $img_url = wp_get_attachment_image_url( $field['value']['value'], 'thumbnail' ); |
| 215 | // If the type is media_library, then we need to show the media library preview. |
| 216 | ?> |
| 217 | <img src="<?php echo esc_url( $img_url ); ?>" alt="<?php esc_attr_e( 'The currently selected image preview', 'secure-custom-fields' ); ?>" /> |
| 218 | </div> |
| 219 | <div class="acf-icon-picker-media-library-preview-dashicon" style="<?php echo esc_attr( 'dashicons' !== $field['value']['type'] ? 'display: none;' : '' ); ?>"> |
| 220 | <div class="dashicons <?php echo esc_attr( $field['value']['value'] ); ?>"> |
| 221 | </div> |
| 222 | </div> |
| 223 | </button> |
| 224 | <button class="acf-icon-picker-media-library-button"> |
| 225 | <div class="acf-icon-picker-media-library-button-icon dashicons dashicons-admin-media"></div> |
| 226 | <span><?php esc_html_e( 'Browse Media Library', 'secure-custom-fields' ); ?></span> |
| 227 | </button> |
| 228 | </div> |
| 229 | </div> |
| 230 | <?php |
| 231 | break; |
| 232 | case 'url': |
| 233 | echo '<div class="acf-icon-picker-url">'; |
| 234 | acf_text_input( |
| 235 | array( |
| 236 | 'class' => 'acf-icon_url', |
| 237 | 'value' => $field['value']['type'] === 'url' ? $field['value']['value'] : '', |
| 238 | ) |
| 239 | ); |
| 240 | |
| 241 | // Helper Text |
| 242 | ?> |
| 243 | <p class="description"><?php esc_html_e( 'The URL to the icon you\'d like to use, or svg as Data URI', 'secure-custom-fields' ); ?></p> |
| 244 | <?php |
| 245 | echo '</div>'; |
| 246 | break; |
| 247 | default: |
| 248 | do_action( 'acf/fields/icon_picker/tab/' . $name, $field ); |
| 249 | $this->render_icon_list_tab( $name, $field ); |
| 250 | } |
| 251 | |
| 252 | echo '</div>'; |
| 253 | } |
| 254 | |
| 255 | echo '</div>'; |
| 256 | } |
| 257 | |
| 258 | /** |
| 259 | * Renders field settings for the icon picker field. |
| 260 | * |
| 261 | * @since ACF 6.3 |
| 262 | * |
| 263 | * @param array $field The icon picker field object. |
| 264 | * @return void |
| 265 | */ |
| 266 | public function render_field_settings( $field ) { |
| 267 | acf_render_field_setting( |
| 268 | $field, |
| 269 | array( |
| 270 | 'label' => __( 'Tabs', 'secure-custom-fields' ), |
| 271 | 'instructions' => __( 'Select where content editors can choose the icon from.', 'secure-custom-fields' ), |
| 272 | 'type' => 'checkbox', |
| 273 | 'name' => 'tabs', |
| 274 | 'choices' => $this->get_tabs(), |
| 275 | ) |
| 276 | ); |
| 277 | |
| 278 | $return_format_doc = sprintf( |
| 279 | '<a href="%s" target="_blank">%s</a>', |
| 280 | $this->doc_url, |
| 281 | __( 'Learn More', 'secure-custom-fields' ) |
| 282 | ); |
| 283 | |
| 284 | $return_format_instructions = sprintf( |
| 285 | /* translators: %s - link to documentation */ |
| 286 | __( 'Specify the return format for the icon. %s', 'secure-custom-fields' ), |
| 287 | $return_format_doc |
| 288 | ); |
| 289 | |
| 290 | acf_render_field_setting( |
| 291 | $field, |
| 292 | array( |
| 293 | 'label' => __( 'Return Format', 'secure-custom-fields' ), |
| 294 | 'instructions' => $return_format_instructions, |
| 295 | 'type' => 'radio', |
| 296 | 'name' => 'return_format', |
| 297 | 'choices' => array( |
| 298 | 'string' => __( 'String', 'secure-custom-fields' ), |
| 299 | 'array' => __( 'Array', 'secure-custom-fields' ), |
| 300 | ), |
| 301 | 'layout' => 'horizontal', |
| 302 | ) |
| 303 | ); |
| 304 | } |
| 305 | |
| 306 | /** |
| 307 | * Localizes text for Icon Picker |
| 308 | * |
| 309 | * @since ACF 6.3 |
| 310 | * |
| 311 | * @return void |
| 312 | */ |
| 313 | public function input_admin_enqueue_scripts() { |
| 314 | acf_localize_data( |
| 315 | array( |
| 316 | 'iconPickerA11yStrings' => array( |
| 317 | 'noResultsForSearchTerm' => esc_html__( 'No results found for that search term', 'secure-custom-fields' ), |
| 318 | 'newResultsFoundForSearchTerm' => esc_html__( 'The available icons matching your search query have been updated in the icon picker below.', 'secure-custom-fields' ), |
| 319 | ), |
| 320 | 'iconPickeri10n' => $this->get_dashicons(), |
| 321 | ) |
| 322 | ); |
| 323 | } |
| 324 | |
| 325 | /** |
| 326 | * Validates the field value before it is saved into the database. |
| 327 | * |
| 328 | * @since ACF 6.3 |
| 329 | * |
| 330 | * @param integer $valid The current validation status. |
| 331 | * @param mixed $value The value of the field. |
| 332 | * @param array $field The field array holding all the field options. |
| 333 | * @param string $input The corresponding input name for $_POST value. |
| 334 | * @return boolean true If the value is valid, false if not. |
| 335 | */ |
| 336 | public function validate_value( $valid, $value, $field, $input ) { |
| 337 | // If the value is empty and it's not required, return true. You're allowed to save nothing. |
| 338 | if ( empty( $value ) && empty( $field['required'] ) ) { |
| 339 | return true; |
| 340 | } |
| 341 | |
| 342 | // Validate required. |
| 343 | if ( $field['required'] && ( empty( $value ) || empty( $value['value'] ) ) ) { |
| 344 | return false; |
| 345 | } |
| 346 | |
| 347 | // If the value is not an array, return $valid status. |
| 348 | if ( ! is_array( $value ) ) { |
| 349 | return $valid; |
| 350 | } |
| 351 | |
| 352 | // If the value is an array, but the type is not set, fail validation. |
| 353 | if ( ! isset( $value['type'] ) ) { |
| 354 | return __( 'Icon picker requires an icon type.', 'secure-custom-fields' ); |
| 355 | } |
| 356 | |
| 357 | // If the value is an array, but the value is not set, fail validation. |
| 358 | if ( ! isset( $value['value'] ) ) { |
| 359 | return __( 'Icon picker requires a value.', 'secure-custom-fields' ); |
| 360 | } |
| 361 | |
| 362 | return true; |
| 363 | } |
| 364 | |
| 365 | /** |
| 366 | * format_value() |
| 367 | * |
| 368 | * This filter is applied to the $value after it is loaded from the db and before it is returned to the template |
| 369 | * |
| 370 | * @since ACF 6.3 |
| 371 | * |
| 372 | * @param mixed $value The value which was loaded from the database. |
| 373 | * @param integer $post_id The $post_id from which the value was loaded. |
| 374 | * @param array $field The field array holding all the field options. |
| 375 | * @return mixed $value The modified value. |
| 376 | */ |
| 377 | public function format_value( $value, $post_id, $field ) { |
| 378 | // Handle empty values. |
| 379 | if ( empty( $value ) ) { |
| 380 | // Return the default value if there is one. |
| 381 | if ( isset( $field['default_value'] ) ) { |
| 382 | return $field['default_value']; |
| 383 | } else { |
| 384 | // Otherwise return false. |
| 385 | return false; |
| 386 | } |
| 387 | } |
| 388 | |
| 389 | // If media_library, behave the same as an image field. |
| 390 | if ( $value['type'] === 'media_library' ) { |
| 391 | // convert to int |
| 392 | $value['value'] = intval( $value['value'] ); |
| 393 | |
| 394 | // format |
| 395 | if ( $field['return_format'] === 'string' ) { |
| 396 | return wp_get_attachment_url( $value['value'] ); |
| 397 | } elseif ( $field['return_format'] === 'array' ) { |
| 398 | $value['value'] = acf_get_attachment( $value['value'] ); |
| 399 | return $value; |
| 400 | } |
| 401 | } |
| 402 | |
| 403 | // If the desired return format is a string |
| 404 | if ( $field['return_format'] === 'string' ) { |
| 405 | return $value['value']; |
| 406 | } |
| 407 | |
| 408 | // If nothing specific matched the return format, just return the value. |
| 409 | return $value; |
| 410 | } |
| 411 | |
| 412 | /** |
| 413 | * get_dashicons() |
| 414 | * |
| 415 | * This function will return an array of dashicons. |
| 416 | * |
| 417 | * @since ACF 6.3 |
| 418 | * |
| 419 | * @return array $dashicons an array of dashicons. |
| 420 | */ |
| 421 | public function get_dashicons() { |
| 422 | $dashicons = array( |
| 423 | 'dashicons-admin-appearance' => esc_html__( 'Appearance Icon', 'secure-custom-fields' ), |
| 424 | 'dashicons-admin-collapse' => esc_html__( 'Collapse Icon', 'secure-custom-fields' ), |
| 425 | 'dashicons-admin-comments' => esc_html__( 'Comments Icon', 'secure-custom-fields' ), |
| 426 | 'dashicons-admin-customizer' => esc_html__( 'Customizer Icon', 'secure-custom-fields' ), |
| 427 | 'dashicons-admin-generic' => esc_html__( 'Generic Icon', 'secure-custom-fields' ), |
| 428 | 'dashicons-admin-home' => esc_html__( 'Home Icon', 'secure-custom-fields' ), |
| 429 | 'dashicons-admin-links' => esc_html__( 'Links Icon', 'secure-custom-fields' ), |
| 430 | 'dashicons-admin-media' => esc_html__( 'Media Icon', 'secure-custom-fields' ), |
| 431 | 'dashicons-admin-multisite' => esc_html__( 'Multisite Icon', 'secure-custom-fields' ), |
| 432 | 'dashicons-admin-network' => esc_html__( 'Network Icon', 'secure-custom-fields' ), |
| 433 | 'dashicons-admin-page' => esc_html__( 'Page Icon', 'secure-custom-fields' ), |
| 434 | 'dashicons-admin-plugins' => esc_html__( 'Plugins Icon', 'secure-custom-fields' ), |
| 435 | 'dashicons-admin-post' => esc_html__( 'Post Icon', 'secure-custom-fields' ), |
| 436 | 'dashicons-admin-settings' => esc_html__( 'Settings Icon', 'secure-custom-fields' ), |
| 437 | 'dashicons-admin-site' => esc_html__( 'Site Icon', 'secure-custom-fields' ), |
| 438 | 'dashicons-admin-site-alt' => esc_html__( 'Site (alt) Icon', 'secure-custom-fields' ), |
| 439 | 'dashicons-admin-site-alt2' => esc_html__( 'Site (alt2) Icon', 'secure-custom-fields' ), |
| 440 | 'dashicons-admin-site-alt3' => esc_html__( 'Site (alt3) Icon', 'secure-custom-fields' ), |
| 441 | 'dashicons-admin-tools' => esc_html__( 'Tools Icon', 'secure-custom-fields' ), |
| 442 | 'dashicons-admin-users' => esc_html__( 'Users Icon', 'secure-custom-fields' ), |
| 443 | 'dashicons-airplane' => esc_html__( 'Airplane Icon', 'secure-custom-fields' ), |
| 444 | 'dashicons-album' => esc_html__( 'Album Icon', 'secure-custom-fields' ), |
| 445 | 'dashicons-align-center' => esc_html__( 'Align Center Icon', 'secure-custom-fields' ), |
| 446 | 'dashicons-align-full-width' => esc_html__( 'Align Full Width Icon', 'secure-custom-fields' ), |
| 447 | 'dashicons-align-left' => esc_html__( 'Align Left Icon', 'secure-custom-fields' ), |
| 448 | 'dashicons-align-none' => esc_html__( 'Align None Icon', 'secure-custom-fields' ), |
| 449 | 'dashicons-align-pull-left' => esc_html__( 'Align Pull Left Icon', 'secure-custom-fields' ), |
| 450 | 'dashicons-align-pull-right' => esc_html__( 'Align Pull Right Icon', 'secure-custom-fields' ), |
| 451 | 'dashicons-align-right' => esc_html__( 'Align Right Icon', 'secure-custom-fields' ), |
| 452 | 'dashicons-align-wide' => esc_html__( 'Align Wide Icon', 'secure-custom-fields' ), |
| 453 | 'dashicons-amazon' => esc_html__( 'Amazon Icon', 'secure-custom-fields' ), |
| 454 | 'dashicons-analytics' => esc_html__( 'Analytics Icon', 'secure-custom-fields' ), |
| 455 | 'dashicons-archive' => esc_html__( 'Archive Icon', 'secure-custom-fields' ), |
| 456 | 'dashicons-arrow-down' => esc_html__( 'Arrow Down Icon', 'secure-custom-fields' ), |
| 457 | 'dashicons-arrow-down-alt' => esc_html__( 'Arrow Down (alt) Icon', 'secure-custom-fields' ), |
| 458 | 'dashicons-arrow-down-alt2' => esc_html__( 'Arrow Down (alt2) Icon', 'secure-custom-fields' ), |
| 459 | 'dashicons-arrow-left' => esc_html__( 'Arrow Left Icon', 'secure-custom-fields' ), |
| 460 | 'dashicons-arrow-left-alt' => esc_html__( 'Arrow Left (alt) Icon', 'secure-custom-fields' ), |
| 461 | 'dashicons-arrow-left-alt2' => esc_html__( 'Arrow Left (alt2) Icon', 'secure-custom-fields' ), |
| 462 | 'dashicons-arrow-right' => esc_html__( 'Arrow Right Icon', 'secure-custom-fields' ), |
| 463 | 'dashicons-arrow-right-alt' => esc_html__( 'Arrow Right (alt) Icon', 'secure-custom-fields' ), |
| 464 | 'dashicons-arrow-right-alt2' => esc_html__( 'Arrow Right (alt2) Icon', 'secure-custom-fields' ), |
| 465 | 'dashicons-arrow-up' => esc_html__( 'Arrow Up Icon', 'secure-custom-fields' ), |
| 466 | 'dashicons-arrow-up-alt' => esc_html__( 'Arrow Up (alt) Icon', 'secure-custom-fields' ), |
| 467 | 'dashicons-arrow-up-alt2' => esc_html__( 'Arrow Up (alt2) Icon', 'secure-custom-fields' ), |
| 468 | 'dashicons-art' => esc_html__( 'Art Icon', 'secure-custom-fields' ), |
| 469 | 'dashicons-awards' => esc_html__( 'Awards Icon', 'secure-custom-fields' ), |
| 470 | 'dashicons-backup' => esc_html__( 'Backup Icon', 'secure-custom-fields' ), |
| 471 | 'dashicons-bank' => esc_html__( 'Bank Icon', 'secure-custom-fields' ), |
| 472 | 'dashicons-beer' => esc_html__( 'Beer Icon', 'secure-custom-fields' ), |
| 473 | 'dashicons-bell' => esc_html__( 'Bell Icon', 'secure-custom-fields' ), |
| 474 | 'dashicons-block-default' => esc_html__( 'Block Default Icon', 'secure-custom-fields' ), |
| 475 | 'dashicons-book' => esc_html__( 'Book Icon', 'secure-custom-fields' ), |
| 476 | 'dashicons-book-alt' => esc_html__( 'Book (alt) Icon', 'secure-custom-fields' ), |
| 477 | 'dashicons-buddicons-activity' => esc_html__( 'Activity Icon', 'secure-custom-fields' ), |
| 478 | 'dashicons-buddicons-bbpress-logo' => esc_html__( 'bbPress Icon', 'secure-custom-fields' ), |
| 479 | 'dashicons-buddicons-buddypress-logo' => esc_html__( 'BuddyPress Icon', 'secure-custom-fields' ), |
| 480 | 'dashicons-buddicons-community' => esc_html__( 'Community Icon', 'secure-custom-fields' ), |
| 481 | 'dashicons-buddicons-forums' => esc_html__( 'Forums Icon', 'secure-custom-fields' ), |
| 482 | 'dashicons-buddicons-friends' => esc_html__( 'Friends Icon', 'secure-custom-fields' ), |
| 483 | 'dashicons-buddicons-groups' => esc_html__( 'Groups Icon', 'secure-custom-fields' ), |
| 484 | 'dashicons-buddicons-pm' => esc_html__( 'PM Icon', 'secure-custom-fields' ), |
| 485 | 'dashicons-buddicons-replies' => esc_html__( 'Replies Icon', 'secure-custom-fields' ), |
| 486 | 'dashicons-buddicons-topics' => esc_html__( 'Topics Icon', 'secure-custom-fields' ), |
| 487 | 'dashicons-buddicons-tracking' => esc_html__( 'Tracking Icon', 'secure-custom-fields' ), |
| 488 | 'dashicons-building' => esc_html__( 'Building Icon', 'secure-custom-fields' ), |
| 489 | 'dashicons-businessman' => esc_html__( 'Businessman Icon', 'secure-custom-fields' ), |
| 490 | 'dashicons-businessperson' => esc_html__( 'Businessperson Icon', 'secure-custom-fields' ), |
| 491 | 'dashicons-businesswoman' => esc_html__( 'Businesswoman Icon', 'secure-custom-fields' ), |
| 492 | 'dashicons-button' => esc_html__( 'Button Icon', 'secure-custom-fields' ), |
| 493 | 'dashicons-calculator' => esc_html__( 'Calculator Icon', 'secure-custom-fields' ), |
| 494 | 'dashicons-calendar' => esc_html__( 'Calendar Icon', 'secure-custom-fields' ), |
| 495 | 'dashicons-calendar-alt' => esc_html__( 'Calendar (alt) Icon', 'secure-custom-fields' ), |
| 496 | 'dashicons-camera' => esc_html__( 'Camera Icon', 'secure-custom-fields' ), |
| 497 | 'dashicons-camera-alt' => esc_html__( 'Camera (alt) Icon', 'secure-custom-fields' ), |
| 498 | 'dashicons-car' => esc_html__( 'Car Icon', 'secure-custom-fields' ), |
| 499 | 'dashicons-carrot' => esc_html__( 'Carrot Icon', 'secure-custom-fields' ), |
| 500 | 'dashicons-cart' => esc_html__( 'Cart Icon', 'secure-custom-fields' ), |
| 501 | 'dashicons-category' => esc_html__( 'Category Icon', 'secure-custom-fields' ), |
| 502 | 'dashicons-chart-area' => esc_html__( 'Chart Area Icon', 'secure-custom-fields' ), |
| 503 | 'dashicons-chart-bar' => esc_html__( 'Chart Bar Icon', 'secure-custom-fields' ), |
| 504 | 'dashicons-chart-line' => esc_html__( 'Chart Line Icon', 'secure-custom-fields' ), |
| 505 | 'dashicons-chart-pie' => esc_html__( 'Chart Pie Icon', 'secure-custom-fields' ), |
| 506 | 'dashicons-clipboard' => esc_html__( 'Clipboard Icon', 'secure-custom-fields' ), |
| 507 | 'dashicons-clock' => esc_html__( 'Clock Icon', 'secure-custom-fields' ), |
| 508 | 'dashicons-cloud' => esc_html__( 'Cloud Icon', 'secure-custom-fields' ), |
| 509 | 'dashicons-cloud-saved' => esc_html__( 'Cloud Saved Icon', 'secure-custom-fields' ), |
| 510 | 'dashicons-cloud-upload' => esc_html__( 'Cloud Upload Icon', 'secure-custom-fields' ), |
| 511 | 'dashicons-code-standards' => esc_html__( 'Code Standards Icon', 'secure-custom-fields' ), |
| 512 | 'dashicons-coffee' => esc_html__( 'Coffee Icon', 'secure-custom-fields' ), |
| 513 | 'dashicons-color-picker' => esc_html__( 'Color Picker Icon', 'secure-custom-fields' ), |
| 514 | 'dashicons-columns' => esc_html__( 'Columns Icon', 'secure-custom-fields' ), |
| 515 | 'dashicons-controls-back' => esc_html__( 'Back Icon', 'secure-custom-fields' ), |
| 516 | 'dashicons-controls-forward' => esc_html__( 'Forward Icon', 'secure-custom-fields' ), |
| 517 | 'dashicons-controls-pause' => esc_html__( 'Pause Icon', 'secure-custom-fields' ), |
| 518 | 'dashicons-controls-play' => esc_html__( 'Play Icon', 'secure-custom-fields' ), |
| 519 | 'dashicons-controls-repeat' => esc_html__( 'Repeat Icon', 'secure-custom-fields' ), |
| 520 | 'dashicons-controls-skipback' => esc_html__( 'Skip Back Icon', 'secure-custom-fields' ), |
| 521 | 'dashicons-controls-skipforward' => esc_html__( 'Skip Forward Icon', 'secure-custom-fields' ), |
| 522 | 'dashicons-controls-volumeoff' => esc_html__( 'Volume Off Icon', 'secure-custom-fields' ), |
| 523 | 'dashicons-controls-volumeon' => esc_html__( 'Volume On Icon', 'secure-custom-fields' ), |
| 524 | 'dashicons-cover-image' => esc_html__( 'Cover Image Icon', 'secure-custom-fields' ), |
| 525 | 'dashicons-dashboard' => esc_html__( 'Dashboard Icon', 'secure-custom-fields' ), |
| 526 | 'dashicons-database' => esc_html__( 'Database Icon', 'secure-custom-fields' ), |
| 527 | 'dashicons-database-add' => esc_html__( 'Database Add Icon', 'secure-custom-fields' ), |
| 528 | 'dashicons-database-export' => esc_html__( 'Database Export Icon', 'secure-custom-fields' ), |
| 529 | 'dashicons-database-import' => esc_html__( 'Database Import Icon', 'secure-custom-fields' ), |
| 530 | 'dashicons-database-remove' => esc_html__( 'Database Remove Icon', 'secure-custom-fields' ), |
| 531 | 'dashicons-database-view' => esc_html__( 'Database View Icon', 'secure-custom-fields' ), |
| 532 | 'dashicons-desktop' => esc_html__( 'Desktop Icon', 'secure-custom-fields' ), |
| 533 | 'dashicons-dismiss' => esc_html__( 'Dismiss Icon', 'secure-custom-fields' ), |
| 534 | 'dashicons-download' => esc_html__( 'Download Icon', 'secure-custom-fields' ), |
| 535 | 'dashicons-drumstick' => esc_html__( 'Drumstick Icon', 'secure-custom-fields' ), |
| 536 | 'dashicons-edit' => esc_html__( 'Edit Icon', 'secure-custom-fields' ), |
| 537 | 'dashicons-edit-large' => esc_html__( 'Edit Large Icon', 'secure-custom-fields' ), |
| 538 | 'dashicons-edit-page' => esc_html__( 'Edit Page Icon', 'secure-custom-fields' ), |
| 539 | 'dashicons-editor-aligncenter' => esc_html__( 'Align Center Icon', 'secure-custom-fields' ), |
| 540 | 'dashicons-editor-alignleft' => esc_html__( 'Align Left Icon', 'secure-custom-fields' ), |
| 541 | 'dashicons-editor-alignright' => esc_html__( 'Align Right Icon', 'secure-custom-fields' ), |
| 542 | 'dashicons-editor-bold' => esc_html__( 'Bold Icon', 'secure-custom-fields' ), |
| 543 | 'dashicons-editor-break' => esc_html__( 'Break Icon', 'secure-custom-fields' ), |
| 544 | 'dashicons-editor-code' => esc_html__( 'Code Icon', 'secure-custom-fields' ), |
| 545 | 'dashicons-editor-contract' => esc_html__( 'Contract Icon', 'secure-custom-fields' ), |
| 546 | 'dashicons-editor-customchar' => esc_html__( 'Custom Character Icon', 'secure-custom-fields' ), |
| 547 | 'dashicons-editor-expand' => esc_html__( 'Expand Icon', 'secure-custom-fields' ), |
| 548 | 'dashicons-editor-help' => esc_html__( 'Help Icon', 'secure-custom-fields' ), |
| 549 | 'dashicons-editor-indent' => esc_html__( 'Indent Icon', 'secure-custom-fields' ), |
| 550 | 'dashicons-editor-insertmore' => esc_html__( 'Insert More Icon', 'secure-custom-fields' ), |
| 551 | 'dashicons-editor-italic' => esc_html__( 'Italic Icon', 'secure-custom-fields' ), |
| 552 | 'dashicons-editor-justify' => esc_html__( 'Justify Icon', 'secure-custom-fields' ), |
| 553 | 'dashicons-editor-kitchensink' => esc_html__( 'Kitchen Sink Icon', 'secure-custom-fields' ), |
| 554 | 'dashicons-editor-ltr' => esc_html__( 'LTR Icon', 'secure-custom-fields' ), |
| 555 | 'dashicons-editor-ol' => esc_html__( 'Ordered List Icon', 'secure-custom-fields' ), |
| 556 | 'dashicons-editor-ol-rtl' => esc_html__( 'Ordered List RTL Icon', 'secure-custom-fields' ), |
| 557 | 'dashicons-editor-outdent' => esc_html__( 'Outdent Icon', 'secure-custom-fields' ), |
| 558 | 'dashicons-editor-paragraph' => esc_html__( 'Paragraph Icon', 'secure-custom-fields' ), |
| 559 | 'dashicons-editor-paste-text' => esc_html__( 'Paste Text Icon', 'secure-custom-fields' ), |
| 560 | 'dashicons-editor-paste-word' => esc_html__( 'Paste Word Icon', 'secure-custom-fields' ), |
| 561 | 'dashicons-editor-quote' => esc_html__( 'Quote Icon', 'secure-custom-fields' ), |
| 562 | 'dashicons-editor-removeformatting' => esc_html__( 'Remove Formatting Icon', 'secure-custom-fields' ), |
| 563 | 'dashicons-editor-rtl' => esc_html__( 'RTL Icon', 'secure-custom-fields' ), |
| 564 | 'dashicons-editor-spellcheck' => esc_html__( 'Spellcheck Icon', 'secure-custom-fields' ), |
| 565 | 'dashicons-editor-strikethrough' => esc_html__( 'Strikethrough Icon', 'secure-custom-fields' ), |
| 566 | 'dashicons-editor-table' => esc_html__( 'Table Icon', 'secure-custom-fields' ), |
| 567 | 'dashicons-editor-textcolor' => esc_html__( 'Text Color Icon', 'secure-custom-fields' ), |
| 568 | 'dashicons-editor-ul' => esc_html__( 'Unordered List Icon', 'secure-custom-fields' ), |
| 569 | 'dashicons-editor-underline' => esc_html__( 'Underline Icon', 'secure-custom-fields' ), |
| 570 | 'dashicons-editor-unlink' => esc_html__( 'Unlink Icon', 'secure-custom-fields' ), |
| 571 | 'dashicons-editor-video' => esc_html__( 'Video Icon', 'secure-custom-fields' ), |
| 572 | 'dashicons-ellipsis' => esc_html__( 'Ellipsis Icon', 'secure-custom-fields' ), |
| 573 | 'dashicons-email' => esc_html__( 'Email Icon', 'secure-custom-fields' ), |
| 574 | 'dashicons-email-alt' => esc_html__( 'Email (alt) Icon', 'secure-custom-fields' ), |
| 575 | 'dashicons-email-alt2' => esc_html__( 'Email (alt2) Icon', 'secure-custom-fields' ), |
| 576 | 'dashicons-embed-audio' => esc_html__( 'Embed Audio Icon', 'secure-custom-fields' ), |
| 577 | 'dashicons-embed-generic' => esc_html__( 'Embed Generic Icon', 'secure-custom-fields' ), |
| 578 | 'dashicons-embed-photo' => esc_html__( 'Embed Photo Icon', 'secure-custom-fields' ), |
| 579 | 'dashicons-embed-post' => esc_html__( 'Embed Post Icon', 'secure-custom-fields' ), |
| 580 | 'dashicons-embed-video' => esc_html__( 'Embed Video Icon', 'secure-custom-fields' ), |
| 581 | 'dashicons-excerpt-view' => esc_html__( 'Excerpt View Icon', 'secure-custom-fields' ), |
| 582 | 'dashicons-exit' => esc_html__( 'Exit Icon', 'secure-custom-fields' ), |
| 583 | 'dashicons-external' => esc_html__( 'External Icon', 'secure-custom-fields' ), |
| 584 | 'dashicons-facebook' => esc_html__( 'Facebook Icon', 'secure-custom-fields' ), |
| 585 | 'dashicons-facebook-alt' => esc_html__( 'Facebook (alt) Icon', 'secure-custom-fields' ), |
| 586 | 'dashicons-feedback' => esc_html__( 'Feedback Icon', 'secure-custom-fields' ), |
| 587 | 'dashicons-filter' => esc_html__( 'Filter Icon', 'secure-custom-fields' ), |
| 588 | 'dashicons-flag' => esc_html__( 'Flag Icon', 'secure-custom-fields' ), |
| 589 | 'dashicons-food' => esc_html__( 'Food Icon', 'secure-custom-fields' ), |
| 590 | 'dashicons-format-aside' => esc_html__( 'Aside Icon', 'secure-custom-fields' ), |
| 591 | 'dashicons-format-audio' => esc_html__( 'Audio Icon', 'secure-custom-fields' ), |
| 592 | 'dashicons-format-chat' => esc_html__( 'Chat Icon', 'secure-custom-fields' ), |
| 593 | 'dashicons-format-gallery' => esc_html__( 'Gallery Icon', 'secure-custom-fields' ), |
| 594 | 'dashicons-format-image' => esc_html__( 'Image Icon', 'secure-custom-fields' ), |
| 595 | 'dashicons-format-quote' => esc_html__( 'Quote Icon', 'secure-custom-fields' ), |
| 596 | 'dashicons-format-status' => esc_html__( 'Status Icon', 'secure-custom-fields' ), |
| 597 | 'dashicons-format-video' => esc_html__( 'Video Icon', 'secure-custom-fields' ), |
| 598 | 'dashicons-forms' => esc_html__( 'Forms Icon', 'secure-custom-fields' ), |
| 599 | 'dashicons-fullscreen-alt' => esc_html__( 'Fullscreen (alt) Icon', 'secure-custom-fields' ), |
| 600 | 'dashicons-fullscreen-exit-alt' => esc_html__( 'Fullscreen Exit (alt) Icon', 'secure-custom-fields' ), |
| 601 | 'dashicons-games' => esc_html__( 'Games Icon', 'secure-custom-fields' ), |
| 602 | 'dashicons-google' => esc_html__( 'Google Icon', 'secure-custom-fields' ), |
| 603 | 'dashicons-grid-view' => esc_html__( 'Grid View Icon', 'secure-custom-fields' ), |
| 604 | 'dashicons-groups' => esc_html__( 'Groups Icon', 'secure-custom-fields' ), |
| 605 | 'dashicons-hammer' => esc_html__( 'Hammer Icon', 'secure-custom-fields' ), |
| 606 | 'dashicons-heading' => esc_html__( 'Heading Icon', 'secure-custom-fields' ), |
| 607 | 'dashicons-heart' => esc_html__( 'Heart Icon', 'secure-custom-fields' ), |
| 608 | 'dashicons-hidden' => esc_html__( 'Hidden Icon', 'secure-custom-fields' ), |
| 609 | 'dashicons-hourglass' => esc_html__( 'Hourglass Icon', 'secure-custom-fields' ), |
| 610 | 'dashicons-html' => esc_html__( 'HTML Icon', 'secure-custom-fields' ), |
| 611 | 'dashicons-id' => esc_html__( 'ID Icon', 'secure-custom-fields' ), |
| 612 | 'dashicons-id-alt' => esc_html__( 'ID (alt) Icon', 'secure-custom-fields' ), |
| 613 | 'dashicons-image-crop' => esc_html__( 'Crop Icon', 'secure-custom-fields' ), |
| 614 | 'dashicons-image-filter' => esc_html__( 'Filter Icon', 'secure-custom-fields' ), |
| 615 | 'dashicons-image-flip-horizontal' => esc_html__( 'Flip Horizontal Icon', 'secure-custom-fields' ), |
| 616 | 'dashicons-image-flip-vertical' => esc_html__( 'Flip Vertical Icon', 'secure-custom-fields' ), |
| 617 | 'dashicons-image-rotate' => esc_html__( 'Rotate Icon', 'secure-custom-fields' ), |
| 618 | 'dashicons-image-rotate-left' => esc_html__( 'Rotate Left Icon', 'secure-custom-fields' ), |
| 619 | 'dashicons-image-rotate-right' => esc_html__( 'Rotate Right Icon', 'secure-custom-fields' ), |
| 620 | 'dashicons-images-alt' => esc_html__( 'Images (alt) Icon', 'secure-custom-fields' ), |
| 621 | 'dashicons-images-alt2' => esc_html__( 'Images (alt2) Icon', 'secure-custom-fields' ), |
| 622 | 'dashicons-index-card' => esc_html__( 'Index Card Icon', 'secure-custom-fields' ), |
| 623 | 'dashicons-info' => esc_html__( 'Info Icon', 'secure-custom-fields' ), |
| 624 | 'dashicons-info-outline' => esc_html__( 'Info Outline Icon', 'secure-custom-fields' ), |
| 625 | 'dashicons-insert' => esc_html__( 'Insert Icon', 'secure-custom-fields' ), |
| 626 | 'dashicons-insert-after' => esc_html__( 'Insert After Icon', 'secure-custom-fields' ), |
| 627 | 'dashicons-insert-before' => esc_html__( 'Insert Before Icon', 'secure-custom-fields' ), |
| 628 | 'dashicons-instagram' => esc_html__( 'Instagram Icon', 'secure-custom-fields' ), |
| 629 | 'dashicons-laptop' => esc_html__( 'Laptop Icon', 'secure-custom-fields' ), |
| 630 | 'dashicons-layout' => esc_html__( 'Layout Icon', 'secure-custom-fields' ), |
| 631 | 'dashicons-leftright' => esc_html__( 'Left Right Icon', 'secure-custom-fields' ), |
| 632 | 'dashicons-lightbulb' => esc_html__( 'Lightbulb Icon', 'secure-custom-fields' ), |
| 633 | 'dashicons-linkedin' => esc_html__( 'LinkedIn Icon', 'secure-custom-fields' ), |
| 634 | 'dashicons-list-view' => esc_html__( 'List View Icon', 'secure-custom-fields' ), |
| 635 | 'dashicons-location' => esc_html__( 'Location Icon', 'secure-custom-fields' ), |
| 636 | 'dashicons-location-alt' => esc_html__( 'Location (alt) Icon', 'secure-custom-fields' ), |
| 637 | 'dashicons-lock' => esc_html__( 'Lock Icon', 'secure-custom-fields' ), |
| 638 | 'dashicons-marker' => esc_html__( 'Marker Icon', 'secure-custom-fields' ), |
| 639 | 'dashicons-media-archive' => esc_html__( 'Archive Icon', 'secure-custom-fields' ), |
| 640 | 'dashicons-media-audio' => esc_html__( 'Audio Icon', 'secure-custom-fields' ), |
| 641 | 'dashicons-media-code' => esc_html__( 'Code Icon', 'secure-custom-fields' ), |
| 642 | 'dashicons-media-default' => esc_html__( 'Default Icon', 'secure-custom-fields' ), |
| 643 | 'dashicons-media-document' => esc_html__( 'Document Icon', 'secure-custom-fields' ), |
| 644 | 'dashicons-media-interactive' => esc_html__( 'Interactive Icon', 'secure-custom-fields' ), |
| 645 | 'dashicons-media-spreadsheet' => esc_html__( 'Spreadsheet Icon', 'secure-custom-fields' ), |
| 646 | 'dashicons-media-text' => esc_html__( 'Text Icon', 'secure-custom-fields' ), |
| 647 | 'dashicons-media-video' => esc_html__( 'Video Icon', 'secure-custom-fields' ), |
| 648 | 'dashicons-megaphone' => esc_html__( 'Megaphone Icon', 'secure-custom-fields' ), |
| 649 | 'dashicons-menu' => esc_html__( 'Menu Icon', 'secure-custom-fields' ), |
| 650 | 'dashicons-menu-alt' => esc_html__( 'Menu (alt) Icon', 'secure-custom-fields' ), |
| 651 | 'dashicons-menu-alt2' => esc_html__( 'Menu (alt2) Icon', 'secure-custom-fields' ), |
| 652 | 'dashicons-menu-alt3' => esc_html__( 'Menu (alt3) Icon', 'secure-custom-fields' ), |
| 653 | 'dashicons-microphone' => esc_html__( 'Microphone Icon', 'secure-custom-fields' ), |
| 654 | 'dashicons-migrate' => esc_html__( 'Migrate Icon', 'secure-custom-fields' ), |
| 655 | 'dashicons-minus' => esc_html__( 'Minus Icon', 'secure-custom-fields' ), |
| 656 | 'dashicons-money' => esc_html__( 'Money Icon', 'secure-custom-fields' ), |
| 657 | 'dashicons-money-alt' => esc_html__( 'Money (alt) Icon', 'secure-custom-fields' ), |
| 658 | 'dashicons-move' => esc_html__( 'Move Icon', 'secure-custom-fields' ), |
| 659 | 'dashicons-nametag' => esc_html__( 'Nametag Icon', 'secure-custom-fields' ), |
| 660 | 'dashicons-networking' => esc_html__( 'Networking Icon', 'secure-custom-fields' ), |
| 661 | 'dashicons-no' => esc_html__( 'No Icon', 'secure-custom-fields' ), |
| 662 | 'dashicons-no-alt' => esc_html__( 'No (alt) Icon', 'secure-custom-fields' ), |
| 663 | 'dashicons-open-folder' => esc_html__( 'Open Folder Icon', 'secure-custom-fields' ), |
| 664 | 'dashicons-palmtree' => esc_html__( 'Palm Tree Icon', 'secure-custom-fields' ), |
| 665 | 'dashicons-paperclip' => esc_html__( 'Paperclip Icon', 'secure-custom-fields' ), |
| 666 | 'dashicons-pdf' => esc_html__( 'PDF Icon', 'secure-custom-fields' ), |
| 667 | 'dashicons-performance' => esc_html__( 'Performance Icon', 'secure-custom-fields' ), |
| 668 | 'dashicons-pets' => esc_html__( 'Pets Icon', 'secure-custom-fields' ), |
| 669 | 'dashicons-phone' => esc_html__( 'Phone Icon', 'secure-custom-fields' ), |
| 670 | 'dashicons-pinterest' => esc_html__( 'Pinterest Icon', 'secure-custom-fields' ), |
| 671 | 'dashicons-playlist-audio' => esc_html__( 'Playlist Audio Icon', 'secure-custom-fields' ), |
| 672 | 'dashicons-playlist-video' => esc_html__( 'Playlist Video Icon', 'secure-custom-fields' ), |
| 673 | 'dashicons-plugins-checked' => esc_html__( 'Plugins Checked Icon', 'secure-custom-fields' ), |
| 674 | 'dashicons-plus' => esc_html__( 'Plus Icon', 'secure-custom-fields' ), |
| 675 | 'dashicons-plus-alt' => esc_html__( 'Plus (alt) Icon', 'secure-custom-fields' ), |
| 676 | 'dashicons-plus-alt2' => esc_html__( 'Plus (alt2) Icon', 'secure-custom-fields' ), |
| 677 | 'dashicons-podio' => esc_html__( 'Podio Icon', 'secure-custom-fields' ), |
| 678 | 'dashicons-portfolio' => esc_html__( 'Portfolio Icon', 'secure-custom-fields' ), |
| 679 | 'dashicons-post-status' => esc_html__( 'Post Status Icon', 'secure-custom-fields' ), |
| 680 | 'dashicons-pressthis' => esc_html__( 'Pressthis Icon', 'secure-custom-fields' ), |
| 681 | 'dashicons-printer' => esc_html__( 'Printer Icon', 'secure-custom-fields' ), |
| 682 | 'dashicons-privacy' => esc_html__( 'Privacy Icon', 'secure-custom-fields' ), |
| 683 | 'dashicons-products' => esc_html__( 'Products Icon', 'secure-custom-fields' ), |
| 684 | 'dashicons-randomize' => esc_html__( 'Randomize Icon', 'secure-custom-fields' ), |
| 685 | 'dashicons-reddit' => esc_html__( 'Reddit Icon', 'secure-custom-fields' ), |
| 686 | 'dashicons-redo' => esc_html__( 'Redo Icon', 'secure-custom-fields' ), |
| 687 | 'dashicons-remove' => esc_html__( 'Remove Icon', 'secure-custom-fields' ), |
| 688 | 'dashicons-rest-api' => esc_html__( 'REST API Icon', 'secure-custom-fields' ), |
| 689 | 'dashicons-rss' => esc_html__( 'RSS Icon', 'secure-custom-fields' ), |
| 690 | 'dashicons-saved' => esc_html__( 'Saved Icon', 'secure-custom-fields' ), |
| 691 | 'dashicons-schedule' => esc_html__( 'Schedule Icon', 'secure-custom-fields' ), |
| 692 | 'dashicons-screenoptions' => esc_html__( 'Screen Options Icon', 'secure-custom-fields' ), |
| 693 | 'dashicons-search' => esc_html__( 'Search Icon', 'secure-custom-fields' ), |
| 694 | 'dashicons-share' => esc_html__( 'Share Icon', 'secure-custom-fields' ), |
| 695 | 'dashicons-share-alt' => esc_html__( 'Share (alt) Icon', 'secure-custom-fields' ), |
| 696 | 'dashicons-share-alt2' => esc_html__( 'Share (alt2) Icon', 'secure-custom-fields' ), |
| 697 | 'dashicons-shield' => esc_html__( 'Shield Icon', 'secure-custom-fields' ), |
| 698 | 'dashicons-shield-alt' => esc_html__( 'Shield (alt) Icon', 'secure-custom-fields' ), |
| 699 | 'dashicons-shortcode' => esc_html__( 'Shortcode Icon', 'secure-custom-fields' ), |
| 700 | 'dashicons-slides' => esc_html__( 'Slides Icon', 'secure-custom-fields' ), |
| 701 | 'dashicons-smartphone' => esc_html__( 'Smartphone Icon', 'secure-custom-fields' ), |
| 702 | 'dashicons-smiley' => esc_html__( 'Smiley Icon', 'secure-custom-fields' ), |
| 703 | 'dashicons-sort' => esc_html__( 'Sort Icon', 'secure-custom-fields' ), |
| 704 | 'dashicons-sos' => esc_html__( 'Sos Icon', 'secure-custom-fields' ), |
| 705 | 'dashicons-spotify' => esc_html__( 'Spotify Icon', 'secure-custom-fields' ), |
| 706 | 'dashicons-star-empty' => esc_html__( 'Star Empty Icon', 'secure-custom-fields' ), |
| 707 | 'dashicons-star-filled' => esc_html__( 'Star Filled Icon', 'secure-custom-fields' ), |
| 708 | 'dashicons-star-half' => esc_html__( 'Star Half Icon', 'secure-custom-fields' ), |
| 709 | 'dashicons-sticky' => esc_html__( 'Sticky Icon', 'secure-custom-fields' ), |
| 710 | 'dashicons-store' => esc_html__( 'Store Icon', 'secure-custom-fields' ), |
| 711 | 'dashicons-superhero' => esc_html__( 'Superhero Icon', 'secure-custom-fields' ), |
| 712 | 'dashicons-superhero-alt' => esc_html__( 'Superhero (alt) Icon', 'secure-custom-fields' ), |
| 713 | 'dashicons-table-col-after' => esc_html__( 'Table Col After Icon', 'secure-custom-fields' ), |
| 714 | 'dashicons-table-col-before' => esc_html__( 'Table Col Before Icon', 'secure-custom-fields' ), |
| 715 | 'dashicons-table-col-delete' => esc_html__( 'Table Col Delete Icon', 'secure-custom-fields' ), |
| 716 | 'dashicons-table-row-after' => esc_html__( 'Table Row After Icon', 'secure-custom-fields' ), |
| 717 | 'dashicons-table-row-before' => esc_html__( 'Table Row Before Icon', 'secure-custom-fields' ), |
| 718 | 'dashicons-table-row-delete' => esc_html__( 'Table Row Delete Icon', 'secure-custom-fields' ), |
| 719 | 'dashicons-tablet' => esc_html__( 'Tablet Icon', 'secure-custom-fields' ), |
| 720 | 'dashicons-tag' => esc_html__( 'Tag Icon', 'secure-custom-fields' ), |
| 721 | 'dashicons-tagcloud' => esc_html__( 'Tagcloud Icon', 'secure-custom-fields' ), |
| 722 | 'dashicons-testimonial' => esc_html__( 'Testimonial Icon', 'secure-custom-fields' ), |
| 723 | 'dashicons-text' => esc_html__( 'Text Icon', 'secure-custom-fields' ), |
| 724 | 'dashicons-text-page' => esc_html__( 'Text Page Icon', 'secure-custom-fields' ), |
| 725 | 'dashicons-thumbs-down' => esc_html__( 'Thumbs Down Icon', 'secure-custom-fields' ), |
| 726 | 'dashicons-thumbs-up' => esc_html__( 'Thumbs Up Icon', 'secure-custom-fields' ), |
| 727 | 'dashicons-tickets' => esc_html__( 'Tickets Icon', 'secure-custom-fields' ), |
| 728 | 'dashicons-tickets-alt' => esc_html__( 'Tickets (alt) Icon', 'secure-custom-fields' ), |
| 729 | 'dashicons-tide' => esc_html__( 'Tide Icon', 'secure-custom-fields' ), |
| 730 | 'dashicons-translation' => esc_html__( 'Translation Icon', 'secure-custom-fields' ), |
| 731 | 'dashicons-trash' => esc_html__( 'Trash Icon', 'secure-custom-fields' ), |
| 732 | 'dashicons-twitch' => esc_html__( 'Twitch Icon', 'secure-custom-fields' ), |
| 733 | 'dashicons-twitter' => esc_html__( 'Twitter Icon', 'secure-custom-fields' ), |
| 734 | 'dashicons-twitter-alt' => esc_html__( 'Twitter (alt) Icon', 'secure-custom-fields' ), |
| 735 | 'dashicons-undo' => esc_html__( 'Undo Icon', 'secure-custom-fields' ), |
| 736 | 'dashicons-universal-access' => esc_html__( 'Universal Access Icon', 'secure-custom-fields' ), |
| 737 | 'dashicons-universal-access-alt' => esc_html__( 'Universal Access (alt) Icon', 'secure-custom-fields' ), |
| 738 | 'dashicons-unlock' => esc_html__( 'Unlock Icon', 'secure-custom-fields' ), |
| 739 | 'dashicons-update' => esc_html__( 'Update Icon', 'secure-custom-fields' ), |
| 740 | 'dashicons-update-alt' => esc_html__( 'Update (alt) Icon', 'secure-custom-fields' ), |
| 741 | 'dashicons-upload' => esc_html__( 'Upload Icon', 'secure-custom-fields' ), |
| 742 | 'dashicons-vault' => esc_html__( 'Vault Icon', 'secure-custom-fields' ), |
| 743 | 'dashicons-video-alt' => esc_html__( 'Video (alt) Icon', 'secure-custom-fields' ), |
| 744 | 'dashicons-video-alt2' => esc_html__( 'Video (alt2) Icon', 'secure-custom-fields' ), |
| 745 | 'dashicons-video-alt3' => esc_html__( 'Video (alt3) Icon', 'secure-custom-fields' ), |
| 746 | 'dashicons-visibility' => esc_html__( 'Visibility Icon', 'secure-custom-fields' ), |
| 747 | 'dashicons-warning' => esc_html__( 'Warning Icon', 'secure-custom-fields' ), |
| 748 | 'dashicons-welcome-add-page' => esc_html__( 'Add Page Icon', 'secure-custom-fields' ), |
| 749 | 'dashicons-welcome-comments' => esc_html__( 'Comments Icon', 'secure-custom-fields' ), |
| 750 | 'dashicons-welcome-learn-more' => esc_html__( 'Learn More Icon', 'secure-custom-fields' ), |
| 751 | 'dashicons-welcome-view-site' => esc_html__( 'View Site Icon', 'secure-custom-fields' ), |
| 752 | 'dashicons-welcome-widgets-menus' => esc_html__( 'Widgets Menus Icon', 'secure-custom-fields' ), |
| 753 | 'dashicons-welcome-write-blog' => esc_html__( 'Write Blog Icon', 'secure-custom-fields' ), |
| 754 | 'dashicons-whatsapp' => esc_html__( 'WhatsApp Icon', 'secure-custom-fields' ), |
| 755 | 'dashicons-wordpress' => esc_html__( 'WordPress Icon', 'secure-custom-fields' ), |
| 756 | 'dashicons-wordpress-alt' => esc_html__( 'WordPress (alt) Icon', 'secure-custom-fields' ), |
| 757 | 'dashicons-xing' => esc_html__( 'Xing Icon', 'secure-custom-fields' ), |
| 758 | 'dashicons-yes' => esc_html__( 'Yes Icon', 'secure-custom-fields' ), |
| 759 | 'dashicons-yes-alt' => esc_html__( 'Yes (alt) Icon', 'secure-custom-fields' ), |
| 760 | 'dashicons-youtube' => esc_html__( 'YouTube Icon', 'secure-custom-fields' ), |
| 761 | ); |
| 762 | |
| 763 | return apply_filters( 'acf/fields/icon_picker/dashicons', $dashicons ); |
| 764 | } |
| 765 | |
| 766 | /** |
| 767 | * Returns the schema used by the REST API. |
| 768 | * |
| 769 | * @since ACF 6.3 |
| 770 | * |
| 771 | * @param array $field The main field array. |
| 772 | * @return array |
| 773 | */ |
| 774 | public function get_rest_schema( array $field ): array { |
| 775 | return array( |
| 776 | 'type' => array( 'object', 'null' ), |
| 777 | 'required' => ! empty( $field['required'] ), |
| 778 | 'properties' => array( |
| 779 | 'type' => array( |
| 780 | 'description' => esc_html__( 'The type of icon to save.', 'secure-custom-fields' ), |
| 781 | 'type' => array( 'string' ), |
| 782 | 'required' => true, |
| 783 | 'enum' => array_keys( $this->get_tabs() ), |
| 784 | ), |
| 785 | 'value' => array( |
| 786 | 'description' => esc_html__( 'The value of icon to save.', 'secure-custom-fields' ), |
| 787 | 'type' => array( 'string', 'int' ), |
| 788 | 'required' => true, |
| 789 | ), |
| 790 | ), |
| 791 | ); |
| 792 | } |
| 793 | |
| 794 | /** |
| 795 | * Validates a value sent via the REST API. |
| 796 | * |
| 797 | * @since ACF 6.3 |
| 798 | * |
| 799 | * @param boolean $valid The current validity boolean. |
| 800 | * @param array|null $value The value of the field. |
| 801 | * @param array $field The main field array. |
| 802 | * @return boolean|WP_Error |
| 803 | */ |
| 804 | public function validate_rest_value( $valid, $value, $field ) { |
| 805 | if ( is_null( $value ) ) { |
| 806 | if ( ! empty( $field['required'] ) ) { |
| 807 | return new WP_Error( |
| 808 | 'rest_property_required', |
| 809 | /* translators: %s - field name */ |
| 810 | sprintf( __( '%s is a required property of acf.', 'secure-custom-fields' ), $field['name'] ) |
| 811 | ); |
| 812 | } else { |
| 813 | return $valid; |
| 814 | } |
| 815 | } |
| 816 | |
| 817 | if ( ! empty( $value['type'] ) && 'media_library' === $value['type'] ) { |
| 818 | $param = sprintf( '%s[%s][value]', $field['prefix'], $field['name'] ); |
| 819 | $data = array( |
| 820 | 'param' => $param, |
| 821 | 'value' => (int) $value['value'], |
| 822 | ); |
| 823 | |
| 824 | if ( ! is_int( $value['value'] ) || 'attachment' !== get_post_type( $value['value'] ) ) { |
| 825 | /* translators: %s - field/param name */ |
| 826 | $error = sprintf( __( '%s requires a valid attachment ID when type is set to media_library.', 'secure-custom-fields' ), $param ); |
| 827 | return new WP_Error( 'rest_invalid_param', $error, $data ); |
| 828 | } |
| 829 | } |
| 830 | |
| 831 | return $valid; |
| 832 | } |
| 833 | } |
| 834 | |
| 835 | acf_register_field_type( 'acf_field_icon_picker' ); |
| 836 | endif; |
| 837 |