Plugin Directory

Changeset 989729


Ignore:
Timestamp:
09/14/2014 09:34:32 PM (12 years ago)
Author:
pattyland
Message:

deleted unnecessary variable declaration

Location:
lookbook-embed/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • lookbook-embed/trunk/lookbook-embed.php

    r989720 r989729  
    22/**
    33 * Plugin Name: LOOKBOOK Embed
    4  * Version: 0.1.1
     4 * Version: 0.1.2
    55 * Description: Just add LOOKBOOK links into your posts and the plugin will add the HYPE button for you.
    66 * Author: Sören Müller
     
    99 */
    1010
    11  
     11
    1212wp_embed_register_handler( 'lookbook', "/https?:\/\/lookbook.nu\/look\/(\d+)-[a-zA-Z-\._~:\/\?#\[\]@!\$&'()*\+,;=]+/", 'wp_embed_handler_lookbook' );
    1313
    1414function wp_embed_handler_lookbook( $matches, $attr, $url, $rawattr ) {
    15    
     15
    1616    $look_id = esc_attr($matches[1]);
    17    
     17
    1818    $embed = '<!--BEGIN HYPE WIDGET-->';
    1919    $embed .= sprintf( '<div id="hype_container_%s">Loading...</div>', $look_id);
    2020    $embed .= sprintf('<script>var lookbook_ids = lookbook_ids || []; lookbook_ids.push(%s)</script>', $look_id);
    2121    $embed .= '<!--END HYPE WIDGET-->';
    22    
    23        
     22
     23
    2424    return apply_filters( 'embed_lookbook', $embed, $matches, $attr, $url, $rawattr );
    2525}
     
    2727
    2828/*add_action( 'wp_enqueue_scripts', 'lookbook_script' );
    29    
     29
    3030function lookbook_script() {
    3131    wp_enqueue_script( 'lookbook', '//lookbook.nu/look/widget/6456764.js?include=hype&size=medium&style=button&align=center', array(), null, true );
     
    3333
    3434function display_lookbook_widgets() {
    35     echo '<script>
    36     if (jQuery) {
    37       $LB = jQuery;
    38     }
     35    echo '<script>
    3936    if (typeof lookbook_ids != "undefined"){
     37        if (jQuery) {
     38            $LB = jQuery;
     39        }
    4040        jQuery.each(lookbook_ids, function( index, value ) {
    4141          jQuery.getScript( "//lookbook.nu/look/widget/" + value + ".js?include=hype&size=medium&style=button&align=center" )
     
    4848}
    4949add_action('wp_footer', 'display_lookbook_widgets');
    50 
    51 
    52 
  • lookbook-embed/trunk/readme.txt

    r989722 r989729  
    2323
    2424== Changelog ==
     25= 0.1.2 =
     26* Deleted unnecessary variable declaration
    2527= 0.1.1 =
    2628* Fixed error when no hype button found
Note: See TracChangeset for help on using the changeset viewer.