You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Admin_Page class may/should have the open_result_table() and close_result_table() methods to format the result into the table format.
template-table-open.php file template should exist at includes/Admin/Templates and should have the table opening tags.
template-table-close.php file template should exist at includes/Admin/Templates and should have the table closing tags.
template-result-row.php file template should exist at includes/Admin/Templates - this file will handle the formatting of the error/warning message into the table's row (<tr>) format using the script[type="text/template"] tags. The row format's columns can be as below:
Error/warning message
Error Type (error/warning)
Error/Warning Standard name (e.g., WordPress.XSS.EscapeOutput.OutputNotEscaped, and so on. )
File name and path - on which error/warning occurs
Line and Column numbers - on which error/warning occurs
open_result_table() method should includes the template-table-open.php template in it.
render_result_row() method should includes the template-result-row.php template in it.
close_result_table() method should includes the template-table-close.php template in it.
Admin_Page class will use the initialize_page() method(see Create Tools page #32). This method should call all three template functions to create the template markup in the admin footer with the admin_footer action.
open_result_table()
render_result_row()
close_result_table()
NOTE: On the fresh admin screen, the table not exist on the page, and once results are returned, the table will be created and rendered, but that will be handled in #84.
Tests Coverage
Automated Tests:
Write a test case for the Admin_Page::render_result_row().
Write a test case for the Admin_Page::open_result_table() and Admin_Page::close_result_table().
Write a test case to test the row template markup.
Manual Tests:
Once the user clicks the Check it! button, check if the proper HTML table and table row are showing up and appending on the screen.
Results/errors returned from each check should be shown in the tables in the Admin area on the
Dashboard >> Tools >> Plugin Checkpage.This issue is dependent on the following:
Acceptance Criteria
NOTE: Read description of #34 before checking below steps.
render_result_row()should available in theAdmin_Pageclass (this class is introduced in Create Tools page #32)constructor()method in theAdmin_AJAXclass which will take the$render_callbackvariable as a constructor parameter. (Admin_AJAXclass is introduced in Create AJAX function and triggers and handling of progress indicator for the user #34)Admin_Pageclass may/should have theopen_result_table()andclose_result_table()methods to format the result into the table format.template-table-open.phpfile template should exist atincludes/Admin/Templatesand should have the table opening tags.template-table-close.phpfile template should exist atincludes/Admin/Templatesand should have the table closing tags.template-result-row.phpfile template should exist atincludes/Admin/Templates- this file will handle the formatting of the error/warning message into the table's row (<tr>) format using thescript[type="text/template"]tags. The row format's columns can be as below:open_result_table()method should includes thetemplate-table-open.phptemplate in it.render_result_row()method should includes thetemplate-result-row.phptemplate in it.close_result_table()method should includes thetemplate-table-close.phptemplate in it.Admin_Pageclass will use theinitialize_page()method(see Create Tools page #32). This method should call all three template functions to create the template markup in the admin footer with theadmin_footeraction.open_result_table()render_result_row()close_result_table()NOTE: On the fresh admin screen, the table not exist on the page, and once results are returned, the table will be created and rendered, but that will be handled in #84.
Tests Coverage
Automated Tests:
Admin_Page::render_result_row().Admin_Page::open_result_table()andAdmin_Page::close_result_table().Manual Tests:
Check it!button, check if the proper HTML table and table row are showing up and appending on the screen.