[6767]
|
johnjamesjacoby
|
Importers: `setup_globals()` is a public method.
This change fixes a bug with the vBulletin importer causing it not to run.
See r6766 for the vBulletin3 equivalent.
|
[6766]
|
johnjamesjacoby
|
Importers: `setup_globals()` is a public method.
This change fixes a bug with the vBulletin3 importer causing it not to run.
|
[6763]
|
johnjamesjacoby
|
Converter: add inline documentation for `wp_insert_user()`.
This change adds an inline reminder about what `wp_insert_user()` does internally, so our future selves know at a glance why else a user might be skipped.
|
[6762]
|
johnjamesjacoby
|
Options: allow default option cache strategy to be filtered, without causing an intercept.
This change brings filter behavior back that was unintentionally removed in r6751.
|
[6761]
|
johnjamesjacoby
|
Options: Use new `$intercept` value in place of old `$strategy` value.
This change fixes an undefined variable debug notice introduced in r6751.
|
[6760]
|
johnjamesjacoby
|
Common: introduce `bbp_get_url_scheme()` to simplify 'https' vs 'http' scheme concatenation.
This change improves code flow and reduces complexity by eliminating the number of inline `is_ssl()` checks necessary when URLs are being generated.
|
[6759]
|
johnjamesjacoby
|
Reset: DRY out the `bbp_admin_reset_database()` logic.
This change introduces a helper function for running queries and producing user feedback based on those results. It also introduces a `Skipped` result if the query is invalid or empty. Ultimately, this results in fewer repeated lines of code, fewer reused local variables, and an easier to understand code flow.
An old, leftover routine for removing `forum-mod` taxonomy terms was also removed, as that approach was abandoned during the 2.6 development cycle but was missed when other refactoring was done.
|
[6758]
|
johnjamesjacoby
|
Ajax: introduce `bbp_ajax_headers()` abstracted from `bbp_do_ajax()`.
This change makes it possible to send the proper & expected headers in custom theme-side AJAX implementations.
|
[6757]
|
johnjamesjacoby
|
Sub-actions: bail on completely invalid/empty get/post requests.
This change ensures that non-empty actions (sanitized via `sanitize_key()`) will not make their way into the get/post request actions.
This is in addition to similar checks added to AJAX requests in r6755.
|
[6756]
|
johnjamesjacoby
|
Inline documentation improvements from r6755.
|
[6755]
|
johnjamesjacoby
|
Ajax: send a proper `400` response when nothing happens.
This change adds nocache and noindex headers to theme-side AJAX handling, adds support for pre-sanitized `$action` parameters, and checks that the action-hook actually has actions hooked to it before attempting to execute it.
Similar to `admin-ajax.php` a `400` response is now returned when an AJAX request is attempted that does not have a handler.
|
[6754]
|
johnjamesjacoby
|
Moderation: pass `$content` into `comment_max_links_url` filter.
This changes brings parity to changes made in WordPress 4.7.0.
Fixes #3141.
|
[6753]
|
johnjamesjacoby
|
Duplicates: check `post_author` argument instead of current user.
This change brings duplicate checking up to speed with flood and blacklist checks by preferring `user_can()` over `current_user_can()`, and plays a bit more friendly with anonymous author IDs.
Props r-a-y. Fixes #3186.
|
[6752]
|
johnjamesjacoby
|
Intercept: invert comparison in `bbp_is_intercepted()`.
I was testing it to make sure it worked correctly, and forgot to switch it back before r6751.
See #3184.
|
[6751]
|
johnjamesjacoby
|
Intercept: first pass intercept API.
This change introduces 3 new functions for generating a default intercept value and comparing against it in specific places. If the return value differs from the default intercept value, we know that function call was intercepted by a filter, and that value will become the new return value without executing the remaining part of the function.
See #3184.
|
[6750]
|
johnjamesjacoby
|
Admin: split reset handler into 2 functions (handler and logic)
This change improves compatibility with future WP CLI initiatives, specifically allowing removing all bbPress data.
Fixes #3173. Props espellcaste.
|
[6747]
|
johnjamesjacoby
|
Update more engagements documentation.
Fixes #3177. Props espellcaste.
|
[6746]
|
johnjamesjacoby
|
Update engagements documentation.
Fixes #3176. Props espellcaste.
|
[6745]
|
johnjamesjacoby
|
URLs: Audit the usage of `trailingslashit()`.
This change ensures that trailing slashes are only used at the end of URLs where they're expected, and avoids adding slashes at the end of URLs when permalinks are configured not to include them.
See #3181.
|
[6744]
|
johnjamesjacoby
|
CSS cleanup from r6743.
|
[6743]
|
johnjamesjacoby
|
Styling tweaks for improved Twenty Seventeen theme support.
|
[6742]
|
johnjamesjacoby
|
Anonymous: cleanup from r6741.
|
[6741]
|
johnjamesjacoby
|
Anonymous: remove escaped placeholders from `$where` clause of duplicate check.
This change fixes a bug for versions of WordPress 4.8.3 and higher, that was causing the anonymous email comparison to use the placeholder text instead of the raw email address, but only when an email address contained a `%` character.
Also use the correct return variant, and make sure the output is escaped.
|
[6740]
|
johnjamesjacoby
|
Anonymous: remove `sanitize_comment_cookies()` call.
This was causing repeated comment cookie sanitization on each subsequent page load.
|
[6739]
|
johnjamesjacoby
|
Engagements: include `BBP_User_Engagements_Term` class, as term storage example.
This change includes an alternative storage mechanism for engagements. Meta is used by default, but using Taxonomies and Terms for storage instead may be more appealing to certain installation types.
A few related functions were updated to use newer abstractions. See #459.
|
[6738]
|
johnjamesjacoby
|
Args: pass default parameters into filters in `bbp_parse_args()`.
This change allows conditional filtering of parsed arguments based on the arguments originally passed in.
|
[6737]
|
johnjamesjacoby
|
Anonymous Users: improve styling for anonymous topic/reply author boxes.
This change wraps anonymous author data in `span` elements where `a` elements would normally be used for registered users, and tweaks the default template-pack CSS to accomodate these new elements.
|
[6736]
|
johnjamesjacoby
|
Use correct filter key in `bbp_get_author_link()`. See r6735.
|
[6735]
|
johnjamesjacoby
|
Strings: remove escaped single quotes from profile/website link attributes.
Also normalize the approach used in these 3 similar functions.
|
[6734]
|
johnjamesjacoby
|
Abstraction: abstract site switching functions to include an `is_mulitsite()` check.
This allows functions that are traditionally hook-only to be called directly, regardless of the installation type, and without littering the codebase with several `is_multisite()` switches.
Fixes #3179.
|
[6730]
|
johnjamesjacoby
|
Admin: fix filter load order for PHP 7.1 compat.
|
[6729]
|
johnjamesjacoby
|
Labels: Update post type & taxonomy labels to latest keys.
This change updates forum, topic, topic-tag, and reply labels to include all of the most recent additions to their `labels` registration arguments. It also switches to the escaped gettext variant functions to match existing standards.
|
[6728]
|
johnjamesjacoby
|
Allow a custom redirect destination in the reply form.
(Specifically for shortcode or third-party plugin usage.)
See r3450.
|
[6727]
|
johnjamesjacoby
|
Subscriptions: Avoid empty `include` statement in `bbp_get_email_addresses_from_user_ids()` call.
This change ensures that if no user IDs are gathered as part of the limited chunk, the loop will continue and avoid a costly `get_users()` call.
See r6725.
|
[6726]
|
johnjamesjacoby
|
Uncomment my debug cruft. Antiprops jjj. See r6725.
|
[6725]
|
johnjamesjacoby
|
Subscriptions: Introduce `bbp_get_email_addresses_from_user_ids()` to chunk `get_users()` calls.
This changes the strategy used when querying for subscribed users so that not of them are queried at the same time, which could cause timeouts or out-of-memory issues when there are many users subscribed to a forum or topic.
By default, users are now queried in `100` user increments, and each 100 user chunk of email addresses gets merged into 1 large array and returned. The `100` default also has a filter, so it's somewhat configurable. Duplicate email addresses are strictly avoided, and user ID filters were moved to after the current user ID is removed from the array, which allows for third party plugins to add them back in if they'd like to include them.
See #3068.
|
[6724]
|
johnjamesjacoby
|
Widgets: normalize login widget output.
This change makes sure these two forms are using the same field attributes.
|
[6723]
|
johnjamesjacoby
|
Engagements: abstract meta strategy into an overload'able class.
This change introduces a class and wrapper function to allow the `meta` strategy of the new user engagements API to be hot-swapped. This might be helpful on large installations where a dedicated database table makes more sense, or for integrations where features like "Favorites" or "Subscriptions" might already be delegated to other third-party membership plugins. Now, the caller class can be filtered to one that includes custom methods.
See #3068.
|
[6722]
|
johnjamesjacoby
|
Formatting: Use `mb_substr()` where appropriate.
This change ensures that strings which are known to contain or allow for multibyte characters are allowed to do so (in excerpts and a few server globals.)
Fixes #3170. Props it4life.
|
[6721]
|
johnjamesjacoby
|
Replies: Update tests for `test_bbp_get_reply_position()`.
This change makes sure that updating a reply position to zero is still possible, also ensuring that tests continue to pass as expected.
|
[6720]
|
johnjamesjacoby
|
Topic Tags: Check for post ID when checking `assign_topic_tags`.
This change adds a fallback value for the standard `assign_terms` capability check, and fixes a few test errors introduced in r6714.
|
[6719]
|
johnjamesjacoby
|
Common: remove redundant calls to `bbp_number_not_negative()`.
This change decreases the filter priority of out-of-range prevention from `10` to `8`, and also adds filters to pre-formatted values in lieu of hard-coding this function into each individual count getter. This allows plugins to unplug this check more easily, and makes sure each value is only checked once for each call instead of occasionally twice in a row.
|
[6718]
|
johnjamesjacoby
|
Forums: make sure topic & reply counts are proper integers for `_n()` usage.
This change fixes a bug where formatted strings would cause an incorrect singular and plural string assignment, in forums that had over 1k posts.
|
[6717]
|
johnjamesjacoby
|
Replies: performance optimization to `bbp_update_reply_position()`.
This change uses `wpdb::update()` instead of `wp_update_post()` and juggles the `bbp_clean_post_cache()` filter, retaining object caches of related posts and queries, and also removes other unintended `edit_post` action interference.
Fixes #3169.
|
[6716]
|
johnjamesjacoby
|
Converter: Remove duplicate `class` attribute on DB password field.
|
[6715]
|
johnjamesjacoby
|
Tools: Remove quotes from prepared query statements.
Also use the same `esc_like()` result in 2 matched queries.
Props jrf. Fixes #3168.
|
[6714]
|
johnjamesjacoby
|
Capabilities: first pass at single topic-tag cap mappings.
This change adds IDs where appropriate, and introduces single term cap checks with intelligent comparisons that match the approach used by forums, topics, and replies.
* Inactive users cannot assign, manage, edit, or delete
* Moderators can assign, manage, edit, and delete
* Participants can assign
* Spectators & Blocked users still cannot manipulate topic tags in any way
This prepares bbPress for third-party plugins to leverage topic-tags in ways it otherwise wasn't prepared to do.
See #3167.
|
[6713]
|
johnjamesjacoby
|
Capabilities: prevent edits when past the edit-lock time.
This change increases the priority of the `moderator` check, so that moderators are not subjected to edit-lock restrictions, and maps to `do_not_allow` for topic/reply authors who normally can edit but are now beyond the allotted time period.
Fixes #3164. Props SergeyBiryukov.
|
[6712]
|
johnjamesjacoby
|
Fix documentation typos.
|
[6711]
|
johnjamesjacoby
|
Common: add some sanity checks to cache priming helpers.
This change adds more checks to avoid caching post & post author data that may have been deleted since the IDs were last sourced from the database.
We also remove a call to `get_post_field()` to reference the local object directly. This adds an `empty()` but removes a more complex function call when we already have the post in local scope anyways.
Fixes #3166. Props thebrandonallen.
|
[6710]
|
johnjamesjacoby
|
BuddyPress: improve targeting of single forum/topic filters.
This change simplifies the logic used when attaching-to and checking-for the current BuddyPress Group Forum & Topic pages, by conditionally filtering behind a singular `bp_is_group()` check.
Fixes #3165. Props thebrandonallen.
|
[6709]
|
johnjamesjacoby
|
Admin: run `admin.css` through `grunt commit` routine.
This adds a missing Webkit CSS shim for how the bbPress logo is vertically aligned in the new database upgrade notice.
|
[6708]
|
johnjamesjacoby
|
Users: use `bbp_set_user_role()` in `bbp_set_current_user_default_role()`.
This change makes sure forum users only have 1 forum role, subsequently calling the `bbp_set_user_role` filter where expected. This will fix a rare situation where a weird role map could cause the default role to be re-added.
|
[6707]
|
johnjamesjacoby
|
Update docblock of `bbp_set_user_role()`.
|
[6706]
|
johnjamesjacoby
|
Replies: introduce `bbp_get_public_reply_statuses()` to speed-up reply queries.
This change removes the `closed` post status from several reply-only queries, ensuring that query indexes are used effectively. It also brings parity to the Replies component that exists in both Forums & Topics.
|
[6705]
|
johnjamesjacoby
|
Admin: add an admin notice if database upgrade was skipped.
This change adds a persistent admin notice (who doesn't love those?) in the event that the forums are part of a large WordPress installation that prevented the automatic database upgrade routine from running.
Two links are provided: one to "Go Upgrade" and another to "Hide Forever". The first will take the user (with adequate capability) to the `Tools > Forums > Upgrade` screen; the second will delete the notice nag key from `wp_options`.
This includes some admin area CSS tweaks, so the asset version gets a bump as well.
|
[6704]
|
johnjamesjacoby
|
Admin: allow feedback dismissal to be optional in `bbp_admin_tools_feedback()`.
|
[6703]
|
johnjamesjacoby
|
Admin: Remove duplicate dismiss button from `bbp_admin_tools_feedback()`.
|
[6702]
|
johnjamesjacoby
|
Fix weird indentation in `bbp_get_admin_repair_tool_run_url()`.
|
[6701]
|
johnjamesjacoby
|
Update docblock for `bbp_update_post_family_caches()`. See #3163.
|
[6700]
|
johnjamesjacoby
|
Common: also prime post author caches.
This change introduces another performance tweak to `bbp_has_topics()`, `bbp_has_forums()`, `bbp_has_search()`, and `bbp_has_replies()`, by pre-cache'ing the post author objects for what is known to be their imminent usage in the current template loops.
This change also renames the function & parameter introduced in r6698 to better fit existing naming conventions in WordPress.
See #3163.
|
[6699]
|
johnjamesjacoby
|
Bump trunk to 2.6.0 RC 5.
|
[6698]
|
johnjamesjacoby
|
Common: prime last-active post caches.
This change introduces a performance tweak to `bbp_has_topics()`, `bbp_has_forums()`, and `bbp_has_search()`, pre-cache'ing the last-active post objects for what is known to be their imminent usage in the current template loops.
See #3163.
|
[6697]
|
johnjamesjacoby
|
Admin: prefer `implode()` over `join()`.
|
[6696]
|
johnjamesjacoby
|
BuddyPress: Do not record edit activity if revisions are off.
This change will prevent edits to topics & replies from creating new Activity Stream items, by obeying both the global setting and the post-type-supports properties of topics & replies. It also prevents activity stream items from being created when reply positions are recalculated on the fly.
|
[6695]
|
johnjamesjacoby
|
Options: break `Features` out from `Settings` section.
This change makes it easier to discern which options are features, and which are settings for those features.
Also updates the inline descriptions for several array items.
|
[6694]
|
johnjamesjacoby
|
Options: set default database version to `0`.
This change avoids race conditions with the updater when no version exists in the database. This would cause the database version to not be bumped, resulting in rewrite rules being needlessly flushed on each visit to `wp-admin`.
(Also tweak some nearby array values to make them easier to read.)
|
[6693]
|
johnjamesjacoby
|
Update `package-lock.json` with latest dependency order.
|
[6692]
|
johnjamesjacoby
|
Classes: add more author & moderator related CSS classes to helper functions.
This change adds classes to forums, topics, and replies where the respective author is also a moderator of the nearest parent forum.
See #459.
|
[6690]
|
johnjamesjacoby
|
Assets: Lint recent CSS & JS changes for password toggle.
This change makes the build process work again. :)
|
[6689]
|
johnjamesjacoby
|
Read-me & Humans updates:
* Add Sergey & Pippin
* Add dates to changelog
* Consolidate 2.0.0 betas into one release
* Update plugin descriptions
|
[6688]
|
johnjamesjacoby
|
Bump readme.txt versions and changelog.
|
[6687]
|
johnjamesjacoby
|
Tag 2.5.14.
|
[6686]
|
johnjamesjacoby
|
Bump 2.5 branch to 2.5.14.
|
[6685]
|
johnjamesjacoby
|
Query: use `NOT IN` strategy in `bbp_get_all_child_ids()`
This ensures that only specific post-statuses are explicitly excluded from "all child IDs" type queries, where previously post-statuses needed to be specifically defined.
See #3128. Fixes #3140. 2.5 branch, for 2.5.14.
|
[6684]
|
johnjamesjacoby
|
General: more PHP7.1 array fixes.
See #3031. 2.5 branch, for 2.5.14.
|
[6683]
|
johnjamesjacoby
|
Template: rework post class assignments.
This change avoids multiple reassignments to the same `$classes` variable name, and instead tries to name variables logically and merge them together when necessary. The performance difference is nil, as 'array_merge()` will perform similarly to how each array was reshaped when new classes would be added, but the human difference is only positive, from having clearer and easier to understand logic.
|
[6682]
|
johnjamesjacoby
|
Template: adjust escaping of pagination count strings.
This change fixes a regression (in trunk only) that caused the filtered results of pagination counts to always be late escaped, but the intention was really only to escape the output of `_n()` which does not have an escaped equivalent function in the Gettext API.
I also tweaked the logic in `bbp_get_topic_pagination_count()` to not bail early. This brings it inline with `bbp_get_forum_pagination_count()` and allows the filter to run even when the text string is empty. Flexibility is the goal, so skipping the filter was also unintentional, and is now fixed.
Fixes #3162.
|
[6681]
|
johnjamesjacoby
|
Converter: progress bars and percentages.
This change incorporates 2 horizontal bars in the importer header area. One indicates how far the current step has progressed, and the other indicates total progress. Pretty sweet.
Trunk, for 2.6.
|
[6680]
|
johnjamesjacoby
|
Pagination: abstract and normalize common functionality.
This change introduces a few new helper functions, and audits the links generated where loops of forums, topics, and replies are made visible. It addresses a number of edge-cases in the pagination code, including:
* `view=all` state not carrying over
* Total-page boundary maybe using the wrong value to calculate the total number of available pages
* Inconsistent output of values across post types and shortcodes
* Inability to filter pagination arguments in certain use cases
* Reduces code repetition and increases general happiness
Trunk, for 2.6.
|
[6679]
|
johnjamesjacoby
|
Converter: Improve `clean` logic when checking for deleted activity.
This change fixes a condition where meta-data is out-of-sync with posts or users, resulting in a false assignment of `true` when there actually is no data to delete, and no data has been deleted. Now when this happens, the converter will proceed as intended.
Trunk, for 2.6.
|
[6678]
|
johnjamesjacoby
|
Converter: Update the options labels and descriptions.
This change should bring increased clarity to what the converter options are for.
Trunk, for 2.6.
|
[6677]
|
johnjamesjacoby
|
Converter: Add toggle to show/hide the database password contents.
This change provides a relatively sane middle-ground for insecure content warnings in the converter, by providing a button to toggle the `password` field back and forth to a `text` field. Ideally, in the future, there will be a legitimate way to do this.
Trunk, for 2.6. See #3153.
|
[6676]
|
johnjamesjacoby
|
Content: Use correct `tabindex` array key vs. `tab`.
This change corrects a debug notice when the TinyMCE toolbar setting is toggled off.
Trunk, for 2.6. See r6424. Props vinod-dalvi.
|
[6675]
|
johnjamesjacoby
|
Users: first pass at forum role selection on invite/add-new.
This change adds the ability to set a specific forum role when adding a new user. If no valid role is found or saved, the default role will be used by default. There is likely more to do here, to ensure auto-role continues to work as intended as well.
Trunk, for 2.6. See: #3157.
|
[6674]
|
johnjamesjacoby
|
BuddyPress: Prefer `bbp_redirect()` in `bbp_maybe_create_group_forum_root()`
This change uses the new internal function as it's intended, and removes an additional `die;` usage.
Trunk, for 2.6.
|
[6673]
|
johnjamesjacoby
|
Common: cast return value to `array` in `bbp_pre_get_posts_normalize_forum_visibility()`.
Trunk, for 2.6. See #3031.
|
[6672]
|
johnjamesjacoby
|
Core: Add `source` parameter to API registrations.
This change makes it easier to target bbPress-specific post types & statuses, and taxonomies. `source` may not be the final key, but thankfully all of these APIs accept additional keys, and if support is added to core eventually, we can easily migrate over to it without problems.
Trunk, for 2.6. See: https://core.trac.wordpress.org/ticket/41739
|
[6671]
|
johnjamesjacoby
|
Converter: softer verbiage on the importer buttons.
This changes "Stop" to "Pause" and "Continue" to "Resume". This more accurately represents the actions these buttons perform, while also inspiring a bit more confidence that the converter can be halted and resumed at anytime.
Trunk, for 2.6.
|
[6670]
|
johnjamesjacoby
|
Converter: more OOP, specifically for the BBCode parser.
This change introduces a `bbcode_parser_properties` array to the base converter, allowing custom BBCode parser properties to be passed into the parent method via the child, minimizing the amount of code in each individual forum converter.
Trunk, for 2.6.
|
[6669]
|
johnjamesjacoby
|
Converter: use WordPress smiley URL & path in default `callback_html()` method.
This change makes sure that smiley paths and URLs are correctly converted inside of post content areas. Previous to this, the default `smiley/img.gif` path would be used, resulting in broken smiley images, even after conversion.
Trunk, for 2.6.
|
[6668]
|
johnjamesjacoby
|
Tools: include users with "unexpected" roles in `bbp_admin_repair_user_roles()`
This change makes sure that if a user has an unexpectedly missing or predictably broken role entry, they are still mapped to the `$default_role` for the current site, and fixes a problem with the role repair tool where users with the most broken roles were still never actually repaired.
Trunk, for 2.6.
|
[6667]
|
johnjamesjacoby
|
Roles: account for empty role in `bbp_set_current_user_default_role()`
This change makes sure that if a user's role does not match any known role, they still receive the default role for the site.
Trunk, for 2.6.
|
[6666]
|
johnjamesjacoby
|
Converter: reduce `meta_key` and `meta_value` length to `75`.
This change lowers the maximum allowed string length from `191` (which was used based on what's in WordPress core.) After further review, `75` is a reasonable maximum to try for now, though it could likely be tuned further if needed.
Trunk, for 2.6. Fixes #3145.
|
[6665]
|
johnjamesjacoby
|
Converter: use `esc_like()` to avoid debug notice when cleaning users.
This change runs the `_bbp_` `meta_key` prefix through `esc_like()`, ensuring that the subsequent `prepare()` call has a value passed into it.
Trunk, for 2.6.
|
[6664]
|
johnjamesjacoby
|
Tools: add optional `description` text to upgrade & repair tools.
This change hopefully adds some real-world context to otherwise mysterious functionality, in an attempt to better explain why any specific routine should be run vs. any others.
Trunk, for 2.6. See #3149.
|
[6663]
|
johnjamesjacoby
|
Converter: ensure UI state variables are correctly localized.
This change combines the new UI state variables into an array, so they retain their type-casting through the localization API. It also inverts the logic in 1 comparison to make sure the correct user feedback is displayed in its intended location.
Trunk, for 2.6. Props jrf. Fixes #3146.
|
[6662]
|
johnjamesjacoby
|
Converter: bind number-of-rows attribute to between 1 and 5000.
This change adds validation to ensure no unexpected number of database rows are queried, and also back-ports sanitization to database connection values from trunk.
2.5 branch, for 2.5.14. Props jrf. Fixes #3148.
|
[6661]
|
johnjamesjacoby
|
Converter: bind number-of-rows attribute to between 1 and 5000.
This change adds validation to ensure no unexpected number of database rows are queried.
Trunk, for 2.6. Props jrf. See #3148.
|
[6660]
|
johnjamesjacoby
|
Widgets: add `isset()` checks to checkbox attributes.
This change fixes debug notices when saving Topics & Replies widgets and `show_date` or `show_user` are not checked.
Trunk, for 2.6. Props jrf. Fixes #3142.
|