WordPress filter hook · part of WordPress core

editable_slug

A WordPress core filter that 28 plugins also fire themselves, running on 471K+ sites between them.

“Filters the slug value in the form field.”

How to use editable_slug

It's a filter: your callback receives the value, and must return the (changed) value. Add this to your theme's functions.php or a small custom plugin:

functions.php
add_filter( 'editable_slug', function( $value ) {
	// Change $value here.
	return $value;
}, 10, 1 );

Argument names come from bbPress's source. Other plugins may pass different values: check the call in the plugin you're targeting below.

This hook is fired by WordPress core too. Official reference on developer.wordpress.org →

28 plugins that fire editable_slug

Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.

  1. bbPress icon bbPress100,000+ installs apply_filters( 'editable_slug', $value ) includes/admin/settings.php:2190
  2. Admin Columns icon Admin Columns100,000+ installs apply_filters( 'editable_slug', $term->slug, $term ) classes/Formatter/Term/Slug.php:22
  3. BuddyPress icon BuddyPress90,000+ installs apply_filters( 'editable_slug', $value, $option ) bp-core/admin/bp-core-admin-settings.php:518
  4. Customer Reviews for WooCommerce icon Customer Reviews for WooCommerce80,000+ installs apply_filters( 'editable_slug', $qe_data->slug, $qe_data ) includes/tags/class-cr-tags-list-table.php:418
  5. PublishPress Taxonomies icon PublishPress Taxonomies40,000+ installs apply_filters( 'editable_slug', $qe_data->slug, $qe_data ) inc/terms-table.php:1336
  6. Link Whisper Free icon Link Whisper Free30,000+ installs apply_filters( 'editable_slug', $uri, $post ) core/Wpil/Model/Post.php:1506
  7. Advanced Coupons for WooCommerce icon Advanced Coupons for WooCommerce20,000+ installs apply_filters( 'editable_slug', $raw_data ) Models/Objects/Advanced_Coupon.php:154
  8. Youzify icon Youzify5,000+ installs apply_filters( 'editable_slug', bbp_get_topic_tag_slug() ) includes/public/templates/bbpress/form-topic-tag.php:47
  9. Real Category Management: Content Management in Category Folders icon Real Category Management: Content Management in Category Folders2,000+ installs apply_filters( 'editable_slug', $category->slug ) inc/TaxTree.php:183
  10. Tainacan icon Tainacan1,000+ installs apply_filters( 'editable_slug', $uri, $post ) views/admin/class-tainacan-admin.php:422
  11. PublishPress Statuses icon PublishPress Statuses1,000+ installs apply_filters( 'editable_slug', $uri, $post ) Workarounds.php:213
  12. BuddyPress Integration for WooCommerce icon BuddyPress Integration for WooCommerce700+ installs apply_filters( 'editable_slug', $attached_page['tab_slug'], get_post( $attached_page['page_id'] ) ) admin/views/pages/html_admin_pages_forms_table.php:57
  13. FA Lite icon FA Lite500+ installs apply_filters( 'editable_slug', $tag->slug ) includes/admin/libs/class-fa-taxonomies-list-table.php:249
  14. Forumax icon Forumax500+ installs apply_filters( 'editable_slug', $value ) lib/bbpress/includes/admin/settings.php:1984
  15. Media Categories icon Media Categories20+ installs apply_filters( 'editable_slug', $category->slug ) media-categories.php:439
  16. Ninja Shop icon Ninja Shop20+ installs apply_filters( 'editable_slug', $post->post_name ) lib/products/class.products-post-type.php:857
  17. AIO Performance Profiler, Monitor, Optimize, Compress & Debug icon AIO Performance Profiler, Monitor, Optimize, Compress & Debug10+ installs apply_filters( 'editable_slug', $uri, $post ) classes/adminbarFunction.php:1331
  18. Sharpr icon Sharpr10+ installs apply_filters( 'editable_slug', $this->data->post_title ) libs/Ri/Post.php:59
  19. Suffusion bbPress Pack icon Suffusion bbPress Pack10+ installs apply_filters( 'editable_slug', bbp_get_topic_tag_slug() ) template/bbpress/form-topic-tag.php:41
  20. Edit Category Slug (Multisite) icon Edit Category Slug (Multisite)10+ installs apply_filters( 'editable_slug', $category->slug ) edit-category-slug.php:13
  21. FV Community News icon FV Community News10+ installs apply_filters( 'editable_slug', $value ) src/template-functions.php:114
  22. Eighties bbPress icon Eighties bbPress10+ installs apply_filters( 'editable_slug', bbp_get_topic_tag_slug() ) template/bbpress/form-topic-tag.php:39
  23. Reactive LITE icon Reactive LITE10+ installs apply_filters( 'editable_slug', $term->slug ) app/PostData.php:72
  24. Ninja Galleries icon Ninja Galleries10+ installs apply_filters( 'editable_slug', $tag->slug ) wpnj-media-tags/mediatags_admin.php:697
  25. Dynamic Taxonomy Menu Items icon Dynamic Taxonomy Menu Items10+ installs apply_filters( 'editable_slug', $value ) classes/NavWalker/Forums.php:178
  26. Edit Tag Slug (Multisite) icon Edit Tag Slug (Multisite)10+ installs apply_filters( 'editable_slug', $tag->slug ) edit-tag-slug.php:13
  27. EventHive icon EventHiveFewer than 10 installs apply_filters( 'editable_slug', $term->slug, $term ) includes/admin/category-list.php:513
  28. Bevel Kit icon Bevel KitFewer than 10 installs apply_filters( 'editable_slug', $term->slug, $term ) src/modules/loops/widgets/taxonomy-filter.php:358

Need a customisation built on this hook?

Tell us what you want to change and which plugin it's for. We'll write it, test it and send it back as a small plugin.