Changeset 936003
- Timestamp:
- 06/21/2014 07:41:22 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
wp-photonav/trunk/wp-photonav.php
r772735 r936003 4 4 Plugin URI: http://fmos.at/wp-photonav 5 5 Description: Provides a scrolling field without scrollbars for huge pictures. Especially useful for panorama pictures. 6 Version: 1. 1.06 Version: 1.0.2 7 7 Author: Fabian Stanke 8 8 Author URI: http://fmos.at … … 22 22 function register_resources() { 23 23 $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'); 26 26 wp_enqueue_script('jquery-photonav'); 27 27 wp_enqueue_style('wp-photonav'); … … 59 59 $media_upload_iframe_src = "media-upload.php?post_id=$uploading_iframe_ID"; 60 60 $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"; 62 62 $out = "<a href='{$photonav_upload_iframe_src}&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>"; 63 63 print($out); … … 292 292 'popup'=>'none', // 0.7 293 293 'animate' => '0', // 0.7 294 'position' => 'center', // 1.1295 'label' => 'none' // 1.1296 294 ); 297 295 $a = shortcode_atts($defaults, $atts); … … 302 300 if (is_numeric($a['container_width'])) { 303 301 $a['container_width'] = $a['container_width']."px"; 304 } else if ($a['container_width'] == '') {305 $a['container_width'] = 'auto';306 302 } 307 303 if (is_null($a['container_height'])) { … … 313 309 $a['container_height'] = 'auto'; 314 310 } 311 if ($a['container_width'] == '') { 312 $a['container_width'] = 'auto'; 313 } 315 314 $valid_modes = array('move', 'drag', 'drag360'); 316 315 if (!in_array($a['mode'], $valid_modes)) { … … 320 319 if (!in_array($a['popup'], $valid_popups)) { 321 320 $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';331 321 } 332 322 $template_photonav = <<<PHOTONAVTEMPLATE … … 346 336 </div> 347 337 </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> 349 339 </div> 350 340 PHOTONAVTEMPLATE; … … 356 346 $template_photonav = str_replace("%PHOTONAV_POPUP%", $a['popup'], $template_photonav); 357 347 $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);360 348 return $template_photonav; 361 349 } … … 445 433 } 446 434 435 include 'widget.php'; 447 436 ?>
Note: See TracChangeset
for help on using the changeset viewer.