apply_filters( 'label_to_slug', string $label, string $key )
Filters the value of the slug after the conversion from the label. Used to filter slug value in label_to_slug function.
Contents
Description #
Parameters #
- $label
-
(string) Label entered on settings page.
- $key
-
(string) Key name of setting field.
Source #
Examples #
<?php /** * Example usage for label_to_slug filter. */ add_filter( 'label_to_slug', function( $label, $key ) { // May add any custom logic using $label, $key. // Always return $label. return $label; }, 10, 2 );