Plugin Directory

Changeset 936003


Ignore:
Timestamp:
06/21/2014 07:41:22 AM (11 years ago)
Author:
fmos
Message:

new button

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wp-photonav/trunk/wp-photonav.php

    r772735 r936003  
    44 Plugin URI: http://fmos.at/wp-photonav
    55 Description: Provides a scrolling field without scrollbars for huge pictures. Especially useful for panorama pictures.
    6  Version: 1.1.0
     6 Version: 1.0.2
    77 Author: Fabian Stanke
    88 Author URI: http://fmos.at
     
    2222        function register_resources() {
    2323            $baseDir = "/".PLUGINDIR."/wp-photonav";
    24             wp_register_script('jquery-photonav', $baseDir."/jquery.photonav.js", array('jquery', 'jquery-ui-draggable'), '1.1.0');
    25             wp_register_style('wp-photonav', $baseDir."/wp-photonav.css", array(), '1.1.0');
     24            wp_register_script('jquery-photonav', $baseDir."/jquery.photonav.js", array('jquery', 'jquery-ui-draggable'), '1.0.2');
     25            wp_register_style('wp-photonav', $baseDir."/wp-photonav.css", array(), '1.0.2');
    2626            wp_enqueue_script('jquery-photonav');
    2727            wp_enqueue_style('wp-photonav');
     
    5959            $media_upload_iframe_src = "media-upload.php?post_id=$uploading_iframe_ID";
    6060            $photonav_upload_iframe_src = apply_filters("photonav_upload_iframe_src", "$media_upload_iframe_src&type=photonav&tab=type_url");
    61             $image_title = "WP-PhotoNav";
     61            $image_title = "photonav.add_photonav";
    6262            $out = "<a href='{$photonav_upload_iframe_src}&amp;TB_iframe=true' id='add_photonav' class='button thickbox' title='$image_title' onclick='return false;'><img src='".WP_PLUGIN_URL."/wp-photonav/media-button.gif' alt='$image_title' /> Photonav</a>";
    6363            print($out);
     
    292292                'popup'=>'none',                // 0.7
    293293                'animate' => '0',               // 0.7
    294                 'position' => 'center',         // 1.1
    295                 'label' => 'none'               // 1.1
    296294            );
    297295            $a = shortcode_atts($defaults, $atts);
     
    302300            if (is_numeric($a['container_width'])) {
    303301                $a['container_width'] = $a['container_width']."px";
    304             } else if ($a['container_width'] == '') {
    305                 $a['container_width'] = 'auto';
    306302            }
    307303            if (is_null($a['container_height'])) {
     
    313309                $a['container_height'] = 'auto';
    314310            }
     311            if ($a['container_width'] == '') {
     312                $a['container_width'] = 'auto';
     313            }
    315314            $valid_modes = array('move', 'drag', 'drag360');
    316315            if (!in_array($a['mode'], $valid_modes)) {
     
    320319            if (!in_array($a['popup'], $valid_popups)) {
    321320                $a['popup'] = 'none';
    322             }
    323             $valid_positions = array('left', 'center', 'right');
    324             if (!in_array($a['position'], $valid_positions)) {
    325                 if (!is_numeric($a['position'])) {
    326                     $a['position'] = $defaults['position'];
    327                 }
    328             }
    329             if ($a['label'] == '') {
    330                 $a['label'] = 'none';
    331321            }
    332322            $template_photonav = <<<PHOTONAVTEMPLATE
     
    346336        </div>
    347337    </div>
    348     <script type="text/javascript">jQuery(document).ready(function(){jQuery("#%PHOTONAV_ID%").photoNav({id:"%PHOTONAV_ID%",mode:"%PHOTONAV_MODE%",popup:"%PHOTONAV_POPUP%",animate:"%PHOTONAV_ANIMATE%",position:"%PHOTONAV_POSITION%",label:"%PHOTONAV_LABEL%"});});</script>
     338    <script type="text/javascript">jQuery(document).ready(function(){jQuery("#%PHOTONAV_ID%").photoNav({id:"%PHOTONAV_ID%",mode:"%PHOTONAV_MODE%",popup:"%PHOTONAV_POPUP%",animate:"%PHOTONAV_ANIMATE%"});});</script>
    349339</div>
    350340PHOTONAVTEMPLATE;
     
    356346            $template_photonav = str_replace("%PHOTONAV_POPUP%", $a['popup'], $template_photonav);
    357347            $template_photonav = str_replace("%PHOTONAV_ANIMATE%", $a['animate'], $template_photonav);
    358             $template_photonav = str_replace("%PHOTONAV_POSITION%", $a['position'], $template_photonav);
    359             $template_photonav = str_replace("%PHOTONAV_LABEL%", $a['label'], $template_photonav);
    360348            return $template_photonav;
    361349        }
     
    445433}
    446434
     435include 'widget.php';
    447436?>
Note: See TracChangeset for help on using the changeset viewer.