WordPress.org

Ready to get started?Download WordPress

Forums

WP YouTube Lyte
Shortcode + Align (3 posts)

  1. ben4d85
    Member
    Posted 1 year ago #

    That's a really great plugin! Two quick feature request:

    1.) Please add a shortcode
    2.) Please make it possible to add a way of controlling the align (or adding a custom class)

    Example Shortcode:
    [youtube id="123456789" align="alignright"]

    Example Source:

    <?  /** YouTube shortcode */
        function shortcode_youtube($atts) {
            extract(shortcode_atts(array(
                "id" 	=> '',
    	    "align" => 'aligncenter'
            ), $atts));
            return '<div class="'.$align.'">' . lyte_parse('httpv://www.youtube.com/watch?v='.$id) . '</div>';
        }
        add_shortcode("youtube", "shortcode_youtube");
    ?>

    Thanks!

    http://wordpress.org/extend/plugins/wp-youtube-lyte/

  2. futtta
    Member
    Plugin Author

    Posted 1 year ago #

    it's hard to say "no" if someone even provides (example) code to include. i'll have a look and probably add this feature to the upcoming 1.1.5, thanks for the active participation ben4d85!

  3. futtta
    Member
    Plugin Author

    Posted 1 year ago #

    your shortcode is in the freshly baked 1.1.5, the align property isn't yet (you can set alingment in the configuration-page, but I guess you knew that already).

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.