Version Description
- Removing two admin notices related to legacy templates
- Variation notes migrated to custom metabox
- Removing 'Insert default content' button from landing page and modifying metabox order
Download this release
Release Info
Developer | adbox |
Plugin | WordPress Landing Pages |
Version | 2.4.8 |
Comparing to | |
See all releases |
Code changes from version 2.4.7 to 2.4.8
- assets/js/admin/admin.post-edit.js +0 -14
- classes/class.admin-notices.php +1 -137
- classes/class.landing-pages.php +0 -3
- classes/class.metaboxes.php +35 -19
- landing-pages.php +2 -2
- readme.txt +7 -2
- shared/assets/css/magnific-popup.css +60 -132
- shared/assets/js/global/jquery.magnific-popup.min.js +4 -4
- shared/classes/class.events.php +6 -2
- shared/classes/class.form.php +3 -2
- shared/classes/class.inbound-api.php +1 -0
- shared/classes/class.lead-storage.php +10 -0
- shared/classes/class.load-shared.php +2 -2
- shared/classes/class.marketing-button.php +42 -0
- shared/classes/class.menus.adminbar.php +2 -2
- shared/shortcodes/inbound-shortcodes.php +1 -15
- shared/shortcodes/js/shortcodes.js +1 -1
- shared/shortcodes/shortcodes/forms.php +39 -2
assets/js/admin/admin.post-edit.js
CHANGED
@@ -168,20 +168,6 @@ jQuery(document).ready(function ($) {
|
|
168 |
});
|
169 |
});
|
170 |
|
171 |
-
|
172 |
-
/* the_content default overwrite */
|
173 |
-
jQuery('body').on('click', '#overwrite-content', function () {
|
174 |
-
if (confirm('Are you sure you want to overwrite what is currently in the main edit box above?')) {
|
175 |
-
var ctmce = jQuery('#content-tmce');
|
176 |
-
switchEditors.switchto(ctmce[0]); // switch to tinymce
|
177 |
-
setTimeout(function () {
|
178 |
-
var default_content = jQuery(".inbound-default-content-option textarea").first().text();
|
179 |
-
jQuery("#content_ifr").contents().find("body").html(default_content);
|
180 |
-
}, 500);
|
181 |
-
|
182 |
-
}
|
183 |
-
});
|
184 |
-
|
185 |
/* Colorpicker fix */
|
186 |
jQuery('.jpicker').one('mouseenter', function () {
|
187 |
jQuery(this).jPicker({
|
168 |
});
|
169 |
});
|
170 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
171 |
/* Colorpicker fix */
|
172 |
jQuery('.jpicker').one('mouseenter', function () {
|
173 |
jQuery(this).jPicker({
|
classes/class.admin-notices.php
CHANGED
@@ -11,8 +11,6 @@ class Landing_Pages_Admin_Notices {
|
|
11 |
add_action('admin_notices', array( __CLASS__, 'dont_install_landing_page_templates_here'));
|
12 |
add_action('admin_notices', array( __CLASS__, 'get_more_templates_notice' ) );
|
13 |
add_action('admin_notices', array( __CLASS__, 'permalink_structure_notice' ) );
|
14 |
-
add_action('admin_notices', array( __CLASS__, 'save_legacy_landing_page' ) );
|
15 |
-
add_action('admin_notices', array( __CLASS__, 'download_legacy_templates' ) );
|
16 |
}
|
17 |
|
18 |
/**
|
@@ -127,64 +125,6 @@ class Landing_Pages_Admin_Notices {
|
|
127 |
}
|
128 |
}
|
129 |
|
130 |
-
/**
|
131 |
-
* Notice to tell people that variation A needs to be save first
|
132 |
-
*/
|
133 |
-
public static function save_legacy_landing_page(){
|
134 |
-
global $post;
|
135 |
-
|
136 |
-
$screen = get_current_screen();
|
137 |
-
|
138 |
-
if ( !isset($post) || $screen->id == 'landing-pages' ||$screen->id == 'edit-landing-page' || $post->post_status !='publish' ) {
|
139 |
-
return;
|
140 |
-
}
|
141 |
-
|
142 |
-
/* only show administrators */
|
143 |
-
if( !current_user_can('activate_plugins') ) {
|
144 |
-
return;
|
145 |
-
}
|
146 |
-
|
147 |
-
$extension_data = Landing_Pages_Load_Extensions::get_extended_data();;
|
148 |
-
$current_template = Landing_Pages_Variations::get_current_template($post->ID);
|
149 |
-
|
150 |
-
if ( !isset($extension_data[$current_template]['info']['data_type']) || $extension_data[$current_template]['info']['data_type'] != 'acf4' ) {
|
151 |
-
return;
|
152 |
-
}
|
153 |
-
|
154 |
-
$settings = Landing_Pages_Meta::get_settings( $post->ID );
|
155 |
-
$variations = ( isset($settings['variations']) ) ? $settings['variations'] : null;
|
156 |
-
|
157 |
-
if ($variations) {
|
158 |
-
return;
|
159 |
-
}
|
160 |
-
|
161 |
-
?>
|
162 |
-
<style type='text/css'>
|
163 |
-
#post {
|
164 |
-
display: none;
|
165 |
-
}
|
166 |
-
|
167 |
-
.wrap h1 {
|
168 |
-
display: none;
|
169 |
-
}
|
170 |
-
</style>
|
171 |
-
<script type='text/javascript'>
|
172 |
-
jQuery(document).ready(function () {
|
173 |
-
jQuery('#update_landing_page').click(function () {
|
174 |
-
jQuery('#post').submit();
|
175 |
-
});
|
176 |
-
|
177 |
-
});
|
178 |
-
</script>
|
179 |
-
<div class="error">
|
180 |
-
<p>
|
181 |
-
<?php echo sprintf(__('This landing page requires a database update to continue. %s %sUpdate Now%s', 'landing-pages'), '<br><br>', '<button class="button button-primary" id="update_landing_page">', '</button>'); ?>
|
182 |
-
</p>
|
183 |
-
</div>
|
184 |
-
<?php
|
185 |
-
|
186 |
-
}
|
187 |
-
|
188 |
/**
|
189 |
* Notice to tell people that variation A needs to be save first
|
190 |
*/
|
@@ -193,7 +133,7 @@ class Landing_Pages_Admin_Notices {
|
|
193 |
|
194 |
$screen = get_current_screen();
|
195 |
|
196 |
-
if ( !isset($post) || $screen->id == 'landing-pages' ||$screen->id == 'edit-landing-page' ||
|
197 |
return;
|
198 |
}
|
199 |
|
@@ -267,82 +207,6 @@ class Landing_Pages_Admin_Notices {
|
|
267 |
<?php
|
268 |
}
|
269 |
|
270 |
-
|
271 |
-
/**
|
272 |
-
* Prompt user to download required templates
|
273 |
-
*/
|
274 |
-
public static function download_legacy_templates() {
|
275 |
-
global $pagenow;
|
276 |
-
|
277 |
-
/* ignore for pro users */
|
278 |
-
if (class_exists('Inbound_Pro_Plugin')) {
|
279 |
-
return;
|
280 |
-
}
|
281 |
-
|
282 |
-
/* only show administrators */
|
283 |
-
if( !current_user_can('activate_plugins') ) {
|
284 |
-
return;
|
285 |
-
}
|
286 |
-
|
287 |
-
$message_id = 'download-legacy-landing-page-templates';
|
288 |
-
|
289 |
-
/* check if user viewed message already */
|
290 |
-
if (self::check_if_viewed($message_id)) {
|
291 |
-
return;
|
292 |
-
}
|
293 |
-
|
294 |
-
/* check to see if ctas before 5/18/2016 exist */
|
295 |
-
$args = array(
|
296 |
-
'posts_per_page' => 5,
|
297 |
-
'post_type' => 'landing-page',
|
298 |
-
'order' => 'DESC',
|
299 |
-
'date_query' => array(
|
300 |
-
'before' => '2016-08-05'
|
301 |
-
)
|
302 |
-
);
|
303 |
-
|
304 |
-
$posts = get_posts($args);
|
305 |
-
|
306 |
-
if ($posts && count($posts) < 1) {
|
307 |
-
return;
|
308 |
-
}
|
309 |
-
|
310 |
-
$link = "https://www.inboundnow.com/inbound-now-removing-several-free-templates-core-plugin/";
|
311 |
-
|
312 |
-
?>
|
313 |
-
<div class="error" style="margin-bottom:10px;" id="inbound_notice_<?php echo $message_id; ?>">
|
314 |
-
<h3 style='font-weight:normal; margin-bottom:0px;padding-bottom:0px;'>
|
315 |
-
<strong>
|
316 |
-
<?php _e( 'Very Important Notice for Landing Pages Users!' , 'inbound-pro' ); ?>
|
317 |
-
</strong>
|
318 |
-
<br>
|
319 |
-
<br>
|
320 |
-
</h3>
|
321 |
-
<p style='font-weight:normal; margin-top:0px;margin-bottom:0px;'>
|
322 |
-
<?php _e( "We've removed the following templates from Landing Pages plugin:" , "inbound-pro" ); ?>
|
323 |
-
<br><br>
|
324 |
-
<ul style="list-style-type: circle; margin-left:25px;">
|
325 |
-
<li>Dropcap</li>
|
326 |
-
<li>Half & Half</li>
|
327 |
-
<li>Tublar</li>
|
328 |
-
<li>Countdown Lander</li>
|
329 |
-
</ul>
|
330 |
-
</p>
|
331 |
-
<p>
|
332 |
-
<?php _e( 'They are free & available to be re-downloaded via the link below. If you are using one of the templates above you will need to download and reinstall it for your landing page to continue working. We are doing this to reduce overall plugin size & load times. We are very sorry for any inconvenience this might cause you.' , 'inbound-pro' ) ?>
|
333 |
-
</p>
|
334 |
-
<a class="button button-large button-primary" href="<?php echo $link; ?>" ><?php _e('Recover Templates (free)','inbound-pro'); ?></a>
|
335 |
-
<a class="button button-large inbound_dismiss" href="#" id="<?php echo $message_id; ?>" data-notification-id="<?php echo $message_id; ?>" ><?php _e('Dismiss','inbound-pro'); ?></a>
|
336 |
-
<br><br>
|
337 |
-
</div>
|
338 |
-
<?php
|
339 |
-
|
340 |
-
/* echo javascript used to listen for notice closing */
|
341 |
-
self::javascript_dismiss_notice();
|
342 |
-
|
343 |
-
}
|
344 |
-
|
345 |
-
|
346 |
}
|
347 |
|
348 |
new Landing_Pages_Admin_Notices;
|
11 |
add_action('admin_notices', array( __CLASS__, 'dont_install_landing_page_templates_here'));
|
12 |
add_action('admin_notices', array( __CLASS__, 'get_more_templates_notice' ) );
|
13 |
add_action('admin_notices', array( __CLASS__, 'permalink_structure_notice' ) );
|
|
|
|
|
14 |
}
|
15 |
|
16 |
/**
|
125 |
}
|
126 |
}
|
127 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
128 |
/**
|
129 |
* Notice to tell people that variation A needs to be save first
|
130 |
*/
|
133 |
|
134 |
$screen = get_current_screen();
|
135 |
|
136 |
+
if ( !isset($post) || $screen->id == 'landing-pages' ||$screen->id == 'edit-landing-page' || $post->post_status !='publish' ) {
|
137 |
return;
|
138 |
}
|
139 |
|
207 |
<?php
|
208 |
}
|
209 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
210 |
}
|
211 |
|
212 |
new Landing_Pages_Admin_Notices;
|
classes/class.landing-pages.php
CHANGED
@@ -619,9 +619,6 @@ function lp_add_option($key, $type, $id, $default = null, $label = null, $descri
|
|
619 |
case "datepicker":
|
620 |
return array('label' => $label, 'description' => $description, 'id' => $id, 'type' => 'datepicker', 'default' => $default);
|
621 |
break;
|
622 |
-
case "default-content":
|
623 |
-
return array('label' => $label, 'description' => $description, 'id' => $id, 'type' => 'default-content', 'default' => $default);
|
624 |
-
break;
|
625 |
case "html":
|
626 |
return array('label' => $label, 'description' => $description, 'id' => $id, 'type' => 'html', 'default' => $default);
|
627 |
break;
|
619 |
case "datepicker":
|
620 |
return array('label' => $label, 'description' => $description, 'id' => $id, 'type' => 'datepicker', 'default' => $default);
|
621 |
break;
|
|
|
|
|
|
|
622 |
case "html":
|
623 |
return array('label' => $label, 'description' => $description, 'id' => $id, 'type' => 'html', 'default' => $default);
|
624 |
break;
|
classes/class.metaboxes.php
CHANGED
@@ -66,6 +66,17 @@ class Landing_Pages_Metaboxes {
|
|
66 |
);
|
67 |
}
|
68 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
69 |
/* Select Template Metbox */
|
70 |
add_meta_box(
|
71 |
'lp_metabox_select_template', /* $id */
|
@@ -100,15 +111,6 @@ class Landing_Pages_Metaboxes {
|
|
100 |
|
101 |
}
|
102 |
|
103 |
-
/* Add conversion area for default template */
|
104 |
-
add_meta_box(
|
105 |
-
'lp_2_form_content',
|
106 |
-
__('Landing Page Form or Conversion Button - <em>click the black & blue power button icon to build forms/buttons</em>', 'landing-pages'),
|
107 |
-
array( __CLASS__ , 'display_conversion_area_metabox' ),
|
108 |
-
'landing-page',
|
109 |
-
'normal',
|
110 |
-
'high'
|
111 |
-
);
|
112 |
|
113 |
/* add custom css */
|
114 |
add_meta_box(
|
@@ -130,6 +132,16 @@ class Landing_Pages_Metaboxes {
|
|
130 |
'low'
|
131 |
);
|
132 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
133 |
/* Add AB Testing Stats Box */
|
134 |
add_meta_box(
|
135 |
'lp_ab_display_stats_metabox',
|
@@ -354,15 +366,10 @@ class Landing_Pages_Metaboxes {
|
|
354 |
|
355 |
$variation_id = Landing_Pages_Variations::get_current_variation_id( );
|
356 |
$main_headline = Landing_Pages_Variations::get_main_headline( $post->ID , $variation_id );
|
357 |
-
$variation_notes = Landing_Pages_Variations::get_variation_notes( $post->ID , $variation_id );
|
358 |
|
359 |
?>
|
360 |
-
<div id='lp-notes-area'>
|
361 |
-
<span id='add-lp-notes'><?php _e('Notes' , 'landing-pages'); ?></span>
|
362 |
-
<input placeholder='<?php _e('Add Notes to your variation. Example: This version is testing a green submit button ' , 'landing-pages'); ?>' type='text' class='lp-notes' name='<?php echo Landing_Pages_Variations::prepare_input_id( 'lp-variation-notes' , false , true); ?>' id='lp-variation-notes' value='<?php echo addslashes($variation_notes); ?>' size='30'>
|
363 |
-
</div>
|
364 |
<div id="main-title-area">
|
365 |
-
<input type="text" name="<?php echo Landing_Pages_Variations::prepare_input_id( 'lp-main-headline'); ?>" placeholder="<?php _e('
|
366 |
</div>
|
367 |
<div id="switch-lp">0</div>
|
368 |
|
@@ -717,6 +724,19 @@ href='?post=<?php echo $post->ID; ?>&action=edit&action-variation-id=<?php echo
|
|
717 |
echo '<textarea name="'.$custom_js_name.'" id="lp_custom_js" rows="5" cols="30" style="width:100%;">'.$custom_js.'</textarea>';
|
718 |
}
|
719 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
720 |
/**
|
721 |
* Display select template container
|
722 |
*/
|
@@ -999,10 +1019,6 @@ href='?post=<?php echo $post->ID; ?>&action=edit&action-variation-id=<?php echo
|
|
999 |
|
1000 |
echo '<div class="wp-call-to-action-option-td inbound-meta-box-option ' . $type_class_option . '" data-field-type="' . $field['type'] . '">';
|
1001 |
switch ($field['type']) {
|
1002 |
-
/* default content for the_content */
|
1003 |
-
case 'default-content':
|
1004 |
-
echo '<span id="overwrite-content" class="button-secondary">Insert Default Content into main Content area</span><div style="display:none;"><textarea name="' . $field_id . '" id="' . $field_id . '" class="default-content" cols="106" rows="6" style="width: 75%; display:hidden;">' . $meta . '</textarea></div>';
|
1005 |
-
break;
|
1006 |
case 'description-block':
|
1007 |
echo '<div id="' . $field_id . '" class="description-block">' . $field['description'] . '</div>';
|
1008 |
break;
|
66 |
);
|
67 |
}
|
68 |
|
69 |
+
|
70 |
+
/* Add conversion area for default template */
|
71 |
+
add_meta_box(
|
72 |
+
'lp_2_form_content',
|
73 |
+
__('Insert Form / Conversion Content', 'landing-pages'),
|
74 |
+
array( __CLASS__ , 'display_conversion_area_metabox' ),
|
75 |
+
'landing-page',
|
76 |
+
'normal',
|
77 |
+
'high'
|
78 |
+
);
|
79 |
+
|
80 |
/* Select Template Metbox */
|
81 |
add_meta_box(
|
82 |
'lp_metabox_select_template', /* $id */
|
111 |
|
112 |
}
|
113 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
114 |
|
115 |
/* add custom css */
|
116 |
add_meta_box(
|
132 |
'low'
|
133 |
);
|
134 |
|
135 |
+
/* add custom variation notes */
|
136 |
+
add_meta_box(
|
137 |
+
'lp_4_variation_notes',
|
138 |
+
__('Variation Notes' , 'landing-pages') ,
|
139 |
+
array( __CLASS__ , 'display_variation_notes' ),
|
140 |
+
'landing-page',
|
141 |
+
'normal',
|
142 |
+
'low'
|
143 |
+
);
|
144 |
+
|
145 |
/* Add AB Testing Stats Box */
|
146 |
add_meta_box(
|
147 |
'lp_ab_display_stats_metabox',
|
366 |
|
367 |
$variation_id = Landing_Pages_Variations::get_current_variation_id( );
|
368 |
$main_headline = Landing_Pages_Variations::get_main_headline( $post->ID , $variation_id );
|
|
|
369 |
|
370 |
?>
|
|
|
|
|
|
|
|
|
371 |
<div id="main-title-area">
|
372 |
+
<input type="text" name="<?php echo Landing_Pages_Variations::prepare_input_id( 'lp-main-headline'); ?>" placeholder="<?php _e('Enter Headline' , 'landing-pages'); ?>" id="lp-main-headline" value="<?php echo $main_headline; ?>" title="'. __('This headline will appear in the landing page template.' , 'landing-pages') .'">
|
373 |
</div>
|
374 |
<div id="switch-lp">0</div>
|
375 |
|
724 |
echo '<textarea name="'.$custom_js_name.'" id="lp_custom_js" rows="5" cols="30" style="width:100%;">'.$custom_js.'</textarea>';
|
725 |
}
|
726 |
|
727 |
+
/**
|
728 |
+
* Display variation notes metabox
|
729 |
+
*/
|
730 |
+
public static function display_variation_notes() {
|
731 |
+
global $post;
|
732 |
+
|
733 |
+
$variation_id = Landing_Pages_Variations::get_current_variation_id( );
|
734 |
+
$variation_notes = Landing_Pages_Variations::get_variation_notes( $post->ID , $variation_id );
|
735 |
+
$variation_notes_id = Landing_Pages_Variations::prepare_input_id( 'lp-variation-notes');
|
736 |
+
|
737 |
+
echo '<textarea name="'.$variation_notes_id.'" id="lp_variation_notes" rows="5" cols="30" style="width:100%;">'.$variation_notes.'</textarea>';
|
738 |
+
}
|
739 |
+
|
740 |
/**
|
741 |
* Display select template container
|
742 |
*/
|
1019 |
|
1020 |
echo '<div class="wp-call-to-action-option-td inbound-meta-box-option ' . $type_class_option . '" data-field-type="' . $field['type'] . '">';
|
1021 |
switch ($field['type']) {
|
|
|
|
|
|
|
|
|
1022 |
case 'description-block':
|
1023 |
echo '<div id="' . $field_id . '" class="description-block">' . $field['description'] . '</div>';
|
1024 |
break;
|
landing-pages.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Landing Pages
|
4 |
Plugin URI: http://www.inboundnow.com/landing-pages/
|
5 |
Description: Landing page template framework with variant testing and lead capturing through cooperation with Inbound Now's Leads plugin. This is the stand alone version served through WordPress.org.
|
6 |
-
Version: 2.4.
|
7 |
Author: Inbound Now
|
8 |
Author URI: http://www.inboundnow.com/
|
9 |
|
@@ -37,7 +37,7 @@ if (!class_exists('Inbound_Landing_Pages_Plugin')) {
|
|
37 |
*/
|
38 |
private static function load_constants() {
|
39 |
|
40 |
-
define('LANDINGPAGES_CURRENT_VERSION', '2.4.
|
41 |
define('LANDINGPAGES_URLPATH', plugins_url( '/' , __FILE__ ) );
|
42 |
define('LANDINGPAGES_PATH', WP_PLUGIN_DIR.'/'.plugin_basename( dirname(__FILE__) ).'/' );
|
43 |
define('LANDINGPAGES_PLUGIN_SLUG', 'landing-pages' );
|
3 |
Plugin Name: Landing Pages
|
4 |
Plugin URI: http://www.inboundnow.com/landing-pages/
|
5 |
Description: Landing page template framework with variant testing and lead capturing through cooperation with Inbound Now's Leads plugin. This is the stand alone version served through WordPress.org.
|
6 |
+
Version: 2.4.8
|
7 |
Author: Inbound Now
|
8 |
Author URI: http://www.inboundnow.com/
|
9 |
|
37 |
*/
|
38 |
private static function load_constants() {
|
39 |
|
40 |
+
define('LANDINGPAGES_CURRENT_VERSION', '2.4.8' );
|
41 |
define('LANDINGPAGES_URLPATH', plugins_url( '/' , __FILE__ ) );
|
42 |
define('LANDINGPAGES_PATH', WP_PLUGIN_DIR.'/'.plugin_basename( dirname(__FILE__) ).'/' );
|
43 |
define('LANDINGPAGES_PLUGIN_SLUG', 'landing-pages' );
|
readme.txt
CHANGED
@@ -6,8 +6,8 @@ License: GPLv2 or later
|
|
6 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
7 |
Tags: landing pages, inbound marketing, conversion pages, split testing, a b test, a b testing, a/b test, a/b testing, coming soon page, email list, landing page, list building, maintenance page, squeeze page, inbound now, landing-pages, splash pages, cpa, click tracking, goal tracking, analytics, free landing page templates
|
8 |
Requires at least: 3.8
|
9 |
-
Tested up to: 4.7.
|
10 |
-
Stable Tag: 2.4.
|
11 |
|
12 |
Create landing pages for your WordPress site. Monitor and improve conversion rates, run A/B split tests, customize your own templates and more.
|
13 |
|
@@ -84,6 +84,11 @@ We also offer a guide for using <a href="https://github.com/inboundnow/landing-p
|
|
84 |
|
85 |
== Changelog ==
|
86 |
|
|
|
|
|
|
|
|
|
|
|
87 |
= 2.4.7 =
|
88 |
* Adding revision support to Landing Pages
|
89 |
* Updating Select2 assets to work with WooCommerce 3.0
|
6 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
7 |
Tags: landing pages, inbound marketing, conversion pages, split testing, a b test, a b testing, a/b test, a/b testing, coming soon page, email list, landing page, list building, maintenance page, squeeze page, inbound now, landing-pages, splash pages, cpa, click tracking, goal tracking, analytics, free landing page templates
|
8 |
Requires at least: 3.8
|
9 |
+
Tested up to: 4.7.4
|
10 |
+
Stable Tag: 2.4.8
|
11 |
|
12 |
Create landing pages for your WordPress site. Monitor and improve conversion rates, run A/B split tests, customize your own templates and more.
|
13 |
|
84 |
|
85 |
== Changelog ==
|
86 |
|
87 |
+
= 2.4.8 =
|
88 |
+
* Removing two admin notices related to legacy templates
|
89 |
+
* Variation notes migrated to custom metabox
|
90 |
+
* Removing 'Insert default content' button from landing page and modifying metabox order
|
91 |
+
|
92 |
= 2.4.7 =
|
93 |
* Adding revision support to Landing Pages
|
94 |
* Updating Select2 assets to work with WooCommerce 3.0
|
shared/assets/css/magnific-popup.css
CHANGED
@@ -4,19 +4,18 @@
|
|
4 |
left: 0;
|
5 |
width: 100%;
|
6 |
height: 100%;
|
7 |
-
z-index:
|
8 |
overflow: hidden;
|
9 |
position: fixed;
|
10 |
background: #0b0b0b;
|
11 |
-
opacity: 0.8;
|
12 |
-
filter: alpha(opacity=80); }
|
13 |
|
14 |
.mfp-wrap {
|
15 |
top: 0;
|
16 |
left: 0;
|
17 |
width: 100%;
|
18 |
height: 100%;
|
19 |
-
z-index:
|
20 |
position: fixed;
|
21 |
outline: none !important;
|
22 |
-webkit-backface-visibility: hidden; }
|
@@ -29,8 +28,6 @@
|
|
29 |
left: 0;
|
30 |
top: 0;
|
31 |
padding: 0 8px;
|
32 |
-
-webkit-box-sizing: border-box;
|
33 |
-
-moz-box-sizing: border-box;
|
34 |
box-sizing: border-box; }
|
35 |
|
36 |
.mfp-container:before {
|
@@ -58,8 +55,7 @@
|
|
58 |
.mfp-ajax-cur {
|
59 |
cursor: progress; }
|
60 |
|
61 |
-
.mfp-zoom-out-cur,
|
62 |
-
.mfp-zoom-out-cur .mfp-image-holder .mfp-close {
|
63 |
cursor: -moz-zoom-out;
|
64 |
cursor: -webkit-zoom-out;
|
65 |
cursor: zoom-out; }
|
@@ -88,7 +84,7 @@
|
|
88 |
display: none !important; }
|
89 |
|
90 |
.mfp-preloader {
|
91 |
-
color: #
|
92 |
position: absolute;
|
93 |
top: 50%;
|
94 |
width: auto;
|
@@ -97,12 +93,10 @@
|
|
97 |
left: 8px;
|
98 |
right: 8px;
|
99 |
z-index: 1044; }
|
100 |
-
|
101 |
.mfp-preloader a {
|
102 |
-
color: #
|
103 |
-
|
104 |
.mfp-preloader a:hover {
|
105 |
-
color:
|
106 |
|
107 |
.mfp-s-ready .mfp-preloader {
|
108 |
display: none; }
|
@@ -118,10 +112,11 @@ button.mfp-arrow {
|
|
118 |
border: 0;
|
119 |
-webkit-appearance: none;
|
120 |
display: block;
|
|
|
121 |
padding: 0;
|
122 |
z-index: 1046;
|
123 |
-
|
124 |
-
|
125 |
|
126 |
button::-moz-focus-inner {
|
127 |
padding: 0;
|
@@ -138,21 +133,22 @@ button::-moz-focus-inner {
|
|
138 |
text-align: center;
|
139 |
opacity: 0.65;
|
140 |
padding: 0 0 18px 10px;
|
141 |
-
color:
|
142 |
font-style: normal;
|
143 |
font-size: 28px;
|
144 |
font-family: Arial, Baskerville, monospace; }
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
|
|
149 |
|
150 |
.mfp-close-btn-in .mfp-close {
|
151 |
-
color: #
|
152 |
|
153 |
.mfp-image-holder .mfp-close,
|
154 |
.mfp-iframe-holder .mfp-close {
|
155 |
-
color:
|
156 |
right: -6px;
|
157 |
text-align: right;
|
158 |
padding-right: 6px;
|
@@ -162,9 +158,10 @@ button::-moz-focus-inner {
|
|
162 |
position: absolute;
|
163 |
top: 0;
|
164 |
right: 0;
|
165 |
-
color: #
|
166 |
font-size: 12px;
|
167 |
-
line-height: 18px;
|
|
|
168 |
|
169 |
.mfp-arrow {
|
170 |
position: absolute;
|
@@ -175,18 +172,14 @@ button::-moz-focus-inner {
|
|
175 |
padding: 0;
|
176 |
width: 90px;
|
177 |
height: 110px;
|
178 |
-
-webkit-tap-highlight-color:
|
179 |
-
|
180 |
.mfp-arrow:active {
|
181 |
margin-top: -54px; }
|
182 |
-
|
183 |
.mfp-arrow:hover,
|
184 |
.mfp-arrow:focus {
|
185 |
opacity: 1; }
|
186 |
-
|
187 |
-
.mfp-arrow:
|
188 |
-
.mfp-arrow .mfp-b,
|
189 |
-
.mfp-arrow .mfp-a {
|
190 |
content: '';
|
191 |
display: block;
|
192 |
width: 0;
|
@@ -197,52 +190,47 @@ button::-moz-focus-inner {
|
|
197 |
margin-top: 35px;
|
198 |
margin-left: 35px;
|
199 |
border: medium inset transparent; }
|
200 |
-
.mfp-arrow:after
|
201 |
-
.mfp-arrow .mfp-a {
|
202 |
border-top-width: 13px;
|
203 |
border-bottom-width: 13px;
|
204 |
top: 8px; }
|
205 |
-
.mfp-arrow:before
|
206 |
-
.mfp-arrow .mfp-b {
|
207 |
border-top-width: 21px;
|
208 |
-
border-bottom-width: 21px;
|
|
|
209 |
|
210 |
.mfp-arrow-left {
|
211 |
left: 0; }
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
margin-left: 25px;
|
219 |
-
border-right: 27px solid #3f3f3f; }
|
220 |
|
221 |
.mfp-arrow-right {
|
222 |
right: 0; }
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
.mfp-arrow-right .mfp-b {
|
229 |
-
border-left: 27px solid #3f3f3f; }
|
230 |
|
231 |
.mfp-iframe-holder {
|
232 |
padding-top: 40px;
|
233 |
padding-bottom: 40px; }
|
234 |
-
|
235 |
.mfp-iframe-holder .mfp-content {
|
236 |
line-height: 0;
|
237 |
width: 100%;
|
238 |
max-width: 900px; }
|
|
|
|
|
239 |
|
240 |
.mfp-iframe-scaler {
|
241 |
width: 100%;
|
242 |
height: 0;
|
243 |
overflow: hidden;
|
244 |
padding-top: 56.25%; }
|
245 |
-
|
246 |
.mfp-iframe-scaler iframe {
|
247 |
position: absolute;
|
248 |
display: block;
|
@@ -251,10 +239,7 @@ button::-moz-focus-inner {
|
|
251 |
width: 100%;
|
252 |
height: 100%;
|
253 |
box-shadow: 0 0 8px rgba(0, 0, 0, 0.6);
|
254 |
-
background:
|
255 |
-
|
256 |
-
.mfp-iframe-holder .mfp-close {
|
257 |
-
top: -40px; }
|
258 |
|
259 |
/* Main image in popup */
|
260 |
img.mfp-img {
|
@@ -263,13 +248,13 @@ img.mfp-img {
|
|
263 |
height: auto;
|
264 |
display: block;
|
265 |
line-height: 0;
|
266 |
-
-webkit-box-sizing: border-box;
|
267 |
-
-moz-box-sizing: border-box;
|
268 |
box-sizing: border-box;
|
269 |
padding: 40px 0 40px;
|
270 |
margin: 0 auto; }
|
271 |
|
272 |
/* The shadow behind the image */
|
|
|
|
|
273 |
.mfp-figure:after {
|
274 |
content: '';
|
275 |
position: absolute;
|
@@ -282,10 +267,14 @@ img.mfp-img {
|
|
282 |
height: auto;
|
283 |
z-index: -1;
|
284 |
box-shadow: 0 0 8px rgba(0, 0, 0, 0.6);
|
285 |
-
background: #
|
286 |
-
|
287 |
-
|
288 |
-
|
|
|
|
|
|
|
|
|
289 |
|
290 |
.mfp-bottom-bar {
|
291 |
margin-top: -36px;
|
@@ -298,16 +287,10 @@ img.mfp-img {
|
|
298 |
.mfp-title {
|
299 |
text-align: left;
|
300 |
line-height: 18px;
|
301 |
-
color: #
|
302 |
word-wrap: break-word;
|
303 |
padding-right: 36px; }
|
304 |
|
305 |
-
.mfp-figure small {
|
306 |
-
color: #bdbdbd;
|
307 |
-
display: block;
|
308 |
-
font-size: 12px;
|
309 |
-
line-height: 14px; }
|
310 |
-
|
311 |
.mfp-image-holder .mfp-content {
|
312 |
max-width: 100%; }
|
313 |
|
@@ -316,20 +299,19 @@ img.mfp-img {
|
|
316 |
|
317 |
@media screen and (max-width: 800px) and (orientation: landscape), screen and (max-height: 300px) {
|
318 |
/**
|
319 |
-
|
320 |
-
|
321 |
.mfp-img-mobile .mfp-image-holder {
|
322 |
padding-left: 0;
|
323 |
padding-right: 0; }
|
324 |
-
|
325 |
.mfp-img-mobile img.mfp-img {
|
326 |
padding: 0; }
|
327 |
-
|
328 |
-
/* The shadow behind the image */
|
329 |
.mfp-img-mobile .mfp-figure:after {
|
330 |
top: 0;
|
331 |
bottom: 0; }
|
332 |
-
|
|
|
|
|
333 |
.mfp-img-mobile .mfp-bottom-bar {
|
334 |
background: rgba(0, 0, 0, 0.6);
|
335 |
bottom: 0;
|
@@ -337,17 +319,12 @@ img.mfp-img {
|
|
337 |
top: auto;
|
338 |
padding: 3px 5px;
|
339 |
position: fixed;
|
340 |
-
-webkit-box-sizing: border-box;
|
341 |
-
-moz-box-sizing: border-box;
|
342 |
box-sizing: border-box; }
|
343 |
-
|
344 |
.mfp-img-mobile .mfp-bottom-bar:empty {
|
345 |
padding: 0; }
|
346 |
-
|
347 |
.mfp-img-mobile .mfp-counter {
|
348 |
right: 5px;
|
349 |
top: 3px; }
|
350 |
-
|
351 |
.mfp-img-mobile .mfp-close {
|
352 |
top: 0;
|
353 |
right: 0;
|
@@ -357,67 +334,18 @@ img.mfp-img {
|
|
357 |
background: rgba(0, 0, 0, 0.6);
|
358 |
position: fixed;
|
359 |
text-align: center;
|
360 |
-
padding: 0; }
|
361 |
|
362 |
-
.mfp-img-mobile .mfp-figure small {
|
363 |
-
display: inline;
|
364 |
-
margin-left: 5px; } }
|
365 |
@media all and (max-width: 900px) {
|
366 |
.mfp-arrow {
|
367 |
-webkit-transform: scale(0.75);
|
368 |
transform: scale(0.75); }
|
369 |
-
|
370 |
.mfp-arrow-left {
|
371 |
-webkit-transform-origin: 0;
|
372 |
transform-origin: 0; }
|
373 |
-
|
374 |
.mfp-arrow-right {
|
375 |
-webkit-transform-origin: 100%;
|
376 |
transform-origin: 100%; }
|
377 |
-
|
378 |
.mfp-container {
|
379 |
padding-left: 6px;
|
380 |
-
padding-right: 6px; } }
|
381 |
-
.mfp-ie7 .mfp-img {
|
382 |
-
padding: 0; }
|
383 |
-
.mfp-ie7 .mfp-bottom-bar {
|
384 |
-
width: 600px;
|
385 |
-
left: 50%;
|
386 |
-
margin-left: -300px;
|
387 |
-
margin-top: 5px;
|
388 |
-
padding-bottom: 5px; }
|
389 |
-
.mfp-ie7 .mfp-container {
|
390 |
-
padding: 0; }
|
391 |
-
.mfp-ie7 .mfp-content {
|
392 |
-
padding-top: 44px; }
|
393 |
-
.mfp-ie7 .mfp-close {
|
394 |
-
top: 0;
|
395 |
-
right: 0;
|
396 |
-
padding-top: 0; }
|
397 |
-
/* Custom CSS */
|
398 |
-
#cta-no-show, #the-popup-id, #cta-popup-id {
|
399 |
-
display: none !important;
|
400 |
-
}
|
401 |
-
#wordpress-cta {
|
402 |
-
text-align: center;
|
403 |
-
}
|
404 |
-
.white-popup-block {
|
405 |
-
background: transparent;
|
406 |
-
padding: 0px 0px;
|
407 |
-
text-align: left;
|
408 |
-
max-width: 750px;
|
409 |
-
margin: 40px auto;
|
410 |
-
position: relative;
|
411 |
-
}
|
412 |
-
.shortcode-popup-block {
|
413 |
-
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
414 |
-
background: #fff;
|
415 |
-
padding: 0px;
|
416 |
-
text-align: left;
|
417 |
-
max-width: 85%;
|
418 |
-
margin: 20px auto;
|
419 |
-
position: relative;
|
420 |
-
}
|
421 |
-
.mfp-close {
|
422 |
-
color:red !important;
|
423 |
-
}
|
4 |
left: 0;
|
5 |
width: 100%;
|
6 |
height: 100%;
|
7 |
+
z-index: 1042;
|
8 |
overflow: hidden;
|
9 |
position: fixed;
|
10 |
background: #0b0b0b;
|
11 |
+
opacity: 0.8; }
|
|
|
12 |
|
13 |
.mfp-wrap {
|
14 |
top: 0;
|
15 |
left: 0;
|
16 |
width: 100%;
|
17 |
height: 100%;
|
18 |
+
z-index: 1043;
|
19 |
position: fixed;
|
20 |
outline: none !important;
|
21 |
-webkit-backface-visibility: hidden; }
|
28 |
left: 0;
|
29 |
top: 0;
|
30 |
padding: 0 8px;
|
|
|
|
|
31 |
box-sizing: border-box; }
|
32 |
|
33 |
.mfp-container:before {
|
55 |
.mfp-ajax-cur {
|
56 |
cursor: progress; }
|
57 |
|
58 |
+
.mfp-zoom-out-cur, .mfp-zoom-out-cur .mfp-image-holder .mfp-close {
|
|
|
59 |
cursor: -moz-zoom-out;
|
60 |
cursor: -webkit-zoom-out;
|
61 |
cursor: zoom-out; }
|
84 |
display: none !important; }
|
85 |
|
86 |
.mfp-preloader {
|
87 |
+
color: #CCC;
|
88 |
position: absolute;
|
89 |
top: 50%;
|
90 |
width: auto;
|
93 |
left: 8px;
|
94 |
right: 8px;
|
95 |
z-index: 1044; }
|
|
|
96 |
.mfp-preloader a {
|
97 |
+
color: #CCC; }
|
|
|
98 |
.mfp-preloader a:hover {
|
99 |
+
color: #FFF; }
|
100 |
|
101 |
.mfp-s-ready .mfp-preloader {
|
102 |
display: none; }
|
112 |
border: 0;
|
113 |
-webkit-appearance: none;
|
114 |
display: block;
|
115 |
+
outline: none;
|
116 |
padding: 0;
|
117 |
z-index: 1046;
|
118 |
+
box-shadow: none;
|
119 |
+
touch-action: manipulation; }
|
120 |
|
121 |
button::-moz-focus-inner {
|
122 |
padding: 0;
|
133 |
text-align: center;
|
134 |
opacity: 0.65;
|
135 |
padding: 0 0 18px 10px;
|
136 |
+
color: #FFF;
|
137 |
font-style: normal;
|
138 |
font-size: 28px;
|
139 |
font-family: Arial, Baskerville, monospace; }
|
140 |
+
.mfp-close:hover,
|
141 |
+
.mfp-close:focus {
|
142 |
+
opacity: 1; }
|
143 |
+
.mfp-close:active {
|
144 |
+
top: 1px; }
|
145 |
|
146 |
.mfp-close-btn-in .mfp-close {
|
147 |
+
color: #333; }
|
148 |
|
149 |
.mfp-image-holder .mfp-close,
|
150 |
.mfp-iframe-holder .mfp-close {
|
151 |
+
color: #FFF;
|
152 |
right: -6px;
|
153 |
text-align: right;
|
154 |
padding-right: 6px;
|
158 |
position: absolute;
|
159 |
top: 0;
|
160 |
right: 0;
|
161 |
+
color: #CCC;
|
162 |
font-size: 12px;
|
163 |
+
line-height: 18px;
|
164 |
+
white-space: nowrap; }
|
165 |
|
166 |
.mfp-arrow {
|
167 |
position: absolute;
|
172 |
padding: 0;
|
173 |
width: 90px;
|
174 |
height: 110px;
|
175 |
+
-webkit-tap-highlight-color: transparent; }
|
|
|
176 |
.mfp-arrow:active {
|
177 |
margin-top: -54px; }
|
|
|
178 |
.mfp-arrow:hover,
|
179 |
.mfp-arrow:focus {
|
180 |
opacity: 1; }
|
181 |
+
.mfp-arrow:before,
|
182 |
+
.mfp-arrow:after {
|
|
|
|
|
183 |
content: '';
|
184 |
display: block;
|
185 |
width: 0;
|
190 |
margin-top: 35px;
|
191 |
margin-left: 35px;
|
192 |
border: medium inset transparent; }
|
193 |
+
.mfp-arrow:after {
|
|
|
194 |
border-top-width: 13px;
|
195 |
border-bottom-width: 13px;
|
196 |
top: 8px; }
|
197 |
+
.mfp-arrow:before {
|
|
|
198 |
border-top-width: 21px;
|
199 |
+
border-bottom-width: 21px;
|
200 |
+
opacity: 0.7; }
|
201 |
|
202 |
.mfp-arrow-left {
|
203 |
left: 0; }
|
204 |
+
.mfp-arrow-left:after {
|
205 |
+
border-right: 17px solid #FFF;
|
206 |
+
margin-left: 31px; }
|
207 |
+
.mfp-arrow-left:before {
|
208 |
+
margin-left: 25px;
|
209 |
+
border-right: 27px solid #3F3F3F; }
|
|
|
|
|
210 |
|
211 |
.mfp-arrow-right {
|
212 |
right: 0; }
|
213 |
+
.mfp-arrow-right:after {
|
214 |
+
border-left: 17px solid #FFF;
|
215 |
+
margin-left: 39px; }
|
216 |
+
.mfp-arrow-right:before {
|
217 |
+
border-left: 27px solid #3F3F3F; }
|
|
|
|
|
218 |
|
219 |
.mfp-iframe-holder {
|
220 |
padding-top: 40px;
|
221 |
padding-bottom: 40px; }
|
|
|
222 |
.mfp-iframe-holder .mfp-content {
|
223 |
line-height: 0;
|
224 |
width: 100%;
|
225 |
max-width: 900px; }
|
226 |
+
.mfp-iframe-holder .mfp-close {
|
227 |
+
top: -40px; }
|
228 |
|
229 |
.mfp-iframe-scaler {
|
230 |
width: 100%;
|
231 |
height: 0;
|
232 |
overflow: hidden;
|
233 |
padding-top: 56.25%; }
|
|
|
234 |
.mfp-iframe-scaler iframe {
|
235 |
position: absolute;
|
236 |
display: block;
|
239 |
width: 100%;
|
240 |
height: 100%;
|
241 |
box-shadow: 0 0 8px rgba(0, 0, 0, 0.6);
|
242 |
+
background: #000; }
|
|
|
|
|
|
|
243 |
|
244 |
/* Main image in popup */
|
245 |
img.mfp-img {
|
248 |
height: auto;
|
249 |
display: block;
|
250 |
line-height: 0;
|
|
|
|
|
251 |
box-sizing: border-box;
|
252 |
padding: 40px 0 40px;
|
253 |
margin: 0 auto; }
|
254 |
|
255 |
/* The shadow behind the image */
|
256 |
+
.mfp-figure {
|
257 |
+
line-height: 0; }
|
258 |
.mfp-figure:after {
|
259 |
content: '';
|
260 |
position: absolute;
|
267 |
height: auto;
|
268 |
z-index: -1;
|
269 |
box-shadow: 0 0 8px rgba(0, 0, 0, 0.6);
|
270 |
+
background: #444; }
|
271 |
+
.mfp-figure small {
|
272 |
+
color: #BDBDBD;
|
273 |
+
display: block;
|
274 |
+
font-size: 12px;
|
275 |
+
line-height: 14px; }
|
276 |
+
.mfp-figure figure {
|
277 |
+
margin: 0; }
|
278 |
|
279 |
.mfp-bottom-bar {
|
280 |
margin-top: -36px;
|
287 |
.mfp-title {
|
288 |
text-align: left;
|
289 |
line-height: 18px;
|
290 |
+
color: #F3F3F3;
|
291 |
word-wrap: break-word;
|
292 |
padding-right: 36px; }
|
293 |
|
|
|
|
|
|
|
|
|
|
|
|
|
294 |
.mfp-image-holder .mfp-content {
|
295 |
max-width: 100%; }
|
296 |
|
299 |
|
300 |
@media screen and (max-width: 800px) and (orientation: landscape), screen and (max-height: 300px) {
|
301 |
/**
|
302 |
+
* Remove all paddings around the image on small screen
|
303 |
+
*/
|
304 |
.mfp-img-mobile .mfp-image-holder {
|
305 |
padding-left: 0;
|
306 |
padding-right: 0; }
|
|
|
307 |
.mfp-img-mobile img.mfp-img {
|
308 |
padding: 0; }
|
|
|
|
|
309 |
.mfp-img-mobile .mfp-figure:after {
|
310 |
top: 0;
|
311 |
bottom: 0; }
|
312 |
+
.mfp-img-mobile .mfp-figure small {
|
313 |
+
display: inline;
|
314 |
+
margin-left: 5px; }
|
315 |
.mfp-img-mobile .mfp-bottom-bar {
|
316 |
background: rgba(0, 0, 0, 0.6);
|
317 |
bottom: 0;
|
319 |
top: auto;
|
320 |
padding: 3px 5px;
|
321 |
position: fixed;
|
|
|
|
|
322 |
box-sizing: border-box; }
|
|
|
323 |
.mfp-img-mobile .mfp-bottom-bar:empty {
|
324 |
padding: 0; }
|
|
|
325 |
.mfp-img-mobile .mfp-counter {
|
326 |
right: 5px;
|
327 |
top: 3px; }
|
|
|
328 |
.mfp-img-mobile .mfp-close {
|
329 |
top: 0;
|
330 |
right: 0;
|
334 |
background: rgba(0, 0, 0, 0.6);
|
335 |
position: fixed;
|
336 |
text-align: center;
|
337 |
+
padding: 0; } }
|
338 |
|
|
|
|
|
|
|
339 |
@media all and (max-width: 900px) {
|
340 |
.mfp-arrow {
|
341 |
-webkit-transform: scale(0.75);
|
342 |
transform: scale(0.75); }
|
|
|
343 |
.mfp-arrow-left {
|
344 |
-webkit-transform-origin: 0;
|
345 |
transform-origin: 0; }
|
|
|
346 |
.mfp-arrow-right {
|
347 |
-webkit-transform-origin: 100%;
|
348 |
transform-origin: 100%; }
|
|
|
349 |
.mfp-container {
|
350 |
padding-left: 6px;
|
351 |
+
padding-right: 6px; } }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
shared/assets/js/global/jquery.magnific-popup.min.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
/*! Magnific Popup -
|
2 |
-
* http://dimsemenov.com/plugins/magnific-popup/
|
3 |
-
* Copyright (c)
|
4 |
-
(function(e){var t,i,n,o,a,r,s,l="Close",c="BeforeClose",d="AfterClose",u="BeforeAppend",p="MarkupParse",f="Open",m="Change",g="mfp",v="."+g,h="mfp-ready",C="mfp-removing",y="mfp-prevent-close",w=function(){},b=!!window.jQuery,I=e(window),x=function(e,i){t.ev.on(g+e+v,i)},k=function(t,i,n,o){var a=document.createElement("div");return a.className="mfp-"+t,n&&(a.innerHTML=n),o?i&&i.appendChild(a):(a=e(a),i&&a.appendTo(i)),a},T=function(i,n){t.ev.triggerHandler(g+i,n),t.st.callbacks&&(i=i.charAt(0).toLowerCase()+i.slice(1),t.st.callbacks[i]&&t.st.callbacks[i].apply(t,e.isArray(n)?n:[n]))},E=function(){(t.st.focus?t.content.find(t.st.focus).eq(0):t.wrap).focus()},S=function(i){return i===s&&t.currTemplate.closeBtn||(t.currTemplate.closeBtn=e(t.st.closeMarkup.replace("%title%",t.st.tClose)),s=i),t.currTemplate.closeBtn},P=function(){e.magnificPopup.instance||(t=new w,t.init(),e.magnificPopup.instance=t)},_=function(i){if(!e(i).hasClass(y)){var n=t.st.closeOnContentClick,o=t.st.closeOnBgClick;if(n&&o)return!0;if(!t.content||e(i).hasClass("mfp-close")||t.preloader&&i===t.preloader[0])return!0;if(i===t.content[0]||e.contains(t.content[0],i)){if(n)return!0}else if(o&&e.contains(document,i))return!0;return!1}},O=function(){var e=document.createElement("p").style,t=["ms","O","Moz","Webkit"];if(void 0!==e.transition)return!0;for(;t.length;)if(t.pop()+"Transition"in e)return!0;return!1};w.prototype={constructor:w,init:function(){var i=navigator.appVersion;t.isIE7=-1!==i.indexOf("MSIE 7."),t.isIE8=-1!==i.indexOf("MSIE 8."),t.isLowIE=t.isIE7||t.isIE8,t.isAndroid=/android/gi.test(i),t.isIOS=/iphone|ipad|ipod/gi.test(i),t.supportsTransition=O(),t.probablyMobile=t.isAndroid||t.isIOS||/(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent),n=e(document.body),o=e(document),t.popupsCache={}},open:function(i){var n;if(i.isObj===!1){t.items=i.items.toArray(),t.index=0;var a,s=i.items;for(n=0;s.length>n;n++)if(a=s[n],a.parsed&&(a=a.el[0]),a===i.el[0]){t.index=n;break}}else t.items=e.isArray(i.items)?i.items:[i.items],t.index=i.index||0;if(t.isOpen)return t.updateItemHTML(),void 0;t.types=[],r="",t.ev=i.mainEl&&i.mainEl.length?i.mainEl.eq(0):o,i.key?(t.popupsCache[i.key]||(t.popupsCache[i.key]={}),t.currTemplate=t.popupsCache[i.key]):t.currTemplate={},t.st=e.extend(!0,{},e.magnificPopup.defaults,i),t.fixedContentPos="auto"===t.st.fixedContentPos?!t.probablyMobile:t.st.fixedContentPos,t.st.modal&&(t.st.closeOnContentClick=!1,t.st.closeOnBgClick=!1,t.st.showCloseBtn=!1,t.st.enableEscapeKey=!1),t.bgOverlay||(t.bgOverlay=k("bg").on("click"+v,function(){t.close()}),t.wrap=k("wrap").attr("tabindex",-1).on("click"+v,function(e){_(e.target)&&t.close()}),t.container=k("container",t.wrap)),t.contentContainer=k("content"),t.st.preloader&&(t.preloader=k("preloader",t.container,t.st.tLoading));var l=e.magnificPopup.modules;for(n=0;l.length>n;n++){var c=l[n];c=c.charAt(0).toUpperCase()+c.slice(1),t["init"+c].call(t)}T("BeforeOpen"),t.st.showCloseBtn&&(t.st.closeBtnInside?(x(p,function(e,t,i,n){i.close_replaceWith=S(n.type)}),r+=" mfp-close-btn-in"):t.wrap.append(S())),t.st.alignTop&&(r+=" mfp-align-top"),t.fixedContentPos?t.wrap.css({overflow:t.st.overflowY,overflowX:"hidden",overflowY:t.st.overflowY}):t.wrap.css({top:I.scrollTop(),position:"absolute"}),(t.st.fixedBgPos===!1||"auto"===t.st.fixedBgPos&&!t.fixedContentPos)&&t.bgOverlay.css({height:o.height(),position:"absolute"}),t.st.enableEscapeKey&&o.on("keyup"+v,function(e){27===e.keyCode&&t.close()}),I.on("resize"+v,function(){t.updateSize()}),t.st.closeOnContentClick||(r+=" mfp-auto-cursor"),r&&t.wrap.addClass(r);var d=t.wH=I.height(),u={};if(t.fixedContentPos&&t._hasScrollBar(d)){var m=t._getScrollbarSize();m&&(u.paddingRight=m)}t.fixedContentPos&&(t.isIE7?e("body, html").css("overflow","hidden"):u.overflow="hidden");var g=t.st.mainClass;t.isIE7&&(g+=" mfp-ie7"),g&&t._addClassToMFP(g),t.updateItemHTML(),T("BuildControls"),e("html").css(u),t.bgOverlay.add(t.wrap).prependTo(document.body),t._lastFocusedEl=document.activeElement,setTimeout(function(){t.content?(t._addClassToMFP(h),E()):t.bgOverlay.addClass(h),o.on("focusin"+v,function(i){return i.target===t.wrap[0]||e.contains(t.wrap[0],i.target)?void 0:(E(),!1)})},16),t.isOpen=!0,t.updateSize(d),T(f)},close:function(){t.isOpen&&(T(c),t.isOpen=!1,t.st.removalDelay&&!t.isLowIE&&t.supportsTransition?(t._addClassToMFP(C),setTimeout(function(){t._close()},t.st.removalDelay)):t._close())},_close:function(){T(l);var i=C+" "+h+" ";if(t.bgOverlay.detach(),t.wrap.detach(),t.container.empty(),t.st.mainClass&&(i+=t.st.mainClass+" "),t._removeClassFromMFP(i),t.fixedContentPos){var n={paddingRight:""};t.isIE7?e("body, html").css("overflow",""):n.overflow="",e("html").css(n)}o.off("keyup"+v+" focusin"+v),t.ev.off(v),t.wrap.attr("class","mfp-wrap").removeAttr("style"),t.bgOverlay.attr("class","mfp-bg"),t.container.attr("class","mfp-container"),!t.st.showCloseBtn||t.st.closeBtnInside&&t.currTemplate[t.currItem.type]!==!0||t.currTemplate.closeBtn&&t.currTemplate.closeBtn.detach(),t._lastFocusedEl&&e(t._lastFocusedEl).focus(),t.currItem=null,t.content=null,t.currTemplate=null,t.prevHeight=0,T(d)},updateSize:function(e){if(t.isIOS){var i=document.documentElement.clientWidth/window.innerWidth,n=window.innerHeight*i;t.wrap.css("height",n),t.wH=n}else t.wH=e||I.height();t.fixedContentPos||t.wrap.css("height",t.wH),T("Resize")},updateItemHTML:function(){var i=t.items[t.index];t.contentContainer.detach(),t.content&&t.content.detach(),i.parsed||(i=t.parseEl(t.index));var n=i.type;if(T("BeforeChange",[t.currItem?t.currItem.type:"",n]),t.currItem=i,!t.currTemplate[n]){var o=t.st[n]?t.st[n].markup:!1;T("FirstMarkupParse",o),t.currTemplate[n]=o?e(o):!0}a&&a!==i.type&&t.container.removeClass("mfp-"+a+"-holder");var r=t["get"+n.charAt(0).toUpperCase()+n.slice(1)](i,t.currTemplate[n]);t.appendContent(r,n),i.preloaded=!0,T(m,i),a=i.type,t.container.prepend(t.contentContainer),T("AfterChange")},appendContent:function(e,i){t.content=e,e?t.st.showCloseBtn&&t.st.closeBtnInside&&t.currTemplate[i]===!0?t.content.find(".mfp-close").length||t.content.append(S()):t.content=e:t.content="",T(u),t.container.addClass("mfp-"+i+"-holder"),t.contentContainer.append(t.content)},parseEl:function(i){var n=t.items[i],o=n.type;if(n=n.tagName?{el:e(n)}:{data:n,src:n.src},n.el){for(var a=t.types,r=0;a.length>r;r++)if(n.el.hasClass("mfp-"+a[r])){o=a[r];break}n.src=n.el.attr("data-mfp-src"),n.src||(n.src=n.el.attr("href"))}return n.type=o||t.st.type||"inline",n.index=i,n.parsed=!0,t.items[i]=n,T("ElementParse",n),t.items[i]},addGroup:function(e,i){var n=function(n){n.mfpEl=this,t._openClick(n,e,i)};i||(i={});var o="click.magnificPopup";i.mainEl=e,i.items?(i.isObj=!0,e.off(o).on(o,n)):(i.isObj=!1,i.delegate?e.off(o).on(o,i.delegate,n):(i.items=e,e.off(o).on(o,n)))},_openClick:function(i,n,o){var a=void 0!==o.midClick?o.midClick:e.magnificPopup.defaults.midClick;if(a||2!==i.which&&!i.ctrlKey&&!i.metaKey){var r=void 0!==o.disableOn?o.disableOn:e.magnificPopup.defaults.disableOn;if(r)if(e.isFunction(r)){if(!r.call(t))return!0}else if(r>I.width())return!0;i.type&&(i.preventDefault(),t.isOpen&&i.stopPropagation()),o.el=e(i.mfpEl),o.delegate&&(o.items=n.find(o.delegate)),t.open(o)}},updateStatus:function(e,n){if(t.preloader){i!==e&&t.container.removeClass("mfp-s-"+i),n||"loading"!==e||(n=t.st.tLoading);var o={status:e,text:n};T("UpdateStatus",o),e=o.status,n=o.text,t.preloader.html(n),t.preloader.find("a").on("click",function(e){e.stopImmediatePropagation()}),t.container.addClass("mfp-s-"+e),i=e}},_addClassToMFP:function(e){t.bgOverlay.addClass(e),t.wrap.addClass(e)},_removeClassFromMFP:function(e){this.bgOverlay.removeClass(e),t.wrap.removeClass(e)},_hasScrollBar:function(e){return(t.isIE7?o.height():document.body.scrollHeight)>(e||I.height())},_parseMarkup:function(t,i,n){var o;n.data&&(i=e.extend(n.data,i)),T(p,[t,i,n]),e.each(i,function(e,i){if(void 0===i||i===!1)return!0;if(o=e.split("_"),o.length>1){var n=t.find(v+"-"+o[0]);if(n.length>0){var a=o[1];"replaceWith"===a?n[0]!==i[0]&&n.replaceWith(i):"img"===a?n.is("img")?n.attr("src",i):n.replaceWith('<img src="'+i+'" class="'+n.attr("class")+'" />'):n.attr(o[1],i)}}else t.find(v+"-"+e).html(i)})},_getScrollbarSize:function(){if(void 0===t.scrollbarSize){var e=document.createElement("div");e.id="mfp-sbm",e.style.cssText="width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;",document.body.appendChild(e),t.scrollbarSize=e.offsetWidth-e.clientWidth,document.body.removeChild(e)}return t.scrollbarSize}},e.magnificPopup={instance:null,proto:w.prototype,modules:[],open:function(e,t){return P(),e||(e={}),e.isObj=!0,e.index=t||0,this.instance.open(e)},close:function(){return e.magnificPopup.instance.close()},registerModule:function(t,i){i.options&&(e.magnificPopup.defaults[t]=i.options),e.extend(this.proto,i.proto),this.modules.push(t)},defaults:{disableOn:0,key:null,midClick:!1,mainClass:"",preloader:!0,focus:"",closeOnContentClick:!1,closeOnBgClick:!0,closeBtnInside:!0,showCloseBtn:!0,enableEscapeKey:!0,modal:!1,alignTop:!1,removalDelay:0,fixedContentPos:"auto",fixedBgPos:"auto",overflowY:"auto",closeMarkup:'<button title="%title%" type="button" class="mfp-close">×</button>',tClose:"Close (Esc)",tLoading:"Loading..."}},e.fn.magnificPopup=function(i){P();var n=e(this);if("string"==typeof i)if("open"===i){var o,a=b?n.data("magnificPopup"):n[0].magnificPopup,r=parseInt(arguments[1],10)||0;a.items?o=a.items[r]:(o=n,a.delegate&&(o=o.find(a.delegate)),o=o.eq(r)),t._openClick({mfpEl:o},n,a)}else t.isOpen&&t[i].apply(t,Array.prototype.slice.call(arguments,1));else b?n.data("magnificPopup",i):n[0].magnificPopup=i,t.addGroup(n,i);return n};var z,M,B,H="inline",L=function(){B&&(M.after(B.addClass(z)).detach(),B=null)};e.magnificPopup.registerModule(H,{options:{hiddenClass:"hide",markup:"",tNotFound:"Content not found"},proto:{initInline:function(){t.types.push(H),x(l+"."+H,function(){L()})},getInline:function(i,n){if(L(),i.src){var o=t.st.inline,a=e(i.src);if(a.length){var r=a[0].parentNode;r&&r.tagName&&(M||(z=o.hiddenClass,M=k(z),z="mfp-"+z),B=a.after(M).detach().removeClass(z)),t.updateStatus("ready")}else t.updateStatus("error",o.tNotFound),a=e("<div>");return i.inlineElement=a,a}return t.updateStatus("ready"),t._parseMarkup(n,{},i),n}}});var A,F="ajax",j=function(){A&&n.removeClass(A)};e.magnificPopup.registerModule(F,{options:{settings:null,cursor:"mfp-ajax-cur",tError:'<a href="%url%">The content</a> could not be loaded.'},proto:{initAjax:function(){t.types.push(F),A=t.st.ajax.cursor,x(l+"."+F,function(){j(),t.req&&t.req.abort()})},getAjax:function(i){A&&n.addClass(A),t.updateStatus("loading");var o=e.extend({url:i.src,success:function(n,o,a){var r={data:n,xhr:a};T("ParseAjax",r),t.appendContent(e(r.data),F),i.finished=!0,j(),E(),setTimeout(function(){t.wrap.addClass(h)},16),t.updateStatus("ready"),T("AjaxContentAdded")},error:function(){j(),i.finished=i.loadError=!0,t.updateStatus("error",t.st.ajax.tError.replace("%url%",i.src))}},t.st.ajax.settings);return t.req=e.ajax(o),""}}});var N,W=function(i){if(i.data&&void 0!==i.data.title)return i.data.title;var n=t.st.image.titleSrc;if(n){if(e.isFunction(n))return n.call(t,i);if(i.el)return i.el.attr(n)||""}return""};e.magnificPopup.registerModule("image",{options:{markup:'<div class="mfp-figure"><div class="mfp-close"></div><div class="mfp-img"></div><div class="mfp-bottom-bar"><div class="mfp-title"></div><div class="mfp-counter"></div></div></div>',cursor:"mfp-zoom-out-cur",titleSrc:"title",verticalFit:!0,tError:'<a href="%url%">The image</a> could not be loaded.'},proto:{initImage:function(){var e=t.st.image,i=".image";t.types.push("image"),x(f+i,function(){"image"===t.currItem.type&&e.cursor&&n.addClass(e.cursor)}),x(l+i,function(){e.cursor&&n.removeClass(e.cursor),I.off("resize"+v)}),x("Resize"+i,t.resizeImage),t.isLowIE&&x("AfterChange",t.resizeImage)},resizeImage:function(){var e=t.currItem;if(e&&e.img&&t.st.image.verticalFit){var i=0;t.isLowIE&&(i=parseInt(e.img.css("padding-top"),10)+parseInt(e.img.css("padding-bottom"),10)),e.img.css("max-height",t.wH-i)}},_onImageHasSize:function(e){e.img&&(e.hasSize=!0,N&&clearInterval(N),e.isCheckingImgSize=!1,T("ImageHasSize",e),e.imgHidden&&(t.content&&t.content.removeClass("mfp-loading"),e.imgHidden=!1))},findImageSize:function(e){var i=0,n=e.img[0],o=function(a){N&&clearInterval(N),N=setInterval(function(){return n.naturalWidth>0?(t._onImageHasSize(e),void 0):(i>200&&clearInterval(N),i++,3===i?o(10):40===i?o(50):100===i&&o(500),void 0)},a)};o(1)},getImage:function(i,n){var o=0,a=function(){i&&(i.img[0].complete?(i.img.off(".mfploader"),i===t.currItem&&(t._onImageHasSize(i),t.updateStatus("ready")),i.hasSize=!0,i.loaded=!0,T("ImageLoadComplete")):(o++,200>o?setTimeout(a,100):r()))},r=function(){i&&(i.img.off(".mfploader"),i===t.currItem&&(t._onImageHasSize(i),t.updateStatus("error",s.tError.replace("%url%",i.src))),i.hasSize=!0,i.loaded=!0,i.loadError=!0)},s=t.st.image,l=n.find(".mfp-img");if(l.length){var c=document.createElement("img");c.className="mfp-img",i.img=e(c).on("load.mfploader",a).on("error.mfploader",r),c.src=i.src,l.is("img")&&(i.img=i.img.clone()),i.img[0].naturalWidth>0&&(i.hasSize=!0)}return t._parseMarkup(n,{title:W(i),img_replaceWith:i.img},i),t.resizeImage(),i.hasSize?(N&&clearInterval(N),i.loadError?(n.addClass("mfp-loading"),t.updateStatus("error",s.tError.replace("%url%",i.src))):(n.removeClass("mfp-loading"),t.updateStatus("ready")),n):(t.updateStatus("loading"),i.loading=!0,i.hasSize||(i.imgHidden=!0,n.addClass("mfp-loading"),t.findImageSize(i)),n)}}});var R,Z=function(){return void 0===R&&(R=void 0!==document.createElement("p").style.MozTransform),R};e.magnificPopup.registerModule("zoom",{options:{enabled:!1,easing:"ease-in-out",duration:300,opener:function(e){return e.is("img")?e:e.find("img")}},proto:{initZoom:function(){var e=t.st.zoom,i=".zoom";if(e.enabled&&t.supportsTransition){var n,o,a=e.duration,r=function(t){var i=t.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"),n="all "+e.duration/1e3+"s "+e.easing,o={position:"fixed",zIndex:9999,left:0,top:0,"-webkit-backface-visibility":"hidden"},a="transition";return o["-webkit-"+a]=o["-moz-"+a]=o["-o-"+a]=o[a]=n,i.css(o),i},s=function(){t.content.css("visibility","visible")};x("BuildControls"+i,function(){if(t._allowZoom()){if(clearTimeout(n),t.content.css("visibility","hidden"),image=t._getItemToZoom(),!image)return s(),void 0;o=r(image),o.css(t._getOffset()),t.wrap.append(o),n=setTimeout(function(){o.css(t._getOffset(!0)),n=setTimeout(function(){s(),setTimeout(function(){o.remove(),image=o=null,T("ZoomAnimationEnded")},16)},a)},16)}}),x(c+i,function(){if(t._allowZoom()){if(clearTimeout(n),t.st.removalDelay=a,!image){if(image=t._getItemToZoom(),!image)return;o=r(image)}o.css(t._getOffset(!0)),t.wrap.append(o),t.content.css("visibility","hidden"),setTimeout(function(){o.css(t._getOffset())},16)}}),x(l+i,function(){t._allowZoom()&&(s(),o&&o.remove())})}},_allowZoom:function(){return"image"===t.currItem.type},_getItemToZoom:function(){return t.currItem.hasSize?t.currItem.img:!1},_getOffset:function(i){var n;n=i?t.currItem.img:t.st.zoom.opener(t.currItem.el||t.currItem);var o=n.offset(),a=parseInt(n.css("padding-top"),10),r=parseInt(n.css("padding-bottom"),10);o.top-=e(window).scrollTop()-a;var s={width:n.width(),height:(b?n.innerHeight():n[0].offsetHeight)-r-a};return Z()?s["-moz-transform"]=s.transform="translate("+o.left+"px,"+o.top+"px)":(s.left=o.left,s.top=o.top),s}}});var q="iframe",D="//about:blank",K=function(e){if(t.currTemplate[q]){var i=t.currTemplate[q].find("iframe");i.length&&(e||(i[0].src=D),t.isIE8&&i.css("display",e?"block":"none"))}};e.magnificPopup.registerModule(q,{options:{markup:'<div class="mfp-iframe-scaler"><div class="mfp-close"></div><iframe class="mfp-iframe" src="//about:blank" frameborder="0" allowfullscreen></iframe></div>',srcAction:"iframe_src",patterns:{youtube:{index:"youtube.com",id:"v=",src:"//www.youtube.com/embed/%id%?autoplay=1"},vimeo:{index:"vimeo.com/",id:"/",src:"//player.vimeo.com/video/%id%?autoplay=1"},gmaps:{index:"//maps.google.",src:"%id%&output=embed"}}},proto:{initIframe:function(){t.types.push(q),x("BeforeChange",function(e,t,i){t!==i&&(t===q?K():i===q&&K(!0))}),x(l+"."+q,function(){K()})},getIframe:function(i,n){var o=i.src,a=t.st.iframe;e.each(a.patterns,function(){return o.indexOf(this.index)>-1?(this.id&&(o="string"==typeof this.id?o.substr(o.lastIndexOf(this.id)+this.id.length,o.length):this.id.call(this,o)),o=this.src.replace("%id%",o),!1):void 0});var r={};return a.srcAction&&(r[a.srcAction]=o),t._parseMarkup(n,r,i),t.updateStatus("ready"),n}}});var Y=function(e){var i=t.items.length;return e>i-1?e-i:0>e?i+e:e},U=function(e,t,i){return e.replace("%curr%",t+1).replace("%total%",i)};e.magnificPopup.registerModule("gallery",{options:{enabled:!1,arrowMarkup:'<button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir%"></button>',preload:[0,2],navigateByImgClick:!0,arrows:!0,tPrev:"Previous (Left arrow key)",tNext:"Next (Right arrow key)",tCounter:"%curr% of %total%"},proto:{initGallery:function(){var i=t.st.gallery,n=".mfp-gallery",a=Boolean(e.fn.mfpFastClick);return t.direction=!0,i&&i.enabled?(r+=" mfp-gallery",x(f+n,function(){i.navigateByImgClick&&t.wrap.on("click"+n,".mfp-img",function(){return t.items.length>1?(t.next(),!1):void 0}),o.on("keydown"+n,function(e){37===e.keyCode?t.prev():39===e.keyCode&&t.next()})}),x("UpdateStatus"+n,function(e,i){i.text&&(i.text=U(i.text,t.currItem.index,t.items.length))}),x(p+n,function(e,n,o,a){var r=t.items.length;o.counter=r>1?U(i.tCounter,a.index,r):""}),x("BuildControls"+n,function(){if(t.items.length>1&&i.arrows&&!t.arrowLeft){var n=i.arrowMarkup,o=t.arrowLeft=e(n.replace("%title%",i.tPrev).replace("%dir%","left")).addClass(y),r=t.arrowRight=e(n.replace("%title%",i.tNext).replace("%dir%","right")).addClass(y),s=a?"mfpFastClick":"click";o[s](function(){t.prev()}),r[s](function(){t.next()}),t.isIE7&&(k("b",o[0],!1,!0),k("a",o[0],!1,!0),k("b",r[0],!1,!0),k("a",r[0],!1,!0)),t.container.append(o.add(r))}}),x(m+n,function(){t._preloadTimeout&&clearTimeout(t._preloadTimeout),t._preloadTimeout=setTimeout(function(){t.preloadNearbyImages(),t._preloadTimeout=null},16)}),x(l+n,function(){o.off(n),t.wrap.off("click"+n),t.arrowLeft&&a&&t.arrowLeft.add(t.arrowRight).destroyMfpFastClick(),t.arrowRight=t.arrowLeft=null}),void 0):!1},next:function(){t.direction=!0,t.index=Y(t.index+1),t.updateItemHTML()},prev:function(){t.direction=!1,t.index=Y(t.index-1),t.updateItemHTML()},goTo:function(e){t.direction=e>=t.index,t.index=e,t.updateItemHTML()},preloadNearbyImages:function(){var e,i=t.st.gallery.preload,n=Math.min(i[0],t.items.length),o=Math.min(i[1],t.items.length);for(e=1;(t.direction?o:n)>=e;e++)t._preloadItem(t.index+e);for(e=1;(t.direction?n:o)>=e;e++)t._preloadItem(t.index-e)},_preloadItem:function(i){if(i=Y(i),!t.items[i].preloaded){var n=t.items[i];n.parsed||(n=t.parseEl(i)),T("LazyLoad",n),"image"===n.type&&(n.img=e('<img class="mfp-img" />').on("load.mfploader",function(){n.hasSize=!0}).on("error.mfploader",function(){n.hasSize=!0,n.loadError=!0,T("LazyLoadError",n)}).attr("src",n.src)),n.preloaded=!0}}}});var G="retina";e.magnificPopup.registerModule(G,{options:{replaceSrc:function(e){return e.src.replace(/\.\w+$/,function(e){return"@2x"+e})},ratio:1},proto:{initRetina:function(){if(window.devicePixelRatio>1){var e=t.st.retina,i=e.ratio;i=isNaN(i)?i():i,i>1&&(x("ImageHasSize."+G,function(e,t){t.img.css({"max-width":t.img[0].naturalWidth/i,width:"100%"})}),x("ElementParse."+G,function(t,n){n.src=e.replaceSrc(n,i)}))}}}}),function(){var t=1e3,i="ontouchstart"in window,n=function(){I.off("touchmove"+a+" touchend"+a)},o="mfpFastClick",a="."+o;e.fn.mfpFastClick=function(o){return e(this).each(function(){var r,s=e(this);if(i){var l,c,d,u,p,f;s.on("touchstart"+a,function(e){u=!1,f=1,p=e.originalEvent?e.originalEvent.touches[0]:e.touches[0],c=p.clientX,d=p.clientY,I.on("touchmove"+a,function(e){p=e.originalEvent?e.originalEvent.touches:e.touches,f=p.length,p=p[0],(Math.abs(p.clientX-c)>10||Math.abs(p.clientY-d)>10)&&(u=!0,n())}).on("touchend"+a,function(e){n(),u||f>1||(r=!0,e.preventDefault(),clearTimeout(l),l=setTimeout(function(){r=!1},t),o())})})}s.on("click"+a,function(){r||o()})})},e.fn.destroyMfpFastClick=function(){e(this).off("touchstart"+a+" click"+a),i&&I.off("touchmove"+a+" touchend"+a)}}()})(window.jQuery||window.Zepto);
|
1 |
+
/*! Magnific Popup - v1.1.0 - 2016-02-20
|
2 |
+
* http://dimsemenov.com/plugins/magnific-popup/
|
3 |
+
* Copyright (c) 2016 Dmitry Semenov; */
|
4 |
+
!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):window.jQuery||window.Zepto)}(function(a){var b,c,d,e,f,g,h="Close",i="BeforeClose",j="AfterClose",k="BeforeAppend",l="MarkupParse",m="Open",n="Change",o="mfp",p="."+o,q="mfp-ready",r="mfp-removing",s="mfp-prevent-close",t=function(){},u=!!window.jQuery,v=a(window),w=function(a,c){b.ev.on(o+a+p,c)},x=function(b,c,d,e){var f=document.createElement("div");return f.className="mfp-"+b,d&&(f.innerHTML=d),e?c&&c.appendChild(f):(f=a(f),c&&f.appendTo(c)),f},y=function(c,d){b.ev.triggerHandler(o+c,d),b.st.callbacks&&(c=c.charAt(0).toLowerCase()+c.slice(1),b.st.callbacks[c]&&b.st.callbacks[c].apply(b,a.isArray(d)?d:[d]))},z=function(c){return c===g&&b.currTemplate.closeBtn||(b.currTemplate.closeBtn=a(b.st.closeMarkup.replace("%title%",b.st.tClose)),g=c),b.currTemplate.closeBtn},A=function(){a.magnificPopup.instance||(b=new t,b.init(),a.magnificPopup.instance=b)},B=function(){var a=document.createElement("p").style,b=["ms","O","Moz","Webkit"];if(void 0!==a.transition)return!0;for(;b.length;)if(b.pop()+"Transition"in a)return!0;return!1};t.prototype={constructor:t,init:function(){var c=navigator.appVersion;b.isLowIE=b.isIE8=document.all&&!document.addEventListener,b.isAndroid=/android/gi.test(c),b.isIOS=/iphone|ipad|ipod/gi.test(c),b.supportsTransition=B(),b.probablyMobile=b.isAndroid||b.isIOS||/(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent),d=a(document),b.popupsCache={}},open:function(c){var e;if(c.isObj===!1){b.items=c.items.toArray(),b.index=0;var g,h=c.items;for(e=0;e<h.length;e++)if(g=h[e],g.parsed&&(g=g.el[0]),g===c.el[0]){b.index=e;break}}else b.items=a.isArray(c.items)?c.items:[c.items],b.index=c.index||0;if(b.isOpen)return void b.updateItemHTML();b.types=[],f="",c.mainEl&&c.mainEl.length?b.ev=c.mainEl.eq(0):b.ev=d,c.key?(b.popupsCache[c.key]||(b.popupsCache[c.key]={}),b.currTemplate=b.popupsCache[c.key]):b.currTemplate={},b.st=a.extend(!0,{},a.magnificPopup.defaults,c),b.fixedContentPos="auto"===b.st.fixedContentPos?!b.probablyMobile:b.st.fixedContentPos,b.st.modal&&(b.st.closeOnContentClick=!1,b.st.closeOnBgClick=!1,b.st.showCloseBtn=!1,b.st.enableEscapeKey=!1),b.bgOverlay||(b.bgOverlay=x("bg").on("click"+p,function(){b.close()}),b.wrap=x("wrap").attr("tabindex",-1).on("click"+p,function(a){b._checkIfClose(a.target)&&b.close()}),b.container=x("container",b.wrap)),b.contentContainer=x("content"),b.st.preloader&&(b.preloader=x("preloader",b.container,b.st.tLoading));var i=a.magnificPopup.modules;for(e=0;e<i.length;e++){var j=i[e];j=j.charAt(0).toUpperCase()+j.slice(1),b["init"+j].call(b)}y("BeforeOpen"),b.st.showCloseBtn&&(b.st.closeBtnInside?(w(l,function(a,b,c,d){c.close_replaceWith=z(d.type)}),f+=" mfp-close-btn-in"):b.wrap.append(z())),b.st.alignTop&&(f+=" mfp-align-top"),b.fixedContentPos?b.wrap.css({overflow:b.st.overflowY,overflowX:"hidden",overflowY:b.st.overflowY}):b.wrap.css({top:v.scrollTop(),position:"absolute"}),(b.st.fixedBgPos===!1||"auto"===b.st.fixedBgPos&&!b.fixedContentPos)&&b.bgOverlay.css({height:d.height(),position:"absolute"}),b.st.enableEscapeKey&&d.on("keyup"+p,function(a){27===a.keyCode&&b.close()}),v.on("resize"+p,function(){b.updateSize()}),b.st.closeOnContentClick||(f+=" mfp-auto-cursor"),f&&b.wrap.addClass(f);var k=b.wH=v.height(),n={};if(b.fixedContentPos&&b._hasScrollBar(k)){var o=b._getScrollbarSize();o&&(n.marginRight=o)}b.fixedContentPos&&(b.isIE7?a("body, html").css("overflow","hidden"):n.overflow="hidden");var r=b.st.mainClass;return b.isIE7&&(r+=" mfp-ie7"),r&&b._addClassToMFP(r),b.updateItemHTML(),y("BuildControls"),a("html").css(n),b.bgOverlay.add(b.wrap).prependTo(b.st.prependTo||a(document.body)),b._lastFocusedEl=document.activeElement,setTimeout(function(){b.content?(b._addClassToMFP(q),b._setFocus()):b.bgOverlay.addClass(q),d.on("focusin"+p,b._onFocusIn)},16),b.isOpen=!0,b.updateSize(k),y(m),c},close:function(){b.isOpen&&(y(i),b.isOpen=!1,b.st.removalDelay&&!b.isLowIE&&b.supportsTransition?(b._addClassToMFP(r),setTimeout(function(){b._close()},b.st.removalDelay)):b._close())},_close:function(){y(h);var c=r+" "+q+" ";if(b.bgOverlay.detach(),b.wrap.detach(),b.container.empty(),b.st.mainClass&&(c+=b.st.mainClass+" "),b._removeClassFromMFP(c),b.fixedContentPos){var e={marginRight:""};b.isIE7?a("body, html").css("overflow",""):e.overflow="",a("html").css(e)}d.off("keyup"+p+" focusin"+p),b.ev.off(p),b.wrap.attr("class","mfp-wrap").removeAttr("style"),b.bgOverlay.attr("class","mfp-bg"),b.container.attr("class","mfp-container"),!b.st.showCloseBtn||b.st.closeBtnInside&&b.currTemplate[b.currItem.type]!==!0||b.currTemplate.closeBtn&&b.currTemplate.closeBtn.detach(),b.st.autoFocusLast&&b._lastFocusedEl&&a(b._lastFocusedEl).focus(),b.currItem=null,b.content=null,b.currTemplate=null,b.prevHeight=0,y(j)},updateSize:function(a){if(b.isIOS){var c=document.documentElement.clientWidth/window.innerWidth,d=window.innerHeight*c;b.wrap.css("height",d),b.wH=d}else b.wH=a||v.height();b.fixedContentPos||b.wrap.css("height",b.wH),y("Resize")},updateItemHTML:function(){var c=b.items[b.index];b.contentContainer.detach(),b.content&&b.content.detach(),c.parsed||(c=b.parseEl(b.index));var d=c.type;if(y("BeforeChange",[b.currItem?b.currItem.type:"",d]),b.currItem=c,!b.currTemplate[d]){var f=b.st[d]?b.st[d].markup:!1;y("FirstMarkupParse",f),f?b.currTemplate[d]=a(f):b.currTemplate[d]=!0}e&&e!==c.type&&b.container.removeClass("mfp-"+e+"-holder");var g=b["get"+d.charAt(0).toUpperCase()+d.slice(1)](c,b.currTemplate[d]);b.appendContent(g,d),c.preloaded=!0,y(n,c),e=c.type,b.container.prepend(b.contentContainer),y("AfterChange")},appendContent:function(a,c){b.content=a,a?b.st.showCloseBtn&&b.st.closeBtnInside&&b.currTemplate[c]===!0?b.content.find(".mfp-close").length||b.content.append(z()):b.content=a:b.content="",y(k),b.container.addClass("mfp-"+c+"-holder"),b.contentContainer.append(b.content)},parseEl:function(c){var d,e=b.items[c];if(e.tagName?e={el:a(e)}:(d=e.type,e={data:e,src:e.src}),e.el){for(var f=b.types,g=0;g<f.length;g++)if(e.el.hasClass("mfp-"+f[g])){d=f[g];break}e.src=e.el.attr("data-mfp-src"),e.src||(e.src=e.el.attr("href"))}return e.type=d||b.st.type||"inline",e.index=c,e.parsed=!0,b.items[c]=e,y("ElementParse",e),b.items[c]},addGroup:function(a,c){var d=function(d){d.mfpEl=this,b._openClick(d,a,c)};c||(c={});var e="click.magnificPopup";c.mainEl=a,c.items?(c.isObj=!0,a.off(e).on(e,d)):(c.isObj=!1,c.delegate?a.off(e).on(e,c.delegate,d):(c.items=a,a.off(e).on(e,d)))},_openClick:function(c,d,e){var f=void 0!==e.midClick?e.midClick:a.magnificPopup.defaults.midClick;if(f||!(2===c.which||c.ctrlKey||c.metaKey||c.altKey||c.shiftKey)){var g=void 0!==e.disableOn?e.disableOn:a.magnificPopup.defaults.disableOn;if(g)if(a.isFunction(g)){if(!g.call(b))return!0}else if(v.width()<g)return!0;c.type&&(c.preventDefault(),b.isOpen&&c.stopPropagation()),e.el=a(c.mfpEl),e.delegate&&(e.items=d.find(e.delegate)),b.open(e)}},updateStatus:function(a,d){if(b.preloader){c!==a&&b.container.removeClass("mfp-s-"+c),d||"loading"!==a||(d=b.st.tLoading);var e={status:a,text:d};y("UpdateStatus",e),a=e.status,d=e.text,b.preloader.html(d),b.preloader.find("a").on("click",function(a){a.stopImmediatePropagation()}),b.container.addClass("mfp-s-"+a),c=a}},_checkIfClose:function(c){if(!a(c).hasClass(s)){var d=b.st.closeOnContentClick,e=b.st.closeOnBgClick;if(d&&e)return!0;if(!b.content||a(c).hasClass("mfp-close")||b.preloader&&c===b.preloader[0])return!0;if(c===b.content[0]||a.contains(b.content[0],c)){if(d)return!0}else if(e&&a.contains(document,c))return!0;return!1}},_addClassToMFP:function(a){b.bgOverlay.addClass(a),b.wrap.addClass(a)},_removeClassFromMFP:function(a){this.bgOverlay.removeClass(a),b.wrap.removeClass(a)},_hasScrollBar:function(a){return(b.isIE7?d.height():document.body.scrollHeight)>(a||v.height())},_setFocus:function(){(b.st.focus?b.content.find(b.st.focus).eq(0):b.wrap).focus()},_onFocusIn:function(c){return c.target===b.wrap[0]||a.contains(b.wrap[0],c.target)?void 0:(b._setFocus(),!1)},_parseMarkup:function(b,c,d){var e;d.data&&(c=a.extend(d.data,c)),y(l,[b,c,d]),a.each(c,function(c,d){if(void 0===d||d===!1)return!0;if(e=c.split("_"),e.length>1){var f=b.find(p+"-"+e[0]);if(f.length>0){var g=e[1];"replaceWith"===g?f[0]!==d[0]&&f.replaceWith(d):"img"===g?f.is("img")?f.attr("src",d):f.replaceWith(a("<img>").attr("src",d).attr("class",f.attr("class"))):f.attr(e[1],d)}}else b.find(p+"-"+c).html(d)})},_getScrollbarSize:function(){if(void 0===b.scrollbarSize){var a=document.createElement("div");a.style.cssText="width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;",document.body.appendChild(a),b.scrollbarSize=a.offsetWidth-a.clientWidth,document.body.removeChild(a)}return b.scrollbarSize}},a.magnificPopup={instance:null,proto:t.prototype,modules:[],open:function(b,c){return A(),b=b?a.extend(!0,{},b):{},b.isObj=!0,b.index=c||0,this.instance.open(b)},close:function(){return a.magnificPopup.instance&&a.magnificPopup.instance.close()},registerModule:function(b,c){c.options&&(a.magnificPopup.defaults[b]=c.options),a.extend(this.proto,c.proto),this.modules.push(b)},defaults:{disableOn:0,key:null,midClick:!1,mainClass:"",preloader:!0,focus:"",closeOnContentClick:!1,closeOnBgClick:!0,closeBtnInside:!0,showCloseBtn:!0,enableEscapeKey:!0,modal:!1,alignTop:!1,removalDelay:0,prependTo:null,fixedContentPos:"auto",fixedBgPos:"auto",overflowY:"auto",closeMarkup:'<button title="%title%" type="button" class="mfp-close">×</button>',tClose:"Close (Esc)",tLoading:"Loading...",autoFocusLast:!0}},a.fn.magnificPopup=function(c){A();var d=a(this);if("string"==typeof c)if("open"===c){var e,f=u?d.data("magnificPopup"):d[0].magnificPopup,g=parseInt(arguments[1],10)||0;f.items?e=f.items[g]:(e=d,f.delegate&&(e=e.find(f.delegate)),e=e.eq(g)),b._openClick({mfpEl:e},d,f)}else b.isOpen&&b[c].apply(b,Array.prototype.slice.call(arguments,1));else c=a.extend(!0,{},c),u?d.data("magnificPopup",c):d[0].magnificPopup=c,b.addGroup(d,c);return d};var C,D,E,F="inline",G=function(){E&&(D.after(E.addClass(C)).detach(),E=null)};a.magnificPopup.registerModule(F,{options:{hiddenClass:"hide",markup:"",tNotFound:"Content not found"},proto:{initInline:function(){b.types.push(F),w(h+"."+F,function(){G()})},getInline:function(c,d){if(G(),c.src){var e=b.st.inline,f=a(c.src);if(f.length){var g=f[0].parentNode;g&&g.tagName&&(D||(C=e.hiddenClass,D=x(C),C="mfp-"+C),E=f.after(D).detach().removeClass(C)),b.updateStatus("ready")}else b.updateStatus("error",e.tNotFound),f=a("<div>");return c.inlineElement=f,f}return b.updateStatus("ready"),b._parseMarkup(d,{},c),d}}});var H,I="ajax",J=function(){H&&a(document.body).removeClass(H)},K=function(){J(),b.req&&b.req.abort()};a.magnificPopup.registerModule(I,{options:{settings:null,cursor:"mfp-ajax-cur",tError:'<a href="%url%">The content</a> could not be loaded.'},proto:{initAjax:function(){b.types.push(I),H=b.st.ajax.cursor,w(h+"."+I,K),w("BeforeChange."+I,K)},getAjax:function(c){H&&a(document.body).addClass(H),b.updateStatus("loading");var d=a.extend({url:c.src,success:function(d,e,f){var g={data:d,xhr:f};y("ParseAjax",g),b.appendContent(a(g.data),I),c.finished=!0,J(),b._setFocus(),setTimeout(function(){b.wrap.addClass(q)},16),b.updateStatus("ready"),y("AjaxContentAdded")},error:function(){J(),c.finished=c.loadError=!0,b.updateStatus("error",b.st.ajax.tError.replace("%url%",c.src))}},b.st.ajax.settings);return b.req=a.ajax(d),""}}});var L,M=function(c){if(c.data&&void 0!==c.data.title)return c.data.title;var d=b.st.image.titleSrc;if(d){if(a.isFunction(d))return d.call(b,c);if(c.el)return c.el.attr(d)||""}return""};a.magnificPopup.registerModule("image",{options:{markup:'<div class="mfp-figure"><div class="mfp-close"></div><figure><div class="mfp-img"></div><figcaption><div class="mfp-bottom-bar"><div class="mfp-title"></div><div class="mfp-counter"></div></div></figcaption></figure></div>',cursor:"mfp-zoom-out-cur",titleSrc:"title",verticalFit:!0,tError:'<a href="%url%">The image</a> could not be loaded.'},proto:{initImage:function(){var c=b.st.image,d=".image";b.types.push("image"),w(m+d,function(){"image"===b.currItem.type&&c.cursor&&a(document.body).addClass(c.cursor)}),w(h+d,function(){c.cursor&&a(document.body).removeClass(c.cursor),v.off("resize"+p)}),w("Resize"+d,b.resizeImage),b.isLowIE&&w("AfterChange",b.resizeImage)},resizeImage:function(){var a=b.currItem;if(a&&a.img&&b.st.image.verticalFit){var c=0;b.isLowIE&&(c=parseInt(a.img.css("padding-top"),10)+parseInt(a.img.css("padding-bottom"),10)),a.img.css("max-height",b.wH-c)}},_onImageHasSize:function(a){a.img&&(a.hasSize=!0,L&&clearInterval(L),a.isCheckingImgSize=!1,y("ImageHasSize",a),a.imgHidden&&(b.content&&b.content.removeClass("mfp-loading"),a.imgHidden=!1))},findImageSize:function(a){var c=0,d=a.img[0],e=function(f){L&&clearInterval(L),L=setInterval(function(){return d.naturalWidth>0?void b._onImageHasSize(a):(c>200&&clearInterval(L),c++,void(3===c?e(10):40===c?e(50):100===c&&e(500)))},f)};e(1)},getImage:function(c,d){var e=0,f=function(){c&&(c.img[0].complete?(c.img.off(".mfploader"),c===b.currItem&&(b._onImageHasSize(c),b.updateStatus("ready")),c.hasSize=!0,c.loaded=!0,y("ImageLoadComplete")):(e++,200>e?setTimeout(f,100):g()))},g=function(){c&&(c.img.off(".mfploader"),c===b.currItem&&(b._onImageHasSize(c),b.updateStatus("error",h.tError.replace("%url%",c.src))),c.hasSize=!0,c.loaded=!0,c.loadError=!0)},h=b.st.image,i=d.find(".mfp-img");if(i.length){var j=document.createElement("img");j.className="mfp-img",c.el&&c.el.find("img").length&&(j.alt=c.el.find("img").attr("alt")),c.img=a(j).on("load.mfploader",f).on("error.mfploader",g),j.src=c.src,i.is("img")&&(c.img=c.img.clone()),j=c.img[0],j.naturalWidth>0?c.hasSize=!0:j.width||(c.hasSize=!1)}return b._parseMarkup(d,{title:M(c),img_replaceWith:c.img},c),b.resizeImage(),c.hasSize?(L&&clearInterval(L),c.loadError?(d.addClass("mfp-loading"),b.updateStatus("error",h.tError.replace("%url%",c.src))):(d.removeClass("mfp-loading"),b.updateStatus("ready")),d):(b.updateStatus("loading"),c.loading=!0,c.hasSize||(c.imgHidden=!0,d.addClass("mfp-loading"),b.findImageSize(c)),d)}}});var N,O=function(){return void 0===N&&(N=void 0!==document.createElement("p").style.MozTransform),N};a.magnificPopup.registerModule("zoom",{options:{enabled:!1,easing:"ease-in-out",duration:300,opener:function(a){return a.is("img")?a:a.find("img")}},proto:{initZoom:function(){var a,c=b.st.zoom,d=".zoom";if(c.enabled&&b.supportsTransition){var e,f,g=c.duration,j=function(a){var b=a.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"),d="all "+c.duration/1e3+"s "+c.easing,e={position:"fixed",zIndex:9999,left:0,top:0,"-webkit-backface-visibility":"hidden"},f="transition";return e["-webkit-"+f]=e["-moz-"+f]=e["-o-"+f]=e[f]=d,b.css(e),b},k=function(){b.content.css("visibility","visible")};w("BuildControls"+d,function(){if(b._allowZoom()){if(clearTimeout(e),b.content.css("visibility","hidden"),a=b._getItemToZoom(),!a)return void k();f=j(a),f.css(b._getOffset()),b.wrap.append(f),e=setTimeout(function(){f.css(b._getOffset(!0)),e=setTimeout(function(){k(),setTimeout(function(){f.remove(),a=f=null,y("ZoomAnimationEnded")},16)},g)},16)}}),w(i+d,function(){if(b._allowZoom()){if(clearTimeout(e),b.st.removalDelay=g,!a){if(a=b._getItemToZoom(),!a)return;f=j(a)}f.css(b._getOffset(!0)),b.wrap.append(f),b.content.css("visibility","hidden"),setTimeout(function(){f.css(b._getOffset())},16)}}),w(h+d,function(){b._allowZoom()&&(k(),f&&f.remove(),a=null)})}},_allowZoom:function(){return"image"===b.currItem.type},_getItemToZoom:function(){return b.currItem.hasSize?b.currItem.img:!1},_getOffset:function(c){var d;d=c?b.currItem.img:b.st.zoom.opener(b.currItem.el||b.currItem);var e=d.offset(),f=parseInt(d.css("padding-top"),10),g=parseInt(d.css("padding-bottom"),10);e.top-=a(window).scrollTop()-f;var h={width:d.width(),height:(u?d.innerHeight():d[0].offsetHeight)-g-f};return O()?h["-moz-transform"]=h.transform="translate("+e.left+"px,"+e.top+"px)":(h.left=e.left,h.top=e.top),h}}});var P="iframe",Q="//about:blank",R=function(a){if(b.currTemplate[P]){var c=b.currTemplate[P].find("iframe");c.length&&(a||(c[0].src=Q),b.isIE8&&c.css("display",a?"block":"none"))}};a.magnificPopup.registerModule(P,{options:{markup:'<div class="mfp-iframe-scaler"><div class="mfp-close"></div><iframe class="mfp-iframe" src="//about:blank" frameborder="0" allowfullscreen></iframe></div>',srcAction:"iframe_src",patterns:{youtube:{index:"youtube.com",id:"v=",src:"//www.youtube.com/embed/%id%?autoplay=1"},vimeo:{index:"vimeo.com/",id:"/",src:"//player.vimeo.com/video/%id%?autoplay=1"},gmaps:{index:"//maps.google.",src:"%id%&output=embed"}}},proto:{initIframe:function(){b.types.push(P),w("BeforeChange",function(a,b,c){b!==c&&(b===P?R():c===P&&R(!0))}),w(h+"."+P,function(){R()})},getIframe:function(c,d){var e=c.src,f=b.st.iframe;a.each(f.patterns,function(){return e.indexOf(this.index)>-1?(this.id&&(e="string"==typeof this.id?e.substr(e.lastIndexOf(this.id)+this.id.length,e.length):this.id.call(this,e)),e=this.src.replace("%id%",e),!1):void 0});var g={};return f.srcAction&&(g[f.srcAction]=e),b._parseMarkup(d,g,c),b.updateStatus("ready"),d}}});var S=function(a){var c=b.items.length;return a>c-1?a-c:0>a?c+a:a},T=function(a,b,c){return a.replace(/%curr%/gi,b+1).replace(/%total%/gi,c)};a.magnificPopup.registerModule("gallery",{options:{enabled:!1,arrowMarkup:'<button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir%"></button>',preload:[0,2],navigateByImgClick:!0,arrows:!0,tPrev:"Previous (Left arrow key)",tNext:"Next (Right arrow key)",tCounter:"%curr% of %total%"},proto:{initGallery:function(){var c=b.st.gallery,e=".mfp-gallery";return b.direction=!0,c&&c.enabled?(f+=" mfp-gallery",w(m+e,function(){c.navigateByImgClick&&b.wrap.on("click"+e,".mfp-img",function(){return b.items.length>1?(b.next(),!1):void 0}),d.on("keydown"+e,function(a){37===a.keyCode?b.prev():39===a.keyCode&&b.next()})}),w("UpdateStatus"+e,function(a,c){c.text&&(c.text=T(c.text,b.currItem.index,b.items.length))}),w(l+e,function(a,d,e,f){var g=b.items.length;e.counter=g>1?T(c.tCounter,f.index,g):""}),w("BuildControls"+e,function(){if(b.items.length>1&&c.arrows&&!b.arrowLeft){var d=c.arrowMarkup,e=b.arrowLeft=a(d.replace(/%title%/gi,c.tPrev).replace(/%dir%/gi,"left")).addClass(s),f=b.arrowRight=a(d.replace(/%title%/gi,c.tNext).replace(/%dir%/gi,"right")).addClass(s);e.click(function(){b.prev()}),f.click(function(){b.next()}),b.container.append(e.add(f))}}),w(n+e,function(){b._preloadTimeout&&clearTimeout(b._preloadTimeout),b._preloadTimeout=setTimeout(function(){b.preloadNearbyImages(),b._preloadTimeout=null},16)}),void w(h+e,function(){d.off(e),b.wrap.off("click"+e),b.arrowRight=b.arrowLeft=null})):!1},next:function(){b.direction=!0,b.index=S(b.index+1),b.updateItemHTML()},prev:function(){b.direction=!1,b.index=S(b.index-1),b.updateItemHTML()},goTo:function(a){b.direction=a>=b.index,b.index=a,b.updateItemHTML()},preloadNearbyImages:function(){var a,c=b.st.gallery.preload,d=Math.min(c[0],b.items.length),e=Math.min(c[1],b.items.length);for(a=1;a<=(b.direction?e:d);a++)b._preloadItem(b.index+a);for(a=1;a<=(b.direction?d:e);a++)b._preloadItem(b.index-a)},_preloadItem:function(c){if(c=S(c),!b.items[c].preloaded){var d=b.items[c];d.parsed||(d=b.parseEl(c)),y("LazyLoad",d),"image"===d.type&&(d.img=a('<img class="mfp-img" />').on("load.mfploader",function(){d.hasSize=!0}).on("error.mfploader",function(){d.hasSize=!0,d.loadError=!0,y("LazyLoadError",d)}).attr("src",d.src)),d.preloaded=!0}}}});var U="retina";a.magnificPopup.registerModule(U,{options:{replaceSrc:function(a){return a.src.replace(/\.\w+$/,function(a){return"@2x"+a})},ratio:1},proto:{initRetina:function(){if(window.devicePixelRatio>1){var a=b.st.retina,c=a.ratio;c=isNaN(c)?c():c,c>1&&(w("ImageHasSize."+U,function(a,b){b.img.css({"max-width":b.img[0].naturalWidth/c,width:"100%"})}),w("ElementParse."+U,function(b,d){d.src=a.replaceSrc(d,c)}))}}}}),A()});
|
shared/classes/class.events.php
CHANGED
@@ -738,9 +738,13 @@ class Inbound_Events {
|
|
738 |
|
739 |
$query = 'SELECT *, count(*) as count FROM '.$table_name.' WHERE `lead_id` = "'.$lead_id.'" GROUP BY source';
|
740 |
|
741 |
-
$
|
742 |
|
743 |
-
|
|
|
|
|
|
|
|
|
744 |
|
745 |
}
|
746 |
|
738 |
|
739 |
$query = 'SELECT *, count(*) as count FROM '.$table_name.' WHERE `lead_id` = "'.$lead_id.'" GROUP BY source';
|
740 |
|
741 |
+
$events = $wpdb->get_results( $query , ARRAY_A );
|
742 |
|
743 |
+
$sources = array();
|
744 |
+
foreach ($events as $key => $event) {
|
745 |
+
$sources[$event['datetime']] = $event['source'];
|
746 |
+
}
|
747 |
+
return $sources;
|
748 |
|
749 |
}
|
750 |
|
shared/classes/class.form.php
CHANGED
@@ -45,7 +45,8 @@ if (!class_exists('Inbound_Forms')) {
|
|
45 |
'submit' => 'Submit',
|
46 |
'submit_colors' => '',
|
47 |
'submit_text_color' => '',
|
48 |
-
'submit_bg_color' => ''
|
|
|
49 |
), $atts));
|
50 |
|
51 |
if (!$id && isset($_GET['post'])) {
|
@@ -125,7 +126,7 @@ if (!class_exists('Inbound_Forms')) {
|
|
125 |
|
126 |
|
127 |
$form = '<div id="inbound-form-wrapper" class="inbound-form-wrapper">';
|
128 |
-
$form .= '<form class="inbound-now-form wpl-track-me inbound-track" method="post" id="' . $form_id . '" action="" style="' . $form_width . '">';
|
129 |
$main_layout = ($form_layout != "") ? 'inbound-' . $form_layout : 'inbound-normal';
|
130 |
|
131 |
for ($i = 0; $i < count($matches[0]); $i++) {
|
45 |
'submit' => 'Submit',
|
46 |
'submit_colors' => '',
|
47 |
'submit_text_color' => '',
|
48 |
+
'submit_bg_color' => '',
|
49 |
+
'custom_class' => ''
|
50 |
), $atts));
|
51 |
|
52 |
if (!$id && isset($_GET['post'])) {
|
126 |
|
127 |
|
128 |
$form = '<div id="inbound-form-wrapper" class="inbound-form-wrapper">';
|
129 |
+
$form .= '<form class="inbound-now-form wpl-track-me inbound-track '.$custom_class.'" method="post" id="' . $form_id . '" action="" style="' . $form_width . '">';
|
130 |
$main_layout = ($form_layout != "") ? 'inbound-' . $form_layout : 'inbound-normal';
|
131 |
|
132 |
for ($i = 0; $i < count($matches[0]); $i++) {
|
shared/classes/class.inbound-api.php
CHANGED
@@ -221,6 +221,7 @@ if (!class_exists('Inbound_API')) {
|
|
221 |
* @return array|mixed
|
222 |
*/
|
223 |
public static function get_args_from_token( $token ) {
|
|
|
224 |
|
225 |
/* Pull record from database */
|
226 |
$table_name = $wpdb->prefix . "inbound_tracked_links";
|
221 |
* @return array|mixed
|
222 |
*/
|
223 |
public static function get_args_from_token( $token ) {
|
224 |
+
global $wpdb;
|
225 |
|
226 |
/* Pull record from database */
|
227 |
$table_name = $wpdb->prefix . "inbound_tracked_links";
|
shared/classes/class.lead-storage.php
CHANGED
@@ -255,12 +255,22 @@ if (!class_exists('LeadStorage')) {
|
|
255 |
/* store raw form data */
|
256 |
self::store_raw_form_data($lead);
|
257 |
|
|
|
258 |
/* look for form_id and set it into main array */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
259 |
if (isset($raw_params['inbound_form_id'])) {
|
260 |
$lead['form_id'] = $raw_params['inbound_form_id'];
|
261 |
$lead['form_name'] = $raw_params['inbound_form_n'];
|
262 |
}
|
263 |
|
|
|
264 |
/* update lead id cookie */
|
265 |
setcookie('wp_lead_id', $lead['id'] , time() + (20 * 365 * 24 * 60 * 60), '/');
|
266 |
|
255 |
/* store raw form data */
|
256 |
self::store_raw_form_data($lead);
|
257 |
|
258 |
+
|
259 |
/* look for form_id and set it into main array */
|
260 |
+
if (isset($args['form_id'])) {
|
261 |
+
$lead['form_id'] = $args['form_id'];
|
262 |
+
}
|
263 |
+
if (isset($args['form_name'])) {
|
264 |
+
$lead['form_name'] = $args['form_name'];
|
265 |
+
}
|
266 |
+
|
267 |
+
/* look for an inbound_form_id and set it into main array */
|
268 |
if (isset($raw_params['inbound_form_id'])) {
|
269 |
$lead['form_id'] = $raw_params['inbound_form_id'];
|
270 |
$lead['form_name'] = $raw_params['inbound_form_n'];
|
271 |
}
|
272 |
|
273 |
+
|
274 |
/* update lead id cookie */
|
275 |
setcookie('wp_lead_id', $lead['id'] , time() + (20 * 365 * 24 * 60 * 60), '/');
|
276 |
|
shared/classes/class.load-shared.php
CHANGED
@@ -109,9 +109,9 @@ if (!class_exists('Inbound_Load_Shared')) {
|
|
109 |
} else if( defined('WP_CTA_PATH') ) {
|
110 |
return WP_CTA_PATH . 'shared/';
|
111 |
} else if ( defined('LANDINGPAGES_PATH') ) {
|
112 |
-
return LANDINGPAGES_PATH . '
|
113 |
} else if ( defined('WPL_PATH') ) {
|
114 |
-
return WPL_PATH . '
|
115 |
}
|
116 |
}
|
117 |
|
109 |
} else if( defined('WP_CTA_PATH') ) {
|
110 |
return WP_CTA_PATH . 'shared/';
|
111 |
} else if ( defined('LANDINGPAGES_PATH') ) {
|
112 |
+
return LANDINGPAGES_PATH . 'shared/';
|
113 |
} else if ( defined('WPL_PATH') ) {
|
114 |
+
return WPL_PATH . 'shared/';
|
115 |
}
|
116 |
}
|
117 |
|
shared/classes/class.marketing-button.php
CHANGED
@@ -85,7 +85,49 @@ class Inbound_Marketing_Button {
|
|
85 |
.shortcode-popup-block {
|
86 |
max-height: 660px;
|
87 |
overflow: auto;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
88 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
89 |
#popup-controls {
|
90 |
z-index: 999999;
|
91 |
width: 100%;
|
85 |
.shortcode-popup-block {
|
86 |
max-height: 660px;
|
87 |
overflow: auto;
|
88 |
+
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
89 |
+
background: #fff;
|
90 |
+
padding: 0px;
|
91 |
+
text-align: left;
|
92 |
+
max-width: 85%;
|
93 |
+
margin: 20px auto;
|
94 |
+
position: relative;
|
95 |
+
}
|
96 |
+
|
97 |
+
.mfp-bg {
|
98 |
+
top: 0;
|
99 |
+
left: 0;
|
100 |
+
width: 100%;
|
101 |
+
height: 100%;
|
102 |
+
z-index: 90000;
|
103 |
+
overflow: hidden;
|
104 |
+
position: fixed;
|
105 |
+
background: #0b0b0b;
|
106 |
+
opacity: 0.8;
|
107 |
}
|
108 |
+
|
109 |
+
|
110 |
+
.mfp-wrap {
|
111 |
+
top: 0;
|
112 |
+
left: 0;
|
113 |
+
width: 100%;
|
114 |
+
height: 100%;
|
115 |
+
z-index: 100001;
|
116 |
+
position: fixed;
|
117 |
+
outline: none !important;
|
118 |
+
-webkit-backface-visibility: hidden;
|
119 |
+
}
|
120 |
+
|
121 |
+
.mfp-container {
|
122 |
+
position: relative;
|
123 |
+
display: inline-block;
|
124 |
+
vertical-align: middle;
|
125 |
+
margin: 0 auto;
|
126 |
+
text-align: left;
|
127 |
+
z-index: 100002;
|
128 |
+
}
|
129 |
+
|
130 |
+
|
131 |
#popup-controls {
|
132 |
z-index: 999999;
|
133 |
width: 100%;
|
shared/classes/class.menus.adminbar.php
CHANGED
@@ -76,7 +76,6 @@ if (!class_exists('Inbound_Menus_Adminbar')) {
|
|
76 |
'meta' => array('class' => 'inbound-nav-marketing', 'title' => 'Inbound Marketing Admin')
|
77 |
));
|
78 |
|
79 |
-
//print_r($primary_menu_items);exit;
|
80 |
|
81 |
/** Add Primary Menu Items */
|
82 |
foreach ($primary_menu_items as $id => $menu_item) {
|
@@ -113,12 +112,13 @@ if (!class_exists('Inbound_Menus_Adminbar')) {
|
|
113 |
|
114 |
foreach ($secondary_menu_items as $id => $menu_item) {
|
115 |
$menu_item['id'] = $id;
|
|
|
116 |
|
117 |
if (!isset($menu_item['meta']['target'])) {
|
118 |
$menu_item['meta']['target'] = '_blank';
|
119 |
}
|
120 |
|
121 |
-
if ('_blank' === $menu_item['meta']['target']) {
|
122 |
if (!isset($menu_item['meta']['class'])) {
|
123 |
$menu_item['meta']['class'] = '';
|
124 |
}
|
76 |
'meta' => array('class' => 'inbound-nav-marketing', 'title' => 'Inbound Marketing Admin')
|
77 |
));
|
78 |
|
|
|
79 |
|
80 |
/** Add Primary Menu Items */
|
81 |
foreach ($primary_menu_items as $id => $menu_item) {
|
112 |
|
113 |
foreach ($secondary_menu_items as $id => $menu_item) {
|
114 |
$menu_item['id'] = $id;
|
115 |
+
$menu_item['meta'] = (isset($menu_item['meta']) ) ? $menu_item['meta'] : array();
|
116 |
|
117 |
if (!isset($menu_item['meta']['target'])) {
|
118 |
$menu_item['meta']['target'] = '_blank';
|
119 |
}
|
120 |
|
121 |
+
if ( '_blank' === $menu_item['meta']['target']) {
|
122 |
if (!isset($menu_item['meta']['class'])) {
|
123 |
$menu_item['meta']['class'] = '';
|
124 |
}
|
shared/shortcodes/inbound-shortcodes.php
CHANGED
@@ -60,15 +60,6 @@ class Inbound_Shortcodes {
|
|
60 |
|
61 |
if ( $hook == 'post.php' || $hook == 'post-new.php' || $hook == 'page-new.php' || $hook == 'page.php' ) {
|
62 |
|
63 |
-
/* dequeue third party scripts */
|
64 |
-
global $wp_scripts;
|
65 |
-
if ( !empty( $wp_scripts->queue ) ) {
|
66 |
-
$store = $wp_scripts->queue; // store the scripts
|
67 |
-
foreach ( $wp_scripts->queue as $handle ) {
|
68 |
-
wp_dequeue_script( $handle );
|
69 |
-
}
|
70 |
-
}
|
71 |
-
|
72 |
wp_enqueue_script('jquery' );
|
73 |
wp_enqueue_script('jquery-cookie', INBOUNDNOW_SHARED_URLPATH . 'assets/js/global/jquery.cookie.js', array( 'jquery' ) , false , true );
|
74 |
wp_enqueue_script('jquery-total-storage', INBOUNDNOW_SHARED_URLPATH . 'assets/js/global/jquery.total-storage.min.js', array( 'jquery' ) , false , true );
|
@@ -109,8 +100,7 @@ class Inbound_Shortcodes {
|
|
109 |
array_push($plugins_loaded, "cta");
|
110 |
}
|
111 |
if (is_plugin_active('leads/leads.php')) {
|
112 |
-
|
113 |
-
//array_push($plugins_loaded, "leads");
|
114 |
}
|
115 |
|
116 |
wp_localize_script( 'inbound-shortcodes-plugins', 'inbound_load', array( 'image_dir' => INBOUNDNOW_SHARED_URLPATH . 'shortcodes/', 'inbound_plugins' => $plugins_loaded, 'pop_title' => 'Insert Shortcode' ));
|
@@ -120,10 +110,6 @@ class Inbound_Shortcodes {
|
|
120 |
add_action( 'admin_footer', array(__CLASS__, 'inbound_forms_header_area'));
|
121 |
}
|
122 |
|
123 |
-
/* Requeue third party scripts */
|
124 |
-
foreach ( $store as $handle ) {
|
125 |
-
wp_enqueue_script( $handle );
|
126 |
-
}
|
127 |
}
|
128 |
}
|
129 |
|
60 |
|
61 |
if ( $hook == 'post.php' || $hook == 'post-new.php' || $hook == 'page-new.php' || $hook == 'page.php' ) {
|
62 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
63 |
wp_enqueue_script('jquery' );
|
64 |
wp_enqueue_script('jquery-cookie', INBOUNDNOW_SHARED_URLPATH . 'assets/js/global/jquery.cookie.js', array( 'jquery' ) , false , true );
|
65 |
wp_enqueue_script('jquery-total-storage', INBOUNDNOW_SHARED_URLPATH . 'assets/js/global/jquery.total-storage.min.js', array( 'jquery' ) , false , true );
|
100 |
array_push($plugins_loaded, "cta");
|
101 |
}
|
102 |
if (is_plugin_active('leads/leads.php')) {
|
103 |
+
array_push($plugins_loaded, "leads");
|
|
|
104 |
}
|
105 |
|
106 |
wp_localize_script( 'inbound-shortcodes-plugins', 'inbound_load', array( 'image_dir' => INBOUNDNOW_SHARED_URLPATH . 'shortcodes/', 'inbound_plugins' => $plugins_loaded, 'pop_title' => 'Insert Shortcode' ));
|
110 |
add_action( 'admin_footer', array(__CLASS__, 'inbound_forms_header_area'));
|
111 |
}
|
112 |
|
|
|
|
|
|
|
|
|
113 |
}
|
114 |
}
|
115 |
|
shared/shortcodes/js/shortcodes.js
CHANGED
@@ -617,7 +617,7 @@ var InboundShortcodes = {
|
|
617 |
field_count: field_count,
|
618 |
form_values: form_values,
|
619 |
notify_email: notify_email,
|
620 |
-
notify_email_subject: notify_email_subject,
|
621 |
send_email: send_email,
|
622 |
send_email_template: send_email_template,
|
623 |
send_subject: send_email_subject,
|
617 |
field_count: field_count,
|
618 |
form_values: form_values,
|
619 |
notify_email: notify_email,
|
620 |
+
notify_email_subject: notify_email_subject.replace(/\[~/g, '[').replace(/\]/g, ']'),
|
621 |
send_email: send_email,
|
622 |
send_email_template: send_email_template,
|
623 |
send_subject: send_email_subject,
|
shared/shortcodes/shortcodes/forms.php
CHANGED
@@ -201,6 +201,13 @@ $shortcodes_config['forms'] = array(
|
|
201 |
'std' => '',
|
202 |
'class' => 'main-design-settings',
|
203 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
204 |
),
|
205 |
'child' => array(
|
206 |
'options' => array(
|
@@ -369,7 +376,7 @@ $shortcodes_config['forms'] = array(
|
|
369 |
'shortcode' => '[inbound_field label="{{label}}" type="{{field_type}}" description="{{description}}" required="{{required}}" exclude_tracking={{exclude_tracking}} dropdown="{{dropdown_options}}" radio="{{radio_options}}" checkbox="{{checkbox_options}}" range="{{range_options}}" placeholder="{{placeholder}}" field_container_class="{{field_container_class}}" field_input_class="{{field_input_class}}" html="{{html_block_options}}" dynamic="{{hidden_input_options}}" default="{{default_value}}" map_to="{{map_to}}" divider_options="{{divider_options}}"]',
|
370 |
'clone' => __('Add Another Field', 'inbound-pro' )
|
371 |
),
|
372 |
-
'shortcode' => '[inbound_form name="{{form_name}}" lists="{{lists_hidden}}" tags="{{tags_hidden}}" redirect="{{redirect}}" notify="{{notify}}" notify_subject="{{notify_subject}}" layout="{{layout}}" font_size="{{font-size}}" labels="{{labels}}" icon="{{icon}}" submit="{{submit}}" submit="{{submit}}" submit_colors="{{submit-colors}}" submit_text_color="{{submit-text-color}}" submit_bg_color="{{submit-bg-color}}" width="{{width}}"]{{child}}[/inbound_form]',
|
373 |
'popup_title' => 'Insert Inbound Form Shortcode'
|
374 |
);
|
375 |
|
@@ -399,7 +406,7 @@ if (!function_exists('inbound_forms_cpt')) {
|
|
399 |
'show_ui' => true,
|
400 |
'query_var' => true,
|
401 |
'show_in_menu' => true,
|
402 |
-
'capability_type' => '
|
403 |
'hierarchical' => false,
|
404 |
'menu_position' => 34,
|
405 |
'supports' => array('title','custom-fields', 'editor')
|
@@ -416,6 +423,36 @@ if (!function_exists('inbound_forms_cpt')) {
|
|
416 |
//print_r($submenu); exit;
|
417 |
}*/
|
418 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
419 |
}
|
420 |
|
421 |
|
201 |
'std' => '',
|
202 |
'class' => 'main-design-settings',
|
203 |
),
|
204 |
+
'custom-class' => array(
|
205 |
+
'name' => __('Custom Class Names', 'inbound-pro' ),
|
206 |
+
'desc' => __('Add custom classes here ', 'inbound-pro' ),
|
207 |
+
'type' => 'text',
|
208 |
+
'std' => '',
|
209 |
+
'class' => 'main-design-settings',
|
210 |
+
),
|
211 |
),
|
212 |
'child' => array(
|
213 |
'options' => array(
|
376 |
'shortcode' => '[inbound_field label="{{label}}" type="{{field_type}}" description="{{description}}" required="{{required}}" exclude_tracking={{exclude_tracking}} dropdown="{{dropdown_options}}" radio="{{radio_options}}" checkbox="{{checkbox_options}}" range="{{range_options}}" placeholder="{{placeholder}}" field_container_class="{{field_container_class}}" field_input_class="{{field_input_class}}" html="{{html_block_options}}" dynamic="{{hidden_input_options}}" default="{{default_value}}" map_to="{{map_to}}" divider_options="{{divider_options}}"]',
|
377 |
'clone' => __('Add Another Field', 'inbound-pro' )
|
378 |
),
|
379 |
+
'shortcode' => '[inbound_form name="{{form_name}}" lists="{{lists_hidden}}" tags="{{tags_hidden}}" redirect="{{redirect}}" notify="{{notify}}" notify_subject="{{notify_subject}}" layout="{{layout}}" font_size="{{font-size}}" labels="{{labels}}" icon="{{icon}}" submit="{{submit}}" submit="{{submit}}" submit_colors="{{submit-colors}}" submit_text_color="{{submit-text-color}}" submit_bg_color="{{submit-bg-color}}" custom_class="{{custom-class}}" width="{{width}}"]{{child}}[/inbound_form]',
|
380 |
'popup_title' => 'Insert Inbound Form Shortcode'
|
381 |
);
|
382 |
|
406 |
'show_ui' => true,
|
407 |
'query_var' => true,
|
408 |
'show_in_menu' => true,
|
409 |
+
'capability_type' => array('inbound-form','inbound-forms'),
|
410 |
'hierarchical' => false,
|
411 |
'menu_position' => 34,
|
412 |
'supports' => array('title','custom-fields', 'editor')
|
423 |
//print_r($submenu); exit;
|
424 |
}*/
|
425 |
}
|
426 |
+
|
427 |
+
/**
|
428 |
+
* Register Role Capabilities
|
429 |
+
*/
|
430 |
+
add_action( 'admin_init' , 'inbound_register_form_role_capabilities' ,999);
|
431 |
+
function inbound_register_form_role_capabilities() {
|
432 |
+
// Add the roles you'd like to administer the custom post types
|
433 |
+
$roles = array('inbound_marketer','administrator');
|
434 |
+
|
435 |
+
// Loop through each role and assign capabilities
|
436 |
+
foreach($roles as $the_role) {
|
437 |
+
|
438 |
+
$role = get_role($the_role);
|
439 |
+
if (!$role) {
|
440 |
+
continue;
|
441 |
+
}
|
442 |
+
|
443 |
+
$role->add_cap( 'read' );
|
444 |
+
$role->add_cap( 'read_inbound-form');
|
445 |
+
$role->add_cap( 'read_private_inbound-forms' );
|
446 |
+
$role->add_cap( 'edit_inbound-form' );
|
447 |
+
$role->add_cap( 'edit_inbound-forms' );
|
448 |
+
$role->add_cap( 'edit_others_inbound-form' );
|
449 |
+
$role->add_cap( 'edit_published_inbound-forms' );
|
450 |
+
$role->add_cap( 'publish_inbound-form' );
|
451 |
+
$role->add_cap( 'delete_others_inbound-forms' );
|
452 |
+
$role->add_cap( 'delete_private_inbound-forms' );
|
453 |
+
$role->add_cap( 'delete_published_inbound-forms' );
|
454 |
+
}
|
455 |
+
}
|
456 |
}
|
457 |
|
458 |
|