Making WordPress.org

Changeset 10213

Timestamp:
08/27/2020 07:46:52 AM (4 years ago)
Author:
tellyworth
Message:

Plugin dir: add an email to alert block developers about test failures.

See #5303.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/shortcodes/class-block-validator.php

    r10204 r10213  
    8686            } elseif ( $_POST && ! empty( $_POST['block-directory-test'] ) ) {
    8787                self::handle_test();
     88
     89
    8890            }
    8991            ?>
     
    163165    }
    164166
     167
     168
     169
     170
     171
     172
     173
     174
     175
     176
     177
     178
     179
    165180    protected static function plugin_is_in_block_directory( $slug ) {
    166181        $plugin = Plugin_Directory::get_plugin_post( $slug );
     
    194209        }
    195210
    196         if ( current_user_can( 'edit_post', $post->ID ) ) {
     211        if ( current_user_can( 'edit_post', $p->ID ) ) {
    197212            echo wp_nonce_field( 'block-directory-test-' . $plugin->ID, 'block-directory-test-nonce' );
    198213            // translators: %s plugin title.
    199214            $disabled = ( wp_cache_get( "plugin-e2e-test-{$plugin->ID}", 'plugin-test' ) ? ' disabled="disabled"' : '' );
    200215            echo '<button class="button button-secondary button-large" type="submit" name="block-directory-test" value="test"' . $disabled . '>' . sprintf( __( 'Test %s', 'wporg-plugins' ), $plugin->post_title ) . '</button>';
     216
     217
     218
     219
     220
     221
    201222        }
    202223
     
    305326                if ( !empty( $e2e_result ) ) {
    306327                    echo '<h4>' . __( 'Test Results', 'wporg-plugins' ) . '</h4>';
     328
     329
     330
    307331                    if ( 'true' === $e2e_result ) {
    308332                        echo "<div class='notice notice-info notice-alt'><p>\n";
     
    532556        return wp_mail( $user_email, $email_subject, $email_content, 'From: plugins@wordpress.org' );
    533557    }
     558
     559
     560
     561
     562
     563
     564
     565
     566
     567
     568
     569
     570
     571
     572
     573
     574
     575
     576
     577
     578
     579
     580
     581
     582
     583
     584
     585
     586
     587
     588
     589
     590
     591
     592
     593
     594
     595
     596
     597
     598
     599
     600
     601
     602
     603
     604
     605
     606
     607
     608
     609
     610
     611
     612
     613
     614
     615
     616
     617
     618
     619
     620
     621
     622
     623
     624
     625
     626
     627
     628
     629
     630
     631
     632
     633
     634
     635
    534636}
Note: See TracChangeset for help on using the changeset viewer.