• Hi to everyone,

    I am using this great plugin inour themes but I have one problem with “Share Text”. Text is outputted in div without any container and it’s hard (impossible) to select just text with CSS. I need this because I want to hide text on some pages.

    It would be great if text would be wrapper in span with some class like “share-text”.

    Also it would be great to have filter for generated HTML so we can alter it after before it’s sent to browser.

    Thanks

    https://www.ads-software.com/plugins/simple-share-buttons-adder/

Viewing 1 replies (of 1 total)
  • Thread Starter Pixel Industry

    (@pixel-industry)

    I made some modifications in “show_share_buttons” function.
    Filter “ssba_html_output” is now available. You can use it to alter HTML output:

    function my_ssba_output($content, $using_shortcode) {
    $content = "<div class='ssba-wrap'>" . $content . "</div>";
    return $content;
    }
    add_filter('ssba_html_output', 'my_ssba_output', 10, 2);

    Two parameters are availabe:
    $content – HTML content that will be outputted
    $using_shortcode – this is actually value of $booShortCode. It will be true when we are using shortcode [ssba] to generate icons

    I wrapped Shortcode Text in span with class “ssba_shortcode_text”.

    Here is the code for all that might need this:

    https://pastebin.com/c4HYMtRk

    Hope that author will include modifications in update because I am sure it will be useful for others too.

Viewing 1 replies (of 1 total)
  • The topic ‘Wrap Share Text in container’ is closed to new replies.