bbp_is_reply_edit()
Check if current page is a reply edit page
Description Description
Return Return
(bool) True if it's the reply edit page, false if not
Source Source
File: includes/common/template.php
function bbp_is_reply_edit() { global $wp_query, $pagenow; // Assume false $retval = false; // Check query if ( ! empty( $wp_query->bbp_is_reply_edit ) && ( true === $wp_query->bbp_is_reply_edit ) ) { $retval = true; // Editing in admin } elseif ( is_admin() && ( 'post.php' === $pagenow ) && ( get_post_type() === bbp_get_reply_post_type() ) && ( ! empty( $_GET['action'] ) && ( 'edit' === $_GET['action'] ) ) ) { $retval = true; } // Filter & return return (bool) apply_filters( 'bbp_is_reply_edit', $retval ); }
Changelog Changelog
Version | Description |
---|---|
2.0.0 | Introduced. |