• Resolved Damienov

    (@damienov)


    please add an option to remove inline styling if using the shortcode

    perhaps something like:
    [lyte id='A486E741B25F8E00' playlist='true' styling=no /]

    is there a shortcode documentation for this plugin?

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author Optimizing Matters

    (@optimizingmatters)

    the CSS that styles the player damienov , leaving it unstyled?

    Thread Starter Damienov

    (@damienov)

    yes leaving it unstyled, I know I can overwrite that with !important but it can cause several issues.

    so perhaps adding an option to disable it or adding a parameter on the shortcode to disable the inline styling

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    OK, you can use the lyte_css filter to change (or clear) the CSS, e.g.;

    
    add_filter( 'lyte_css', '__return_empty_string' );

    hope this helps ??
    frank

    Thread Starter Damienov

    (@damienov)

    Excellent! thank you for the quick response

    perhaps you should add this in a documentation ??

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    maybe, but guess this is way too complex for 99,99% of users who do not mind the CSS-in-JS anyway ??

    Thread Starter Damienov

    (@damienov)

    hmm after trying it the inline styling still persist

    <div class="lyte-wrapper" title="Playlist: #MyPlaylist" style="width:560px;max-width: 100%;margin:5px auto;">

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    ah, that one is generated by PHP code and can be different depending on settings, but if you insist you can use the lyte_match_postparse_template filter to change anything in the LYTE output? ??

    Thread Starter Damienov

    (@damienov)

    I see

    a future feature request then :p

    perhaps adding an option or a shorcode parameter, something like

    line 352 wp-lyte-youtube-php

    } elseif ($lyte_noInline == false) {
                    $wrapper="<div class=\"lyte-wrapper".$lyteSettings['ratioClass']."\"".$_this_title_tag.">";
    }
    • This reply was modified 3 years, 10 months ago by Damienov.
    • This reply was modified 3 years, 10 months ago by Damienov.
    Plugin Author Optimizing Matters

    (@optimizingmatters)

    why not use lyte_match_postparse_template to replace the style-attribute? ??

    Thread Starter Damienov

    (@damienov)

    honestly? I’ve tried it

    can’t seem to make it work lol

    eh.. I’m crappy at php ??

    Thread Starter Damienov

    (@damienov)

    finally got this working lol

    add_filter('lyte_match_postparse_template','no_inline');
    function no_inline($x) {
    	$x = str_replace('style="width:560px;max-width: 100%;margin:5px auto;"','',$x);
    	return $x;
    }

    I hope this is the right way

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    super! ??

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘option to remove inline styling’ is closed to new replies.