| [7365]
|
johnjamesjacoby
|
Tools - Unit Tests: Fix some failing tests.
This commit tweaks the expected values of some tests so that they pass as intended, mostly surrounding int/string type numerics and total/single counts.
|
| [7364]
|
johnjamesjacoby
|
Component - Users: Support `wp_is_valid_utf8()` for UTF-8 display names.
This commit adds support for a new function, introduced in WordPress 6.9, to work around UTF-8 deprecations in PHP8.4.
In trunk, for 2.7.
See #2141.
|
| [7363]
|
johnjamesjacoby
|
Theme Compatibility: Make sure topic archive titles use the WordPress Page title, if one exists.
This commit modifies `bbp_template_include_theme_compat()` to use the existing `$new_title` variable logic instead of the hard-coded Topic Archive title, allowing for the Page title to take its place.
Props rollybueno.
In trunk, for 2.7.
Fixes #3604.
|
| [7362]
|
johnjamesjacoby
|
Topics/Replies: Add CSS class for user roles in topics/replies.
This commit improves the ability target specific author roles anywhere single topic or reply author meta is shown.
Props douglsmith, mikachan, netweb, robinwpdeveloper, rudlinkon, sirlouen.
In trunk, for 2.7.
Fixes #2692.
|
| [7361]
|
johnjamesjacoby
|
Tools - Code Improvement: Document some filters.
This commit improves the code documentation of several filters across the codebase.
Props johnjamesjacoby, narenin, sirlouen.
In trunk, for 2.7.
See #3110.
|
| [7360]
|
johnjamesjacoby
|
Tools - Code Improvement: Updates to the `phpcs.xml.dist` config file.
This commit implements the `WordPress.WP.I18n.MissingTranslatorsComment` code sniff, fixes a bunch of whitespace regressions from #3614 and #3613.
Props johnjamesjacoby, sirlouen.
In trunk, for 2.7.
Fixes #3615.
|
| [7359]
|
johnjamesjacoby
|
Tools - Code Improvement: Updates to the `phpcs.xml.dist` config file.
This commit reverts r7358, includes a few new exclusions, and ensures PHPCS has fully passes.
Props johnjamesjacoby, sirlouen.
In trunk, for 2.7.
Fixes #3614.
|
| [7358]
|
johnjamesjacoby
|
Tools - Code Improvement: Updates to the `phpcs.xml.dist` config file.
Props sirlouen.
In trunk, for 2.7.
See #3614.
|
| [7357]
|
johnjamesjacoby
|
Tools - Code Improvement:
This commit modifies several PHP files to strictly adhere to the following PHPCS rules:
* WordPress.WP.I18n.NonSingularStringLiteralText
* WordPress.WP.PostsPerPage.posts_per_page_posts_per_page
* WordPress.WhiteSpace.ControlStructureSpacing.ExtraSpaceAfterOpenParenthesis
* WordPress.WhiteSpace.ControlStructureSpacing.ExtraSpaceBeforeCloseParenthesis
* WordPress.WhiteSpace.ControlStructureSpacing.NoSpaceAfterOpenParenthesis
* WordPress.WhiteSpace.ControlStructureSpacing.NoSpaceBeforeCloseParenthesis
* WordPress.WhiteSpace.OperatorSpacing.NoSpaceAfter
* WordPress.WhiteSpace.OperatorSpacing.NoSpaceBefore
* WordPress.WhiteSpace.OperatorSpacing.SpacingAfter
* WordPress.WhiteSpace.OperatorSpacing.SpacingBefore
This commit does not include changes to the phpcs.xml.dist config file to add these rules yet - this will happen in a separate commit.
Props sirlouen.
In trunk, for 2.7.
See #3614.
|
| [7356]
|
johnjamesjacoby
|
Akismet: improve verbiage in history log items.
When Akismet catches spam for moderators, and moderators are able to bypass spam, a second log entry is inserted into the history to explain why, and the previous verbiage was not very clear.
This commit attempts to provide some clarity, while also respecting that this specific code is filterable, and that the spam recommendation could be overruled by third-party plugins for any reason.
This commit also adds some hooks by request, and improves some related code docs.
Props johnjamesjacoby, r-a-y, sirlouen.
In trunk, for 2.7.
See r7353. Fixes #3434.
|
| [7355]
|
johnjamesjacoby
|
Tools - Build: Ignore `.phpunit.result.cache`
In trunk, for 2.7.
See r7353.
|
| [7354]
|
johnjamesjacoby
|
Tools - Build: Update package-lock.json.
In trunk, for 2.7.
See r7353. Fixes #3610.
|
| [7353]
|
johnjamesjacoby
|
Tools - Build: Upgrade Composer, npm, and add wp-env for PHPUnit.
This commit modernizes the dev environment, bringing it up-to-speed with BuddyPress and others.
Props sirlouen.
In trunk, for 2.7.
Fixes #3610.
|
| [7352]
|
johnjamesjacoby
|
Tools - Build: Clean-up PHPCS, and enforce Yoda conditionals.
This commit includes changes to various PHP files, Composer requirements, and PHPCS config, to confirm that the `WordPress.PHP.YodaConditions` code sniff passes.
Props sirlouen.
In trunk, for 2.7.
Fixes #3613.
|
| [7351]
|
johnjamesjacoby
|
Meta: pass post-type into relevant calls to `register_meta()`.
This change ensures that these bbPress meta keys are not associated with other custom post-types, particularly when using the REST API.
Props r-a-y, terresquall.
See #3588.
Fixes #3436.
|
| [7350]
|
johnjamesjacoby
|
Forums/Topics/Replies: Add capability checks for parent object IDs when users are creating & editing content theme-side.
This change introduces a series of matching capability checks to the new/edit handler functions, that ensure the currently logged in user can read the proposed parent location for their content.
This change includes checks for anonymous users (when enabled) mapping "read" checks for public forums/topics/replies to `exist` so they can continue to post the same as before.
It also removes a few private/hidden error messages and replaces them with more generic phasing, to minimize leakage about content that is not publicly accessible.
The intent with these changes is to account for and trap any mismatches between where content handler functions are listening vs. what the user has access to create new content inside of – if they cannot read it, they cannot create new content in it, and will now see errors letting them know.
In trunk, for 2.7.
Fixes #3650.
|
| [7349]
|
johnjamesjacoby
|
Topics - Template: Add missing output condition where voice count is 0 but last-activity exists.
This change fixes a bug where topics created by anonymous users would show the "This topic is empty" fallback text in the topic description, when the topic was obviously not empty.
In trunk, for 2.7.
Fixes #3652.
|
| [7348]
|
johnjamesjacoby
|
Core - Canonical: Convert `bbp_redirect_canonical()` into a sub-action.
This change abstracts the existing internal canonical redirect logic into new dedicated functions so that they can be individually improved or customized in the future.
Pagination and Editing theme-side require intercepting and preventing the core redirection when requesting certain URLs, and there are likely to be new conditions in the future.
In trunk, for 2.7.
Fixes #3648.
|
| [7347]
|
johnjamesjacoby
|
Labels: modernize "Create New %" type labels to simpler & shorter "Add %".
This changes some post-type & template labels to be more inline with current WordPress standards, so lengthy & redundant phrases like "Create New" become "Add".
In trunk, for 2.7.
Fixes #3647.
|
| [7346]
|
johnjamesjacoby
|
Forums: swap out `bbp_is_user_keymaster()` check for `moderate` capability when checking the `edit_forums` and `edit_others_forums` mapped forum caps.
This commit fixes a bug that was causing the top-level admin-area "Forums" menu to not appear for logged in users who were assigned the "Moderator" role.
Moderators are intended to be like Editors, capable of moderating all forum-specific content. Sometimes that includes editing forum titles, descriptions, slugs, or creating a new forum and moving a bunch of existing topics into it.
Note: this change is largely a visual one, as Moderators have had the ability to edit forums since bbPress 2.2 when BuddyPress Group Forum support was added, if they already had the edit URL.
In trunk, for 2.7.
Fixes #3646.
|
| [7345]
|
johnjamesjacoby
|
Users: Prefer `bbp_is_user_keymaster()` vs. `keep_gate` check.
This allows the `bbp_is_user_keymaster` filter to function as intended in the `BBP_Admin::suggest_user()` AJAX helper.
In trunk, for 2.7.
|
| [7344]
|
johnjamesjacoby
|
Docs: Replace "Key Master" with "Keymaster" in some doc-blocks.
In trunk, for 2.7.
|
| [7343]
|
johnjamesjacoby
|
Docs: add/improve PHPDoc for `$pagenow` global in some places.
Props viralsampat.
In trunk, for 2.7.
Fixes #3641.
|
| [7342]
|
johnjamesjacoby
|
Forums: prevent PHP warnings on singular bbPress pages when post ID's are not set.
This change adds checks for empty `$wp_query->post->ID` before using it inside of `bbp_forum_enforce_private()` and `bbp_forum_enforce_hidden()`.
In branches/2.6, for 2.6.15.
Fixes #3644.
|
| [7341]
|
johnjamesjacoby
|
Forums: prevent PHP warnings on singular bbPress pages when post ID's are not set.
This change adds checks for empty `$wp_query->post->ID` before using it inside of `bbp_forum_enforce_private()` and `bbp_forum_enforce_hidden()`.
In trunk, for 2.7.
Fixes #3644.
|
| [7340]
|
johnjamesjacoby
|
Bump stable tag to 2.6.14, and WP tested-up-to to 6.9.
In trunk, for 2.7.
|
| [7339]
|
johnjamesjacoby
|
Tag 2.6.14.
|
| [7338]
|
johnjamesjacoby
|
Bump 2.6 branch to 2.6.14.
|
| [7337]
|
johnjamesjacoby
|
Extend - BuddyPress: remove unused variables.
This change deletes 2 lines of code (in `maybe_map_permalink_to_group()`) that are no longer being used.
Props upadalavipul.
In branches/2.6, for 2.6.14.
Fixes #3555.
|
| [7336]
|
johnjamesjacoby
|
Extend - BuddyPress: remove unused variables.
This change deletes 2 lines of code (in `maybe_map_permalink_to_group()`) that are no longer being used.
Props upadalavipul.
In trunk, for 2.7.
Fixes #3555.
|
| [7335]
|
johnjamesjacoby
|
Tools - Warnings/Notices: begin phasing out of `utf8_encode()` for PHP 8.2 and higher.
This change moves the existing `utf8_encode()` usages into a new common formatting function: `bbp_format_user_display_name()`, and uses this new function to abstract & encapsulate checking that mbstring equivalents are loaded & supported.
Props philipjohn.
In trunk, for 2.7.
Fixes #3585.
|
| [7334]
|
johnjamesjacoby
|
Tools - Warnings/Notices: begin phasing out of `utf8_encode()` for PHP 8.2 and higher.
This change moves the existing `utf8_encode()` usages into a new common formatting function: `bbp_format_user_display_name()`, and uses this new function to abstract & encapsulate checking that mbstring equivalents are loaded & supported.
Props philipjohn.
In branches/2.6, for 2.6.14.
Fixes #3585.
|
| [7333]
|
johnjamesjacoby
|
Search: use correct sanitization function inside of `bbp_sanitize_search_request()`.
This change fixes a bug causing forum/topic/reply specific searches to fail when searching for more than 1 word, by swapping out `sanitize_title()` with `sanitize_text_field()`.
Props dd32, aezazshekh.
In trunk, for 2.7.
Fixes #3516.
|
| [7332]
|
johnjamesjacoby
|
Search: use correct sanitization function inside of `bbp_sanitize_search_request()`.
This change fixes a bug causing forum/topic/reply specific searches to fail when searching for more than 1 word, by swapping out `sanitize_title()` with `sanitize_text_field()`.
Props dd32, aezazshekh.
In branches/2.6, for 2.6.14.
Fixes #3516.
|
| [7331]
|
johnjamesjacoby
|
Forums: fix meta-key typo in `bbp_get_forum_topic_count_hidden()`
This change replaces `_bbp_topic_reply_count_hidden` with `_bbp_total_topic_count_hidden` which is the intended name of the meta-key.
Props sirlouen.
In branches/2.6, for 2.6.14.
Fixes #3611.
|
| [7330]
|
johnjamesjacoby
|
Forums: fix meta-key typo in `bbp_get_forum_topic_count_hidden()`
This change replaces `_bbp_topic_reply_count_hidden` with `_bbp_total_topic_count_hidden` which is the intended name of the meta-key.
Props sirlouen.
In trunk, for 2.7.
Fixes #3611.
|
| [7329]
|
johnjamesjacoby
|
Theme Compat: remove reference to non-existent function.
This change removes a function call to `display_reply_index()` which does not exist, and replaces it with an empty string.
This condition will not fire under normal circumstances as the Reply post type does not support archives by default. The chances of this fatal error happening are near zero, but we can easily avoid it fully by returning an empty string instead.
Props sirlouen.
In trunk, for 2.7.
Fixes #3616.
|
| [7328]
|
johnjamesjacoby
|
Theme Compat: remove reference to non-existent function.
This change removes a function call to `display_reply_index()` which does not exist, and replaces it with an empty string.
This condition will not fire under normal circumstances as the Reply post type does not support archives by default. The chances of this fatal error happening are near zero, but we can easily avoid it fully by returning an empty string instead.
Props sirlouen.
In branches/2.6, for 2.6.14.
Fixes #3616.
|
| [7327]
|
johnjamesjacoby
|
Feeds: prefer filterable functions in `bbp_display_replies_feed_rss2()`.
This change replaces function calls to `the_author()` with the bbPress equivalent for topics & replies.
This allows display names in feeds to be filtered in the same way they normally are in non-feed contexts.
Props yoavf.
In branches/2.6, for 2.6.14.
Fixes #3543.
|
| [7326]
|
johnjamesjacoby
|
Feeds: prefer filterable functions in `bbp_display_replies_feed_rss2()`.
This change replaces function calls to `the_author()` with the bbPress equivalent for topics & replies.
This allows display names in feeds to be filtered in the same way they normally are in non-feed contexts.
Props yoavf.
In trunk, for 2.7.
Fixes #3543.
|
| [7325]
|
johnjamesjacoby
|
Extend - Akismet: avoid timeouts in the `delete_orphaned_spam_meta()` method.
This change modifies the SQL used to query for Akismet post-meta keys, such that it will only retrieve rows where `meta_key` is like `akismet_`.
This results in a less-optimized database query, but circumvents a bug where unnecessary rows were being looped through in a way that would never finish.
Props terresquall.
In trunk, for 2.7.
Fixes #3580.
|
| [7324]
|
johnjamesjacoby
|
Extend - Akismet: avoid timeouts in the `delete_orphaned_spam_meta()` method.
This change modifies the SQL used to query for Akismet post-meta keys, such that it will only retrieve rows where `meta_key` is like `akismet_`.
This results in a less-optimized database query, but circumvents a bug where unnecessary rows were being looped through in a way that would never finish.
Props terresquall.
In branches/2.6, for 2.6.14.
Fixes #3580.
|
| [7323]
|
johnjamesjacoby
|
Replies: use `bbp_get_reply_url()` instead of `bbp_get_reply_to_link()`.
This change ensures that reply-to links work outside of the single-topic context (user profiles, search pages, etc...)
Props gdragon.
In branches/2.6, for 2.6.14.
Fixes #3595.
|
| [7322]
|
johnjamesjacoby
|
Replies: use `bbp_get_reply_url()` instead of `bbp_get_reply_to_link()`.
This change ensures that reply-to links work outside of the single-topic context (user profiles, search pages, etc...)
Props gdragon.
In trunk, for 2.7.
Fixes #3609.
|
| [7321]
|
johnjamesjacoby
|
Forums: Improve targeting of `bbp_pre_get_posts_normalize_forum_visibility` filter.
This change ensures that forum (post) IDs are only excluded from queries where intended, and specifically not when querying for attachments on draft posts & pages.
Props shawfactor, sirlouen.
In trunk, for 2.7.
Fixes #3609.
|
| [7320]
|
johnjamesjacoby
|
Forums: Improve targeting of `bbp_pre_get_posts_normalize_forum_visibility` filter.
This change ensures that forum (post) IDs are only excluded from queries where intended, and specifically not when querying for attachments on draft posts & pages.
Props shawfactor, sirlouen.
In branches/2.6, for 2.6.14.
Fixes #3609.
|
| [7319]
|
johnjamesjacoby
|
API - Actions/Filters: pass filtered author values into actions when adding/editing forums/topics/replies.
This change uses the pre-filtered `_data` versions of author IDs rather than the original/unfiltered ones, fixing an unintended behavior where the newly filtered author ID was not being used by the subsequent hooked-in functions.
See: https://meta.trac.wordpress.org/ticket/6839
Props dd32.
In branches/2.6, for 2.6.14.
Fixes #3578.
|
| [7318]
|
johnjamesjacoby
|
API - Actions/Filters: pass filtered author values into actions when adding/editing forums/topics/replies.
This change uses the pre-filtered `_data` versions of author IDs rather than the original/unfiltered ones, fixing an unintended behavior where the newly filtered author ID was not being used by the subsequent hooked-in functions.
See: https://meta.trac.wordpress.org/ticket/6839
Props dd32.
In trunk, for 2.7.
Fixes #3578.
|
| [7317]
|
johnjamesjacoby
|
Extend - BuddyPress: Improve support for BuddyPress 12.0 and higher.
This change fixes fatal errors when BuddyPress Group/Member functions (deprecated in 12.0) are not included.
(Note that this commit differs from the proposed patch in that it does not modify the action-order of existing integrations, hence it does not rely on BuddyPress versions greater than 12.0 being in-use, and is safe for use with older BuddyPress versions.)
Props boonebgorges, imath, robin-w.
In branches/2.6, for 2.6.14.
Fixes #3576.
|
| [7316]
|
johnjamesjacoby
|
Extend - BuddyPress: Improve support for BuddyPress 12.0 and higher.
This change fixes fatal errors when BuddyPress Group/Member functions (deprecated in 12.0) are not included.
(Note that this commit differs from the proposed patch in that it does not modify the action-order of existing integrations, hence it does not rely on BuddyPress versions greater than 12.0 being in-use, and is safe for use with older BuddyPress versions.)
Props boonebgorges, imath, robin-w.
In trunk, for 2.7.
Fixes #3576.
|
| [7315]
|
johnjamesjacoby
|
Common: fix incorrect return type of `bbp_pre_handle_404()`.
This change ensures that `true` is always returned when overriding the 404 status.
Props ethitter.
In trunk, for 2.7.
Fixes #3626.
|
| [7314]
|
johnjamesjacoby
|
Common: fix incorrect return type of `bbp_pre_handle_404()`.
This change ensures that `true` is always returned when overriding the 404 status.
Props ethitter.
In branches/2.6, for 2.6.14.
Fixes #3626.
|
| [7313]
|
johnjamesjacoby
|
Common: document a few global variable usages.
Props upadalavipul.
In branches/2.6, for 2.6.14.
Fixes #3623.
|
| [7312]
|
johnjamesjacoby
|
Common: document a few global variable usages.
Props upadalavipul.
In trunk, for 2.7.
Fixes #3623.
|
| [7311]
|
johnjamesjacoby
|
Extend - BuddyPress - Members: correct default value from r7309.
Change from string to array, to avoid a potential PHP warning.
See #3617.
|
| [7310]
|
johnjamesjacoby
|
Extend - BuddyPress - Members: correct a deprecated function usage.
This change adds a private method to encapsulate support for `bp_core_get_user_domain()` if it is still explicitly included, and using `bp_members_get_user_url()` otherwise.
Props davidbaumwaid, sirlouen.
In branches/2.6, for 2.6.14.
Fixes #3617.
|
| [7309]
|
johnjamesjacoby
|
Extend - BuddyPress - Members: correct a deprecated function usage.
This change adds a private method to encapsulate support for `bp_core_get_user_domain()` if it is still explicitly included, and using `bp_members_get_user_url()` otherwise.
Props davidbaumwaid, sirlouen.
In trunk, for 2.7.
Fixes #3617.
|
| [7308]
|
johnjamesjacoby
|
Extend - BuddyPress - Notifications: redirect to reply when clicking a notification.
This change ensures that members are redirected to the appropriate reply URL rather than the parent topic URL.
It also now marks replies before marking the topic, and combines the updated rows together.
Props cjerrells.
In trunk, for 2.7.
Fixes #3638.
|
| [7307]
|
johnjamesjacoby
|
Extend - BuddyPress - Notifications: redirect to reply when clicking a notification.
This change ensures that members are redirected to the appropriate reply URL rather than the parent topic URL.
It also now marks replies before marking the topic, and combines the updated rows together.
Props cjerrells.
In branches/2.6, for 2.6.14.
Fixes #3638.
|
| [7306]
|
johnjamesjacoby
|
Extend - BuddyPress: reserve space for Members/Activity components.
This change prevents PHP deprecation notices from dynamic properties being invoked without being previously declared.
In branches/2.6, for 2.6.14.
|
| [7305]
|
johnjamesjacoby
|
Extend - BuddyPress: reserve space for Members/Activity components.
This change prevents PHP deprecation notices from dynamic properties being invoked without being previously declared.
In trunk, for 2.7.
|
| [7304]
|
johnjamesjacoby
|
Moderation: Make moderated or disallowed key check case-insensitive for non-Latin words.
The `bbp_check_for_moderation()` function expects to be case-insensitive, but that only works for words using Latin script and consisting of ASCII characters.
This commit adds the Unicode flag to the regular expression used for the check in these functions, so that both pattern and subject can be treated as UTF-8 strings.
See: https://www.php.net/manual/en/reference.pcre.pattern.modifiers.php
In branches/2.6, for 2.6.14.
Fixes #3640.
|
| [7303]
|
johnjamesjacoby
|
Moderation: Make moderated or disallowed key check case-insensitive for non-Latin words.
The `bbp_check_for_moderation()` function expects to be case-insensitive, but that only works for words using Latin script and consisting of ASCII characters.
This commit adds the Unicode flag to the regular expression used for the check in these functions, so that both pattern and subject can be treated as UTF-8 strings.
See: https://www.php.net/manual/en/reference.pcre.pattern.modifiers.php
In trunk, for 2.7.
Fixes #3640.
|
| [7302]
|
johnjamesjacoby
|
Moderation: prefer "disallowed_keys" over "disallow_keys".
This change corrects a regression (from r7270, since 2.6.11) where the incorrect option name was used when deprecating `blacklist_keys` via #3538.
Props robin-w.
In trunk, for 2.7.
Fixes #3639.
|
| [7301]
|
johnjamesjacoby
|
Moderation: prefer "disallowed_keys" over "disallow_keys".
This change corrects a regression (from r7270, since 2.6.11) where the incorrect option name was used when deprecating `blacklist_keys` via #3538.
Props robin-w.
In branches/2.6, for 2.6.14.
Fixes #3638.
|
| [7300]
|
johnjamesjacoby
|
Forums: cast return value of `post__not_in` as array.
This change avoids a potentially fatal PHP error if that query variable is a string.
Props rollybueno.
In branches/2.6, for 2.6.14.
Fixes #3636.
|
| [7299]
|
johnjamesjacoby
|
Forums: cast return value of `post__not_in` as array.
This change avoids a potentially fatal PHP error if that query variable is a string.
Props rollybueno.
In trunk, for 2.7.
Fixes #3636.
|
| [7298]
|
johnjamesjacoby
|
Search: Avoid PHP warnings if search terms are a nested array.
This commit modifies the `bbp_sanitize_search_request()` function to filter out all non-scalar values from the requested values, ensuring that unsupported formats (arrays of arrays specifically) are ignored.
Props dd32.
In trunk, for 2.7.
Fixes #3634.
|
| [7297]
|
johnjamesjacoby
|
Search: Avoid PHP warnings if search terms are a nested array.
This commit modifies the `bbp_sanitize_search_request()` function to filter out all non-scalar values from the requested values, ensuring that unsupported formats (arrays of arrays specifically) are ignored.
Props dd32.
In the 2.6 branch, for 2.6.14.
See #3634.
|
| [7296]
|
johnjamesjacoby
|
Tag 2.6.13.
|
| [7295]
|
johnjamesjacoby
|
Bump versions from 2.6.12 to 2.6.13.
|
| [7294]
|
johnjamesjacoby
|
Readme: Bump stable tag in trunk to 2.6.13.
|
| [7293]
|
johnjamesjacoby
|
Replies: Fix a bug that causes replies to not appear in some topics.
In WordPress 6.8, `WP_Query` now enforces a consistent alphabetical order for array values. This change breaks the `_bbp_has_replies_where()` function, which previously relied on a strict comparison against `post_type`.
See: https://core.trac.wordpress.org/ticket/59516
This commit replaces the strict comparison with an `array_diff()` check to account for the new behavior. It also optimizes the surrounding logic to minimize repeated calls to `$query->get()`.
Props vortfu, arl1nd.
Committed to trunk for 2.7.
Fixes #3631.
|
| [7292]
|
johnjamesjacoby
|
Replies: Fix a bug that causes replies to not appear in some topics.
In WordPress 6.8, `WP_Query` now enforces a consistent alphabetical order for array values. This change breaks the `_bbp_has_replies_where()` function, which previously relied on a strict comparison against `post_type`.
See: https://core.trac.wordpress.org/ticket/59516
This commit replaces the strict comparison with an `array_diff()` check to account for the new behavior. It also optimizes the surrounding logic to minimize repeated calls to `$query->get()`.
Props @vortfu.
Committed to the 2.6 branch for 2.6.13.
See #3631.
|
| [7291]
|
johnjamesjacoby
|
Tag 2.6.12.
|
| [7290]
|
johnjamesjacoby
|
Bump 2.6 branch to 2.6.12.
|
| [7289]
|
johnjamesjacoby
|
Users: bail early out of profile-update if also during user sign-up.
This change ensures that the `bbp_profile_update_role()` function does not unintentionally run during user registration.
Props mungah, h1-2999394.
In trunk, for 2.7.
|
| [7288]
|
johnjamesjacoby
|
Users: bail early out of profile-update if also during user sign-up.
This change ensures that the `bbp_profile_update_role()` function does not unintentionally run during user registration.
Props mungah, h1-2999394.
In branches/2.6, for 2.6.12.
|
| [7283]
|
johnjamesjacoby
|
Tools: update npm packages for Grunt tasks.
This change:
* swaps in `terser` & `@wordpress/stylelint-config`
* updates stylelint to 15.11.0 (with `scss` support)
* adds separate stylelint config files for both CSS and SCSS (and deletes the original auto-loaded `.stylelintrc` file)
This is just enough to get Grunt unclogged and working again without complaining too much.
----
To make this work:
* Recommend to install NVM to make using npm 18 easier
* `nvm use 18`
* `npm install --legacy-peer-deps --save-dev`
Once complete, the various `grunt` CLI commands should work again without any problems (for now!)
|
| [7282]
|
johnjamesjacoby
|
Core: remove reference to bbPress::setup_globals()
This method was removed long ago, and replaced by the `bbp_setup_globals` sub-action.
|
| [7281]
|
johnjamesjacoby
|
Core: small updates to bbPress()->data
This change tweaks the code commentary a bit, and adds a default value of an empty array.
This is largely for the sake of code cleanliness, but also removes the potential for debug notices or errors inside of the magic methods from `data` not being initialized as an array when they are first called.
|
| [7280]
|
johnjamesjacoby
|
Search: remove `array_keys()` from
This change ensures that the correct public statuses are used by default inside of the `bbp_has_search_results()` function, and it does this by using the values from `bbp_get_public_topic_statuses()` and not the keys.
This fixes a regression causing search results to omit public statuses as part of their default arguments.
Props GDragoN.
Fixes #3607.
|
| [7279]
|
johnjamesjacoby
|
Common: prefer `bbp_get_topic_permalink()` over `get_permalink()`
This change ensures that features like Subscriptions & Pagination (inside of topics list loops) have: an opportunity to use the anticipated function path, and access to the right filters when including links back to them.
This fixes a potential bug where filtering a topic permalink would not happen inside of emails or pagination in the loop-topic template part.
See #3603.
|
| [7278]
|
johnjamesjacoby
|
Admin: add post-state support to admin-area list-tables
This change checks posts for shortcode usages and adds "state" labels for them, to help make Forum integration easier to identify from within the list table context (usually Pages, but currently not post-type specific).
It does this by introducing `BBP_Admin::display_post_states()` and hooking it in as a filter to `display_post_states`.
Committer note: `get_page_by_path()` would offer more precision but also be significantly more costly to call here, so instead there is a fuzzy match on `post_name` for the Forum & Topic Archive pages only.
Fixes #3605.
|
| [7277]
|
johnjamesjacoby
|
Breadcrumbs: prevent duplicate root crumb on Forum Archive subpages
This change prevents the Forum Archive page from appearing a second time in the breadcrumb trail when using pages, shortcodes, and/or subpages for forum setup.
It does this by keeping track of a previous match of a page by path to the Forum Archive, and skipping that page ID in the subsequent ancestors loop.
In trunk, for 2.7.
|
| [7276]
|
johnjamesjacoby
|
Posts: strip "Protected/Private" for bbPress post types
This change prevents post title hints from being prepended to titles of Forums, Topics, or Replies, which was happening as a consequence of calling `get_the_title()` which assumes every protected/private post title needs it.
It does this by including the following code changes:
* introduce the `bbp_no_title_status_hints()` filter function, which hooks into 2 WordPress filters and maybe overrides the return value
* replace a few `get_the_title()` calls with `get_post_field( 'post_title' )` to bypass the above filters when they would never be desirable
Committer note: this could be considered a small back-compat break (because it alters long-standing theme-side output) but ultimately it is a design decision to output all of the forum content as it was saved by the community members. Forums that prefer the old behavior can unhook `bbp_no_title_status_hints` and continue to customize child template parts to insert custom forum status hints.
Fixes #3602.
|
| [7275]
|
johnjamesjacoby
|
Merge 2.6 improvements into trunk.
From 2.6.11.
|
| [7274]
|
johnjamesjacoby
|
Tag 2.6.11.
|
| [7273]
|
johnjamesjacoby
|
Bump 2.6 branch to 2.6.11.
|
| [7272]
|
johnjamesjacoby
|
Forums: bail out of `pre_get_posts` if empty `post_type` parameter
This change addresses a regression inside of `bbp_pre_get_posts_normalize_forum_visibility` that was unintentionally targeting posts queries that were not sourced from the ones built into bbPress (forum/topic/reply), causing the majority of non-bbPress queries to return empty results.
Fixes #3601.
In branches/2.6, for 2.6.11.
|
| [7271]
|
johnjamesjacoby
|
Common: update `blacklist_keys` to `disallow_keys` in PHPUnit tests
See: #3601
In branches/2.6, for 2.6.11.
|
| [7270]
|
johnjamesjacoby
|
Common: update `blacklist_keys` to `disallow_keys`
This change prevents a deprecated option notice in WordPress versions greater than 5.5.
See: #3601
In branches/2.6, for 2.6.11.
|
| [7269]
|
johnjamesjacoby
|
Remove duplicated line added from merge in r7268.
|
| [7268]
|
johnjamesjacoby
|
Merge r7250 through r7267 from branches/2.6.
In trunk, for 2.7.
|
| [7267]
|
johnjamesjacoby
|
Bump WordPress tested & requires versions.
In branches/2.6.
|
| [7266]
|
johnjamesjacoby
|
Tag 2.6.10.
|
| [7265]
|
johnjamesjacoby
|
Bump some versions to 2.6.10.
In branches/2.6, for 2.6.10.
|
| [7264]
|
johnjamesjacoby
|
Views: do not trap RSS feeds for unregistered views
This change adds a check inside of `bbp_request_feed_trap()` that only allows `bbp_display_topics_feed_rss2()` to happen if query-arguments exist for the slug of the view that is being requested.
Without this check in place, the view unintentionally includes all topics, because no additional arguments are passed into `bbp_has_topics()`.
Fixes #3544.
Props dd32.
In branches/2.6, for 2.6.10.
|
| [7263]
|
johnjamesjacoby
|
Tools/Repair: audit post statuses in repair queries.
This change ensures that all of the relevant repair tools are including the expected public post statuses for their related post types.
These changes specifically address possibly missing Closed Topics in the repair tools, while also ensuring that anything filtering the results of the `_public_statuses()` functions to add their own custom statuses (I.E. archives on WordPress.org) are taken into consideration.
Fixes #3591.
Props GDragoN.
In branches/2.6, for 2.6.10.
|
| [7262]
|
johnjamesjacoby
|
Search: prevent hidden forums from appearing in results.
This change includes the following changes:
* Removes `readable` perm check from `bbp_has_search_results()` and replaces it with public topic statuses by default, while conditionally adding private & hidden statuses if user is capable
* Tweaks the logic inside of `bbp_pre_get_posts_normalize_forum_visibility()` to always handle both of its internal conditions (forum query, or any query that includes forums/topics/replies connected via meta data)
* Tweaks output of `content-search.php` template part to not show the "Oh bother" error when visiting a search page for the first time
* Adds a string `feedback-no-search.php` template part to address both "no results" and "no terms" conditions
These changes address some faulty search logic that was allowing hidden forums to appear in global search results to users who should not have been able to see them, while also improving the search page experience itself.
Fixes #3473.
Props wpsolr, robin-w.
In branches/2.6, for 2.6.10.
|