mirror of
https://github.com/WordPress/five-for-the-future.git
synced 2025-07-05 18:35:46 +03:00
Add code coverage report
This commit is contained in:
parent
0964167f12
commit
0e88966246
8 changed files with 111 additions and 367 deletions
|
@ -24,6 +24,8 @@ add_shortcode( '5ftf_my_pledges', __NAMESPACE__ . '\render_my_pledges' );
|
|||
/**
|
||||
* Register the post type(s).
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function register_custom_post_type() {
|
||||
|
@ -85,6 +87,8 @@ function register_custom_post_type() {
|
|||
* wouldn't be scheduled.
|
||||
*
|
||||
* @see https://dotorg.trac.wordpress.org/changeset/15351/
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
function schedule_cron_jobs() {
|
||||
if ( ! wp_next_scheduled( 'notify_inactive_contributors' ) ) {
|
||||
|
@ -95,6 +99,8 @@ function schedule_cron_jobs() {
|
|||
/**
|
||||
* Add columns to the Contributors list table.
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param array $columns
|
||||
*
|
||||
* @return array
|
||||
|
@ -113,6 +119,8 @@ function add_list_table_columns( $columns ) {
|
|||
/**
|
||||
* Render content in the custom columns added to the Contributors list table.
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param string $column
|
||||
* @param int $post_id
|
||||
*
|
||||
|
@ -392,6 +400,8 @@ function get_contributor_user_ids( $contributor_posts ) {
|
|||
/**
|
||||
* Only show the My Pledges menu to users who are logged in.
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param array $menu_items
|
||||
*
|
||||
* @return array
|
||||
|
@ -413,6 +423,8 @@ function hide_my_pledges_when_logged_out( $menu_items ) {
|
|||
/**
|
||||
* Render the My Pledges shortcode.
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
function render_my_pledges() {
|
||||
|
@ -586,6 +598,8 @@ function parse_contributors( $contributors, $pledge_id = null ) {
|
|||
|
||||
/**
|
||||
* Send an email to inactive contributors.
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
function notify_inactive_contributors() : void {
|
||||
$contributors = get_inactive_contributor_batch();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue