Plugin Directory

Changeset 1935293


Ignore:
Timestamp:
09/04/2018 04:57:04 AM (8 years ago)
Author:
darteweb
Message:

1.7 Version released

Location:
dimage-360
Files:
8 added
2 edited

Legend:

Unmodified
Added
Removed
  • dimage-360/trunk/d-image-360.php

    r1903965 r1935293  
    33Plugin Name: DImage 360
    44Author URI: http://www.darteweb.com/
    5 Version: 1.6
     5Version: 1.7
    66Author: D'arteweb
    77Description: DImage 360 is a plugin to embed a 360 view on your WordPress website. It's a user friendly and feature rich plugin to add a responsive 360deg view or 180deg panorama on website.
    88*/
    9 function wp_dimage_360_scripts() {
    10    
     9function wp_dimage_360_scripts()
     10{
    1111    wp_enqueue_style('dimage-style', plugins_url( 'css/dimage-style.css', __FILE__));
    1212    wp_enqueue_script('photo-sphere-js1', plugins_url( 'js/photo-sphere-viewer.min.js', __FILE__),array('jquery'), true);
     
    1515add_action('wp_enqueue_scripts','wp_dimage_360_scripts');
    1616
     17function dimage_fun( $atts )
     18{
    1719
    18 function dimage_fun( $atts ) {
     20    static $count = 0;
     21    $count++;
    1922
    20 static $count = 0;
    21 $count++;
    22 
    23 $atts = shortcode_atts(
    24     array(
    25         'auto-rotate'=>1000,
    26         'url' => '',
    27         'attachment_id'=>'',
    28                 'zoom_level'=>0,
    29                 'anim_speed'=>2,
    30         'control'=>true
    31     ), $atts, 'dimage' );   
    32 
    33 
     23    $atts = shortcode_atts(
     24        array(
     25            'auto-rotate'=>1000,
     26            'url' => '',
     27            'position' => 0,
     28            'attachment_id'=>'',
     29            'zoom_level'=>0,
     30            'anim_speed'=>2,
     31            'control'=>true
     32        ), $atts, 'dimage' );   
     33       
    3434    if(!empty($atts['attachment_id']))
    3535    {
    36        $url = wp_get_attachment_url($atts['attachment_id'], 'full' );
     36       $url = wp_get_attachment_url($atts['attachment_id'], 'full' );
    3737       $atts['url'] = $url;
    3838    }
    39 
    40 ob_start();
     39    ob_start();
    4140    if($atts['url'] === '')
    4241    {
     
    6059                panorama: '<?php echo $atts['url']; ?>',
    6160                container: div,
     61                default_position: {long: <?php echo $atts['position']?>/60},
    6262                time_anim: <?php echo $atts['auto-rotate']; ?>,
    6363                navbar: <?php echo $atts['control']; ?>,
    64                                 zoom_level: <?php echo $atts['zoom_level']; ?>,
    65                                 anim_speed: '<?php echo $atts['anim_speed']; ?>rpm',
    66                                 navbar_style: {
     64                zoom_level: <?php echo $atts['zoom_level']; ?>,
     65                anim_speed: '<?php echo $atts['anim_speed']; ?>rpm',
     66                navbar_style: {
    6767                    backgroundColor: 'rgba(58, 67, 77, 0.7)'
    6868                },     
     
    7070        </script>   
    7171        <?php 
    72     }
     72}
    7373return ob_get_clean();
    7474}
  • dimage-360/trunk/readme.txt

    r1934967 r1935293  
    3535    <strong>zoom_level:</strong> You can set zoom level from 0 to 100. Default it setup as 0.
    3636    <strong>anim_speed:</strong> You can set animation speed from 0 to 100. Default it setup as 2.
     37    <strong>default_position:</strong> Defines the default position, the first point seen by the user. Default it setup as 0.
    3738
    3839    <strong>Example</strong>`[dimage  attachment_id="56" zoom_level="10" anim_speed="10"]`
     
    7273* Zoom level from 0 to 100 functionality added through shortcode.
    7374* Animation Speed from 0 to 100 functionality added through shortcode.
     75
     76= 1.7 =
     77
     78* Release date: September 04, 2018
     79* Default position functionality added through shortcode.
Note: See TracChangeset for help on using the changeset viewer.