| [7396]
|
johnjamesjacoby
|
Tools: PHPCS improvements from recent commits.
In trunk, for 2.7.
|
| [7395]
|
johnjamesjacoby
|
Tools: Remove JSValidate and use ESLint.
Also update CSS & JS assets based on new tooling.
Includes some improvements to admin area styling, specifically block previews.
In trunk, for 2.7.
|
| [7394]
|
johnjamesjacoby
|
Core - Theme Compat: add Block Theme support.
This commit includes the following changes:
* Deprecates `bbp_get_theme_compat_templates()` for a singular version
* Introduces `bbp_get_theme_canvas_template()` to retrieve a filtered path to `theme-canvas.php`
* Introduces `bbp_get_template_include_templates()` to retrieve a filtered array of checker & getter functions
* Simplifies `bbp_template_include_theme_supports()` into a foreach loop
* Simplifies `bbp_is_template_included()` usage inside of `bbp_template_include_theme_compat()` by removing the later check now that `404`'s are handled elsewhere
Props mikachan, robin-w, arafatjamil01, johnjamesjacoby.
Fixes #3487.
In trunk, for 2.7.
|
| [7393]
|
johnjamesjacoby
|
Common - Formatting: Properly fallback the UTF8/mb display name formatter.
This change prevents deprecation notices when more modern UTF8 handling is available, preventing unnecessarily falling back to `seems_utf8()`.
Follow-up to r7364.
See #2141.
In trunk, for 2.7.
|
| [7392]
|
johnjamesjacoby
|
Common - Code Improvement: Correct some missing/inaccurate `@return` tags.
Props manhphuc.
See: https://github.com/bbpress/bbPress/pull/39
In trunk, for 2.7.
|
| [7391]
|
johnjamesjacoby
|
Common - Code Improvement: Fix a missing `@since` tag.
Props manhphuc.
See: https://github.com/bbpress/bbPress/pull/38
In trunk, for 2.7.
|
| [7390]
|
johnjamesjacoby
|
Common - Code Improvement: remove HTML4 `type` attribute on `<script>` tag.
This changes `bbp_swap_no_js_body_class()` so the `script` tag it outputs no longer includes a `type="text/javascript" attribute.`
See #wp59883.
In trunk, for 2.7.
|
| [7389]
|
johnjamesjacoby
|
API - Blocks: Do not use the block editor for bbPress post types.
This commit ensures that the legacy (non-block, meta-box based) new/edit post GUI is still used, even though `show_in_rest` is set to `true` for the forum/topic/reply post types, by introducing a new function on top of the core `use_block_editor_for_post_type` filter.
This prevents admin-area edits from saving block-based content when it is not yet properly handled or supported for the 2.7.0 release, even though blocks are (via the shortcodes & theme compatibility APIs).
See #3403.
In trunk, for 2.7.
|
| [7388]
|
johnjamesjacoby
|
API - Blocks: fix supported post types.
This commit reverts most of r7387 for a simpler approach.
See #3403.
In trunk, for 2.7.
|
| [7387]
|
johnjamesjacoby
|
API - Blocks: add support for Post and Page post types.
This commit ensures that both of the primary post types supported by WordPress core are explicitly supported by all blocks in their `block.json` files.
See #3403.
In trunk, for 2.7.
|
| [7386]
|
johnjamesjacoby
|
Admin - Metaboxes: Enshorten metabox titles.
This commit ensures that metabox titles do not break onto 2 lines of text now that `show_in_rest` is true and the new editor UI is being used.
See #3603.
In trunk, for 2.7.
|
| [7385]
|
johnjamesjacoby
|
Common Functions: avoid PHP warnings in logout URL.
This commit checks that server globals are not empty before attempting to concatenate them into a redirection destination.
See https://bbpress.org/forums/topic/assistance-with-various-php-errors-please/
In trunk, for 2.7.
|
| [7384]
|
johnjamesjacoby
|
API - Blocks: Improve block previews
This commit attempts to improve the look of form elements & template notices in block previews.
See #3403.
In trunk, for 2.7.
|
| [7383]
|
johnjamesjacoby
|
API - Blocks: Introduce support for Gutenberg blocks.
This commit includes:
* `bbp_register_blocks` sub-action
* `common/blocks.php` to register all of the blocks via PHP
* `common/blocks` directory that includes a subdirectory for each `block.json` file
* `admin/assets/js/blocks.js` to add block previews & preliminary support for some controls
* `admin/assets/css/blocks.css` to help block previews look modern & clean
Fixes #3403.
In trunk, for 2.7.
Props georgestephanis, adamsilverstein, SirLouen, johnjamesjacoby.
|
| [7382]
|
johnjamesjacoby
|
General - Administration: add "loaded" hooks to admin classes.
This change allows third-party plugins access to various class objects after they are loaded, specifically their `$this` references in their related `setup_actions()` methods.
In trunk, for 2.7.
Fixes #3660.
|
| [7381]
|
johnjamesjacoby
|
Tools - Code Improvement: un-indent last remaining `_get_` functions.
|
| [7380]
|
johnjamesjacoby
|
Tools - Code Improvement: docs & code formatting improvements.
Props johnjamesjacoby, noruzzaman.
Fixes #3659.
|
| [7379]
|
johnjamesjacoby
|
Tools - Code Improvement: stop ignoring these PHPCS sniffs:
* PEAR.Files.IncludingFile.UseRequire
* PSR2.ControlStructures.SwitchDeclaration.BodyOnNextLineDEFAULT
* PSR2.Methods.FunctionClosingBrace.SpacingBeforeClose
* Squiz.ControlStructures.ControlSignature.NewlineAfterOpenBrace
* Squiz.PHP.DisallowMultipleAssignments.FoundInControlStructure
* Squiz.PHP.EmbeddedPhp.MultipleStatements
* Squiz.PHP.NonExecutableCode.Unreachable
* Universal.Arrays.DuplicateArrayKey.Found
* Universal.ControlStructures.DisallowLonelyIf.Found
* WordPress.PHP.NoSilencedErrors.Discouraged
This commit includes code formatting changes for the above sniffs.
See #3658.
|
| [7378]
|
johnjamesjacoby
|
Tools - Code Improvement: stop ignoring these PHPCS sniffs:
* Generic.CodeAnalysis.AssignmentInCondition.FoundInWhileCondition
* Generic.CodeAnalysis.EmptyStatement.DetectedElseif
* Generic.CodeAnalysis.EmptyStatement.DetectedIf
* Generic.CodeAnalysis.UselessOverridingMethod.Found
* Generic.ControlStructures.InlineControlStructure.NotAllowed
* Generic.Files.LineEndings.InvalidEOLChar
* Generic.Formatting.DisallowMultipleStatements.SameLine
* Generic.Formatting.SpaceAfterCast.TooMuchSpace
* Generic.Functions.OpeningFunctionBraceKernighanRitchie.ContentAfterBrace
* Generic.WhiteSpace.DisallowSpaceIndent.SpacesUsed
* NormalizedArrays.Arrays.ArrayBraceSpacing.SpaceAfterArrayOpenerMultiLine
* NormalizedArrays.Arrays.ArrayBraceSpacing.SpaceAfterArrayOpenerSingleLine
* NormalizedArrays.Arrays.ArrayBraceSpacing.SpaceBeforeArrayCloserMultiLine
* NormalizedArrays.Arrays.CommaAfterLast.MissingMultiLineCloserSameLine
* PEAR.Functions.FunctionCallSignature.CloseBracketLine
* PEAR.Functions.FunctionCallSignature.EmptyLine
* PEAR.Functions.FunctionCallSignature.Indent
* PEAR.Functions.FunctionCallSignature.MultipleArguments
* PHPCompatibility.FunctionUse.ArgumentFunctionsReportCurrentValue.NeedsInspection
* PHPCompatibility.Syntax.RemovedCurlyBraceArrayAccess.Found
* PSR2.Classes.ClassDeclaration.CloseBraceAfterBody
* PSR2.Classes.PropertyDeclaration.ScopeMissing
* PSR2.Classes.PropertyDeclaration.Underscore
* PSR2.Classes.PropertyDeclaration.VarUsed
* PSR2.ControlStructures.ElseIfDeclaration.NotAllowed
* PSR2.ControlStructures.SwitchDeclaration.BreakIndent
* PSR2.Methods.MethodDeclaration.Underscore
* Squiz.ControlStructures.ControlSignature.SpaceAfterCloseBrace
* Squiz.Functions.FunctionDeclarationArgumentSpacing.SpacingAfterOpen
* Squiz.Functions.FunctionDeclarationArgumentSpacing.SpacingBeforeClose
* Squiz.Functions.MultiLineFunctionDeclaration.ContentAfterBrace
* Squiz.PHP.DisallowSizeFunctionsInLoops.Found
* Squiz.Scope.MethodScope.Missing
* Squiz.WhiteSpace.SuperfluousWhitespace.EndLine
* Universal.NamingConventions.NoReservedKeywordParameterNames.arrayFound
* Universal.NamingConventions.NoReservedKeywordParameterNames.echoFound
* Universal.NamingConventions.NoReservedKeywordParameterNames.parentFound
* Universal.Operators.DisallowStandalonePostIncrementDecrement.PostDecrementFound
* Universal.Operators.DisallowStandalonePostIncrementDecrement.PostIncrementFound
* Universal.Operators.StrictComparisons.LooseEqual
* Universal.Operators.StrictComparisons.LooseNotEqual
* WordPress.Arrays.ArrayKeySpacingRestrictions.TooMuchSpaceAfterKey
* WordPress.DateTime.CurrentTimeTimestamp.Requested
* WordPress.DateTime.RestrictedFunctions.date_date
* WordPress.Files.FileName.NotHyphenatedLowercase
* WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedClassFound
* WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedConstantFound
* WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound
* WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound
* WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound
* WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase
* WordPress.PHP.IniSet.Risky
* WordPress.PHP.PregQuoteDelimiter.Missing
* WordPress.PHP.StrictInArray.MissingTrueStrict
* WordPress.WP.AlternativeFunctions.parse_url_parse_url
* WordPress.WP.AlternativeFunctions.rand_mt_rand
* WordPress.WP.AlternativeFunctions.strip_tags_strip_tag
* WordPress.WP.AlternativeFunctions.strip_tags_strip_tags
* WordPress.WP.Capabilities.Unknown
* WordPress.WP.DeprecatedParameters.Get_termsParam2Found
* WordPress.WP.DeprecatedParameters.Wp_count_termsParam2Found
* WordPress.WP.DiscouragedFunctions.query_posts_query_posts
* WordPress.WP.DiscouragedFunctions.wp_reset_query_wp_reset_query
* WordPress.WP.EnqueuedResourceParameters.NotInFooter
* WordPress.WP.GlobalVariablesOverride.Prohibited
* WordPress.WP.I18n.LowLevelTranslationFunction
This commit includes code formatting changes for the above sniffs.
See #3658.
|
| [7377]
|
johnjamesjacoby
|
Tools - Code Improvement: stop ignoring more PHPCS sniffs.
* WordPress.WP.AlternativeFunctions.rand_mt_rand
This commit prefers `wp_rand()` over `mt_rand()` in the Akismet extension.
See #3658.
|
| [7376]
|
johnjamesjacoby
|
Tools - Code Improvement: stop ignoring more PHPCS sniffs.
* Universal.WhiteSpace.CommaSpacing.TooMuchSpaceAfter
* WordPress.Arrays.ArrayIndentation.ItemNotAligned
* WordPress.Arrays.ArrayIndentation.MultiLineArrayItemNotAligned
* WordPress.Arrays.ArrayKeySpacingRestrictions.NoSpacesAroundArrayKeys
* WordPress.Arrays.ArrayKeySpacingRestrictions.SpacesAroundArrayKeys
* WordPress.Arrays.MultipleStatementAlignment.MultilineItemSpaceBeforeDoubleArrow
* WordPress.Arrays.MultipleStatementAlignment.SpaceBeforeDoubleArrow
This commit includes code formatting changes to pass the above PHPCS checks.
See #3658.
|
| [7375]
|
johnjamesjacoby
|
Tools - Code Improvement: stop ignoring some MySQL prepare sniffs.
This commit ensures that all SQL is correctly prepared, and that specific queries are tagged to be ignored by PHPCS due to them not using the literal `$wpdb` global as required by the sniffs.
See #3658.
|
| [7374]
|
johnjamesjacoby
|
Tools - Code Improvement: stop ignoring `WordPress.Arrays.ArrayDeclarationSpacing.ArrayItemNoNewLine` sniff.
This commit ensures that all arrays with multiple keys & values are not on single lines.
|
| [7373]
|
johnjamesjacoby
|
Tools - Code Improvement: stop ignoring `Universal.WhiteSpace.PrecisionAlignment.Found` sniff.
This change removes any precision alignment that used spaces instead of tabs.
|
| [7372]
|
johnjamesjacoby
|
Tools - Code Improvement: stop ignoring `Universal.WhiteSpace.DisallowInlineTabs.NonIndentTabsUsed` sniff.
This change replaces inline tabs with spaces from a bunch of files where they have crept in over the years.
|
| [7371]
|
johnjamesjacoby
|
Tools - Code Improvement: bump PHP & WP versions.
This change bumps the requirements for WordPress to 6.0 and PHP to 7.2, including inside of the PHPCS matrix.
|
| [7370]
|
johnjamesjacoby
|
Tools - Unit Tests: update `test_bbp_spam_topic()` with more accurate before/after tests.
This commit ensures that the `test_bbp_spam_topic()` tests pass, and that the various counts, and last IDs and times before & after spamming a topic, are operating as intended.
See #3657.
|
| [7369]
|
johnjamesjacoby
|
Tools - Unit Tests: update `bbp_get_forum_permalink()` to better support hierarchical URIs.
This commit ensures that the `test_bbp_get_forum_permalink()` test passes, and that hierarchical Forum post-type links are correctly formatted when using unpretty/plain permalinks.
See #3657.
|
| [7368]
|
johnjamesjacoby
|
Tools - Unit Tests: allow mentions after '[' and '(' chars.
This commit fixes the suite of user-mentions unit tests, so that they no longer require an empty "class" attribute, and also so that mentions inside of common wrappers (`()`, `[]` ) are allowed.
See #3657.
|
| [7367]
|
johnjamesjacoby
|
Tools - Unit Tests: plan for `seems_utf8()` to be deprecated.
This commit updates 3 author-link unit tests to avoid WordPress Deprecation notices.
See #3657.
|
| [7366]
|
johnjamesjacoby
|
Tools - Unit Tests: prevent double-spaces in span attributes.
This commit prevents the `<span>` that wraps author link parts from having 2 spaces immediately after the opening tag.
|
| [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.
|