manfromanotherland / roots-share-buttons

roots-share-buttons for composer
https://roots.io/plugins/roots-share-buttons/
4 stars 0 forks source link
composer composer-package shortcode wordpress wordpress-plugin

Roots Share Buttons

Add lightweight social sharing buttons.

Requirements

Features

Customization

The [share] shortcode includes the template from templates/shortcode-share.php. If you'd like to use a custom template, copy shortcode-share.php into the templates/ directory in your theme and also implement the following example snippet:

/**
 * Custom [share] shortcode template
 */
function custom_roots_share_buttons_template() {
  return get_template_directory() . '/templates/shortcode-share.php';
}
add_action('roots/share_template', 'custom_roots_share_buttons_template');

Removing plugin CSS

Roots Share Buttons includes one stylesheet. If you'd prefer to implement these styles within your theme (which is recommended), you can remove the plugin assets with this snippet:

/**
 * Remove Roots Share Buttons assets
 */
function remove_roots_share_buttons_assets() {
  wp_dequeue_style('roots-share-buttons');
}
add_action('wp_enqueue_scripts', 'remove_roots_share_buttons_assets');