bbp_is_topic_tag_edit()
Check if the current page is editing a topic tag
Description
Return
(bool) True if editing a topic tag, false if not
Source
File: bp-forums/common/template.php
405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 | function bbp_is_topic_tag_edit() { global $wp_query , $pagenow , $taxnow ; // Bail if topic-tags are off if ( ! bbp_allow_topic_tags() ) return false; // Assume false $retval = false; // Check query if ( ! empty ( $wp_query ->bbp_is_topic_tag_edit ) && ( true === $wp_query ->bbp_is_topic_tag_edit ) ) $retval = true; // Editing in admin elseif ( is_admin() && ( 'edit-tags.php' === $pagenow ) && ( bbp_get_topic_tag_tax_id() === $taxnow ) && ( ! empty ( $_GET [ 'action' ] ) && ( 'edit' === $_GET [ 'action' ] ) ) ) $retval = true; return (bool) apply_filters( 'bbp_is_topic_tag_edit' , $retval ); } |
Changelog
Version | Description |
---|---|
bbPress (r3346) | Introduced. |
Questions?
We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.