[6564]
|
johnjamesjacoby
|
Settings: Use `$this->minimum_capability` in options page filter method.
This change keeps the filter inline with the mapped meta caps, should the minimum capability be renamed or changed.
|
[6565]
|
johnjamesjacoby
|
Authors: Use `bbp_get_fallback_display_name()` instead of "Anonymous".
This change uses the new function introduced in r6562 to allow the fallback display name to be filtered, and passes the relative topic or reply ID in for additional context.
|
[6566]
|
johnjamesjacoby
|
Adimn: Fix some formatting in PHPDoc blocks.
|
[6567]
|
johnjamesjacoby
|
Users: Check for ability to edit before falling back to `publish`.
This change prioritizes a user's ability to edit a forum/topic/reply over the fallback to the ability to publish, allowing per-forum moderators the ability to access the relative theme-side forms.
|
[6568]
|
johnjamesjacoby
|
Revert part of r6567, and instead skip the page condition completely.
This makes sure that forms are made available to moderators regardless of the page condition, and fixes a situation where per-forum moderators couldn't publish to forums or topics that were closed.
|
[6569]
|
johnjamesjacoby
|
Tests: Update private/hidden options on `bbp_insert_forum()` calls.
This makes sure that tests pass when creating & toggling forum visibilities, fixing some tests related to private & hidden forum IDs and counts.
|
[6570]
|
johnjamesjacoby
|
Tests: Update forum visibility tests to use both approaches:
* Forum was created with a private/hidden status
* Forum was created public, but later changed to private/hidden
See r6569.
|
[6571]
|
johnjamesjacoby
|
Capabilities: Logic improvements to help with per-forum moderation.
* Introduce `moderate_forum` capability check, used to check if a user has the ability to moderate a specific forum
* Limit number of direct `keep_gate` checks, and use `bbp_is_user_keymaster()` where possible
* Make `bbp_is_user_forum_moderator()` check the new `moderate_forum` mapped capability
* Have the `moderate` mapped capability check `moderate_forum` if the `$args[0]` can be bubbled up to being a forum ID
* Map admin post-type areas to their appropriate `edit_` capabilities – they are now properly handled via other mapped conditions
This change (along with r6567 & r6569) allows private & hidden forums to appear in forums queries for users who can moderate them.
|
[6572]
|
johnjamesjacoby
|
Super Moderators: First pass at mapping the meta-capabilities.
This change hooks-up the ability for moderators to edit other users if the super moderator ability is allowed. <3
|
[6573]
|
johnjamesjacoby
|
Documentation: Remove all `@uses` usages.
Per the WordPress inline documentation standards:
> the @uses tag is not recommended to be used to indicate a used-by relationship, as this information can be derived through other means. These tags also are very likely to become out-of-date as our functions change over time.
|
[6574]
|
johnjamesjacoby
|
Super Moderators: Compare the user ID to `$args[0]` instead.
This change makes sure the proper user IDs are compared, and also prevents super moderators from editing Keymasters (demotions can't come from users with a less capable role than their own.)
|
[6575]
|
johnjamesjacoby
|
Super Moderators: prefer `edit_user` with an ID over `edit_users` without one.
This change makes sure we know exactly which user ID the user is trying to edit. In cases where there is no ID available, we'll try to guess at the displayed user ID, and if that's empty too, we'll do nothing.
This allows the "User Role" template part to load properly for Super Moderators.
|
[6576]
|
johnjamesjacoby
|
Forums: Use `bbp_get_forum_subforum_count()` in `bbp_forum_get_subforums()`.
This performance optimization will result in 1 less query per forum in the forums list that does not have subforums, by checking the subforum meta-data before trying to query for subforums that do not exist anyways.
This is less of an issue with a persistent object cache, but those without that luxury can now save those database queries for when they really matter.
|
[6577]
|
netweb
|
Build Tools: Update Autoprefixer supported browser matrix.
Following WordPress' implementation this new version hard codes IE 11 as a minimum, otherwise specifies either last 2 or last 1 based on https://make.wordpress.org/design/handbook/design-guide/browser-support/
|
[6578]
|
johnjamesjacoby
|
Theme: Put back vendor prefixes in default template pack styling.
|
[6579]
|
netweb
|
Humans: I like tacos 🌮
|
[6580]
|
johnjamesjacoby
|
Documentation: Typo fixes in users functions.
|
[6581]
|
johnjamesjacoby
|
Ajax: in `bbp_do_ajax()` use `wp_die()` instead of `die()` so any custom handlers are used.
|
[6582]
|
johnjamesjacoby
|
Globals: Use `bbp_get_global_object()` instead of touching `$wp_query` directly in template functions.
|
[6583]
|
johnjamesjacoby
|
Better 404 handling:
* Introduce `bbp_is_404` query var, and set this in places where the default 404 condition needs to be overridden
* Introduce `bbp_set_200()` for cases where a default of 404 needs to be set to a 200
* Introduce `bbp_get_wp_query()` helper for getting the `$wp_query` global
* Update `bbp_set_404()` to accept a `$query` parameter to make passing the query around easier
* Update child-ids queries to use the `last_changed` cache to reduce the amount of cache churn when cleaning
Fixes #3047. See #1973.
|
[6584]
|
johnjamesjacoby
|
Tests: Remove debug cruft from r6583.
|
[6585]
|
johnjamesjacoby
|
Cache: make `bbp_clean_post_cache()` an action-only function.
Instead of calling `bbp_clean_post_cache()` directly, we'll call `clean_post_cache()` as per normal and hook `bbp_clean_post_cache()` to the end of it. This reduces a bunch of superfluous cache invalidation from occurring back-to-back.
We'll also only ever update the `last_changed` cache key when we've reached the forum-root. This makes sure that subsequent recursive calls up the `post_parent` tree are dealing with the same `last_changed` value until the end.
This change will reduce the number of cache invalidation calls by a large amount, improving functional performance for database writes to the post & postmeta tables.
|
[6586]
|
johnjamesjacoby
|
404: Use `! empty()` over `isset()` to only account for `true` values in `bbp_is_404`.
This fixes broken `/edit/` theme-side URLs, that will redirect otherwise.
|
[6587]
|
johnjamesjacoby
|
Styling: Flatten the editor buttons, and force fieldset legend width & border.
This improves default theme compatibility.
|
[6588]
|
johnjamesjacoby
|
Styling: Clean-up default styling to pass style linting rules.
|
[6589]
|
johnjamesjacoby
|
Styling: Bump assets version & remove prefixes from default.css.
Prefixes are put back during build.
|
[6590]
|
johnjamesjacoby
|
Styling: No text shadow on editor buttons.
|
[6591]
|
johnjamesjacoby
|
Authors: Rejig author link functions.
* Allow for easier filtering of link sections
* Update default arguments to remove no-break space and `<br>`, and rely on styling instead
* Surrounding code clean-up
* Add escaping to display names in links
|
[6592]
|
johnjamesjacoby
|
Users: Add `user_url`, `user_registered`, and last-active to profiles.
Also divide profile page up into 2 sections: Profile & Forums.
|
[6593]
|
johnjamesjacoby
|
Tools: Use `delete_metadata()` to remove favs & subs without a `foreach` loop.
|
[6594]
|
johnjamesjacoby
|
Users: Offer the login form in place of topic/reply forms if user is logged out.
|
[6595]
|
johnjamesjacoby
|
Bump the asset version to latest revision.
|
[6596]
|
johnjamesjacoby
|
Bump to 2.6 RC 4.
|
[6597]
|
johnjamesjacoby
|
Tag 2.6 RC 4.
|
[6598]
|
johnjamesjacoby
|
Styling: No border on forums links.
An increasing number of themes are putting borders on links by default to simulate an underline, which causes every link in the forums to be styled in unanticipated ways.
This changeset ensures that links in the entry-content section in forums do not have faux-underlines or excessive attention drawn to them.
|
[6599]
|
johnjamesjacoby
|
Converter: Default values to `0` so converter starts correctly.
|
[6600]
|
johnjamesjacoby
|
Converter: Add `halt` setting for stopping the importer when an error occurs.
Next: implement in Converter.
|
[6601]
|
johnjamesjacoby
|
Admin/Converter: Lazy load admin & converter as needed.
* Move admin class into its own file
* Remove `admin.php`
* Introduce `_setup_` functions to make loading them on the fly easier
* Simplify converter logic for smoother starting/stopping
* Improved UI for timer/status updates
* Remove double-duty variables from `BBP_Converter` and response data
* Switch from text-only response value to JSON object for improved flexibility
This allows the converter to return more data, and makes it easier to work with that data.
Todo:
* Error responses
* Check that starts are bumping correctly inside of steps
* Better utilize JSON responses
|
[6602]
|
johnjamesjacoby
|
Admin: Remove obscure 'About bbPress' admin-bar link.
Nobody ever really used it, and less is more in this case.
|
[6603]
|
johnjamesjacoby
|
Admin: buzz & swoop.
|
[6604]
|
johnjamesjacoby
|
Admin: Use some JavaScript to spruce up the badge-animation.
@todo Update the "What's New" page contents.
|
[6605]
|
johnjamesjacoby
|
Styling: More aggressively remove borders on anchor elements.
Some themes very stubbornly insist on having shadows & lines around them.
|
[6606]
|
johnjamesjacoby
|
Widgets: Remove `nopaging` keys from widget queries.
This reverts part of r6506 that broke the `max_rows` setting of widgets.
Props thebrandonallen. See #3123.
|
[6607]
|
johnjamesjacoby
|
Queries: `nopaging` audit.
* In r6506 the `nopaging` query argument was added to various queries to avoid paginating results when it wasn't necessary. This resulted in a few queries (widgets mainly) not obeying their specific settings.
* In #3123, other inconsistencies in our query arguments were uncovered, triggering the need to audit our query usages and equalize them once again.
This change brings all queries back to par with one another, specifically in regards to `posts_per_page => -1` style queries, and queries where filters can be suppressed and meta/term caches should not be primed.
It also groups together the `get_user_object_ids` functions. These are now unused in bbPress proper, though were previously useful before the engagements API was in place. These queries are considered too inefficient to rely upon in large-scale applications, but are included to provide filterable wrappers should someone need them, or should we need to bring them back later.
Props thebrandonallen. Fixes #3123.
|
[6608]
|
johnjamesjacoby
|
Assets: Update admin CSS/JS to match lint rules, and update packages.
|
[6609]
|
johnjamesjacoby
|
Counts: Remove `count_user_posts()` usages, and always return an `int`.
User topic & reply counts haven't included `closed` status for topics, and these wrappers should include support for things like `view=all` later.
Fixes #3124.
|
[6610]
|
SergeyBiryukov
|
Counts: Fix typo in DB query in `bbp_get_user_reply_count_raw()`.
See #3124.
|
[6611]
|
johnjamesjacoby
|
Topics: Remove `bbp_get_user_closed_topic_count()`.
This was introduced in the 2.6 cycle to circumvent a problem from using `count_user_posts()`. Now that we're doing a direct query again, this function is no longer used.
See #6610.
|
[6612]
|
johnjamesjacoby
|
Queries: Use new `object_type` over old `post_type`.
When `bbp_get_user_object_ids()` was introduced, some helpers did not get updated to use the new argument key. This change fixes that, and fixes failing tests in the process.
Note that these tests are testing new & unused helper functions for 2.6, so it's unlikely any noticable problems occurred from these being broken.
|
[6613]
|
johnjamesjacoby
|
Subscriptions: Strip & decode email titles.
Props thebrandonallen. Fixes #2865.
|
[6614]
|
johnjamesjacoby
|
Subscriptions: Use `bbp_remove_all_filters()` with restore option.
This change uses the bbPress version of `remove_all_filters()` which allows those filters to be restored. We need to restore filters after emails are sent so that template titles & content render correctly within their respective templates.
See #6613.
|
[6615]
|
johnjamesjacoby
|
Template Packs: In default theme, only enqueue `editor.js` when `in_bbpress()`.
This results in 1 fewer external asset being enqueued on non-bbPress pages.
Fixes #2930.
|
[6616]
|
johnjamesjacoby
|
Subscriptions: Include `closed` status in subscription triggers.
This change allows activity in closed topics to trigger subscription emails. It also fully implements `bbp_get_subscribers()` completing the deprecation of topic/forum specific handlers.
Fixes #2729.
|
[6617]
|
SergeyBiryukov
|
Users: Check `promote_user` capability instead of `edit_user` before displaying "User Role" section in `form-user-edit.php`, for consistency with `bbp_profile_update_role()`.
Fixes #3126.
|
[6618]
|
johnjamesjacoby
|
Topics: prefer "started" over "created" for default theme verbiage.
|
[6619]
|
johnjamesjacoby
|
Users: Use `bbp_parse_args()` in user content loops.
This commit changes the function signatures of several wrappers for `bbp_has_` functions away from simply accepting a `$user_id` to accepting an array of arguments, in a fully backwards compatible way. It also updates the surrounding documentation to more accurately describe what is returned and why.
This allows the arguments used within these functions to be explicitly filtered, passively or aggressively overridden, or bypassed entirely.
|
[6620]
|
johnjamesjacoby
|
Search: Escape output of `bbp_search_terms()` and wire-up to `ts` and `rs`.
|
[6621]
|
johnjamesjacoby
|
Replies: Normalize `bbp_has_replies()` default search with `bbp_has_topics()`.
This brings parity to how these two functions handle default search parameters.
|
[6622]
|
johnjamesjacoby
|
Templates: Add form template parts for searching specifically for topics & replies.
These have been in-use on BuddyPress.org/bbPress.org for years, and will be useful in user-profiles soon.
Also use `bbp_search_terms()` in `form-search.php` now that it's properly escaping output.
|
[6623]
|
johnjamesjacoby
|
Users: First-pass search forms in profile content pages.
This commit makes it possible to search user profiles for specific topics & replies (styling still needed.)
|
[6624]
|
netweb
|
Build Tools: Switch to Ubuntu Trusty as the the default linux distro for Travis CI.
* This changeset also explicitly adds `dist: precise` to the PHP 5.2 and 5.3 build jobs.
* Travis CI will discontinue support of PHP 5.2 & 5.3 in September 2017 and a further follow up will be required.
Fixes #3127.
|
[6625]
|
netweb
|
Build Tools: Move PHP 5.2 and 5.3 Travis CI jobs from the `php` section to the `matrix` section.
This changeset is a follow up to [6624] where the "build matrix" was broken, my bad.
See #3127.
|
[6626]
|
netweb
|
Build Tools: Update `package.json` dependencies and `package-lock.json`
This changeset primarily updates the `package-lock.json` file to support the latest npm 5.1 and 5.2 releases.
• The format of the `package-lock.json` changed slightly with npm 5.1 to better support `devDependencies` dependencies.
• Explicitly update all dependencies to the latest available version.
• Updates `postcss-scss` to use semantic version _patch_ `~` in line with the other npm modules used.
See #3113.
|
[6627]
|
johnjamesjacoby
|
General: Make sure object `_get_` functions reach intended filters.
This retains existing behavior of bailing early and returning `null` if there is a `post_type` mismatch. Other similar functions would pass the `null` value through to the filter. These may do that eventually, but let's get these filters working first.
Fixes #3130.
|
[6628]
|
johnjamesjacoby
|
Separators: Normalize the `sep` arguments between functions.
This change also switches `bbp_list_forums()` to `implode()` links rather than concatenate the same `$output` string with an increasing number of items. This has the positive side-effect of moving the forum separator (a comma by default) out of individual links.
Props milindmore22. Fixes #2900.
|
[6629]
|
johnjamesjacoby
|
Search: Use correct `rs` request key.
Fixes a debug notice when searching replies inside of topics.
|
[6630]
|
johnjamesjacoby
|
Search: move `bbp_allow_search()` checks into form template parts.
This allows the inclusion of those forms without needing to wrap each inclusion statement in its own feature check, making search a more atomic and isolated feature within bbPress.
It also should conclude the development of the user content search functionality.
Because this involves some template-part changes to the "Default" template pack, users who have opted to override these parts in their own themes will not receive these updates (nor should they.) This is a known consequence of including template parts in themes, so while still not an ideal system, will not result in any breakage for existing sites.
|
[6631]
|
johnjamesjacoby
|
Converter: Add missing `_bbp_converter_convert_users` option key.
Prevents debug notices when also converting user accounts from other platforms.
|
[6632]
|
johnjamesjacoby
|
Converter: Clean user cache when converting a user's password field.
This makes sure the user object is pristine on the subsequent request to it, fixing possible race conditions with authentication errors.
|
[6633]
|
johnjamesjacoby
|
Converter: Use error control operator on `Internal_UpdateParamsForMissingEndTag()`
Avoids polluting the php error logs if position is not byref.
|
[6634]
|
johnjamesjacoby
|
Converter: Tweak description of `restart` setting to better hint at what it does.
|
[6635]
|
johnjamesjacoby
|
Converter: Don't use `delete_option()` on converter options.
Default option filters are breaking `update_option()` return values when options do not exist, so remove this optimization and save it for when a conversion is completed.
This needs more looking into.
|
[6636]
|
johnjamesjacoby
|
Converter: Update `bbp_converter_status()` to use current step.
When actually converting data, this step is only bumped when moving between major events, not minors.
|
[6637]
|
netweb
|
Build Tools: Add PHP 7.2 to Travis CI.
Fixes #3136.
|
[6638]
|
johnjamesjacoby
|
Converter: Introduce `update_query()` method, to help with updating the last query option.
This abstracts the `update_option()` approach for future scrutiny.
|
[6639]
|
johnjamesjacoby
|
Converter: Use `false` as the default value for some options.
This ensures that `default_option_` values are still overloadable when converting.
|
[6640]
|
johnjamesjacoby
|
Converter: Make it all work again!
* Send a response when a step is complete (to trigger the subsequent step)
* Remove `min` class variable, and use `start` everywhere instead
* Move giant step switch into a `steps` array instead (a lot more can be done here later)
* Break apart a few private methods to make the call stack easier to follow
* Store the `platform` for use in inherited objects later
This commit makes the converter work again, tested against a few large database dumps from several platforms to confirm.
|
[6641]
|
johnjamesjacoby
|
Scripts: Do not enqueue if not `is_bbpress()`.
This reduces the number of external scripts that are enqueued on non-bbPress pages. Put another way, it makes sure that bbPress styles & scripts are only loaded on pages where bbPress content is known to exist.
Fibes #3138. Props DJPaul.
|
[6642]
|
johnjamesjacoby
|
Docs: update the description of `bbp_get_default_role()`.
Fixes #3131.
|
[6643]
|
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.
|
[6644]
|
johnjamesjacoby
|
Topics: Introduce `bbp_get_non_public_topic_statuses()`
This new function returns the inverse post-statuses of `bbp_get_public_topic_statuses()` with a filter to help target them more specifically in places where it was not previously possible to do so.
See #3128.
|
[6645]
|
johnjamesjacoby
|
i18n: Improvements to `bbp_get_time_since()`.
Use `_n_noop()` to register year/month/week/day/hour/minute/second strings in advance and `_n()` to actually translate them.
Fixes #3139. Props SergeyBiryukov.
|
[6646]
|
SergeyBiryukov
|
i18n: Fix typo in text domain used for `_n()` in `bbp_get_time_since()`.
See #3139.
|
[6647]
|
johnjamesjacoby
|
Fix undeclared arrays for PHP 7.1 compatibility.
Props hellofromTonya. See #3031. (2.5 branch)
|
[6648]
|
johnjamesjacoby
|
Fix undeclared array in forum template functions for PHP 7.1 compatibility.
Props hellofromTonya. See #3031. (2.5 branch)
|
[6649]
|
SergeyBiryukov
|
i18n: Simplify [6645] with `translate_nooped_plural()`.
See #3139.
|
[6650]
|
SergeyBiryukov
|
Converter: Fix typo and improve wording of Database Settings section labels.
Props jrf.
Fixes #3143.
|
[6651]
|
netweb
|
Build Tools: Add debug echo for `TRAVIS_PHP_VERSION`
|
[6652]
|
netweb
|
Build Tools: Check for existence `xdebug.ini` using `phpenv` for Travis CI
|
[6653]
|
netweb
|
Build Tools: Run Travis-CI unit tests against WordPress 4.8.
|
[6654]
|
netweb
|
Build Tools: Fix copy pasta added in [6652]
|
[6655]
|
netweb
|
Build Tools: Add Composer packages to Travis CI cache
|
[6656]
|
netweb
|
Build Tools: Exclude Travis CI PHP 7.2 builds for WP 4.7 & 4.8, PHP 7.2 compat will WP 4.9.
|
[6657]
|
netweb
|
Build Tools: Use PHPUnit 6.x branch for Travis CI PHP 7.x jobs
|
[6658]
|
SergeyBiryukov
|
Converter: Clarify `status_counting` label in Import Monitor.
Props jrf.
Fixes #3147.
|
[6659]
|
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.
2.5 branch, for 2.5.14. Props jrf. See #3142.
|
[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.
|
[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.
|
[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.
|
[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.
|