C:\xampp\htdocs\landing\wp-content\plugins\mega-addons-for-visual-composer\render\photobook.php


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
<?php
if ( ! defined'ABSPATH' ) ) {
    die( 
'-1' );
}

class 
WPBakeryShortCode_mvc_photobook extends WPBakeryShortCode {

    protected function 
content$atts$content null ) {

        
extractshortcode_atts( array(
            
'image_ids'     => '',
            
'speed'         => '1000',
            
'direction'     => 'RTL',
            
'padding'         => '0',
            
'zoom_depth'     => '1',
            
'auto_delay'     => '1000',
            
'page_numbers'     => '',
            
'closed_book'     => '',
            
'zoom'             => '',
            
'autoplay'         => '',
            
'turn_by_click' => '',
            
'keyboard'         => '',
            
'tabs'             => '',
            
'arrows'         => '',
        ), 
$atts ) );
        
wp_enqueue_style'photobook-css'plugins_url'../css/photobook.css' __FILE__ ));
        
wp_enqueue_script'easing-js'plugins_url'../js/jquery.easing.1.3.js' __FILE__ ), array('jquery') );
        
wp_enqueue_script'photobook-js'plugins_url(   '../js/jquery.booklet.latest.min.js' __FILE__ ), array('jquery''jquery-ui-core''jquery-ui-draggable') );
        
wp_enqueue_script'zoom-js'plugins_url'../js/jquery.zoom.min.js' __FILE__ ), array('jquery') );
        
$content wpb_js_remove_wpautop($contenttrue);
        
ob_start(); ?>
        
        <div class="wcp-loader">
            
        </div>
            <div class="flipbook"
                    data-speed="<?php echo $speed?>"
                    data-direction="<?php echo $direction?>"
                    data-padding="<?php echo $padding?>"
                    data-zoomdepth="<?php echo $zoom_depth?>"
                    data-autodelay="<?php echo $auto_delay?>"
                    data-pagenumbers="<?php echo $page_numbers?>"
                    data-closedbook="<?php echo $closed_book?>"
                    data-zoom="<?php echo $zoom?>"
                    data-autoplay="<?php echo $autoplay?>"
                    data-turnbyclick="<?php echo $turn_by_click?>"
                    data-keyboard="<?php echo $keyboard?>"
                    data-tabs="<?php echo $tabs?>"
                    data-arrows="<?php echo $arrows?>"
                    >
            <?php
                
if ($image_ids != '') {
                    
$all_images explode(','$image_ids);
                    foreach (
$all_images as $image) {
                        
$image_url wp_get_attachment_url$image );
                        echo 
'<div><img src="'.$image_url.'"/></div>';
                    }
                }
            
?>
        </div>
        

        <?php
        
return ob_get_clean();
    }
}


vc_map( array(
    
"name"             => __'Flip Book''photobook' ),
    
"base"             => "mvc_photobook",
    
"category"         => __('Mega Addons'),
    
"description"     => __('3D Page Flip Book''photobook'),
    
"icon" => plugin_dir_url__FILE__ ).'../icons/photobook.png',
    
'params' => array(
        array(
        
"type"             =>     "attach_images",
        
"heading"         =>     __'Images''photobook' ),
        
"param_name"     =>     "image_ids",
        
"description"     =>     __'Select the images that will be used as book pages''photobook' ),
        
"group"         =>     'Pages',
        ),

        array(
            
"type"             =>     "vc_number",
            
"heading"         =>     __'Speed''photobook' ),
            
"param_name"     =>     "speed",
            
"description"     =>     __'Speed of the transition between pages in milliseconds eg 1000''photobook' ),
            
"value"            =>    "1000",
            
"group"         =>     'Settings',
        ),

        array(
            
"type"             =>     "dropdown",
            
"heading"         =>     __'Reading Direction''photobook' ),
            
"param_name"     =>     "direction",
            
"description"     =>     __'Direction of the overall page organization''photobook' ),
            
"group"         =>     'Settings',
            
"value"         => array(
                    
"Right to Left"        => "RTL"
                    
"Left to Right"     => "LTR",
            )
        ),

        array(
            
"type"             =>     "vc_number",
            
"heading"         =>     __'Page Padding''photobook' ),
            
"param_name"     =>     "padding",
            
"description"     =>     __'Padding added to each page wrapper''photobook' ),
            
