Skip to content

Commit

Permalink
Fix code example formatting in readme.txt.
Browse files Browse the repository at this point in the history
  • Loading branch information
gonzomir committed Mar 31, 2024
1 parent 7a6910f commit 8a31c0a
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -115,14 +115,14 @@ Initial release

From version 1.4 you can more easily display the sharing widget in your templates using the function `msb_display_buttons()`. The function accepts two arguments - an array of options, passed to the widget, and a second boolean argument that tells the function to echo the resulting markup. Here's an example:

$args = [
'before_widget' => '<div class="msb-container">',
'after_widget' => '</div>',
'before_title' => '<h2>',
'after_title' => '</h2>',
'title' => __( 'Share this article', 'mytextdomain' ),
];
msb_display_buttons( $args, true );
$args = [
'before_widget' => '<div class="msb-container">',
'after_widget' => '</div>',
'before_title' => '<h2>',
'after_title' => '</h2>',
'title' => __( 'Share this article', 'mytextdomain' ),
];
msb_display_buttons( $args, true );

If your theme uses SVG icons, combined into a SVG sprite, and your sprite has icons for Facebook, Twitter, Google+ and LinkedIn, there are two filters you can use to replace the icons, provided by the plugin, with yours. The results of the two filters are concatenated with a hash between them and passed through `esc_url` before output.

Expand Down

0 comments on commit 8a31c0a

Please sign in to comment.