buddypress/tests/phpunit/assets
Mathieu Viet 3ca4e1da5b Improve BP_Component methods relative to setting BP Rewrites
So far `BP_Component::add_rewrite_tags()`, 
`BP_Component::add_rewrite_rules()` & `BP_Component::add_permastructs()` 
were just firing hooks. Thanks to the BP Rewrites plugin we were able to 
test how we can use them to actually enjoy the WP Rewrite API in 
BuddyPress. Compared to what was tested in this feature as plugin, some 
improvements has been brought so that it's easier to benefit from the BP 
Rewrites API for custom components (analyzing the included PHPUnit tests 
can give BP plugin authors a preview about how to process).

Introduce the `BP_Component::pre_query()` method to avoid superfluous Post 
queries when a BuddyPress page is displayed.

The `src/bp-core/bp-rewrites.php` file has also been inited, this is the 
place where all Core component rewrites function will be placed.

Props r-a-y, johnjamesjacoby, boonebgorges

See #4954



git-svn-id: https://buddypress.svn.wordpress.org/trunk@13422 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
2023-02-15 10:23:05 +00:00
..
templates Pass extra args to template loading files. 2020-09-19 18:19:45 +00:00
attachment-extensions.php Improve PHP 8.2 compatibility 2023-02-10 03:12:09 +00:00
bp-rest-api-controllers.php Improve PHP 8.2 compatibility 2023-02-10 03:12:09 +00:00
bptest-xprofile-field-type.php Field Types can now declare supported features & field visibility 2021-03-21 14:17:21 +00:00
canola.jpg PHPUnit: fix failing tests about media 2021-02-06 19:15:14 +00:00
class-bptest-component.php Improve BP_Component methods relative to setting BP Rewrites 2023-02-15 10:23:05 +00:00
group-extensions.php Groups: Make sure BP_Group_Extension::widget_display() can be used 2016-06-27 03:07:47 +00:00
invitations-extensions.php Groups: Avoid a PHP 8.0 deprecated notice about optional function arg. 2020-11-19 12:50:44 +00:00
phpunit-wp-config.php Build/test tools: use GitHub Actions to run PHP unit tests 2021-05-14 05:23:02 +00:00
test-image-large.jpg PHPUnit: fix failing tests about media 2021-02-06 19:15:14 +00:00
upside-down.jpg Add Unit Tests for BP_Attachment_Avatar->shrink() and BP_Attachment_Cover_Image->fit() methods. 2015-10-03 21:55:08 +00:00