Skip to content

Commit

Permalink
Merge pull request #2547 from mehul0810/issue/2545
Browse files Browse the repository at this point in the history
Issue/2545
  • Loading branch information
ravinderk committed Dec 20, 2017
2 parents 78bb7e6 + af1c2f5 commit 128dd3e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions includes/admin/shortcodes/class-shortcode-button.php
Original file line number Diff line number Diff line change
Expand Up @@ -171,27 +171,27 @@ public function shortcode_button() {

reset( $shortcodes );

if ( count( $shortcodes ) == 1 ) {
if ( 1 === count( $shortcodes ) ) {

$shortcode = key( $shortcodes );

printf(
'<button class="button sc-shortcode" data-shortcode="%s">%s</button>',
'<button type="button" class="button sc-shortcode" data-shortcode="%s">%s</button>',
$shortcode,
sprintf( '%s %s %s',
$img,
esc_html__( 'Insert', 'give' ),
__( 'Insert', 'give' ),
self::$shortcodes[ $shortcode ]['label']
)
);
} else {
printf(
'<div class="sc-wrap">' .
'<button class="button sc-button">%s %s</button>' .
'<button class="button sc-button" type="button">%s %s</button>' .
'<div class="sc-menu mce-menu">%s</div>' .
'</div>',
$img,
esc_html__( 'Give Shortcodes', 'give' ),
__( 'Give Shortcodes', 'give' ),
implode( '', array_values( $shortcodes ) )
);
}
Expand Down

0 comments on commit 128dd3e

Please sign in to comment.