@@ -71,7 +71,8 @@ discard block |
||
| 71 | 71 | */ |
| 72 | 72 | private function constants() { |
| 73 | 73 | // Are we in debugging mode? |
| 74 | - if ( isset( $_GET['debugging'] ) ) { // phpcs:ignore |
|
| 74 | + if ( isset( $_GET['debugging'] ) ) { |
|
| 75 | +// phpcs:ignore |
|
| 75 | 76 | define( 'WP2D_DEBUGGING', true ); |
| 76 | 77 | } |
| 77 | 78 | |
@@ -373,7 +374,8 @@ discard block |
||
| 373 | 374 | * @todo esc_html |
| 374 | 375 | */ |
| 375 | 376 | public function check_pod_connection_status_callback() { |
| 376 | - if ( ! defined( 'WP2D_DEBUGGING' ) && isset( $_REQUEST['debugging'] ) ) { // phpcs:ignore |
|
| 377 | + if ( ! defined( 'WP2D_DEBUGGING' ) && isset( $_REQUEST['debugging'] ) ) { |
|
| 378 | +// phpcs:ignore |
|
| 377 | 379 | define( 'WP2D_DEBUGGING', true ); |
| 378 | 380 | } |
| 379 | 381 | |
@@ -32,7 +32,8 @@ |
||
| 32 | 32 | // Make sure we're in debug mode. |
| 33 | 33 | if ( defined( 'WP2D_DEBUGGING' ) && true === WP2D_DEBUGGING ) { |
| 34 | 34 | $d = ''; |
| 35 | - foreach ( debug_backtrace() as $dbt ) { // phpcs:ignore |
|
| 35 | + foreach ( debug_backtrace() as $dbt ) { |
|
| 36 | +// phpcs:ignore |
|
| 36 | 37 | extract( $dbt ); // phpcs:ignore |
| 37 | 38 | // Only trace back as far as the plugin goes. |
| 38 | 39 | if ( strstr( $file, plugin_dir_path( __DIR__ ) ) ) { |
@@ -806,7 +806,8 @@ discard block |
||
| 806 | 806 | $latest_post = end( $diaspora_post_history ); |
| 807 | 807 | |
| 808 | 808 | // Only show if this post is showing a message and the post is a fresh share. |
| 809 | - if ( isset( $_GET['message'] ) && $post->post_modified === $latest_post['created_at'] ) { // phpcs:ignore |
|
| 809 | + if ( isset( $_GET['message'] ) && $post->post_modified === $latest_post['created_at'] ) { |
|
| 810 | +// phpcs:ignore |
|
| 810 | 811 | printf( |
| 811 | 812 | '<div class="updated notice is-dismissible"><p>%1$s <a href="%2$s" target="_blank">%3$s</a></p></div>', |
| 812 | 813 | esc_html__( 'Successfully posted to diaspora*.', 'wp-to-diaspora' ), |
@@ -824,7 +825,8 @@ discard block |
||
| 824 | 825 | */ |
| 825 | 826 | public function ignore_post_error() { |
| 826 | 827 | // If "Ignore" link has been clicked, delete the post error meta data. |
| 827 | - if ( isset( $_GET['wp2d_ignore_post_error'], $_GET['post'] ) ) { // phpcs:ignore |
|
| 828 | + if ( isset( $_GET['wp2d_ignore_post_error'], $_GET['post'] ) ) { |
|
| 829 | +// phpcs:ignore |
|
| 828 | 830 | delete_post_meta( absint( $_GET['post'] ), '_wp_to_diaspora_post_error' ); // phpcs:ignore |
| 829 | 831 | } |
| 830 | 832 | } |
@@ -858,7 +860,8 @@ discard block |
||
| 858 | 860 | $latest_post = end( $diaspora_post_history ); |
| 859 | 861 | |
| 860 | 862 | // Only show if this post is a fresh share. |
| 861 | - if ( get_post( $post_id )->post_modified === $latest_post['created_at'] ) { // phpcs:ignore |
|
| 863 | + if ( get_post( $post_id )->post_modified === $latest_post['created_at'] ) { |
|
| 864 | +// phpcs:ignore |
|
| 862 | 865 | wp_send_json_success( [ |
| 863 | 866 | 'message' => esc_html__( 'Successfully posted to diaspora*.', 'wp-to-diaspora' ), |
| 864 | 867 | 'action' => [ |
@@ -599,8 +599,11 @@ discard block |
||
| 599 | 599 | if ( 'settings_page_wp_to_diaspora' === get_current_screen()->id ) : ?> |
| 600 | 600 | <label><?php echo $checkbox; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?><?php esc_html_e( 'Yes', 'wp-to-diaspora' ); ?></label> |
| 601 | 601 | <p class="description"><?php echo esc_html( $description ); ?></p> |
| 602 | - <?php else : ?> |
|
| 603 | - <label title="<?php echo esc_attr( $description ); ?>"><?php echo $checkbox; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?><?php esc_html_e( 'Show "Posted at" link?', 'wp-to-diaspora' ); ?></label> |
|
| 602 | + <?php else { |
|
| 603 | + : ?> |
|
| 604 | + <label title="<?php echo esc_attr( $description ); |
|
| 605 | +} |
|
| 606 | +?>"><?php echo $checkbox; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?><?php esc_html_e( 'Show "Posted at" link?', 'wp-to-diaspora' ); ?></label> |
|
| 604 | 607 | <?php endif; |
| 605 | 608 | } |
| 606 | 609 | |
@@ -639,9 +642,11 @@ discard block |
||
| 639 | 642 | |
| 640 | 643 | <?php if ( $on_settings_page ) : ?> |
| 641 | 644 | <p class="description"><?php echo esc_html( $description ); ?></p> |
| 642 | - <?php else : ?> |
|
| 645 | + <?php else { |
|
| 646 | + : ?> |
|
| 643 | 647 | </label> |
| 644 | 648 | <?php endif; |
| 649 | +} |
|
| 645 | 650 | } |
| 646 | 651 | |
| 647 | 652 | /** |
@@ -720,8 +725,11 @@ discard block |
||
| 720 | 725 | <?php foreach ( $list as $id => $name ) : ?> |
| 721 | 726 | <label><input type="checkbox" name="wp_to_diaspora_settings[<?php echo esc_attr( $type ); ?>][]" value="<?php echo esc_attr( $id ); ?>" <?php checked( in_array( $id, $items, false ) ); // phpcs:ignore WordPress.PHP.StrictInArray.FoundNonStrictFalse ?>><?php echo esc_html( $name ); ?></label> |
| 722 | 727 | <?php endforeach; ?> |
| 723 | - <?php else : ?> |
|
| 724 | - <label><?php echo $empty_label; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></label> |
|
| 728 | + <?php else { |
|
| 729 | + : ?> |
|
| 730 | + <label><?php echo $empty_label; |
|
| 731 | +} |
|
| 732 | +// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></label> |
|
| 725 | 733 | <?php endif; ?> |
| 726 | 734 | </div> |
| 727 | 735 | <p class="description"> |