Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API function/method: Get all WPSEO related capabilities #9365

Merged
merged 5 commits into from Sep 6, 2018

Conversation

JoryHogeveen
Copy link
Contributor

@JoryHogeveen JoryHogeveen commented Mar 27, 2018

Summary

This PR can be summarized in the following changelog entry:

  • Add API function to get all WPSEO related capabilities.
    Props to: JoryHogeveen

Relevant technical choices:

Used the capability manager class instance.

Test instructions

This PR can be tested by following these steps:

Call the function. It should return the following:
Array ( [0] => wpseo_bulk_edit [1] => wpseo_edit_advanced_metadata [2] => wpseo_manage_options )

Quality assurance

  • I have tested this code to the best of my abilities
  • I have added unittests to verify the code works as intended

Fixes #9300

@JoryHogeveen
Copy link
Contributor Author

JoryHogeveen commented Apr 10, 2018

For reference:

@moorscode mentioned https://github.com/Yoast/wordpress-seo/blob/trunk/wp-seo-main.php#L170-L174 as a difference in code order.
The last commit made this more in line with wp-seo-main logic.

This function shouldn't call add() from the capability factory because that method adds the capabilities to the roles which is not the purpose of this function.

@JoryHogeveen JoryHogeveen mentioned this pull request Apr 11, 2018
18 tasks
@JoryHogeveen
Copy link
Contributor Author

Note: Since 7.3 is out the version tag for this function should be updated before merging.

JoryHogeveen added a commit to JoryHogeveen/view-admin-as that referenced this pull request May 2, 2018
@afercia
Copy link
Contributor

afercia commented Sep 6, 2018

CR 👍

Of course, the @since notation should be updated before merge.

updated @SInCE to 8.3 of wpseo_get_capabilities()
@Dieterrr
Copy link
Contributor

Dieterrr commented Sep 6, 2018

Acceptance done 👍
Updated @since to 8.3.

@Dieterrr Dieterrr merged commit ee304ee into Yoast:trunk Sep 6, 2018
@Dieterrr Dieterrr added this to the 8.3 milestone Sep 6, 2018
@JoryHogeveen JoryHogeveen deleted the patch-2 branch September 6, 2018 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants