fix phpcs issues
This commit is contained in:
parent
6b15d8d158
commit
45b6e63f32
5 changed files with 12 additions and 20 deletions
|
@ -22,7 +22,7 @@ function init() {
|
|||
\defined( 'ACTIVITYPUB_HASHTAGS_REGEXP' ) || \define( 'ACTIVITYPUB_HASHTAGS_REGEXP', '(?:(?<=\s)|(?<=<p>)|(?<=<br>)|^)#([A-Za-z0-9_]+)(?:(?=\s|[[:punct:]]|$))' );
|
||||
\defined( 'ACTIVITYPUB_ALLOWED_HTML' ) || \define( 'ACTIVITYPUB_ALLOWED_HTML', '<strong><a><p><ul><ol><li><code><blockquote><pre><img>' );
|
||||
\defined( 'ACTIVITYPUB_CUSTOM_POST_CONTENT' ) || \define( 'ACTIVITYPUB_CUSTOM_POST_CONTENT', "<p><strong>%title%</strong></p>\n\n%content%\n\n<p>%hashtags%</p>\n\n<p>%shortlink%</p>" );
|
||||
|
||||
\define( 'ACTIVITYPUB_PLUGIN', __FILE__ );
|
||||
\define( 'ACTIVITYPUB_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
|
||||
\define( 'ACTIVITYPUB_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
|
||||
\define( 'ACTIVITYPUB_PLUGIN_FILE', plugin_dir_path( __FILE__ ) . '/' . basename( __FILE__ ) );
|
||||
|
|
|
@ -40,21 +40,13 @@ class Migrate_List extends \WP_List_Table {
|
|||
$post_status_var = get_query_var( 'comments' );
|
||||
$view_count = count( $view_slugs );
|
||||
for ( $x = 0; $x < $view_count; $x++ ) {
|
||||
$class = ( $post_status_var == $view_slugs[ $x ][1] ) ? ' class="current"' : '';
|
||||
$class = ( $post_status_var === $view_slugs[ $x ][1] ) ? ' class="current"' : '';
|
||||
$post_status_temp = $view_slugs[ $x ][1];
|
||||
if ( $post_status_temp != '' ) {
|
||||
if ( ! empty( $post_status_temp ) ) {
|
||||
$post_status_temp = '&comments=' . $view_slugs[ $x ][1];
|
||||
}
|
||||
$views[ $view_slugs[ $x ][0] ] = sprintf(
|
||||
__(
|
||||
'<a href="' .
|
||||
$activitypub_tools_page .
|
||||
$post_status_temp . '"' .
|
||||
$class .
|
||||
' >' .
|
||||
$view_slugs[ $x ][2] .
|
||||
' <span class="count">(%d)</span></a>'
|
||||
),
|
||||
'<a href="' . $activitypub_tools_page . $post_status_temp . '"' . $class . ' >' . $view_slugs[ $x ][2] . ' <span class="count">(%s)</span></a>',
|
||||
$view_slugs[ $x ][3]
|
||||
);
|
||||
}
|
||||
|
@ -137,7 +129,7 @@ class Migrate_List extends \WP_List_Table {
|
|||
|
||||
public function single_row( $item ) {
|
||||
$inline_styles = ( $item['comments'] > 0 ) ? 'warning' : ''; ?>
|
||||
<tr class="<?php echo $inline_styles; ?>"><?php $this->single_row_columns( $item ); ?></tr>
|
||||
<tr class="<?php echo esc_attr( $inline_styles ); ?>"><?php $this->single_row_columns( $item ); ?></tr>
|
||||
<?php
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue