Skip to content

Commit

Permalink
Issue #864: Address failed Travis build by adding 'default' to textdo…
Browse files Browse the repository at this point in the history
…mains.

In phpcs.xml, add 'default'
And remove the @codingStandardsIgnoreLine tags.
  • Loading branch information
Ryan Kienstra committed Jan 20, 2018
1 parent cbdbd4a commit 6ee75ee
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 2 additions & 4 deletions includes/widgets/class-amp-widget-categories.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ public function modify_select( $dropdown ) {
*/
public function widget( $args, $instance ) {
static $first_dropdown = true;
// @codingStandardsIgnoreLine
$title = ! empty( $instance['title'] ) ? $instance['title'] : __( 'Categories' );
$title = ! empty( $instance['title'] ) ? $instance['title'] : __( 'Categories', 'default' );
/** This filter is documented in wp-includes/widgets/class-wp-widget-pages.php */
$title = apply_filters( 'widget_title', $title, $instance, $this->id_base );
$c = ! empty( $instance['count'] ) ? '1' : '0';
Expand All @@ -60,8 +59,7 @@ public function widget( $args, $instance ) {
$dropdown_id = ( $first_dropdown ) ? 'cat' : "{$this->id_base}-dropdown-{$this->number}";
$first_dropdown = false;
echo '<label class="screen-reader-text" for="' . esc_attr( $dropdown_id ) . '">' . esc_html( $title ) . '</label>';
// @codingStandardsIgnoreLine
$cat_args['show_option_none'] = __( 'Select Category' );
$cat_args['show_option_none'] = __( 'Select Category', 'default' );
$cat_args['id'] = $dropdown_id;
/**
* Filters the arguments for the Categories widget drop-down.
Expand Down
2 changes: 1 addition & 1 deletion phpcs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<rule ref="WordPress.WP.I18n">
<properties>
<property name="text_domain" value="amp" />
<property name="text_domain" value="amp,default" />
</properties>
</rule>

Expand Down

0 comments on commit 6ee75ee

Please sign in to comment.