WordPress.org

Ready to get started?Download WordPress

Forums

Social Count Plus
[resolved] Ability to remove CSS and inline styles (2 posts)

  1. Makewebgr
    Member
    Posted 5 months ago #

    http://wordpress.org/plugins/social-count-plus/

    Thank you for your excellent plugin.

    I am trying to a) prevent the CSS file from loading and b) remove any inline styles (color:#333333 !important). I plan to use the CSS code directly int my theme's style.css.

    So:

    a) For the first part, I used the following code in my functions.php file:

    add_action( 'wp_print_styles', 'mw_deregister_styles', 100);
    
    function mw_deregister_styles() {
     wp_deregister_style( 'socialcountplus-style' );
    }

    b) For the second part, it seems that the only solution is to modify the get_view_li() function, 924 line of the social-counter-plus.php file.

    Could you consider changing:

    <span class="count" style="color: %s !important;">

    to

    <span class="count" %s>

    and

    $color = isset( $design['text_color'] ) ? $design['text_color'] : '#333333';

    to something like

    if (!empty($design['text_color'])){ $color = 'style="color: #'.$design['text_color'].' !important;"'; } else { $color =''; };

    so that users removing the color in the backend can have the theme's default color in the frontend?

    https://wordpress.org/plugins/social-count-plus/

  2. Claudio Sanches
    Member
    Plugin Author

    Posted 5 months ago #

    a)

    add_action( 'wp_enqueue_scripts', 'mw_deregister_styles', 100);
    
    function mw_deregister_styles() {
        wp_dequeue_style( 'socialcountplus-style' );
    }
    

    b)
    If you want to customize further, use CSS or do not use the widget, create your own widget with the functions of the plugin.

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.