WordPress.org

Plugin Directory

Changeset 534093


Ignore:
Timestamp:
04/20/12 15:25:54 (2 years ago)
Author:
sivel
Message:

Don't assume a static location for where the upload directory is, use wp_upload_dir to gather that information. This fixes an issue where users of multisite are told to stick it somewhere incorrect.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • shadowbox-js/trunk/inc/admin.php

    r529508 r534093  
    804804     */ 
    805805    function srcinfo_meta_box () { 
     806        $uploads = wp_upload_dir (); 
     807        if ( empty ( $uploads['error'] ) && ! empty ( $uploads['basedir'] ) ) 
     808            $basedir = $uploads['basedir']; 
     809        else 
     810            $basedir = WP_CONTENT_DIR . '/uploads'; 
     811 
     812        $srcdir = $basedir . '/shadowbox-js/src'; 
    806813        ?> 
    807814        <div id="sbgetsrcinfo"> 
     
    809816            <p><?php _e( sprintf ( '<strong>NOTE:</strong> This action will cause this plugin to download the source from this plugin authors site.<br /> 
    810817            If you are concerned about this action "phoning home" you can download the source from<br /> 
    811             <span class="code"><a href="http://dl.sivel.net/wordpress/plugin/shadowbox-js-src.%1$s.zip">http://dl.sivel.net/wordpress/plugin/shadowbox-js-src.%1$s.zip</a></span> and extract to <span class="code">wp-content/uploads/shadowbox-js/src</span>' , $this->sbversion ) , 'shadowbox-js' ); ?></p> 
     818            <span class="code"><a href="http://dl.sivel.net/wordpress/plugin/shadowbox-js-src.%1$s.zip">http://dl.sivel.net/wordpress/plugin/shadowbox-js-src.%1$s.zip</a></span> and extract to <span class="code">%2$s</span>' , $this->sbversion, $srcdir ) , 'shadowbox-js' ); ?></p> 
    812819            <p><?php _e( 'Shadowbox is licensed under the terms of the <a href="http://shadowbox-js.com/LICENSE" target="_blank">Shadowbox.js License</a>. This license grants personal, non-commercial users the right to use Shadowbox without paying a fee. It also provides an option for users who wish to use Shadowbox for commercial purposes. You are encouraged to review the terms of the license before using Shadowbox. If you would like to use Shadowbox for commercial purposes, you can purchase a license from <spann class="code"><a href="http://www.shadowbox-js.com/" target="_blank">http://www.shadowbox-js.com/</a></span>.' ); ?></p> 
    813820            <p><?php _e( 'This plugin also makes use of the <a href="http://www.longtailvideo.com/players/jw-flv-player/" target="_blank">JW FLV Player</a>. JW FLV Player is licensed under the terms of the <a href="http://creativecommons.org/licenses/by-nc-sa/3.0/" target="_blank">Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License</a>. If you would like to use JW FLV Player for commercial purposes, you can purchase a license from <span class="code"><a href="https://www.longtailvideo.com/players/order2" target="_blank">https://www.longtailvideo.com/players/order2</a></span>.' ); ?></p> 
Note: See TracChangeset for help on using the changeset viewer.