@@ -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 |
@@ -675,8 +675,11 @@ discard block |
||
675 | 675 | if ( 'settings_page_wp_to_diaspora' === get_current_screen()->id ) : ?> |
676 | 676 | <label><?php echo $checkbox; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?><?php esc_html_e( 'Yes', 'wp-to-diaspora' ); ?></label> |
677 | 677 | <p class="description"><?php echo esc_html( $description ); ?></p> |
678 | - <?php else : ?> |
|
679 | - <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> |
|
678 | + <?php else { |
|
679 | + : ?> |
|
680 | + <label title="<?php echo esc_attr( $description ); |
|
681 | +} |
|
682 | +?>"><?php echo $checkbox; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?><?php esc_html_e( 'Show "Posted at" link?', 'wp-to-diaspora' ); ?></label> |
|
680 | 683 | <?php endif; |
681 | 684 | } |
682 | 685 | |
@@ -715,9 +718,11 @@ discard block |
||
715 | 718 | |
716 | 719 | <?php if ( $on_settings_page ) : ?> |
717 | 720 | <p class="description"><?php echo esc_html( $description ); ?></p> |
718 | - <?php else : ?> |
|
721 | + <?php else { |
|
722 | + : ?> |
|
719 | 723 | </label> |
720 | 724 | <?php endif; |
725 | +} |
|
721 | 726 | } |
722 | 727 | |
723 | 728 | /** |
@@ -796,8 +801,11 @@ discard block |
||
796 | 801 | <?php foreach ( $list as $id => $name ) : ?> |
797 | 802 | <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 ) ); ?>><?php echo esc_html( $name ); ?></label> |
798 | 803 | <?php endforeach; ?> |
799 | - <?php else : ?> |
|
800 | - <label><?php echo $empty_label; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></label> |
|
804 | + <?php else { |
|
805 | + : ?> |
|
806 | + <label><?php echo $empty_label; |
|
807 | +} |
|
808 | +// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></label> |
|
801 | 809 | <?php endif; ?> |
802 | 810 | </div> |
803 | 811 | <p class="description"> |
@@ -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' => [ |