Plugin Directory

Changeset 527699


Ignore:
Timestamp:
04/05/2012 03:54:07 PM (14 years ago)
Author:
webord
Message:

Need to re-tag

Location:
extend-upload
Files:
1 deleted
1 edited

Legend:

Unmodified
Added
Removed
  • extend-upload/trunk/readme.txt

    r527691 r527699  
    1515To use you must enqueue in the page used both the style and the script of the plugin:
    1616`
    17     <?php
    18         wp_enqueue_script( 'extend-upload' );
    19         wp_enqueue_style( 'extend-upload' );
     17<?php
     18    wp_enqueue_script( 'extend-upload' );
     19    wp_enqueue_style( 'extend-upload' );
    2020`
    2121
    2222Then you can use the plugin by calling the jQuery Extends:
    2323`
    24     (function($) {
    25         $(document).ready(function () {
    26             $('.uc-call').callUpload();
    27         });
    28     })(jQuery.noConflict());
     24(function($) {
     25    $(document).ready(function () {
     26        $('.uc-call').callUpload();
     27    });
     28})(jQuery.noConflict());
    2929`
    3030And the HTML/PHP output should be something like that:
    3131`
    32     <?php
    33         $args = array(
    34             'url' => admin_url( 'media-upload.php?post_id=0&button=' . rawurlencode('Use as Avatar') . '&TB_iframe=1&width=640&height=253' )
    35         )
    36     ?>
    37     <p class='uc-container'>
    38         <label><?php echo _e( "Avatar:" ); ?></label><a target='_blank' class='uc-call' data='<?php echo json_encode( $args ); ?>'><small>" . __( "Upload the Photo" ) . "</small></a>"; ?>
    39         <input class="uc-answer" type="text" value="<?php echo ( is_numeric( absint( $avatar ) ) ? absint( $avatar ) : esc_url($avatar) ); ?>" />
    40     </p>
     32<?php
     33    $args = array(
     34        'url' => admin_url( 'media-upload.php?post_id=0&button=' . rawurlencode('Use as Avatar') . '&TB_iframe=1&width=640&height=253' )
     35    );
     36?>
     37<p class='uc-container'>
     38    <label><?php echo _e( "Avatar:" ); ?></label><a target='_blank' class='uc-call' data='<?php echo json_encode( $args ); ?>'><small>" . __( "Upload the Photo" ) . "</small></a>"; ?>
     39    <input class="uc-answer" type="text" value="<?php echo ( is_numeric( absint( $avatar ) ) ? absint( $avatar ) : esc_url($avatar) ); ?>" />
     40</p>
     41`
    4142
    42 `
    4343Having the `uc-call` for the link, `uc-answer` with the input field and `uc-container` for the box with both the link and the input field.
    4444
Note: See TracChangeset for help on using the changeset viewer.