"group"         =>     'Settings',
        ),

        array(
            
"type"             =>     "vc_number",
            
"heading"         =>     __'Zoom Depth''photobook' ),
            
"param_name"     =>     "zoom_depth",
            
"description"     =>     __'The default value is 1, meaning the zoomed image should be at 100% of its natural width and height''photobook' ),
            
"value"            =>    "1",
            
"group"         =>     'Settings',
        ),

        array(
            
"type"             =>     "vc_number",
            
"heading"         =>     __'AutoPlay delay''photobook' ),
            
"param_name"     =>     "auto_delay",
            
"description"     =>     __'The time in milliseconds between each automatic page flip transition''photobook' ),
            
"group"         =>     'Settings',
        ),

        
// options
        
        
array(
            
"type"             =>     "checkbox",
            
"heading"         =>     __'Page Numbers''photobook' ),
            
"param_name"     =>     "page_numbers",
            
"description"     =>     __'Display page numbers on each page''photobook' ),
            
"group"         =>     'Options',
            
"value"         => array(
                    
"Show"        => "show",
            )
        ),

        array(
            
"type"             =>     "checkbox",
            
"heading"         =>     __'Closed Book''photobook' ),
            
"param_name"     =>     "closed_book",
            
"description"     =>     __'Gives the book the appearance of being closed''photobook' ),
            
"group"         =>     'Options',
            
"value"         => array(
                    
"Enable"        => "enable",
            )
        ),

        array(
            
"type"             =>     "checkbox",
            
"heading"         =>     __'Zoom on Hover''photobook' ),
            
"param_name"     =>     "zoom",
            
"description"     =>     __'Zoom in the page when hover the cursor''photobook' ),
            
"group"         =>     'Options',
            
"value"         => array(
                    
"Enable"        => "enable",
            )
        ),

        array(
            
"type"             =>     "checkbox",
            
"heading"         =>     __'AutoPlay''photobook' ),
            
"param_name"     =>     "autoplay",
            
"description"     =>     __'Enables automatic navigation. Depends on AutoPlay delay in Settings''photobook' ),
            
"group"         =>     'Options',
            
"value"         => array(
                    
"Enable"        => "enable",
            )
        ),

        array(
            
"type"             =>     "checkbox",
            
"heading"         =>     __'Turn Page by clicking Image''photobook' ),
            
"param_name"     =>     "turn_by_click",
            
"description"     =>     __'Enables manual page turning by click on page. Zooming will not work when its enabled''photobook' ),
            
"group"         =>     'Options',
            
"value"         => array(
                    
"Enable"        => "enable",
            )
        ),

        array(
            
"type"             =>     "checkbox",
            
"heading"         =>     __'Keyboard Controls''photobook' ),
            
"param_name"     =>     "keyboard",
            
"description"     =>     __'Enables page navigation using arrows of Keyboard''photobook' ),
            
"group"         =>     'Options',
            
"value"         => array(
                    
"Enable"        => "enable",
            )
        ),

        array(
            
"type"             =>     "checkbox",
            
"heading"         =>     __'Navigation Tabs''photobook' ),
            
"param_name"     =>     "tabs",
            
"description"     =>     __'Adds tabs along the top of the booklet''photobook' ),
            
"group"         =>     'Options',
            
"value"         => array(
                    
"Show"        => "show",
            )
        ),

        array(
            
"type"             =>     "checkbox",
            
"heading"         =>     __'Arrows''photobook' ),
            
"param_name"     =>     "arrows",
            
"description"     =>     __'Adds arrows on both sides of the booklet''photobook' ),
            
"group"         =>     'Options',
            
"value"         => array(
                    
"Show"        => "show",
            )
        ),

        array(
            
"type"             => "vc_links",
            
"param_name"     => "caption_url",
            
"class"            =>    "ult_param_heading",
            
"description"     => __'<span style="Background: #ddd;padding: 10px; display: block; color: #0073aa;font-weight:600;"><a href="https://1.envato.market/02aNL" target="_blank" style="text-decoration: none;">Get the Pro version for more stunning elements and customization options.</a></span>''ihover' ),
            
"group"         => 'Options',
        ),
    ),
) );

x

Windows NT KPTV 6.2 build 9200 (Windows Server 2012 Datacenter Edition) i586