Skip to content

Commit 7b1bc4c

Browse files
committed
PHPCS fixes
1 parent 51305e0 commit 7b1bc4c

File tree

3 files changed

+15
-11
lines changed

3 files changed

+15
-11
lines changed

autoload/ShortcodePostListTable.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -141,30 +141,30 @@ public function column_date( $item ) {
141141
$t_time = $h_time;
142142
$time_diff = 0;
143143
} else {
144-
$t_time = get_the_time( __( 'Y/m/d g:i:s a' ), $post );
144+
$t_time = get_the_time( __( 'Y/m/d g:i:s a', 'shortcode-scrubber' ), $post );
145145
$m_time = $post->post_date;
146146
$time = get_post_time( 'G', true, $post );
147147

148148
$time_diff = time() - $time;
149149

150150
if ( $time_diff > 0 && $time_diff < DAY_IN_SECONDS ) {
151151
/* translators: human time diff */
152-
$h_time = sprintf( __( '%s ago' ), human_time_diff( $time ) );
152+
$h_time = sprintf( __( '%s ago', 'shortcode-scrubber' ), human_time_diff( $time ) );
153153
} else {
154-
$h_time = mysql2date( __( 'Y/m/d' ), $m_time );
154+
$h_time = mysql2date( __( 'Y/m/d', 'shortcode-scrubber' ), $m_time );
155155
}
156156
}
157157

158158
if ( 'publish' === $post->post_status ) {
159-
$status = __( 'Published' );
159+
$status = __( 'Published', 'shortcode-scrubber' );
160160
} elseif ( 'future' === $post->post_status ) {
161161
if ( $time_diff > 0 ) {
162-
$status = '<strong class="error-message">' . __( 'Missed schedule' ) . '</strong>';
162+
$status = '<strong class="error-message">' . __( 'Missed schedule', 'shortcode-scrubber' ) . '</strong>';
163163
} else {
164-
$status = __( 'Scheduled' );
164+
$status = __( 'Scheduled', 'shortcode-scrubber' );
165165
}
166166
} else {
167-
$status = __( 'Last Modified' );
167+
$status = __( 'Last Modified', 'shortcode-scrubber' );
168168
}
169169

170170
$status = apply_filters( 'post_date_column_status', $status, $post, 'date', 'list' );

includes/hooks.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,12 @@
66
*/
77

88
// Load translations
9-
add_action( 'plugins_loaded', function () {
10-
load_plugin_textdomain( basename( __DIR__ ), false, basename( __DIR__ ) . '/languages/' );
11-
} );
9+
add_action(
10+
'plugins_loaded',
11+
function () {
12+
load_plugin_textdomain( basename( __DIR__ ), false, basename( __DIR__ ) . '/languages/' );
13+
}
14+
);
1215

1316
// Magically enable nested shortcodes for shortcodes that don't support it
1417
add_filter( 'do_shortcode_tag', 'do_shortcode' );

includes/plugin-check.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,8 @@ public function check_plugin_requirements() {
105105
}
106106
}
107107
if ( $this->has_errors() ) {
108-
unset( $_GET['activate'] ); // Suppress 'Plugin Activated' notice
108+
// Suppress 'Plugin Activated' notice
109+
unset( $_GET['activate'] ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended
109110
$this->deactivate();
110111
add_action( 'admin_notices', array( $this, 'admin_notices' ) );
111112
}

0 commit comments

Comments
 (0)