Skip to content

Commit

Permalink
Improve js call in a href instead of onclick
Browse files Browse the repository at this point in the history
  • Loading branch information
calvintam236 committed Sep 29, 2016
1 parent 176966b commit 5b56684
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/GitHub_Updater/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ public function plugin_branch_switcher( $plugin_file, $plugin_data ) {
echo $enclosure['open'];
printf( esc_html__( 'Current branch is `%1$s`, try %2$sanother branch%3$s.', 'github-updater' ),
$branch,
'<a href="#" onclick="jQuery(\'#' . $id . '\').toggle();return false;">',
'<a href="javascript:$(\'#'. $id .'\').toggle()">',
'</a>'
);

Expand Down
2 changes: 1 addition & 1 deletion src/GitHub_Updater/Theme.php
Original file line number Diff line number Diff line change
Expand Up @@ -640,7 +640,7 @@ protected function single_install_switcher( $theme ) {
ob_start();
printf( '<p>' . esc_html__( 'Current branch is `%s`. Try %sanother version%s', 'github-updater' ),
$theme->branch,
'<a href="#" onclick="jQuery(\'#ghu_versions\').toggle();return false;">',
'<a href="javascript:$(\'#ghu_versions\').toggle()">',
'</a></p>'
);
?>
Expand Down

0 comments on commit 5b56684

Please sign in to comment.