Filter hook 'available_permalink_structure_tags'

in WP Core File wp-admin/options-permalink.php at line 308

View Source

available_permalink_structure_tags

Filter Hook
Description
Filters the list of available permalink structure tags on the Permalinks settings page.

Hook Information

File Location wp-admin/options-permalink.php View on GitHub
Hook Type Filter
Line Number 308

Hook Parameters

Type Name Description
string[] $available_tags An array of key => value pairs of available permalink structure tags.

Usage Examples

Basic Usage
<?php
// Hook into available_permalink_structure_tags
add_filter('available_permalink_structure_tags', 'my_custom_filter', 10, 1);

function my_custom_filter($available_tags) {
    // Your custom filtering logic here
    return $available_tags;
}

Source Code Context

wp-admin/options-permalink.php:308 - How this hook is used in WordPress core
<?php
 303   *
 304   * @since 4.9.0
 305   *
 306   * @param string[] $available_tags An array of key => value pairs of available permalink structure tags.
 307   */
 308  $available_tags = apply_filters( 'available_permalink_structure_tags', $available_tags );
 309  
 310  /* translators: %s: Permalink structure tag. */
 311  $tag_added = __( '%s added to permalink structure' );
 312  /* translators: %s: Permalink structure tag. */
 313  $tag_removed = __( '%s removed from permalink structure' );

PHP Documentation

<?php
/**
 * Filters the list of available permalink structure tags on the Permalinks settings page.
 *
 * @since 4.9.0
 *
 * @param string[] $available_tags An array of key => value pairs of available permalink structure tags.
 */
Quick Info
  • Hook Type: Filter
  • Parameters: 1
  • File: wp-admin/options-permalink.php
Related Hooks

Related hooks will be displayed here in future updates.