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

Site Editor: Remove unused PHP code #36997

Merged
merged 4 commits into from
Dec 6, 2021
Merged

Conversation

Mamaduka
Copy link
Member

Description

Now that we have a custom Templates and Template Parts list page (#36379), there's no need to modify the default WP List Table.

PR removes unused filters and their callbacks.

How has this been tested?

  • PHP Unit tests should be passing.
  • There aren't any PHP notices in debug.log

Types of changes

Code Quality

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • I've tested my changes with keyboard and screen readers.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.
  • I've updated all React Native files affected by any refactorings/renamings in this PR (please manually search all *.native.js files for terms that need renaming or removal).

@Mamaduka Mamaduka self-assigned this Nov 30, 2021
@Mamaduka Mamaduka added [Feature] Site Editor Related to the overarching Site Editor (formerly "full site editing") [Type] Code Quality Issues or PRs that relate to code quality labels Nov 30, 2021
@noisysocks
Copy link
Member

Did this code ever make it to Core? Just checking we don't need to backport these changes.

@Mamaduka
Copy link
Member Author

Mamaduka commented Dec 3, 2021

@noisysocks,

I did search core and couldn't find these filters/callbacks.

Copy link
Contributor

@youknowriad youknowriad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code was useful when the "templates" and "template parts" menu were visible in WP Admin. It's not the case anymore so yeah it's dead code.

@youknowriad youknowriad added the Backport to WP 6.7 Beta/RC Pull request that needs to be backported to the WordPress major release that's currently in beta label Dec 3, 2021
@noisysocks
Copy link
Member

I rebased this to (hopefully) fix failing tests.

@noisysocks noisysocks merged commit 2b9d0e6 into trunk Dec 6, 2021
@noisysocks noisysocks deleted the remove/edit-site-unused-code branch December 6, 2021 02:43
@noisysocks noisysocks removed the Backport to WP 6.7 Beta/RC Pull request that needs to be backported to the WordPress major release that's currently in beta label Dec 6, 2021
@github-actions github-actions bot added this to the Gutenberg 12.2 milestone Dec 6, 2021
noisysocks pushed a commit that referenced this pull request Dec 6, 2021
* Site Editor: Remove unused PHP code

* Remove templates edit link tests

* Remove moved files

* Remove filters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Site Editor Related to the overarching Site Editor (formerly "full site editing") [Type] Code Quality Issues or PRs that relate to code quality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants