Changeset 10213
- Timestamp:
- 08/27/2020 07:46:52 AM (4 years ago)
- 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 86 86 } elseif ( $_POST && ! empty( $_POST['block-directory-test'] ) ) { 87 87 self::handle_test(); 88 89 88 90 } 89 91 ?> … … 163 165 } 164 166 167 168 169 170 171 172 173 174 175 176 177 178 179 165 180 protected static function plugin_is_in_block_directory( $slug ) { 166 181 $plugin = Plugin_Directory::get_plugin_post( $slug ); … … 194 209 } 195 210 196 if ( current_user_can( 'edit_post', $p ost->ID ) ) {211 if ( current_user_can( 'edit_post', $p->ID ) ) { 197 212 echo wp_nonce_field( 'block-directory-test-' . $plugin->ID, 'block-directory-test-nonce' ); 198 213 // translators: %s plugin title. 199 214 $disabled = ( wp_cache_get( "plugin-e2e-test-{$plugin->ID}", 'plugin-test' ) ? ' disabled="disabled"' : '' ); 200 215 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 201 222 } 202 223 … … 305 326 if ( !empty( $e2e_result ) ) { 306 327 echo '<h4>' . __( 'Test Results', 'wporg-plugins' ) . '</h4>'; 328 329 330 307 331 if ( 'true' === $e2e_result ) { 308 332 echo "<div class='notice notice-info notice-alt'><p>\n"; … … 532 556 return wp_mail( $user_email, $email_subject, $email_content, 'From: plugins@wordpress.org' ); 533 557 } 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 534 636 }
Note: See TracChangeset
for help on using the changeset viewer.