Some cleanup for the custom status module, as initial work to extend it. There were a few main changes:
The print_configure_view() function had a lot of responsibilities, embedded HTML, and indentation. I moved the two HTML sections (configure page, edit status page) into separate view files and simplified the function.
Fixed some PHPCS warnings from using $_GET and $_POST variables in print_configure_view() with some rewrites and some phpcs:ignores.
Updated i18n functions to their escaped versions (_e() → esc_html_e()) where appropriate.
Moved one string (ef_confirm_delete_status_string) from an embeded <script> tag to wp_localize_script().
Updated all array()s in the file to short syntax ([]). I did this automatically with PHP-CS-Fixer:
Description
This PR is currently based on @ingeniumed's work in https://github.com/Automattic/Edit-Flow/pull/734. Please review after that PR has been merged.
Some cleanup for the custom status module, as initial work to extend it. There were a few main changes:
The
print_configure_view()
function had a lot of responsibilities, embedded HTML, and indentation. I moved the two HTML sections (configure page, edit status page) into separate view files and simplified the function.Fixed some PHPCS warnings from using
$_GET
and$_POST
variables inprint_configure_view()
with some rewrites and somephpcs:ignore
s.Updated i18n functions to their escaped versions (
_e()
→esc_html_e()
) where appropriate.Moved one string (
ef_confirm_delete_status_string
) from an embeded<script>
tag towp_localize_script()
.Updated all
array()
s in the file to short syntax ([]
). I did this automatically with PHP-CS-Fixer:A lot of whitespace alignment changes were automatically made by my editor.
Steps to Test