Plugin Directory

Changeset 886172

Timestamp:
04/02/2014 06:48:49 AM (10 years ago)
Author:
enej
Message:

Making the plugin translation ready and improvements to escaping translated string

Location:
photostream-sync/branches/ux-refresh
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • photostream-sync/branches/ux-refresh/class-photostream-client.php

    r884718 r886172  
    8181        $response = wp_remote_post( $url, array( 'body' => $body ) );
    8282        if( is_wp_error( $response ) ) {
    83             $end_message = '<br /><a href="' . esc_url( $__photostream->get_admin_page() ) . '" > Go Back and try again!</a>';
     83            $end_message = '<br /><a href="' . esc_url( $__photostream->get_admin_page() ) . '" > </a>';
    8484            wp_die( $response->get_error_message().$end_message );
    8585        }
  • photostream-sync/branches/ux-refresh/class-photostream-list-table.php

    r886143 r886172  
    5656       
    5757        $actions = array(
    58             'edit'      => sprintf( '<a href="%s" class="edit" >%s</a>',      $edit_photostream_link,   esc_html__( 'Edit' ) ),
    59             'import'    => sprintf( '<a href="%s" class="import" >%s</a>',  $import_photostream_link,   esc_html__( 'Import' ) ),
    60             'delete'    => sprintf( '<a href="%s" class="delete" >%s</a>',  $delete_photostream_link,   esc_html__( 'Delete' ) )
     58            'edit'      => sprintf( '<a href="%s" class="edit" >%s</a>',      $edit_photostream_link,   esc_html__( 'Edit' ) ),
     59            'import'    => sprintf( '<a href="%s" class="import" >%s</a>',  $import_photostream_link,   esc_html__( 'Import' ) ),
     60            'delete'    => sprintf( '<a href="%s" class="delete" >%s</a>',  $delete_photostream_link,   esc_html__( 'Delete' ) )
    6161
    6262        );
    6363
    64         $sync_icon = ( $item['sync'] ? '<div class="dashicons dashicons-backup" title="' . esc_attr__( 'Syncing Enabled' ) . '"></div> ' : '' );
     64        $sync_icon = ( $item['sync'] ? '<div class="dashicons dashicons-backup" title="' . esc_attr__( 'Syncing Enabled' ) . '"></div> ' : '' );
    6565        $actions['info'] = $__photostream->get_processed_media_info( $item['key'] );
    6666       
     
    106106
    107107           //  'cb'                    => '<input type="checkbox" />', //Render a checkbox instead of text
    108             'photostream'           => esc_html__( 'Photostream' ),
    109             'link'                  => esc_html__( 'Link' ),
    110             'as_author'             => esc_html__( 'Post as'),
     108            'photostream'           => esc_html__( 'Photostream' ),
     109            'link'                  => esc_html__( 'Link' ),
     110            'as_author'             => esc_html__( 'Post as'),
    111111         
    112112           
  • photostream-sync/branches/ux-refresh/photostream-sync.php

    r886153 r886172  
    4949        load_plugin_textdomain( 'photostream' );
    5050        $page = add_media_page(
    51             esc_html( __( 'Photostreams' ) ),
    52             esc_html( __( 'Photostreams' ) ),
     51            esc_html( __( 'Photostreams' ) ),
     52            esc_html( __( 'Photostreams' ) ),
    5353            'import', // @todo: change permission so that people that can uplaod media can add a photo stream
    5454            'photostream',
     
    6060
    6161    function add_action_links( $links ) {
    62         $links['settings'] = '<a href="'.esc_url( $this->admin_page ).'">'. __( 'Settings' ) . '</a>';
     62        $links['settings'] = '<a href="'.esc_url( $this->admin_page ).'">'. __( 'Settings' ) . '</a>';
    6363        return $links;
    6464    }
     
    8888    function display_text_transform_options() {
    8989        ?><div class="transform_options">
    90         <a href="#" onClick="jQuery(this).parent().find('div:first').toggle('fast'); return false;">Show Options</a>
     90        <a href="#" onClick="jQuery(this).parent().find('div:first').toggle('fast'); return false;"></a>
    9191        <div>
    9292        stream-&gt;title, stream-&gt;key<br/>
    9393        owner-&gt;firstName, owner-&gt;lastName, owner-&gt;fullName<br/>
    94         image-&gt;caption, image-&gt;guid, image-&gt;date(<a href="http://us2.php.net/manual/en/function.date.php" target="_blank">format</a>)<br/>
    95         batch-&gt;guid, batch-&gt;date(<a href="http://us2.php.net/manual/en/function.date.php" target="_blank">format</a>)<br/>
    96         fetch-&gt;date(<a href="http://us2.php.net/manual/en/function.date.php" target="_blank">format</a>)
     94        image-&gt;caption, image-&gt;guid, image-&gt;date(<a href="http://us2.php.net/manual/en/function.date.php" target="_blank"></a>)<br/>
     95        batch-&gt;guid, batch-&gt;date(<a href="http://us2.php.net/manual/en/function.date.php" target="_blank"></a>)<br/>
     96        fetch-&gt;date(<a href="http://us2.php.net/manual/en/function.date.php" target="_blank"></a>)
    9797        </div>
    9898        </div>
     
    115115        $this->view = ( isset( $_GET['view'] ) && in_array( $_GET['view'], array( 'init', 'add', 'edit', 'import', 'delete', 'add_import' ) ) ? $_GET['view'] : 'init' );
    116116        $this->key  = ( isset( $_GET['key'] ) && in_array( $_GET['key'] , $streams ) ? $_GET['key'] : false );
    117         $invalid_key = __( 'Sorry, the stream you are looking for doesn\'t exits' );
     117        $invalid_key = __( 'Sorry, the stream you are looking for doesn\'t exits' );
    118118        ?>
    119119        <div class="wrap photostream-wrap">
    120120            <h2>
    121                 <?php esc_html_e( 'Photostreams' ); ?>
     121                <?php esc_html_e( 'Photostreams' ); ?>
    122122                <?php if( in_array( $this->view,  array( 'edit', 'import', 'delete' )) ) { ?>
    123                     <a class="return-to" href="<?php echo esc_url( $this->admin_page ); ?>"><?php _e( 'Back to Photostreams'); ?></a>
     123                    <a class="return-to" href="<?php echo esc_url( $this->admin_page ); ?>"><?php '); ?></a>
    124124                <?php } ?>
    125125            </h2>
     
    189189        ?>
    190190        <div class="ps-sync-manage" >
    191             <h3><?php _e('Manage Your Streams'); ?></h3>   
     191            <h3><?php ); ?></h3>   
    192192            <?php
    193193            // include the lis
     
    273273
    274274    function admin_ui_add_step( $step_count ) {
    275         $steps = array( __( 'Add URL' ) , __( 'Configure Photostream' ) , __( 'Import Media' ) );
     275        $steps = array( __( 'Add URL'' ) );
    276276        ?><ul class="steps-shell"> <?php
    277277        for($i = 0; isset( $steps[$i] ) ;$i++ ) {
     
    282282            }
    283283            ?>
    284             <li class="<?php echo  $class; ?>"><?php echo  __( 'Step' ) . ' ' . ( $i + 1 ); ?>: <span><?php echo $steps[$i]; ?></span></li>
     284            <li class="<?php echo  $class; ?>"><?php echo  ; ?></span></li>
    285285            <?php
    286286        } ?>
     
    295295     */
    296296    function admin_ui_add_url() { ?>
    297         <h3>Add Photostream</h3>
     297        <h3></h3>
    298298        <div class="add-photostream-url">
    299299            <form method="post">
    300300                <?php wp_nonce_field( 'ps-sync-add-1', 'ps-nonce' ); ?>
    301301                <input type="hidden" name="section" value="add-url" />
    302                 <strong><?php esc_html_e('Photostream URL'); ?></strong><br />
     302                <strong><?php esc_html_e('Photostream URL'); ?></strong><br />
    303303
    304304                    <input id="photostream-url" class="regular-text code" type="text" value="" placeholder="https://www.icloud.com/photostream/" name="photostream-url">
    305                     <input id="submit-add-photosteam-url" class="button button-primary submit-form" type="submit" value="<?php esc_attr_e( 'Next' ); ?>" name="submit" /><span class="spinner"></span>
    306                     <p id="help-message"><em><?php esc_html_e( 'Enter the URL of your public iCloud photostream'); echo '<br />'; _e('It should look something like this'); ?> "https://www.icloud.com/photostream/#nnnnnnnnnnnnn".</em></p>
     305                    <input id="submit-add-photosteam-url" class="button button-primary submit-form" type="submit" value="<?php esc_attr_e( 'Next' ); ?>" name="submit" /><span class="spinner"></span>
     306                    <p id="help-message"><em><?php esc_html_e( 'Enter the URL of your public iCloud photostream''); ?> "https://www.icloud.com/photostream/#nnnnnnnnnnnnn".</em></p>
    307307                    <input name="step" type="hidden" value="2" />
    308308            </form>
    309309        </div>
    310310        <div class="info-box">
    311             <strong><?php _e('Steps to create a public photostreams URL on the iPhone'); ?></strong>
     311            <strong><?php _e('Steps to create a public photostreams URL on the iPhone'); ?></strong>
    312312            <ol>
    313                 <li><?php _e('Open the photos app');?></li>
    314                 <li><?php _e('Tap "Photo Stream" (bottom)');?></li>
    315                 <li><?php _e('Tap + (top)');?></li>
    316                 <li><?php _e('Give it a name, make sure "Public Website" is "On"');?></li>
    317                 <li><?php _e('Tap Create (top)');?></li>
    318                 <li><?php _e('Back at the list get the details for this new Stream (tap the blue right arrow)');?></li>
    319                 <li><?php _e('Down at the bottom is the link to the photostream.');?></li>
     313                <li><?php _e('Open the photos app');?></li>
     314                <li><?php _e('Tap "Photo Stream" (bottom)');?></li>
     315                <li><?php _e('Tap + (top)');?></li>
     316                <li><?php _e('Give it a name, make sure "Public Website" is "On"');?></li>
     317                <li><?php _e('Tap Create (top)');?></li>
     318                <li><?php _e('Back at the list get the details for this new Stream (tap the blue right arrow)');?></li>
     319                <li><?php _e('Down at the bottom is the link to the photostream.');?></li>
    320320            </ol>
    321321        </div>
     
    330330    function admin_ui_add_step2() { ?>
    331331        <div class="stream-info">
    332             <h3><?php _e('Adding photostream'); ?>: <em><?php echo esc_html( $this->add_data['title'] ); ?></em></h3>
    333             <p class="info"><strong><?php echo esc_html( $this->add_data['title'] ); ?></strong> <?php _e( 'photostream contains');?> <?php echo $this->add_data['stream_media_info']; ?>. <a target="_blank" href="<?php echo esc_url($this->add_data['url']); ?>" title="<?php _e( 'Go to photo stream '); ?>. <?php echo esc_attr( $this->add_data['title'] ); ?>">Visit photostream</a> #<?php echo esc_html( $this->add_data['key'] ); ?></p>
     332            <h3><?php photostream'); ?>: <em><?php echo esc_html( $this->add_data['title'] ); ?></em></h3>
     333            <p class="info"><strong><?php echo esc_html( $this->add_data['title'] ); ?></strong> <?php </a> #<?php echo esc_html( $this->add_data['key'] ); ?></p>
    334334        </div>
    335335        <?php
     
    348348        ?>
    349349        <div class="stream-info">
    350             <h3><?php _e('Editing photostream'); ?>: <em><?php echo esc_html( $stream->title ); ?></em></h3>
    351             <p class="info"><strong><?php echo esc_html(  $stream->title ); ?></strong> <?php __( 'photostream added' ); ?> <?php echo $this->get_processed_media_info( $this->key ); ?>. <a target="_blank" href="<?php echo esc_url( $url ); ?>" title="<?php _e( 'Go to photo stream ' ); ?>. <?php echo esc_attr( $stream->title ); ?>">Visit photostream</a> #<?php echo esc_html( $this->key ); ?></p>
     350            <h3><?php ); ?>: <em><?php echo esc_html( $stream->title ); ?></em></h3>
     351            <p class="info"><strong><?php echo esc_html(  $stream->title ); ?></strong> <?php </a> #<?php echo esc_html( $this->key ); ?></p>
    352352        </div>
    353353        <?php
     
    404404
    405405        $messages = array(
    406             'gallery'   => _n_noop('%s Gallery', '%s Galleries'),
     406            'gallery'   => _n_noop('%s Gallery', '%s Galleries'),
    407407            'photo'     => _n_noop('%s Picture', '%s Pictures'),
    408408            'video'     => _n_noop('%s Video', '%s Videos')
     
    412412        $first_seperater = $second_seperater = ' '.__('and').' ';
    413413        if( $number_of_galleries > 0 ) {
    414             $display_galleries = "<strong>" . esc_html( sprintf( translate_nooped_plural( $messages['gallery'], $number_of_galleries ), $number_of_galleries ) ) ."</strong>";
     414            $display_galleries = "<strong>" . esc_html( sprintf( translate_nooped_plural( $messages['gallery'], $number_of_galleries ), $number_of_galleries ) ) ."</strong>";
    415415        } else {
    416416            $first_seperater   = '';
     
    418418       
    419419        if( $number_of_photos > 0 ) {
    420             $display_photos = "<strong>" . esc_html( sprintf( translate_nooped_plural( $messages['photo'], $number_of_photos ), $number_of_photos ) ) ."</strong>";     
     420            $display_photos = "<strong>" . esc_html( sprintf( translate_nooped_plural( $messages['photo'], $number_of_photos ), $number_of_photos ) ) ."</strong>";     
    421421        }
    422422       
    423423        if( $number_of_videos  > 0 ) {
    424             $display_videos = "<strong>" . esc_html( sprintf( translate_nooped_plural( $messages['video'], $number_of_videos  ), $number_of_videos  ) ) ."</strong>";
     424            $display_videos = "<strong>" . esc_html( sprintf( translate_nooped_plural( $messages['video'], $number_of_videos  ), $number_of_videos  ) ) ."</strong>";
    425425            $second_seperater = ( !empty( $display_photos ) ? ", " : "" );
    426426        } else {
     
    447447        wp_enqueue_script( 'photostream-add' );
    448448        wp_localize_script( 'photostream-add', 'photostream_add', array(
    449                 'show' => 'Show Advanced Options',
    450                 'hide' => 'Hide Advanced Options'
     449                'show' => ,
     450                'hide' =>
    451451                ));
    452452        switch( $action ) {
     
    499499            <tbody>
    500500                <tr >
    501                     <th><?php esc_html_e( 'Enable Syncing' ); ?></th>
     501                    <th><?php esc_html_e( 'Enable Syncing' ); ?></th>
    502502                    <td>
    503503                        <input type="hidden"    name="photostream<?php echo $form_section; ?>[enabled]" value="0"/>
    504504                        <input type="checkbox"  name="photostream<?php echo $form_section; ?>[enabled]" value="1" <?php checked( true, $stream->enabled ); ?> />
    505                         <span class="help"><?php esc_html_e( 'Enable, or disable whether importing should happen for this stream.' ); ?></span>
     505                        <span class="help"><?php esc_html_e( 'Enable, or disable whether importing should happen for this stream.' ); ?></span>
    506506                    </td>
    507507
     
    509509            </tbody>
    510510        </table>
    511         <h3><?php _e( 'Gallery Settings' ); ?></h3>
     511        <h3><?php _e( 'Gallery Settings' ); ?></h3>
    512512        <table class="form-table">
    513513            <tbody>
     
    517517                        <input type="text" name="photostream<?php echo $form_section; ?>[post_title]" value="<?php esc_attr_e( $stream->post_title ); ?>"
    518518                            placeholder="stream-&gt;title - batch-&gt;date(Y-m-d)" class="regular-text" />
    519                         <p class="help"><?php esc_html_e( 'Configure the post title for gallery posts. Click "show options" for formatting help.' ); ?></p>
     519                        <p class="help"><?php esc_html_e( 'Configure the post title for gallery posts. Click "show options" for formatting help.' ); ?></p>
    520520                        <?php $this->display_text_transform_options(); ?>
    521521                    </td>
    522522                </tr>
    523523                <tr>
    524                     <th><?php esc_html_e( 'Gallery Author' ); ?></th>
     524                    <th><?php esc_html_e( 'Gallery Author' ); ?></th>
    525525                    <td>
    526526                        <?php wp_dropdown_users( array( 'name' => 'photostream' . $form_section . '[user]' , 'selected' => $stream->user) ); ?>
    527                         <span class="help"><?php esc_html_e( 'Choose the WordPress user that this plugin is acting as when importing this photostream.' ); ?></span>
     527                        <span class="help"><?php esc_html_e( 'Choose the WordPress user that this plugin is acting as when importing this photostream.' ); ?></span>
    528528                    </td>
    529529                </tr>
    530530                <tr>
    531                     <th><?php esc_html_e( 'Default Password' ); ?></th>
     531                    <th><?php esc_html_e( 'Default Password' ); ?></th>
    532532                    <td><input name="photostream<?php echo $form_section; ?>[password]" class="regular-text" type="text" value="<?php esc_attr_e( $stream->password ); ?>" />
    533                     <p class="help"><?php esc_html_e( 'Password Protect all gallery posts made during import' ); ?></p>
     533                    <p class="help"><?php esc_html_e( 'Password Protect all gallery posts made during import' ); ?></p>
    534534                    </td>
    535535                </tr>
    536536               
    537537                <tr>
    538                     <th><?php esc_html_e( 'Gallery Caption Use' ); ?></th>
     538                    <th><?php esc_html_e( 'Gallery Caption Use' ); ?></th>
    539539                    <td>
    540540                        <select name="photostream<?php echo $form_section; ?>[use_caption]">
    541                             <option value="" ><?php esc_html_e( 'Do not use caption' ); ?></option>
    542                             <option value="above" <?php selected( 'above', $stream->use_caption ); ?> ><?php esc_html_e( "Place the caption above the gallery" ); ?></option>
    543                             <option value="below" <?php selected( 'below', $stream->use_caption ); ?> ><?php esc_html_e( "Place the caption below the gallery" ); ?></option>
     541                            <option value="" ><?php esc_html_e( 'Do not use caption' ); ?></option>
     542                            <option value="above" <?php selected( 'above', $stream->use_caption ); ?> ><?php esc_html_e( "Place the caption above the gallery" ); ?></option>
     543                            <option value="below" <?php selected( 'below', $stream->use_caption ); ?> ><?php esc_html_e( "Place the caption below the gallery" ); ?></option>
    544544                        </select>
    545                         <p class="help"><?php esc_html_e( 'Configure how a caption should be included in the gallery posts when one is available.' ); ?></p>
     545                        <p class="help"><?php esc_html_e( 'Configure how a caption should be included in the gallery posts when one is available.' ); ?></p>
    546546                    </td>
    547547                </tr>
    548548                <tr>
    549                     <th><?php esc_html_e( 'Gallery Publishing' ); ?></th>
     549                    <th><?php esc_html_e( 'Gallery Publishing' ); ?></th>
    550550                    <td>
    551551                        <select name="photostream<?php echo $form_section; ?>[post_status]">
    552                             <option value="publish" <?php selected( 'publish', $stream->post_status ); ?> >Publish</option>
    553                             <option value="draft"   <?php selected( 'draft',   $stream->post_status ); ?> >Draft</option>
     552                            <option value="publish" <?php selected( 'publish', $stream->post_status ); ?> ></option>
     553                            <option value="draft"   <?php selected( 'draft',   $stream->post_status ); ?> ></option>
    554554                        </select>
    555                         <span class="help"><?php esc_html_e( 'Choose whether gallery posts should be published automatically or kept as drafts.' ); ?></span>
     555                        <span class="help"><?php esc_html_e( 'Choose whether gallery posts should be published automatically or kept as drafts.' ); ?></span>
    556556                    </td>
    557557                </tr>
    558558                <tr>
    559                     <th><?php esc_html_e( 'Gallery Tags' ); ?></th>
     559                    <th><?php esc_html_e( 'Gallery Tags' ); ?></th>
    560560                    <td>
    561                         <p class="help"><?php esc_html_e( 'Choose one or more tags for gallery posts.' ); ?></p>
     561                        <p class="help"><?php esc_html_e( 'Choose one or more tags for gallery posts.' ); ?></p>
    562562                        <div class="tagsdiv" id="post_tag">
    563563                            <div id="#tagsdiv-post_tag">
    564564                                <div class="jaxtag">
    565565                                    <div class="nojs-tags hide-if-js">
    566                                     <p>Add or remove tags</p>
     566                                    <p></p>
    567567                                    <textarea id="tax-input-post_tag" class="the-tags" cols="20" rows="3" name="photostream<?php echo $form_section; ?>[tags]"><?php esc_attr_e( implode( ', ', $stream->tags ) ); ?></textarea></div>
    568568                                        <div class="ajaxtag hide-if-no-js">
    569                                         <label for="new-tag-post_tag" class="screen-reader-text">Tags</label>
    570                                         <div class="taghint" style="">Add New Tag</div>
     569                                        <label for="new-tag-post_tag" class="screen-reader-text"></label>
     570                                        <div class="taghint" style=""></div>
    571571                                        <p><input type="text" placeholder="tag1, tag2, tag3" value="" autocomplete="off" size="16" class="newtag form-input-tip" name="newtag[post_tag]" id="new-tag-post_tag">
    572572                                        <input type="button" value="Add" class="button tagadd"></p>
    573573                                    </div>
    574                                     <p class="howto">Separate tags with commas</p>
     574                                    <p class="howto"></p>
    575575                                </div>
    576576                                <div class="tagchecklist"></div>
     
    582582                </tr>
    583583                <tr>
    584                     <th><?php esc_html_e( 'Gallery Categories' ); ?></th>
     584                    <th><?php esc_html_e( 'Gallery Categories' ); ?></th>
    585585                    <td>
    586586                        <ul class="gallery-categories"><?php wp_category_checklist( 0, 0, $stream->cats ); ?></ul>
    587                         <p class="help"><?php esc_html_e( 'Choose one or more categories for gallery posts.' ); ?></p>
     587                        <p class="help"><?php esc_html_e( 'Choose one or more categories for gallery posts.' ); ?></p>
    588588                    </td>
    589589                    <?php
     
    593593            </tbody>
    594594        </table>
    595         <p><a href="#advance-settings" id="advance-settings-toggle"><?php _e( 'Show Advance Settings' ); ?></a></p>
     595        <p><a href="#advance-settings" id="advance-settings-toggle"><?php _e( 'Show Advance Settings' ); ?></a></p>
    596596
    597597        <div class="advance-settings" >
    598         <h3><?php _e( 'Advance Settings' ); ?></h3>
     598        <h3><?php _e( 'Advance Settings' ); ?></h3>
    599599        <table class="form-table">
    600600            <tbody>
    601601                <tr>
    602                     <th><?php esc_html_e( 'Gallery Post Type' ); ?></th>
     602                    <th><?php esc_html_e( 'Gallery Post Type' ); ?></th>
    603603                    <td>
    604604                        <select name="photostream<?php echo $form_section; ?>[post_type]">
     
    607607                        <?php } ?>
    608608                        </select>
    609                         <p class="help"><?php esc_html_e( 'Choose a post type for gallery posts. This is an advanced setting for users writing themes around this plugin.' ); ?></p>
     609                        <p class="help"><?php esc_html_e( 'Choose a post type for gallery posts. This is an advanced setting for users writing themes around this plugin.' ); ?></p>
    610610                    </td>
    611611                </tr>
    612612                <tr>
    613                     <th><?php esc_html_e( 'Gallery Shortcode' ); ?></th>
     613                    <th><?php esc_html_e( 'Gallery Shortcode' ); ?></th>
    614614                    <td>
    615615                        <input name="photostream<?php echo $form_section; ?>[gallery_shortcode]" type="text" placeholder="[gallery]" value="<?php esc_attr_e($stream->gallery_shortcode); ?>" />
    616                         <p class="help"><?php esc_html_e( 'Choose a custom gallery shortcode for gallery posts. This is an advanced setting and is   best left alone unless you have a specific reason to change it.' ); ?></p>
     616                        <p class="help"><?php esc_html_e( 'Choose a custom gallery shortcode for gallery posts. This is an advanced setting and is   best left alone unless you have a specific reason to change it.' ); ?></p>
    617617                    </td>
    618618                </tr>
     
    621621                    <td>
    622622                        <input name="photostream<?php echo $form_section; ?>[video_shortcode]" type="text" placeholder="loop='off' autoplay='off'" value="<?php esc_attr_e($stream->video_shortcode); ?>" />
    623                         <p class="help"><?php esc_html_e( 'Add parameters to the [video] shortcode. This goes inside the shortcode so, unlike the gallery setting, you should not supply the entire shortcode. This is an advanced setting and is best  left alone unless you have a specific reason to change it.' ); ?></p>
     623                        <p class="help"><?php esc_html_e( 'Add parameters to the [video] shortcode. This goes inside the shortcode so, unlike the gallery setting, you should not supply the entire shortcode. This is an advanced setting and is best  left alone unless you have a specific reason to change it.' ); ?></p>
    624624                    </td>
    625625                </tr>
    626626
    627627                <tr>
    628                     <th><?php esc_html_e( 'Media Filename Config' ); ?></th>
     628                    <th><?php esc_html_e( 'Media Filename Config' ); ?></th>
    629629                    <td>
    630630                        <input
     
    634634                            value="<?php esc_attr_e( $stream->rename_file ); ?>"
    635635                            placeholder="stream->title - owner->fullName -- file->date(Y-m-d).jpg"/>
    636                         <p class="help"><?php esc_html_e( 'Configure the filename to save imported media as. Click "show options" for formatting help.' ); ?></p>
     636                        <p class="help"><?php esc_html_e( 'Configure the filename to save imported media as. Click "show options" for formatting help.' ); ?></p>
    637637                        <?php $this->display_text_transform_options(); ?>
    638638                    </td>   
     
    644644
    645645        <?php
    646             $submit_text = ( ( 'edit' == $this->view ) ? __( 'Update Photostream' ) :  __( 'Add Photostream and Import Media' ) );
     646            $submit_text = ( ( 'edit' == $this->view ) ? __( 'Update Photostream'' ) );
    647647            $this->display_submit_form( $submit_text ); ?>
    648648        </form>
     
    659659        </div>
    660660       
    661         <span class="cancel-link"> <?php _e( 'or' ); ?>
    662         <a href="<?php echo esc_url( $this->admin_page ); ?>"><?php _e( 'cancel return to Photostreams'); ?></a></span>
     661        <span class="cancel-link"> <?php ' ); ?>
     662        <a href="<?php echo esc_url( $this->admin_page ); ?>"><?php '); ?></a></span>
    663663        <?php
    664664    }
     
    672672
    673673        if( !$this->key ) {
    674             return $this->display_error( 'Sorry but this key doesn\'t stream to exits' );
     674            return $this->display_error( 'Sorry but this key doesn\'t stream to exits' );
    675675        }
    676676
     
    680680
    681681        if( !is_object($client ) )
    682             return $this->display_error( 'It seems that the shotostream URL is offline' );
     682            return $this->display_error( 'It seems that the shotostream URL is offline' );
    683683       
    684684        $data = $client->get();
    685685        $url = $client->get_url();
    686686        if( !is_object( $data ) )
    687             return $this->display_error(  'It seems that the shotostream URL is offline' );
     687            return $this->display_error(  'It seems that the shotostream URL is offline' );
    688688       
    689689
     
    695695        unset( $client ); ?>
    696696        <div class="stream-info">
    697             <h3><?php _e('Importing photostream'); ?>: <em><?php echo esc_html( $stream->title ); ?></em></h3>
    698             <p class="info"><strong><?php echo esc_html( $stream->title ); ?></strong> <?php _e( 'photostream contains');?> <?php echo $this->get_stream_media_info( $data, count( $groups ) ); ?>. <a target="_blank" href="<?php echo esc_url( $url ); ?>" title="<?php _e( 'Go to photo stream '); ?>. <?php echo esc_attr( $stream->title ); ?>">Visit photostream</a> #<?php echo esc_html( $this->key ); ?></p>
     697            <h3><?php ); ?>: <em><?php echo esc_html( $stream->title ); ?></em></h3>
     698            <p class="info"><strong><?php echo esc_html( $stream->title ); ?></strong> <?php </a> #<?php echo esc_html( $this->key ); ?></p>
    699699        </div>
    700700       
     
    721721
    722722                if ( $tag_list ) {
    723                     $utility_text = __( 'Gallery was posted in %1$s and tagged %2$s on %3$s<span class="by-author"> by %4$s</span>.' );
     723                    $utility_text = __( 'Gallery was posted in %1$s and tagged %2$s on %3$s<span class="by-author"> by %4$s</span>.' );
    724724                } elseif ( $categories_list ) {
    725                     $utility_text = __( 'Gallery was posted in %1$s on %3$s<span class="by-author"> by %4$s</span>.' );
     725                    $utility_text = __( 'Gallery was posted in %1$s on %3$s<span class="by-author"> by %4$s</span>.' );
    726726                } else {
    727                     $utility_text = __( 'Gallery was posted on %3$s<span class="by-author"> by %4$s</span>.' );
     727                    $utility_text = __( 'Gallery was posted on %3$s<span class="by-author"> by %4$s</span>.' );
    728728                }
    729729               
    730730                switch( get_post_status() ) {
    731731                    case 'publish':
    732                         $view_link = '<a class="button" href="' . get_permalink( ) . '" >'.__( 'View' ) . '</a>';
     732                        $view_link = '<a class="button" href="' . get_permalink( ) . '" >'.' ) . '</a>';
    733733                    break;
    734734
    735735                    default:
    736                         $view_link = '<a class="button" href="' . site_url( '?p='.get_the_ID() ) . '" >'.__( 'Preview' ) . '</a>';
     736                        $view_link = '<a class="button" href="' . site_url( '?p='.get_the_ID() ) . '" >'.' ) . '</a>';
    737737                    break;
    738738                }
     
    740740                <div class="gallery">
    741741                    <h4><?php the_title(); ?> </h4>
    742                     <a href="<?php echo get_edit_post_link(); ?>" class="button">Edit</a> <span class="separator">|</span> <?php echo $view_link; ?>
     742                    <a href="<?php echo get_edit_post_link(); ?>" class="button"></a> <span class="separator">|</span> <?php echo $view_link; ?>
    743743                    <p class="byline"><?php printf( $utility_text, $categories_list, $tag_list, $date, get_the_author() ); ?></p>
    744744                    <ul id="gallery-<?php echo esc_attr( get_the_id() ); ?>" class="attachemnt-grid"></ul>
     
    749749        } else {
    750750            // No posts found
    751             _e( "No Galleries Found!" );
     751            );
    752752        }
    753753        /* Restore original Post Data */
     
    766766            'photos'        => $photos_data,
    767767            'stream_key'    => $this->key,
    768             'start_text'    => __( 'Start Importing of Media'),
    769             'done'          => __( 'Done' ),
    770             'finished'      => __( 'Success, we just finish adding all media' ) .' <a href="'. $this->admin_page. '">'.__('return to photostreams'). '</a>.',
    771             'close'         => __( 'If you leave this page your import will be interupted' )
     768            'start_text'    => __( 'Start Importing of Media'),
     769            'done'          => __( 'Done' ),
     770            'finished'      => __( 'Success, we just finish adding all media''). '</a>.',
     771            'close'         => __( 'If you leave this page your import will be interupted' )
    772772            );
    773773
     
    785785            <p><?php echo esc_html( $error ); ?></p>
    786786            <?php if( ! in_array( $this->view, array( 'add', 'init' ) ) ) { ?>
    787                 <p><a href="<?php echo esc_url( $this->admin_page ); ?>"><?php _e('Return to manage photostream' ); ?></a></p>
     787                <p><a href="<?php echo esc_url( $this->admin_page ); ?>"><?php _e(photostream' ); ?></a></p>
    788788            <?php } ?>
    789789        </div>
     
    809809        ?>
    810810        <div class="stream-info">
    811             <h3><?php _e('Deleting photostream'); ?>: <em><?php echo esc_html( $stream->title ); ?></em></h3>
    812             <p class="info"><strong><?php echo esc_html(  $stream->title ); ?></strong> <?php _e( 'photostream has' ); ?> <?php echo $this->get_processed_media_info( $this->key ); ?>. <a target="_blank" href="<?php echo esc_url( $url ); ?>" title="<?php _e( 'Go to photo stream ' ); ?>. <?php echo esc_attr( $stream->title ); ?>">Visit photostream</a> #<?php echo esc_html( $this->key ); ?></p>
     811            <h3><?php photostream'); ?>: <em><?php echo esc_html( $stream->title ); ?></em></h3>
     812            <p class="info"><strong><?php echo esc_html(  $stream->title ); ?></strong> <?php </a> #<?php echo esc_html( $this->key ); ?></p>
    813813        </div>
    814814
     
    820820            <p>
    821821            <?php
    822             _e( 'Are you sure you want to delete this' );
     822            ' );
    823823            echo ' <strong>' . esc_html( $stream->title ). '</strong> ' ;   
    824             _e( 'photostream?' );
     824            ' );
    825825            ?></p>
    826826
    827             <p><label><input type="checkbox" name="delete_galleries"  /> <?php _e('Also delete the associated'); ?> <?php echo $galleries_display; ?></label></p>
    828             <p><label><input type="checkbox" name="delete_media"  />  <?php _e('Also delete the associated'); ?> <?php echo $media_display; ?></label></p>
    829        
    830             <?php $this->display_submit_form( __('Delete Photostream') ); ?>
     827            <p><label><input type="checkbox" name="delete_galleries"  /> <?php ); ?> <?php echo $galleries_display; ?></label></p>
     828            <p><label><input type="checkbox" name="delete_media"  />  <?php ); ?> <?php echo $media_display; ?></label></p>
     829       
     830            <?php $this->display_submit_form( __('Delete Photostream') ); ?>
    831831
    832832        </form>
     
    847847       
    848848        if ( !wp_verify_nonce( $_POST['ps-nonce'], 'ps-sync-add-1' ) ){
    849             $this->error_message = __( 'Can\'t do that!' );
     849            $this->error_message = __( 'Can\'t do that!' );
    850850            return;
    851851        }
     
    854854        $key = $this->parse_user_input_photostream_key( $_POST['photostream-url'] );
    855855        if( !$key ) {
    856             $this->error_message = __( 'Photostream URL was not right, please try again!' );
     856            $this->error_message = __( 'Photostream URL was not right, please try again!' );
    857857            return;
    858858        }
    859859
    860860        if( in_array( $key, $this->get_streams() ) ){
    861             $this->error_message = __( 'Sorry, you can\'t add the same stream twice.' );
     861            $this->error_message = __( 'Sorry, you can\'t add the same stream twice.' );
    862862            return;
    863863        }
     
    865865        $client = new Photostream_Client( $key );
    866866        if( !is_object($client ) ) {
    867             $this->error_message = __( 'Sorry something went wrong here and we couldn\'t find your photos.' );
     867            $this->error_message = __( 'Sorry something went wrong here and we couldn\'t find your photos.' );
    868868            return;
    869869        }
     
    872872       
    873873        if( !is_object( $data ) ) {
    874             $this->error_message = __( 'Double check your photostream URL. It doesn\'t work!' );
     874            $this->error_message = __( 'Double check your photostream URL. It doesn\'t work!' );
    875875            return;
    876876        }
    877877        if( sizeof( $data->photos ) < 1 ) {
    878             $this->error_message = __( 'It looks like you don\'t have any media in this photostream!' );
     878            $this->error_message = __( 'It looks like you don\'t have any media in this photostream!' );
    879879            return;
    880880        }
     
    900900       
    901901        if ( !wp_verify_nonce( $_POST['ps-nonce'], 'ps-sync-add-2' ) ){
    902             $this->error_message = __( 'Can\'t do that!' );
     902            $this->error_message = __( 'Can\'t do that!' );
    903903            return false;
    904904        }
     
    939939   
    940940        if ( !wp_verify_nonce( $_POST['ps-nonce'], 'photostream-delete-'.$key ) ){
    941             $this->error_message = __( 'Can\'t do that!' );
     941            $this->error_message = __( 'Can\'t do that!' );
    942942            return;
    943943        }
     
    11751175        ) );
    11761176        if( empty( $group_posts ) ){
    1177             $this->error_message = __( 'You first need to create the Gallery' );
     1177            $this->error_message = __( 'You first need to create the Gallery' );
    11781178            return;
    11791179        }
     
    11831183
    11841184        if( !is_object($client ) ) {
    1185             $this->error_message = __( 'It seems that the shotostream URL is offline' );
     1185            $this->error_message = __( 'It seems that the shotostream URL is offline' );
    11861186            return;
    11871187        }
     
    11901190       
    11911191        if( !is_object( $data ) ) {
    1192             $this->error_message = __( 'It seems that the shotostream URL is offline' );
     1192            $this->error_message = __( 'It seems that the shotostream URL is offline' );
    11931193        }
    11941194
    11951195        if( sizeof( $data->photos ) < 1 ) {
    1196             $this->error_message = __( 'It looks like you don\'t have any media in this photostream!' );   
     1196            $this->error_message = __( 'It looks like you don\'t have any media in this photostream!' );
    11971197        }
    11981198       
     
    12091209
    12101210        if ( ! current_user_can( 'upload_files' ) )
    1211             die( json_encode( array( 'success' => __( "Your user account doesn't have permission to upload media" ) ) ) );
     1211            die( json_encode( array( 'success' => __( "Your user account doesn't have permission to upload media" ) ) ) );
    12121212
    12131213        @set_time_limit( 900 ); // 5 minutes per image should be
     
    18031803                'validation',
    18041804                0,
    1805                 sprintf( __('%s does not look like a valid Photostream key.'), $key )
     1805                sprintf( __('%s does not look like a valid Photostream key.'), $key )
    18061806            );
    18071807            return false;
     
    18291829    $schedules['quarter_hourly'] = array(
    18301830        'interval' => 900,
    1831         'display' => __( 'Every 15 minutes' ),
     1831        'display' => __( 'Every 15 minutes' ),
    18321832    );
    18331833    return $schedules;
Note: See TracChangeset for help on using the changeset viewer.