WordPress Page Builder – Beaver Builder - Version 1.4.5

Version Description

Download this release

Release Info

Developer justinbusa
Plugin Icon 128x128 WordPress Page Builder – Beaver Builder
Version 1.4.5
Comparing to
See all releases

Code changes from version 1.4.3 to 1.4.5

Files changed (57) hide show
  1. changelog.txt +28 -1
  2. classes/{FLBuilderAdminPosts.php → class-fl-builder-admin-posts.php} +0 -0
  3. classes/{FLBuilderAdminSettings.php → class-fl-builder-admin-settings.php} +0 -0
  4. classes/{FLBuilderAdmin.php → class-fl-builder-admin.php} +47 -47
  5. classes/{FLBuilderAutoSuggest.php → class-fl-builder-auto-suggest.php} +0 -0
  6. classes/{FLBuilderColor.php → class-fl-builder-color.php} +0 -0
  7. classes/{FLBuilderIcons.php → class-fl-builder-icons.php} +0 -0
  8. classes/{FLBuilderLoop.php → class-fl-builder-loop.php} +0 -0
  9. classes/{FLBuilderModel.php → class-fl-builder-model.php} +571 -552
  10. classes/{FLBuilderModule.php → class-fl-builder-module.php} +7 -4
  11. classes/{FLBuilderPhoto.php → class-fl-builder-photo.php} +8 -8
  12. classes/{FLBuilderUpdate.php → class-fl-builder-update.php} +0 -0
  13. classes/{FLBuilderUtils.php → class-fl-builder-utils.php} +0 -0
  14. classes/{FLBuilder.php → class-fl-builder.php} +352 -330
  15. classes/{FLJSMin.php → class-fl-jsmin.php} +0 -0
  16. css/fl-builder-layout.css +3 -0
  17. css/fl-builder.css +17 -5
  18. css/fl-icon-selector.css +12 -1
  19. fl-builder.php +16 -16
  20. includes/admin-posts.php +2 -2
  21. includes/admin-settings.php +80 -80
  22. includes/column-settings.php +36 -36
  23. includes/field-form.php +3 -3
  24. includes/field-link.php +1 -1
  25. includes/field-multiple-photos.php +6 -11
  26. includes/field-suggest.php +2 -2
  27. includes/global-settings.php +10 -10
  28. includes/icon-selector.php +4 -3
  29. includes/js-config.php +5 -4
  30. includes/module-settings.php +17 -17
  31. includes/row-settings.php +41 -41
  32. includes/ui.php +5 -15
  33. includes/updater-config.php +1 -1
  34. includes/updater/classes/{FLUpdater.php → class-fl-updater.php} +55 -43
  35. includes/updater/includes/form.php +10 -10
  36. includes/updater/updater.php +1 -1
  37. includes/user-template-settings.php +3 -3
  38. js/fl-builder.js +11 -11
  39. js/fl-icon-selector.js +38 -12
  40. lang/fl-builder-it_IT.mo +0 -0
  41. lang/fl-builder-it_IT.po +0 -3506
  42. lang/fl-builder-pt_BR.mo +0 -0
  43. lang/fl-builder-pt_BR.po +0 -2958
  44. lang/fl-builder-sv_SE.mo +0 -0
  45. lang/fl-builder-sv_SE.po +0 -3086
  46. lang/fl-builder-xx_XX.mo +0 -0
  47. lang/fl-builder-xx_XX.pot +0 -3153
  48. languages/readme.md +14 -0
  49. languages/sk_SK.mo +0 -0
  50. languages/sk_SK.po +3558 -0
  51. languages/xx_XX.pot +3381 -0
  52. modules/photo/js/settings.js +7 -7
  53. modules/photo/photo.php +74 -74
  54. modules/video/video.php +15 -15
  55. modules/widget/includes/frontend.php +9 -8
  56. modules/widget/includes/settings-general.php +8 -8
  57. modules/widget/widget.php +37 -0
changelog.txt CHANGED
@@ -1,4 +1,31 @@
1
- <h4>1.4.3</h4>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  <p><strong>Enhancements</strong></p>
3
  <ul>
4
  <li>Added Foundation Icons and WordPress Dashicons to the icon selector.</li>
1
+ <h4>1.4.5 - 01/26/2015</h4>
2
+ <p><strong>Enhancements</strong></p>
3
+ <ul>
4
+ <li>Added a search field to the icon selector.</li>
5
+ </ul>
6
+ <p><strong>Bug Fixes</strong></p>
7
+ <ul>
8
+ <li>Fixed a bug introduced in 1.4.4 that caused PHP warnings when creating new pages.</li>
9
+ </ul>
10
+
11
+ <h4>1.4.4 - 01/26/2015</h4>
12
+ <p><strong>Enhancements</strong></p>
13
+ <ul>
14
+ <li>Major improvements to how translations are handled. A huge thanks to Oliver Juhas of <a href="http://www.webmandesign.eu/" target="_blank">WebMan Design</a> for making that happen. <strong>Please Note:</strong> Older translations are not compatible with this update need to be redone. Please get in touch with us if you're interested in helping with that.</li>
15
+ <li>Widgets in the builder now run the widget update method.</li>
16
+ <li>Content for the tabs module now scrolls into view on smaller devices.</li>
17
+ <li>Added filters for working with custom css classes on rows, columns and modules.</li>
18
+ <li>Updated class filenames to follow WordPress standards.</li>
19
+ </ul>
20
+ <p><strong>Bug Fixes</strong></p>
21
+ <ul>
22
+ <li>Fixed icon hover color.</li>
23
+ <li>Fixed a bug with slideshows showing up in the header on archive pages.</li>
24
+ <li>Fixed a bug causing the heading module color to not work when linked.</li>
25
+ <li>Fixed a bug with overriding modules in a theme when the name of the wp-content directory is changed.</li>
26
+ </ul>
27
+
28
+ <h4>1.4.3 - 01/11/2015</h4>
29
  <p><strong>Enhancements</strong></p>
30
  <ul>
31
  <li>Added Foundation Icons and WordPress Dashicons to the icon selector.</li>
classes/{FLBuilderAdminPosts.php → class-fl-builder-admin-posts.php} RENAMED
File without changes
classes/{FLBuilderAdminSettings.php → class-fl-builder-admin-settings.php} RENAMED
File without changes
classes/{FLBuilderAdmin.php → class-fl-builder-admin.php} RENAMED
@@ -9,24 +9,24 @@ final class FLBuilderAdmin {
9
 
10
  /**
11
  * @method activate
12
- */
13
- static public function activate()
14
  {
15
  global $wp_version;
16
-
17
  // Check for WordPress 3.5 and above.
18
  if(version_compare($wp_version, '3.5', '>=')) {
19
-
20
  // Check for multisite.
21
  if(is_multisite()) {
22
-
23
  // Init multisite support.
24
  self::init_classes();
25
  self::init_multisite();
26
-
27
  // This version has multisite support.
28
  if(class_exists('FLBuilderMultisite')) {
29
-
30
  if(is_network_admin()) {
31
  FLBuilderMultisite::install();
32
  }
@@ -36,7 +36,7 @@ final class FLBuilderAdmin {
36
  }
37
  // This version doesn't have multisite support.
38
  else {
39
- self::show_activate_error(sprintf(__('This version of the <strong>Page Builder</strong> plugin is not compatible with WordPress Multisite. <a href="%s" target="_blank">Please upgrade</a> to the Multisite version of this plugin.', 'fl-builder'), FL_BUILDER_UPGRADE_URL));
40
  }
41
  }
42
  // No multisite, standard install.
@@ -48,7 +48,7 @@ final class FLBuilderAdmin {
48
  else {
49
  self::show_activate_error(__('The <strong>Page Builder</strong> plugin requires WordPress version 3.5 or greater. Please update WordPress before activating the plugin.', 'fl-builder'));
50
  }
51
-
52
  // Success! Trigger the activation notice.
53
  if(FL_BUILDER_LITE !== true) {
54
  update_site_option('_fl_builder_activation_admin_notice', true);
@@ -57,21 +57,21 @@ final class FLBuilderAdmin {
57
 
58
  /**
59
  * @method show_activate_error
60
- */
61
- static public function show_activate_error($message)
62
  {
63
  deactivate_plugins(plugin_basename(FL_BUILDER_DIR . 'fl-builder.php'), false, is_network_admin());
64
-
65
  die($message);
66
  }
67
 
68
  /**
69
  * @method show_activate_notice
70
- */
71
- static public function show_activate_notice()
72
  {
73
  $notice = get_site_option('_fl_builder_activation_admin_notice');
74
-
75
  if($notice) {
76
  add_action('admin_notices', 'FLBuilderAdmin::activate_notice');
77
  add_action('network_admin_notices', 'FLBuilderAdmin::activate_notice');
@@ -81,30 +81,30 @@ final class FLBuilderAdmin {
81
 
82
  /**
83
  * @method activate_notice
84
- */
85
- static public function activate_notice()
86
  {
87
  $href = esc_url(admin_url('/options-general.php?page=fl-builder-settings#license'));
88
-
89
  echo '<div class="updated" style="background: #d3ebc1;">';
90
- echo '<p><strong>' . sprintf(__( 'Page Builder activated! <a href="%s">Click here</a> to enable remote updates.', 'fl-builder'), $href) . '</strong></p>';
91
  echo '</div>';
92
  }
93
 
94
  /**
95
  * @method install
96
- */
97
  static public function install() {}
98
 
99
  /**
100
  * @method uninstall
101
- */
102
- static public function uninstall()
103
  {
104
  FLBuilderModel::uninstall_database();
105
  }
106
-
107
- /**
108
  * @method init
109
  */
110
  static public function init()
@@ -116,20 +116,20 @@ final class FLBuilderAdmin {
116
  self::init_templates();
117
  }
118
 
119
- /**
120
  * @method init_classes
121
  */
122
  static public function init_classes()
123
  {
124
- $templates_class = FL_BUILDER_DIR . 'classes/FLBuilderTemplates.php';
125
- $ms_class = FL_BUILDER_DIR . 'classes/FLBuilderMultisite.php';
126
- $ms_settings_class = FL_BUILDER_DIR . 'classes/FLBuilderMultisiteSettings.php';
127
-
128
  if(file_exists($templates_class)) {
129
  require_once $templates_class;
130
  }
131
  if(is_multisite()) {
132
-
133
  if(file_exists($ms_class)) {
134
  require_once $ms_class;
135
  }
@@ -137,11 +137,11 @@ final class FLBuilderAdmin {
137
  require_once $ms_settings_class;
138
  }
139
  }
140
-
141
- require_once FL_BUILDER_DIR . 'classes/FLBuilderAdminSettings.php';
142
  }
143
 
144
- /**
145
  * @method init_settings
146
  */
147
  static public function init_settings()
@@ -149,13 +149,13 @@ final class FLBuilderAdmin {
149
  FLBuilderAdminSettings::init();
150
  }
151
 
152
- /**
153
  * @method init_multisite
154
  */
155
  static public function init_multisite()
156
  {
157
  if(is_multisite()) {
158
-
159
  if(class_exists('FLBuilderMultisite')) {
160
  FLBuilderMultisite::init();
161
  }
@@ -165,7 +165,7 @@ final class FLBuilderAdmin {
165
  }
166
  }
167
 
168
- /**
169
  * @method init_templates
170
  */
171
  static public function init_templates()
@@ -174,28 +174,28 @@ final class FLBuilderAdmin {
174
  FLBuilderTemplates::init();
175
  }
176
  }
177
-
178
  /**
179
  * @method render_plugin_action_links
180
- */
181
- static public function render_plugin_action_links($actions)
182
  {
183
  if(FL_BUILDER_LITE === true) {
184
- $actions[] = '<a href="' . FL_BUILDER_UPGRADE_URL . '" style="color:#3db634;" target="_blank">' . __('Upgrade', 'fl-builder') . '</a>';
185
  }
186
-
187
  return $actions;
188
  }
189
-
190
  /**
191
  * @method white_label_plugins_page
192
- */
193
- static public function white_label_plugins_page($plugins)
194
  {
195
  $branding = FLBuilderModel::get_branding();
196
-
197
  if($branding != __('Page Builder', 'fl-builder')) {
198
-
199
  if(isset($plugins['fl-builder/fl-builder.php'])) {
200
  $plugins['fl-builder/fl-builder.php']['Name'] = $branding;
201
  $plugins['fl-builder/fl-builder.php']['Title'] = $branding;
@@ -211,7 +211,7 @@ final class FLBuilderAdmin {
211
  $plugins['bb-plugin/fl-builder.php']['PluginURI'] = '';
212
  }
213
  }
214
-
215
  return $plugins;
216
  }
217
  }
9
 
10
  /**
11
  * @method activate
12
+ */
13
+ static public function activate()
14
  {
15
  global $wp_version;
16
+
17
  // Check for WordPress 3.5 and above.
18
  if(version_compare($wp_version, '3.5', '>=')) {
19
+
20
  // Check for multisite.
21
  if(is_multisite()) {
22
+
23
  // Init multisite support.
24
  self::init_classes();
25
  self::init_multisite();
26
+
27
  // This version has multisite support.
28
  if(class_exists('FLBuilderMultisite')) {
29
+
30
  if(is_network_admin()) {
31
  FLBuilderMultisite::install();
32
  }
36
  }
37
  // This version doesn't have multisite support.
38
  else {
39
+ self::show_activate_error( sprintf( __( 'This version of the <strong>Page Builder</strong> plugin is not compatible with WordPress Multisite. <a%s>Please upgrade</a> to the Multisite version of this plugin.', 'fl-builder' ), ' href="' . esc_url( FL_BUILDER_UPGRADE_URL ) . '" target="_blank"' ) );
40
  }
41
  }
42
  // No multisite, standard install.
48
  else {
49
  self::show_activate_error(__('The <strong>Page Builder</strong> plugin requires WordPress version 3.5 or greater. Please update WordPress before activating the plugin.', 'fl-builder'));
50
  }
51
+
52
  // Success! Trigger the activation notice.
53
  if(FL_BUILDER_LITE !== true) {
54
  update_site_option('_fl_builder_activation_admin_notice', true);
57
 
58
  /**
59
  * @method show_activate_error
60
+ */
61
+ static public function show_activate_error($message)
62
  {
63
  deactivate_plugins(plugin_basename(FL_BUILDER_DIR . 'fl-builder.php'), false, is_network_admin());
64
+
65
  die($message);
66
  }
67
 
68
  /**
69
  * @method show_activate_notice
70
+ */
71
+ static public function show_activate_notice()
72
  {
73
  $notice = get_site_option('_fl_builder_activation_admin_notice');
74
+
75
  if($notice) {
76
  add_action('admin_notices', 'FLBuilderAdmin::activate_notice');
77
  add_action('network_admin_notices', 'FLBuilderAdmin::activate_notice');
81
 
82
  /**
83
  * @method activate_notice
84
+ */
85
+ static public function activate_notice()
86
  {
87
  $href = esc_url(admin_url('/options-general.php?page=fl-builder-settings#license'));
88
+
89
  echo '<div class="updated" style="background: #d3ebc1;">';
90
+ echo '<p><strong>' . sprintf( __( 'Page Builder activated! <a%s>Click here</a> to enable remote updates.', 'fl-builder' ), ' href="' . esc_url( $href ) . '"' ) . '</strong></p>';
91
  echo '</div>';
92
  }
93
 
94
  /**
95
  * @method install
96
+ */
97
  static public function install() {}
98
 
99
  /**
100
  * @method uninstall
101
+ */
102
+ static public function uninstall()
103
  {
104
  FLBuilderModel::uninstall_database();
105
  }
106
+
107
+ /**
108
  * @method init
109
  */
110
  static public function init()
116
  self::init_templates();
117
  }
118
 
119
+ /**
120
  * @method init_classes
121
  */
122
  static public function init_classes()
123
  {
124
+ $templates_class = FL_BUILDER_DIR . 'classes/class-fl-builder-templates.php';
125
+ $ms_class = FL_BUILDER_DIR . 'classes/class-fl-builder-multisite.php';
126
+ $ms_settings_class = FL_BUILDER_DIR . 'classes/class-fl-builder-multisite-settings.php';
127
+
128
  if(file_exists($templates_class)) {
129
  require_once $templates_class;
130
  }
131
  if(is_multisite()) {
132
+
133
  if(file_exists($ms_class)) {
134
  require_once $ms_class;
135
  }
137
  require_once $ms_settings_class;
138
  }
139
  }
140
+
141
+ require_once FL_BUILDER_DIR . 'classes/class-fl-builder-admin-settings.php';
142
  }
143
 
144
+ /**
145
  * @method init_settings
146
  */
147
  static public function init_settings()
149
  FLBuilderAdminSettings::init();
150
  }
151
 
152
+ /**
153
  * @method init_multisite
154
  */
155
  static public function init_multisite()
156
  {
157
  if(is_multisite()) {
158
+
159
  if(class_exists('FLBuilderMultisite')) {
160
  FLBuilderMultisite::init();
161
  }
165
  }
166
  }
167
 
168
+ /**
169
  * @method init_templates
170
  */
171
  static public function init_templates()
174
  FLBuilderTemplates::init();
175
  }
176
  }
177
+
178
  /**
179
  * @method render_plugin_action_links
180
+ */
181
+ static public function render_plugin_action_links($actions)
182
  {
183
  if(FL_BUILDER_LITE === true) {
184
+ $actions[] = '<a href="' . FL_BUILDER_UPGRADE_URL . '" style="color:#3db634;" target="_blank">' . _x( 'Upgrade', 'Plugin action link label.', 'fl-builder' ) . '</a>';
185
  }
186
+
187
  return $actions;
188
  }
189
+
190
  /**
191
  * @method white_label_plugins_page
192
+ */
193
+ static public function white_label_plugins_page($plugins)
194
  {
195
  $branding = FLBuilderModel::get_branding();
196
+
197
  if($branding != __('Page Builder', 'fl-builder')) {
198
+
199
  if(isset($plugins['fl-builder/fl-builder.php'])) {
200
  $plugins['fl-builder/fl-builder.php']['Name'] = $branding;
201
  $plugins['fl-builder/fl-builder.php']['Title'] = $branding;
211
  $plugins['bb-plugin/fl-builder.php']['PluginURI'] = '';
212
  }
213
  }
214
+
215
  return $plugins;
216
  }
217
  }
classes/{FLBuilderAutoSuggest.php → class-fl-builder-auto-suggest.php} RENAMED
File without changes
classes/{FLBuilderColor.php → class-fl-builder-color.php} RENAMED
File without changes
classes/{FLBuilderIcons.php → class-fl-builder-icons.php} RENAMED
File without changes
classes/{FLBuilderLoop.php → class-fl-builder-loop.php} RENAMED
File without changes
classes/{FLBuilderModel.php → class-fl-builder-model.php} RENAMED
@@ -11,7 +11,7 @@ final class FLBuilderModel {
11
  /**
12
  * @property $row_layouts
13
  * @type array
14
- */
15
  static public $row_layouts = array(
16
  '1-col' => array(100),
17
  '2-cols' => array(50, 50),
@@ -24,19 +24,19 @@ final class FLBuilderModel {
24
  'left-right-sidebar' => array(25, 50, 25)
25
  );
26
 
27
- /**
28
  * @property $settings_forms
29
  * @type array
30
  */
31
  static public $settings_forms = array();
32
 
33
- /**
34
  * @property $modules
35
  * @type array
36
  */
37
  static public $modules = array();
38
-
39
- /**
40
  * The last node id that was generated by the builder.
41
  * This is saved to ensure the next node id is unique.
42
  *
@@ -45,8 +45,8 @@ final class FLBuilderModel {
45
  * @private
46
  */
47
  static private $last_generated_node_id = null;
48
-
49
- /**
50
  * Cached post data from either the $_POST array
51
  * or from the json decoded fl_builder_data post variable.
52
  *
@@ -55,8 +55,8 @@ final class FLBuilderModel {
55
  * @private
56
  */
57
  static private $post_data = null;
58
-
59
- /**
60
  * An array of cached published layout data by post_id.
61
  *
62
  * @property $published_layout_data
@@ -64,8 +64,8 @@ final class FLBuilderModel {
64
  * @private
65
  */
66
  static private $published_layout_data = array();
67
-
68
- /**
69
  * An array of cached draft layout data by post_id.
70
  *
71
  * @property $draft_layout_data
@@ -73,41 +73,41 @@ final class FLBuilderModel {
73
  * @private
74
  */
75
  static private $draft_layout_data = array();
76
-
77
  /**
78
- * All database updates should be made through
79
  * this method for security.
80
  *
81
  * @method update
82
- */
83
  static public function update($method = null, $params = array())
84
  {
85
  $post_data = self::get_post_data();
86
  $method = isset($post_data['method']) ? $post_data['method'] : $method;
87
  $post_id = self::get_post_id();
88
-
89
  // User can't edit this post.
90
  if($post_id && !current_user_can('edit_post', $post_id)) {
91
  return false;
92
  }
93
-
94
- // Method doesn't exist.
95
  else if(!$method) {
96
  return false;
97
  }
98
-
99
  // Method exists.
100
  else if(method_exists('FLBuilderModel', $method)) {
101
-
102
  // Call the method.
103
  $result = call_user_func_array('FLBuilderModel::' . $method, $params);
104
-
105
- // Render new assets.
106
  if(!isset($post_data['render_assets']) || $post_data['render_assets'] == 1) {
107
  FLBuilder::render_css();
108
  FLBuilder::render_js();
109
  }
110
-
111
  // Return the result.
112
  if(defined('DOING_AJAX')) {
113
  echo json_encode($result);
@@ -117,76 +117,76 @@ final class FLBuilderModel {
117
  return $result;
118
  }
119
  }
120
-
121
  return false;
122
  }
123
-
124
  /**
125
  * @method get_edit_url
126
  */
127
  static public function get_edit_url( $post_id = false )
128
  {
129
  global $post;
130
-
131
  if ( false === $post_id ) {
132
  $post_id = $post->ID;
133
  }
134
-
135
  $url = add_query_arg( 'fl_builder', '', get_permalink( $post_id ) );
136
 
137
  if ( class_exists( 'WPMinify' ) ) {
138
  $url = add_query_arg( 'wp-minify-off', '1', $url );
139
  }
140
-
141
  return set_url_scheme( $url );
142
  }
143
-
144
  /**
145
  * @method get_post_data
146
- */
147
  static public function get_post_data()
148
  {
149
  if(!self::$post_data) {
150
-
151
  self::$post_data = array();
152
-
153
  if(isset($_POST['fl_builder_data'])) {
154
-
155
  $data = self::json_decode_settings($_POST['fl_builder_data']);
156
-
157
  foreach($data as $key => $val) {
158
  self::$post_data[$key] = $val;
159
  }
160
  }
161
  else if(isset($_POST)) {
162
-
163
  foreach($_POST as $key => $val) {
164
  self::$post_data[$key] = $val;
165
  }
166
  }
167
  }
168
-
169
  return self::$post_data;
170
  }
171
-
172
  /**
173
  * @method update_post_data
174
- */
175
  static public function update_post_data($key, $value)
176
  {
177
  $post_data = self::get_post_data();
178
  $post_data[$key] = $value;
179
  self::$post_data = $post_data;
180
  }
181
-
182
  /**
183
  * @method get_post_types
184
- */
185
  static public function get_post_types()
186
  {
187
  $key = '_fl_builder_post_types';
188
  $default = array('page', 'fl-builder-template');
189
-
190
  // Get the value.
191
  if(is_network_admin()) {
192
  $value = get_site_option($key);
@@ -198,7 +198,7 @@ final class FLBuilderModel {
198
  else {
199
  $value = get_option($key);
200
  }
201
-
202
  // Return the value.
203
  if(!$value) {
204
  return $default;
@@ -208,24 +208,24 @@ final class FLBuilderModel {
208
  return $value;
209
  }
210
  }
211
-
212
  /**
213
  * @method get_global_posts
214
- */
215
  static public function get_global_posts()
216
  {
217
  return apply_filters('fl_builder_global_posts', array());
218
  }
219
-
220
  /**
221
  * @method get_post_id
222
- */
223
  static public function get_post_id()
224
  {
225
  global $post;
226
-
227
  $post_data = self::get_post_data();
228
-
229
  if(isset($post_data['post_id'])) {
230
  return $post_data['post_id'];
231
  }
@@ -236,41 +236,41 @@ final class FLBuilderModel {
236
  return false;
237
  }
238
  }
239
-
240
  /**
241
  * @method is_ssl
242
  */
243
  static public function is_ssl()
244
- {
245
  return is_ssl() || 0 === stripos( get_option( 'siteurl' ), 'https://' );
246
  }
247
-
248
  /**
249
- * Checks to see if the builder can be enabled for
250
  * the current post in the main query.
251
  *
252
  * @method is_post_editable
253
  */
254
  static public function is_post_editable()
255
- {
256
  global $wp_the_query;
257
-
258
  if ( is_singular() && isset( $wp_the_query->post ) ) {
259
-
260
  $post = $wp_the_query->post;
261
  $post_types = self::get_post_types();
262
  $user_can = current_user_can( 'edit_post', $post->ID );
263
-
264
  if ( in_array( $post->post_type, $post_types ) && $user_can ) {
265
  return true;
266
  }
267
  }
268
-
269
  return false;
270
  }
271
-
272
  /**
273
- * Called by the heartbeat API. Lock the current post
274
  * so only the current user can edit it.
275
  *
276
  * @method lock_post
@@ -278,19 +278,19 @@ final class FLBuilderModel {
278
  static public function lock_post($response, $data)
279
  {
280
  if(isset($data['fl_builder_post_lock'])) {
281
-
282
  require_once ABSPATH . 'wp-admin/includes/post.php';
283
-
284
  wp_set_post_lock($data['fl_builder_post_lock']['post_id']);
285
  }
286
  }
287
-
288
  /**
289
  * Checks to see if the builder layout is enabled
290
  * for the current post.
291
  *
292
  * @method is_builder_enabled
293
- */
294
  static public function is_builder_enabled()
295
  {
296
  if(!is_admin() && post_password_required()) {
@@ -300,30 +300,30 @@ final class FLBuilderModel {
300
  return true;
301
  }
302
  else {
303
-
304
  $post_types = self::get_post_types();
305
  $post = get_post(self::get_post_id());
306
-
307
  if($post && in_array($post->post_type, $post_types)) {
308
  return get_post_meta(self::get_post_id(), '_fl_builder_enabled', true);
309
  }
310
  }
311
-
312
  return false;
313
  }
314
-
315
  /**
316
- * Checks to see if the builder UI is active for
317
  * the current post in the main query.
318
  *
319
  * @method is_builder_active
320
- */
321
  static public function is_builder_active()
322
  {
323
  if ( self::is_post_editable() && ! is_admin() && ! post_password_required() ) {
324
-
325
  $post_data = self::get_post_data();
326
-
327
  if ( isset( $_GET['fl_builder'] ) ) {
328
  return true;
329
  }
@@ -331,116 +331,116 @@ final class FLBuilderModel {
331
  return true;
332
  }
333
  }
334
-
335
  return false;
336
  }
337
-
338
  /**
339
- * Gets the status to use for working with nodes in
340
- * the database. Returns draft if the builder is active,
341
- * otherwise it returns published.
342
  *
343
  * @method get_node_status
344
- */
345
  static public function get_node_status()
346
  {
347
  return self::is_builder_active() ? 'draft' : 'published';
348
  }
349
-
350
  /**
351
  * Enable the builder layout for the current post.
352
  *
353
  * @method enable
354
- */
355
  static public function enable()
356
  {
357
  update_post_meta(self::get_post_id(), '_fl_builder_enabled', true);
358
  }
359
-
360
  /**
361
  * Disable the builder layout for the current post.
362
  *
363
  * @method disable
364
- */
365
  static public function disable()
366
  {
367
  update_post_meta(self::get_post_id(), '_fl_builder_enabled', false);
368
  }
369
-
370
  /**
371
  * Enable the builder editor for the main post in the query.
372
  *
373
  * @method enable_editing
374
- */
375
  static public function enable_editing()
376
  {
377
  global $wp_the_query;
378
-
379
  if ( self::is_post_editable() ) {
380
-
381
- $post = $wp_the_query->post;
382
  $published = self::get_layout_data( 'published' );
383
  $draft = self::get_layout_data( 'draft' );
384
-
385
  // Migrate existing post content to the builder?
386
  if ( empty( $published ) && empty( $draft ) && ! empty( $post->post_content ) ) {
387
-
388
  $row = self::add_row();
389
  $cols = self::get_nodes( 'column' );
390
- $col = array_shift( $cols );
391
  $settings = self::get_module_defaults( 'rich-text' );
392
  $settings->text = wpautop( $post->post_content );
393
-
394
- self::add_module( 'rich-text', $settings, $col->node );
395
  }
396
  // Create a new draft?
397
  else if ( empty( $draft ) ) {
398
  self::update_layout_data( $published, 'draft', $post->ID );
399
  }
400
-
401
  // Delete old draft asset cache.
402
  self::delete_asset_cache();
403
-
404
  // Lock the post.
405
  require_once ABSPATH . 'wp-admin/includes/post.php';
406
  wp_set_post_lock( $post->ID );
407
  }
408
  }
409
-
410
  /**
411
  * @method get_cache_dir
412
- */
413
  static public function get_cache_dir()
414
  {
415
  $wp_info = wp_upload_dir();
416
-
417
  // SSL workaround.
418
  if(self::is_ssl()) {
419
  $wp_info['baseurl'] = str_ireplace('http://', 'https://', $wp_info['baseurl']);
420
  }
421
-
422
  // Build the paths.
423
  $dir_info = array(
424
  'path' => $wp_info['basedir'] . '/fl-builder/',
425
  'url' => $wp_info['baseurl'] . '/fl-builder/'
426
  );
427
-
428
  // Create the cache dir if it doesn't exist.
429
  if(!file_exists($dir_info['path'])) {
430
  mkdir($dir_info['path']);
431
  }
432
-
433
  return $dir_info;
434
  }
435
-
436
  /**
437
  * @method get_asset_version
438
- */
439
  static public function get_asset_version()
440
  {
441
  $post_id = self::get_post_id();
442
  $active = self::is_builder_active();
443
-
444
  if($active) {
445
  return md5(uniqid());
446
  }
@@ -448,43 +448,43 @@ final class FLBuilderModel {
448
  return md5(get_post_modified_time('U', false, $post_id));
449
  }
450
  }
451
-
452
  /**
453
  * @method get_asset_info
454
- */
455
  static public function get_asset_info()
456
  {
457
  $post_data = self::get_post_data();
458
  $post_id = self::get_post_id();
459
  $cache_dir = self::get_cache_dir();
460
-
461
  if(isset($post_data['node_preview'])) {
462
- $suffix = '-layout-preview';
463
  }
464
  else if(self::is_builder_active()) {
465
- $suffix = '-layout-draft';
466
  }
467
  else {
468
  $suffix = '-layout';
469
  }
470
-
471
  $info = array(
472
  'css' => $cache_dir['path'] . $post_id . $suffix . '.css',
473
  'css_url' => $cache_dir['url'] . $post_id . $suffix . '.css',
474
  'js' => $cache_dir['path'] . $post_id . $suffix . '.js',
475
  'js_url' => $cache_dir['url'] . $post_id . $suffix . '.js'
476
  );
477
-
478
  return $info;
479
  }
480
-
481
  /**
482
  * @method delete_asset_cache
483
- */
484
  static public function delete_asset_cache($type = 'all')
485
  {
486
  $info = self::get_asset_info();
487
-
488
  if(($type == 'css' || $type == 'all') && file_exists($info['css'])) {
489
  unlink($info['css']);
490
  }
@@ -492,27 +492,27 @@ final class FLBuilderModel {
492
  unlink($info['js']);
493
  }
494
  }
495
-
496
  /**
497
  * @method delete_all_asset_cache
498
- */
499
  static public function delete_all_asset_cache($post_id = null)
500
  {
501
  $post_id = $post_id == null ? self::get_post_id() : $post_id;
502
  $cache_dir = self::get_cache_dir();
503
-
504
  if($post_id == null) {
505
  array_map('unlink', glob($cache_dir['path'] . '*.css'));
506
  array_map('unlink', glob($cache_dir['path'] . '*.js'));
507
  }
508
- else {
509
  $css = $cache_dir['path'] . $post_id . '-layout.css';
510
  $css_draft = $cache_dir['path'] . $post_id . '-layout-draft.css';
511
  $css_preview = $cache_dir['path'] . $post_id . '-layout-preview.css';
512
  $js = $cache_dir['path'] . $post_id . '-layout.js';
513
  $js_draft = $cache_dir['path'] . $post_id . '-layout-draft.js';
514
  $js_preview = $cache_dir['path'] . $post_id . '-layout-preview.js';
515
-
516
  if(file_exists($css)) {
517
  unlink($css);
518
  }
@@ -533,90 +533,90 @@ final class FLBuilderModel {
533
  }
534
  }
535
  }
536
-
537
  /**
538
  * @method generate_node_id
539
- */
540
  static public function generate_node_id()
541
  {
542
  $node_id = uniqid();
543
-
544
  if($node_id == self::$last_generated_node_id) {
545
  return self::generate_node_id();
546
  }
547
-
548
  self::$last_generated_node_id = $node_id;
549
-
550
  return $node_id;
551
  }
552
-
553
  /**
554
  * @method generate_new_node_ids
555
- */
556
  static public function generate_new_node_ids($data)
557
  {
558
  $map = array();
559
  $nodes = array();
560
-
561
  // Map the new node ids to the old.
562
  foreach($data as $node_id => $node) {
563
  $map[$node_id] = self::generate_node_id();
564
  }
565
-
566
  // Replace the old node ids.
567
  foreach($data as $node_id => $node) {
568
-
569
  $nodes[$map[$node_id]] = $node;
570
  $nodes[$map[$node_id]]->node = $map[$node_id];
571
-
572
  if(!empty($node->parent) && isset($map[$node->parent])) {
573
  $nodes[$map[$node_id]]->parent = $map[$node->parent];
574
  }
575
  }
576
-
577
  return $nodes;
578
  }
579
-
580
  /**
581
  * @method get_node
582
- */
583
  static public function get_node($node_id = null, $status = null)
584
  {
585
  $data = self::get_layout_data($status);
586
  $node = $data[$node_id];
587
-
588
  if(isset($node) && !empty($node->settings)) {
589
  $node->settings = self::get_node_settings($node);
590
  }
591
-
592
  return $node;
593
  }
594
-
595
  /**
596
  * @method get_child_nodes
597
- */
598
  static public function get_child_nodes($parent_id, $status = null)
599
  {
600
  $data = self::get_layout_data($status);
601
  $nodes = array();
602
-
603
  foreach($data as $node_id => $node) {
604
-
605
  if($node->parent == $parent_id) {
606
  $nodes[$node_id] = $node;
607
  }
608
  }
609
-
610
  return $nodes;
611
  }
612
-
613
  /**
614
  * @method get_nodes
615
- */
616
  static public function get_nodes($type = null, $parent_id = null, $status = null)
617
  {
618
  $nodes = array();
619
-
620
  // Get the layout data.
621
  if($parent_id == null) {
622
  $data = self::get_layout_data($status);
@@ -624,45 +624,45 @@ final class FLBuilderModel {
624
  else {
625
  $data = self::get_child_nodes($parent_id, $status);
626
  }
627
-
628
  // Return all nodes?
629
  if($type == null) {
630
  $nodes = $data;
631
  }
632
  // Return nodes of a certain type.
633
  else {
634
-
635
  foreach($data as $node_id => $node) {
636
-
637
  if($node->type == $type) {
638
  $nodes[$node_id] = $node;
639
  }
640
  }
641
-
642
  uasort($nodes, array('FLBuilderModel', 'order_nodes'));
643
  }
644
-
645
  // Merge default settings.
646
  foreach($nodes as $node_id => $node) {
647
-
648
  if(!empty($node->settings)) {
649
  $nodes[$node_id]->settings = self::get_node_settings($nodes[$node_id]);
650
  }
651
  }
652
-
653
  // Return the nodes.
654
  return $nodes;
655
  }
656
-
657
  /**
658
  * @method get_node_settings
659
- */
660
  static public function get_node_settings($node)
661
  {
662
  $post_data = self::get_post_data();
663
-
664
  if(isset($post_data['node_preview']) && isset($post_data['node_id']) && $post_data['node_id'] == $node->node) {
665
-
666
  if(!isset($post_data['node_preview_processed_settings'])) {
667
  $settings = $post_data['node_preview'];
668
  $settings = (object)array_merge((array)$node->settings, (array)$settings);
@@ -677,13 +677,13 @@ final class FLBuilderModel {
677
  $defaults = self::get_node_defaults($node);
678
  $settings = (object)array_merge((array)$defaults, (array)$node->settings);
679
  }
680
-
681
  return $settings;
682
  }
683
-
684
  /**
685
  * @method process_node_settings
686
- */
687
  static public function process_node_settings($node, $new_settings)
688
  {
689
  if($node->type == 'row') {
@@ -695,17 +695,17 @@ final class FLBuilderModel {
695
  if($node->type == 'module') {
696
  $new_settings = self::process_module_settings($node, $new_settings);
697
  }
698
-
699
  return $new_settings;
700
  }
701
-
702
  /**
703
  * @method get_node_defaults
704
- */
705
  static public function get_node_defaults($node)
706
  {
707
  $defaults = array();
708
-
709
  if($node->type == 'row') {
710
  $defaults = self::get_row_defaults();
711
  }
@@ -715,13 +715,13 @@ final class FLBuilderModel {
715
  else if($node->type == 'module') {
716
  $defaults = self::get_module_defaults($node->settings->type);
717
  }
718
-
719
  return $defaults;
720
  }
721
-
722
  /**
723
  * @method order_nodes
724
- */
725
  static public function order_nodes($a, $b)
726
  {
727
  return (int)$a->position - (int)$b->position;
@@ -729,7 +729,7 @@ final class FLBuilderModel {
729
 
730
  /**
731
  * @method count_nodes
732
- */
733
  static public function count_nodes($type = 'row', $parent_id = null)
734
  {
735
  return count(self::get_nodes($type, $parent_id));
@@ -737,70 +737,70 @@ final class FLBuilderModel {
737
 
738
  /**
739
  * @method next_node_position
740
- */
741
  static public function next_node_position($type = 'row', $parent_id = null)
742
  {
743
  $nodes = self::get_nodes($type, $parent_id);
744
  $last = array_pop($nodes);
745
-
746
  return $last ? $last->position + 1 : 0;
747
  }
748
-
749
  /**
750
  * @method delete_node
751
- */
752
  static public function delete_node($node_id = null)
753
  {
754
  // Get the post data.
755
  $post_data = self::get_post_data();
756
-
757
  // Get the layout data.
758
  $data = self::get_layout_data();
759
-
760
  // Get the node id.
761
  if(!$node_id && isset($post_data['node_id'])) {
762
  $node_id = $post_data['node_id'];
763
  }
764
-
765
  // Return if the node doesn't exist.
766
  if(!isset($data[$node_id])) {
767
  return;
768
  }
769
-
770
  // Get the node.
771
- $node = $data[$node_id];
772
-
773
  // Call the delete method if we're deleting a module.
774
  self::call_module_delete($node);
775
-
776
  // Delete the node.
777
  unset($data[$node_id]);
778
-
779
  // Update the layout data.
780
  self::update_layout_data($data);
781
-
782
  // Reorder existing nodes.
783
  self::reorder_nodes($node->type, $node->parent);
784
-
785
  // Delete the node's children.
786
  self::delete_child_nodes($node_id);
787
  }
788
-
789
  /**
790
  * @method delete_child_nodes
791
- */
792
  static public function delete_child_nodes($parent_id = null)
793
  {
794
  $children = self::get_nodes(null, $parent_id);
795
-
796
  foreach($children as $child) {
797
  self::delete_node($child->node);
798
  }
799
  }
800
-
801
  /**
802
  * @method call_module_delete
803
- */
804
  static public function call_module_delete($node)
805
  {
806
  if($node->type == 'module' && isset(self::$modules[$node->settings->type])) {
@@ -810,10 +810,10 @@ final class FLBuilderModel {
810
  $instance->delete();
811
  }
812
  }
813
-
814
  /**
815
  * @method reorder_node
816
- */
817
  static public function reorder_node($node_id = null, $position = 0)
818
  {
819
  $post_data = self::get_post_data();
@@ -823,18 +823,18 @@ final class FLBuilderModel {
823
  $nodes = self::get_nodes($node->type, $node->parent);
824
  $position = isset($post_data['position']) ? (int)$post_data['position'] : $position;
825
  $new_pos = 0;
826
-
827
  // Make sure node positions start at zero.
828
  foreach($nodes as $node) {
829
  $data[$node->node]->position = $new_pos;
830
  $new_pos++;
831
  }
832
-
833
  // Get the node and remove it from the array.
834
  $node = $data[$node_id];
835
  $removed = array_splice($nodes, $node->position, 1);
836
  $new_pos = 0;
837
-
838
  // Reposition it in the array.
839
  array_splice($nodes, $position, 0, $removed);
840
 
@@ -843,54 +843,54 @@ final class FLBuilderModel {
843
  $data[$node->node]->position = $new_pos;
844
  $new_pos++;
845
  }
846
-
847
  // Update the layout data.
848
  self::update_layout_data($data);
849
  }
850
-
851
  /**
852
  * @method reorder_nodes
853
- */
854
  static public function reorder_nodes($type = 'row', $parent_id = null)
855
  {
856
  $data = self::get_layout_data();
857
  $nodes = self::get_nodes($type, $parent_id);
858
  $pos = 0;
859
-
860
  foreach($nodes as $node_id => $node) {
861
  $data[$node_id]->position = $pos;
862
  $pos++;
863
  }
864
-
865
  self::update_layout_data($data);
866
  }
867
-
868
  /**
869
  * @method move_node
870
- */
871
  static public function move_node($node_id = null, $new_parent_id = null, $position = 0)
872
- {
873
  $post_data = self::get_post_data();
874
  $data = self::get_layout_data();
875
  $node_id = isset($post_data['node_id']) ? $post_data['node_id'] : $node_id;
876
- $new_parent_id = isset($post_data['new_parent']) ? $post_data['new_parent'] : $new_parent_id;
877
  $position = isset($post_data['position']) ? $post_data['position'] : $position;
878
  $new_parent = self::get_node($new_parent_id);
879
  $node = self::get_node($node_id);
880
-
881
  // Set the node's new parent.
882
  $data[$node_id]->parent = $new_parent->node;
883
-
884
  // Update the layout data.
885
  self::update_layout_data($data);
886
-
887
  // Set the node's new order.
888
  self::reorder_node($node_id, $position);
889
  }
890
-
891
  /**
892
  * @method add_row
893
- */
894
  static public function add_row($cols = '1-col', $position = false)
895
  {
896
  $post_data = self::get_post_data();
@@ -899,7 +899,7 @@ final class FLBuilderModel {
899
  $position = isset($post_data['position']) ? (int)$post_data['position'] : $position;
900
  $settings = self::get_row_defaults();
901
  $row_node_id = self::generate_node_id();
902
-
903
  // Add the row.
904
  $data[$row_node_id] = new StdClass();
905
  $data[$row_node_id]->node = $row_node_id;
@@ -907,25 +907,25 @@ final class FLBuilderModel {
907
  $data[$row_node_id]->parent = null;
908
  $data[$row_node_id]->position = self::next_node_position('row');
909
  $data[$row_node_id]->settings = $settings;
910
-
911
  // Update the layout data.
912
  self::update_layout_data($data);
913
-
914
  // Position the row.
915
  if($position !== false) {
916
  self::reorder_node($row_node_id, $position);
917
  }
918
-
919
  // Add a column group.
920
  self::add_col_group($row_node_id, $cols, 0);
921
-
922
  // Return the updated row.
923
  return self::get_node($row_node_id);
924
  }
925
-
926
  /**
927
  * @method copy_row
928
- */
929
  static public function copy_row($node_id = null)
930
  {
931
  $post_data = self::get_post_data();
@@ -935,77 +935,77 @@ final class FLBuilderModel {
935
  $new_row_id = self::generate_node_id();
936
  $col_groups = self::get_child_nodes($node_id);
937
  $new_nodes = array();
938
-
939
  // Add the new row.
940
  $layout_data[$new_row_id] = clone $row;
941
  $layout_data[$new_row_id]->settings = clone $row->settings;
942
- $layout_data[$new_row_id]->node = $new_row_id;
943
-
944
  // Get the new child nodes.
945
  foreach($col_groups as $col_group_id => $col_group) {
946
-
947
  $new_nodes[$col_group_id] = clone $col_group;
948
  $cols = self::get_child_nodes($col_group_id);
949
-
950
  foreach($cols as $col_id => $col) {
951
-
952
  $new_nodes[$col_id] = clone $col;
953
  $new_nodes[$col_id]->settings = clone $col->settings;
954
  $modules = self::get_child_nodes($col_id);
955
-
956
  foreach($modules as $module_id => $module) {
957
  $new_nodes[$module_id] = clone $module;
958
  $new_nodes[$module_id]->settings = clone $module->settings;
959
  }
960
  }
961
  }
962
-
963
  // Generate new child ids.
964
  $new_nodes = self::generate_new_node_ids($new_nodes);
965
-
966
  // Set col group parent ids to the new row id.
967
  foreach($new_nodes as $child_node_id => $child) {
968
  if($child->type == 'column-group') {
969
  $new_nodes[$child_node_id]->parent = $new_row_id;
970
  }
971
  }
972
-
973
  // Merge the child data.
974
  $layout_data = array_merge($layout_data, $new_nodes);
975
-
976
  // Update the layout data.
977
  self::update_layout_data($layout_data);
978
-
979
  // Position the new row.
980
  self::reorder_node($new_row_id, $row->position + 1);
981
  }
982
-
983
- /**
984
  * @method get_row_defaults
985
  */
986
  static public function get_row_defaults()
987
  {
988
  return self::get_settings_form_defaults(self::$settings_forms['row']['tabs']);
989
  }
990
-
991
  /**
992
  * @method process_row_settings
993
  */
994
- static public function process_row_settings($row, $new_settings)
995
  {
996
  // Cache background video data.
997
  if($new_settings->bg_type == 'video') {
998
-
999
  // Video
1000
  $video = FLBuilderPhoto::get_attachment_data($new_settings->bg_video);
1001
-
1002
  if($video) {
1003
-
1004
  $parts = explode('.', $video->filename);
1005
  $video->extension = array_pop($parts);
1006
  $new_settings->bg_video_data = $video;
1007
-
1008
- // Fallback
1009
  if(!empty($new_settings->bg_video_fallback_src)) {
1010
  $new_settings->bg_video_data->fallback = $new_settings->bg_video_fallback_src;
1011
  }
@@ -1014,15 +1014,15 @@ final class FLBuilderModel {
1014
  }
1015
  }
1016
  }
1017
-
1018
  // Cache background slideshow data.
1019
  if($new_settings->bg_type == 'slideshow' && $new_settings->ss_source == 'wordpress') {
1020
-
1021
  // Make sure we have a photo data object.
1022
  if(!isset($row->settings->ss_photo_data)) {
1023
  $row->settings->ss_photo_data = new StdClass();
1024
  }
1025
-
1026
  // Hijack the slideshow module to get WordPress photo data.
1027
  $ss = new FLSlideshowModule();
1028
  $ss->settings = new StdClass();
@@ -1030,40 +1030,40 @@ final class FLBuilderModel {
1030
  $ss->settings->photo_data = $row->settings->ss_photo_data;
1031
  $new_settings->ss_photo_data = $ss->get_wordpress_photos();
1032
  }
1033
-
1034
  return $new_settings;
1035
  }
1036
-
1037
  /**
1038
  * @method get_row_bg_data
1039
  */
1040
- static public function get_row_bg_data($row)
1041
  {
1042
  $data = null;
1043
-
1044
  // Background Video
1045
  if($row->settings->bg_type == 'video' && isset($row->settings->bg_video_data)) {
1046
  $data = $row->settings->bg_video_data;
1047
  }
1048
-
1049
  // Background Slideshow
1050
  else if($row->settings->bg_type == 'slideshow' && isset($row->settings->ss_photo_data)) {
1051
  $data = $row->settings->ss_photo_data;
1052
  }
1053
-
1054
  return $data;
1055
  }
1056
-
1057
  /**
1058
  * @method get_row_slideshow_source
1059
  */
1060
- static public function get_row_slideshow_source($row)
1061
  {
1062
  // Make sure we have a photo data object.
1063
  if(!isset($row->settings->ss_photo_data)) {
1064
  $row->settings->ss_photo_data = new StdClass();
1065
  }
1066
-
1067
  // Hijack the slideshow module to get the source.
1068
  $ss = new FLSlideshowModule();
1069
  $ss->settings = new StdClass();
@@ -1071,11 +1071,11 @@ final class FLBuilderModel {
1071
  $ss->settings->photos = $row->settings->ss_photos;
1072
  $ss->settings->feed_url = $row->settings->ss_feed_url;
1073
  $ss->settings->photo_data = $row->settings->ss_photo_data;
1074
-
1075
  // Return the slideshow source.
1076
  return $ss->get_source();
1077
  }
1078
-
1079
  /**
1080
  * @method add_col_group
1081
  */
@@ -1087,7 +1087,7 @@ final class FLBuilderModel {
1087
  $cols = isset($post_data['cols']) ? $post_data['cols'] : $cols;
1088
  $position = isset($post_data['position']) ? (int)$post_data['position'] : $position;
1089
  $group_node_id = self::generate_node_id();
1090
-
1091
  // Add the column group.
1092
  $data[$group_node_id] = new StdClass();
1093
  $data[$group_node_id]->node = $group_node_id;
@@ -1095,10 +1095,10 @@ final class FLBuilderModel {
1095
  $data[$group_node_id]->parent = $node_id;
1096
  $data[$group_node_id]->position = self::next_node_position('column-group', $node_id);
1097
  $data[$group_node_id]->settings = '';
1098
-
1099
  // Add the columns.
1100
  for($i = 0; $i < count(self::$row_layouts[$cols]); $i++) {
1101
-
1102
  $col_node_id = self::generate_node_id();
1103
  $data[$col_node_id] = new StdClass();
1104
  $data[$col_node_id]->node = $col_node_id;
@@ -1108,29 +1108,29 @@ final class FLBuilderModel {
1108
  $data[$col_node_id]->settings = new StdClass();
1109
  $data[$col_node_id]->settings->size = self::$row_layouts[$cols][$i];
1110
  }
1111
-
1112
  // Update the layout data.
1113
  self::update_layout_data($data);
1114
-
1115
  // Position the column group.
1116
  if($position !== false) {
1117
  self::reorder_node($group_node_id, $position);
1118
  }
1119
-
1120
  // Return the column group.
1121
  return self::get_node($group_node_id);
1122
  }
1123
-
1124
  /**
1125
  * @method process_col_settings
1126
  */
1127
  static public function process_col_settings($col, $new_settings)
1128
  {
1129
  $new_settings->size = self::resize_col($col->node, $new_settings->size);
1130
-
1131
  return $new_settings;
1132
  }
1133
-
1134
  /**
1135
  * @method delete_col
1136
  */
@@ -1140,39 +1140,39 @@ final class FLBuilderModel {
1140
  $node_id = isset($post_data['node_id']) ? $post_data['node_id'] : $node_id;
1141
  $new_width = isset($post_data['new_width']) ? $post_data['new_width'] : $new_width;
1142
  $col = self::get_node($node_id);
1143
-
1144
  // Delete the column.
1145
  self::delete_node($node_id);
1146
-
1147
  // Get the group
1148
  $group = self::get_node($col->parent);
1149
-
1150
  // Get the group children.
1151
  $cols = self::get_nodes('column', $group->node);
1152
-
1153
  // Delete the group if empty.
1154
  if(count($cols) === 0) {
1155
  self::delete_node($group->node);
1156
  }
1157
-
1158
  // Resize the remaining columns.
1159
  else {
1160
-
1161
  // Get the layout data.
1162
  $data = self::get_layout_data();
1163
-
1164
  // Loop through the columns.
1165
  foreach($cols as $col_id => $col) {
1166
-
1167
  // Set the new size.
1168
  $data[$col_id]->settings->size = round($new_width, 2);
1169
- }
1170
-
1171
  // Update the layout data.
1172
  self::update_layout_data($data);
1173
  }
1174
  }
1175
-
1176
  /**
1177
  * @method resize_col
1178
  */
@@ -1188,12 +1188,12 @@ final class FLBuilderModel {
1188
  $num_cols = count($cols);
1189
  $min_width = 10;
1190
  $max_width = 100 - $min_width;
1191
-
1192
  // Don't resize if only one column or width isn't a number.
1193
  if($num_cols == 1 || !is_numeric($new_width)) {
1194
  return $col->settings->size;
1195
  }
1196
-
1197
  // Find the sibling column to absorb this resize.
1198
  if($pos === 0) {
1199
  $sibling = $cols[1];
@@ -1204,123 +1204,123 @@ final class FLBuilderModel {
1204
  else {
1205
  $sibling = $cols[$pos + 1];
1206
  }
1207
-
1208
  // Find other siblings.
1209
  foreach($cols as $c) {
1210
-
1211
  if($col->node == $c->node) {
1212
  continue;
1213
  }
1214
  if($sibling->node == $c->node) {
1215
  continue;
1216
  }
1217
-
1218
  $siblings[] = $c;
1219
  $max_width -= $c->settings->size;
1220
  $siblings_width += $c->settings->size;
1221
  }
1222
-
1223
  // Make sure the new width isn't too small.
1224
  if($new_width < $min_width) {
1225
  $new_width = $min_width;
1226
  }
1227
-
1228
  // Make sure the new width isn't too big.
1229
  if($new_width > $max_width) {
1230
  $new_width = $max_width;
1231
  }
1232
-
1233
  // Save new sibling size.
1234
  $data[$sibling->node]->settings->size = round(100 - $siblings_width - $new_width, 2);
1235
-
1236
  // Save new column size.
1237
  $data[$col->node]->settings->size = $new_width;
1238
-
1239
  // Update the layout data.
1240
  self::update_layout_data($data);
1241
-
1242
  // Return the new size.
1243
  return $new_width;
1244
  }
1245
-
1246
- /**
1247
  * @method get_col_defaults
1248
  */
1249
  static public function get_col_defaults()
1250
  {
1251
  return self::get_settings_form_defaults(self::$settings_forms['col']['tabs']);
1252
  }
1253
-
1254
  /**
1255
  * @method load_modules
1256
- */
1257
  static public function load_modules()
1258
  {
1259
  $path = FL_BUILDER_DIR . 'modules/';
1260
  $dir = dir($path);
1261
  $module_path = '';
1262
-
1263
  while(false !== ($entry = $dir->read())) {
1264
-
1265
  if(!is_dir($path . $entry) || $entry == '.' || $entry == '..') {
1266
  continue;
1267
  }
1268
-
1269
  // Paths to check.
1270
  $module_path = $entry . '/' . $entry . '.php';
1271
  $child_path = get_stylesheet_directory() . '/fl-builder/modules/' . $module_path;
1272
  $theme_path = get_template_directory() . '/fl-builder/modules/' . $module_path;
1273
  $builder_path = FL_BUILDER_DIR . 'modules/' . $module_path;
1274
-
1275
  // Check for the module class in a child theme.
1276
  if(is_child_theme() && file_exists($child_path)) {
1277
  require_once $child_path;
1278
  }
1279
-
1280
  // Check for the module class in a parent theme.
1281
  else if(file_exists($theme_path)) {
1282
  require_once $theme_path;
1283
  }
1284
-
1285
  // Check for the module class in the builder directory.
1286
  else if(file_exists($builder_path)) {
1287
  require_once $builder_path;
1288
  }
1289
  }
1290
  }
1291
-
1292
  /**
1293
  * @method register_module
1294
- */
1295
  static public function register_module($class, $form)
1296
  {
1297
  if(class_exists($class)) {
1298
-
1299
  // Create a new instance of the module.
1300
  $instance = new $class();
1301
-
1302
  // Only register modules that are enabled.
1303
  if($instance->enabled) {
1304
 
1305
  // Save the instance in the modules array.
1306
  self::$modules[$instance->slug] = $instance;
1307
-
1308
  // Add the form to the instance.
1309
  self::$modules[$instance->slug]->form = $form;
1310
- self::$modules[$instance->slug]->form['advanced'] = self::$settings_forms['module-advanced'];
1311
  }
1312
  }
1313
  }
1314
-
1315
  /**
1316
  * @method get_enabled_modules
1317
- */
1318
  static public function get_enabled_modules()
1319
  {
1320
  $key = '_fl_builder_enabled_modules';
1321
  $default = array_keys(self::$modules);
1322
  $default[] = 'all';
1323
-
1324
  // Get the value.
1325
  if(is_network_admin()) {
1326
  $value = get_site_option($key);
@@ -1332,7 +1332,7 @@ final class FLBuilderModel {
1332
  else {
1333
  $value = get_option($key);
1334
  }
1335
-
1336
  // Return the value.
1337
  if(!$value || in_array('all', $value)) {
1338
  return $default;
@@ -1341,23 +1341,23 @@ final class FLBuilderModel {
1341
  return $value;
1342
  }
1343
  }
1344
-
1345
  /**
1346
  * @method get_categorized_modules
1347
- */
1348
  static public function get_categorized_modules()
1349
  {
1350
  $enabled_modules = self::get_enabled_modules();
1351
-
1352
  $categories = array(
1353
  'Basic Modules' => array(),
1354
  'Advanced Modules' => array(),
1355
  'Other' => array()
1356
  );
1357
-
1358
  // Build the categories array.
1359
  foreach(self::$modules as $module) {
1360
-
1361
  if(!in_array($module->slug, $enabled_modules)) {
1362
  continue;
1363
  }
@@ -1365,18 +1365,18 @@ final class FLBuilderModel {
1365
  $categories[$module->category] = self::get_wp_widgets();
1366
  }
1367
  else if(isset($module->category)) {
1368
-
1369
  if(!isset($categories[$module->category])) {
1370
  $categories[$module->category] = array();
1371
  }
1372
-
1373
  $categories[$module->category][$module->name] = $module;
1374
  }
1375
  else {
1376
  $categories['Other'][$module->name] = $module;
1377
  }
1378
  }
1379
-
1380
  // Sort the modules.
1381
  foreach($categories as $title => $modules) {
1382
  if(count($categories[$title]) == 0) {
@@ -1386,7 +1386,7 @@ final class FLBuilderModel {
1386
  ksort($categories[$title]);
1387
  }
1388
  }
1389
-
1390
  // Return sorted categories.
1391
  return $categories;
1392
  }
@@ -1396,10 +1396,10 @@ final class FLBuilderModel {
1396
  */
1397
  static public function get_module($node_id)
1398
  {
1399
- $module = self::get_node($node_id);
1400
-
1401
  if(isset(self::$modules[$module->settings->type])) {
1402
-
1403
  $class = get_class(self::$modules[$module->settings->type]);
1404
  $instance = new $class();
1405
  $instance->node = $module->node;
@@ -1408,10 +1408,10 @@ final class FLBuilderModel {
1408
  $instance->settings = $module->settings;
1409
  $instance->type = 'module';
1410
  $instance->form = self::$modules[$module->settings->type]->form;
1411
-
1412
  return $instance;
1413
  }
1414
-
1415
  return false;
1416
  }
1417
 
@@ -1423,11 +1423,11 @@ final class FLBuilderModel {
1423
  $modules = self::get_nodes('module', $col_id);
1424
  $instances = array();
1425
  $i = 0;
1426
-
1427
  foreach($modules as $module) {
1428
-
1429
  if(isset(self::$modules[$module->settings->type])) {
1430
-
1431
  $class = get_class(self::$modules[$module->settings->type]);
1432
  $instances[$i] = new $class();
1433
  $instances[$i]->node = $module->node;
@@ -1439,7 +1439,7 @@ final class FLBuilderModel {
1439
  $i++;
1440
  }
1441
  }
1442
-
1443
  return $instances;
1444
  }
1445
 
@@ -1450,7 +1450,7 @@ final class FLBuilderModel {
1450
  {
1451
  return self::get_modules();
1452
  }
1453
-
1454
  /**
1455
  * @method add_module
1456
  */
@@ -1464,13 +1464,13 @@ final class FLBuilderModel {
1464
  $position = isset($post_data['position']) ? (int)$post_data['position'] : $position;
1465
  $module_node_id = self::generate_node_id();
1466
  $settings->type = $type;
1467
-
1468
  // Run module update method.
1469
  $class = get_class(self::$modules[$type]);
1470
  $instance = new $class();
1471
  $instance->settings = $settings;
1472
  $settings = $instance->update($settings);
1473
-
1474
  // Save the module.
1475
  $data[$module_node_id] = new StdClass();
1476
  $data[$module_node_id]->node = $module_node_id;
@@ -1478,19 +1478,19 @@ final class FLBuilderModel {
1478
  $data[$module_node_id]->parent = $parent_id;
1479
  $data[$module_node_id]->position = self::next_node_position('module', $parent_id);
1480
  $data[$module_node_id]->settings = $settings;
1481
-
1482
  // Update the layout data.
1483
  self::update_layout_data($data);
1484
-
1485
  // Position the module.
1486
  if($position !== false) {
1487
  self::reorder_node($module_node_id, $position);
1488
  }
1489
-
1490
  // Send back the inserted module.
1491
  return self::get_module($module_node_id);
1492
  }
1493
-
1494
  /**
1495
  * @method add_default_module
1496
  */
@@ -1503,8 +1503,8 @@ final class FLBuilderModel {
1503
  $position = isset($post_data['position']) ? (int)$post_data['position'] : $position;
1504
  $settings = self::get_module_defaults($type);
1505
  $module_node_id = self::generate_node_id();
1506
-
1507
- // Add a new row if we don't have a parent.
1508
  if(!$parent) {
1509
  $row = self::add_row('1-col', $position);
1510
  $col_groups = self::get_nodes('column-group', $row->node);
@@ -1514,7 +1514,7 @@ final class FLBuilderModel {
1514
  $parent_id = $parent->node;
1515
  $position = null;
1516
  }
1517
-
1518
  // Add a new column if the parent is a row.
1519
  else if($parent->type == 'row') {
1520
  $col_group = self::add_col_group($parent->node, '1-col', $position);
@@ -1523,13 +1523,13 @@ final class FLBuilderModel {
1523
  $parent_id = $parent->node;
1524
  $position = null;
1525
  }
1526
-
1527
  // Run module update method.
1528
  $class = get_class(self::$modules[$type]);
1529
  $instance = new $class();
1530
  $instance->settings = $settings;
1531
  $settings = $instance->update($settings);
1532
-
1533
  // Save the module.
1534
  $data = self::get_layout_data();
1535
  $data[$module_node_id] = new StdClass();
@@ -1538,106 +1538,106 @@ final class FLBuilderModel {
1538
  $data[$module_node_id]->parent = $parent_id;
1539
  $data[$module_node_id]->position = self::next_node_position('module', $parent_id);
1540
  $data[$module_node_id]->settings = $settings;
1541
-
1542
  // Update the layout data.
1543
  self::update_layout_data($data);
1544
-
1545
  // Position the module.
1546
  if($position !== false) {
1547
  self::reorder_node($module_node_id, $position);
1548
  }
1549
-
1550
  // Send back the inserted module.
1551
  return self::get_module($module_node_id);
1552
  }
1553
-
1554
  /**
1555
  * @method copy_module
1556
- */
1557
  static public function copy_module($node_id = null)
1558
  {
1559
  $post_data = self::get_post_data();
1560
  $node_id = isset($post_data['node_id']) ? $post_data['node_id'] : $node_id;
1561
  $module = self::get_module($node_id);
1562
-
1563
  return self::add_module($module->settings->type, $module->settings, $module->parent, $module->position + 1);
1564
  }
1565
-
1566
  /**
1567
  * @method process_module_settings
1568
- */
1569
  static public function process_module_settings($module, $new_settings)
1570
  {
1571
  // Get a new node instance to work with.
1572
  $class = get_class(self::$modules[$module->settings->type]);
1573
  $instance = new $class();
1574
-
1575
  // Run node delete to clear any cache.
1576
  $instance->settings = $module->settings;
1577
  $instance->delete();
1578
-
1579
  // Run node update.
1580
  $instance->settings = $new_settings;
1581
  $new_settings = $instance->update($new_settings);
1582
-
1583
  return $new_settings;
1584
  }
1585
-
1586
  /**
1587
  * @method get_module_defaults
1588
  */
1589
  static public function get_module_defaults($type)
1590
  {
1591
  $defaults = new StdClass();
1592
-
1593
  if(isset(self::$modules[$type]->form)) {
1594
  $defaults = self::get_settings_form_defaults(self::$modules[$type]->form);
1595
  $defaults->type = $type;
1596
  }
1597
-
1598
  return $defaults;
1599
  }
1600
-
1601
  /**
1602
  * @method get_wp_widgets
1603
  */
1604
  static public function get_wp_widgets()
1605
  {
1606
  global $wp_widget_factory;
1607
-
1608
  $widgets = array();
1609
-
1610
  foreach($wp_widget_factory->widgets as $class => $widget) {
1611
  $widget->class = $class;
1612
  $widgets[$widget->name] = $widget;
1613
  }
1614
-
1615
  ksort($widgets);
1616
-
1617
  return $widgets;
1618
  }
1619
-
1620
  /**
1621
  * @method get_wp_sidebars
1622
  */
1623
  static public function get_wp_sidebars()
1624
  {
1625
  global $wp_registered_sidebars;
1626
-
1627
  $sidebars = array();
1628
-
1629
  foreach($wp_registered_sidebars as $sidebar) {
1630
  $sidebars[$sidebar['name']] = $sidebar;
1631
  }
1632
-
1633
  ksort($sidebars);
1634
-
1635
  return $sidebars;
1636
  }
1637
-
1638
  /**
1639
  * @method load_settings
1640
- */
1641
  static public function load_settings()
1642
  {
1643
  require_once FL_BUILDER_DIR . 'includes/global-settings.php';
@@ -1646,22 +1646,22 @@ final class FLBuilderModel {
1646
  require_once FL_BUILDER_DIR . 'includes/module-settings.php';
1647
  require_once FL_BUILDER_DIR . 'includes/user-template-settings.php';
1648
  }
1649
-
1650
  /**
1651
  * @method register_settings_form
1652
- */
1653
  static public function register_settings_form($id, $form)
1654
  {
1655
  self::$settings_forms[$id] = $form;
1656
  }
1657
-
1658
  /**
1659
  * @method get_settings_form_fields
1660
- */
1661
  static public function get_settings_form_fields($form)
1662
  {
1663
  $fields = array();
1664
-
1665
  foreach ( $form as $tab ) {
1666
  if ( isset( $tab['sections'] ) ) {
1667
  foreach ( $tab['sections'] as $section ) {
@@ -1673,27 +1673,27 @@ final class FLBuilderModel {
1673
  }
1674
  }
1675
  }
1676
-
1677
  return $fields;
1678
  }
1679
-
1680
  /**
1681
  * @method get_settings_form_defaults
1682
  */
1683
  static public function get_settings_form_defaults($tabs = array())
1684
  {
1685
  $defaults = new StdClass();
1686
-
1687
  foreach($tabs as $tab) {
1688
  if(isset($tab['sections'])) {
1689
  foreach($tab['sections'] as $section) {
1690
  if(isset($section['fields'])) {
1691
  foreach($section['fields'] as $name => $field) {
1692
-
1693
  $default = isset($field['default']) ? $field['default'] : '';
1694
  $is_multiple = isset($field['multiple']) && $field['multiple'] === true;
1695
  $supports_multiple = $field['type'] != 'editor' && $field['type'] != 'photo';
1696
-
1697
  if($is_multiple && $supports_multiple) {
1698
  $defaults->$name = array($default);
1699
  }
@@ -1705,10 +1705,10 @@ final class FLBuilderModel {
1705
  }
1706
  }
1707
  }
1708
-
1709
  return $defaults;
1710
  }
1711
-
1712
  /**
1713
  * @method save_settings
1714
  */
@@ -1719,17 +1719,17 @@ final class FLBuilderModel {
1719
  $settings = isset($post_data['settings']) ? $post_data['settings'] : $settings;
1720
  $node = self::get_node($node_id);
1721
  $new_settings = (object)array_merge((array)$node->settings, (array)$settings);
1722
-
1723
  // Process the settings.
1724
  $new_settings = self::process_node_settings($node, $new_settings);
1725
 
1726
  // Save the settings to the node.
1727
  $data = self::get_layout_data();
1728
  $data[$node_id]->settings = $new_settings;
1729
-
1730
  // Update the layout data.
1731
  self::update_layout_data($data);
1732
-
1733
  // Return the new layout.
1734
  if(defined('DOING_AJAX')) {
1735
  FLBuilder::render_css();
@@ -1737,7 +1737,7 @@ final class FLBuilderModel {
1737
  FLBuilder::render_layout();
1738
  }
1739
  }
1740
-
1741
  /**
1742
  * @method json_decode_settings
1743
  */
@@ -1747,15 +1747,15 @@ final class FLBuilderModel {
1747
  $data = json_decode(stripcslashes($data));
1748
  }
1749
  if(is_object($data) || is_array($data)) {
1750
-
1751
  foreach($data as $key => $val) {
1752
-
1753
  $new_val = null;
1754
-
1755
  if(is_string($val)) {
1756
-
1757
  $decoded = json_decode(stripcslashes($val));
1758
-
1759
  if(is_object($decoded) || is_array($decoded)) {
1760
  $new_val = $decoded;
1761
  }
@@ -1763,9 +1763,9 @@ final class FLBuilderModel {
1763
  else if(is_object($val) || is_array($val)) {
1764
  $new_val = self::json_decode_settings($val);
1765
  }
1766
-
1767
  if($new_val) {
1768
-
1769
  if(is_object($data)) {
1770
  $data->{$key} = $new_val;
1771
  }
@@ -1775,10 +1775,10 @@ final class FLBuilderModel {
1775
  }
1776
  }
1777
  }
1778
-
1779
  return $data;
1780
  }
1781
-
1782
  /**
1783
  * @method default_settings
1784
  */
@@ -1790,15 +1790,15 @@ final class FLBuilderModel {
1790
  }
1791
  }
1792
  }
1793
-
1794
- /**
1795
  * @method get_global_defaults
1796
  */
1797
  static public function get_global_defaults()
1798
  {
1799
  return self::get_settings_form_defaults(self::$settings_forms['global']['tabs']);
1800
  }
1801
-
1802
  /**
1803
  * @method get_global_settings
1804
  */
@@ -1806,14 +1806,14 @@ final class FLBuilderModel {
1806
  {
1807
  $settings = get_option('_fl_builder_settings');
1808
  $defaults = self::get_global_defaults();
1809
-
1810
  if(!$settings) {
1811
  $settings = new StdClass();
1812
  }
1813
-
1814
  return (object)array_merge((array)$defaults, (array)$settings);
1815
  }
1816
-
1817
  /**
1818
  * @method save_global_settings
1819
  */
@@ -1823,126 +1823,126 @@ final class FLBuilderModel {
1823
  $settings = isset($post_data['settings']) ? $post_data['settings'] : $settings;
1824
  $old_settings = self::get_global_settings();
1825
  $new_settings = (object)array_merge((array)$old_settings, (array)$settings);
1826
-
1827
  return update_option('_fl_builder_settings', $settings);
1828
  }
1829
 
1830
  /**
1831
  * @method duplicate_post
1832
- */
1833
  static public function duplicate_post()
1834
  {
1835
  global $wpdb;
1836
-
1837
  $post_id = self::get_post_id();
1838
  $post = get_post($post_id);
1839
  $current_user = wp_get_current_user();
1840
-
1841
- // Duplicate the post.
1842
- $data = array(
1843
- 'comment_status' => $post->comment_status,
1844
- 'ping_status' => $post->ping_status,
1845
- 'post_author' => $current_user->ID,
1846
- 'post_content' => $post->post_content,
1847
- 'post_excerpt' => $post->post_excerpt,
1848
- 'post_name' => $post->post_name,
1849
- 'post_parent' => $post->post_parent,
1850
- 'post_password' => $post->post_password,
1851
- 'post_status' => 'draft',
1852
- 'post_title' => __('Copy of ', 'fl-builder') . $post->post_title,
1853
- 'post_type' => $post->post_type,
1854
- 'to_ping' => $post->to_ping,
1855
- 'menu_order' => $post->menu_order
1856
- );
1857
-
1858
  // Get the new post id.
1859
  $new_post_id = wp_insert_post($data);
1860
-
1861
  // Duplicate post meta.
1862
  $post_meta = $wpdb->get_results("SELECT meta_key, meta_value FROM {$wpdb->postmeta} WHERE post_id= {$post_id}");
1863
-
1864
  if(count($post_meta) !== 0) {
1865
-
1866
  $sql = "INSERT INTO {$wpdb->postmeta} (post_id, meta_key, meta_value) ";
1867
-
1868
  foreach($post_meta as $meta_info) {
1869
  $meta_key = $meta_info->meta_key;
1870
  $meta_value = addslashes($meta_info->meta_value);
1871
  $sql_select[] = "SELECT {$new_post_id}, '{$meta_key}', '{$meta_value}'";
1872
  }
1873
-
1874
  $sql .= implode(" UNION ALL ", $sql_select);
1875
  $wpdb->query($sql);
1876
  }
1877
-
1878
  // Duplicate post terms.
1879
  $taxonomies = get_object_taxonomies($post->post_type);
1880
-
1881
  foreach($taxonomies as $taxonomy) {
1882
-
1883
  $post_terms = wp_get_object_terms($post_id, $taxonomy);
1884
-
1885
  for($i = 0; $i < count($post_terms); $i++) {
1886
  wp_set_object_terms($new_post_id, $post_terms[$i]->slug, $taxonomy, true);
1887
  }
1888
  }
1889
-
1890
  // Get the duplicated layout data.
1891
  $data = self::get_layout_data('published', $new_post_id);
1892
-
1893
  // Generate new node ids.
1894
  $data = self::generate_new_node_ids($data);
1895
-
1896
  // Save the duplicated layout data.
1897
  self::update_layout_data($data, 'published', $new_post_id);
1898
-
1899
  // Return the new post id.
1900
  return $new_post_id;
1901
  }
1902
-
1903
  /**
1904
  * @method delete_post
1905
- */
1906
  static public function delete_post($post_id)
1907
  {
1908
  // Delete all published and draft data.
1909
  self::delete_layout_data('published', $post_id);
1910
  self::delete_layout_data('draft', $post_id);
1911
-
1912
  // Delete all css and js.
1913
  self::delete_all_asset_cache($post_id);
1914
  }
1915
-
1916
  /**
1917
  * @method save_revision
1918
- */
1919
  static public function save_revision($post_id)
1920
  {
1921
  $parent_id = wp_is_post_revision($post_id);
1922
-
1923
  if($parent_id) {
1924
-
1925
  $parent = get_post($parent_id);
1926
  $data = self::get_layout_data('published', $parent->ID);
1927
-
1928
  if(!empty($data)) {
1929
  self::update_layout_data($data, 'published', $post_id);
1930
  }
1931
  }
1932
  }
1933
-
1934
  /**
1935
  * @method restore_revision
1936
- */
1937
  static public function restore_revision($post_id, $revision_id)
1938
  {
1939
  $post = get_post($post_id);
1940
  $revision = get_post($revision_id);
1941
-
1942
  if($revision) {
1943
-
1944
  $data = self::get_layout_data('published', $revision->ID);
1945
-
1946
  if(!empty($data)) {
1947
  self::update_layout_data($data, 'published', $post_id);
1948
  self::update_layout_data($data, 'draft', $post_id);
@@ -1951,22 +1951,22 @@ final class FLBuilderModel {
1951
  self::delete_layout_data('published', $post_id);
1952
  self::delete_layout_data('draft', $post_id);
1953
  }
1954
-
1955
  self::delete_all_asset_cache();
1956
  }
1957
  }
1958
-
1959
  /**
1960
  * We use get_metadata here instead of get_post_meta,
1961
- * to ensure revisions are queried accordingly.
1962
  *
1963
  * @method get_layout_data
1964
- */
1965
  static public function get_layout_data($status = null, $post_id = null)
1966
  {
1967
  $post_id = !$post_id ? self::get_post_id() : $post_id;
1968
  $status = !$status ? self::get_node_status() : $status;
1969
-
1970
  // Get published data?
1971
  if($status == 'published') {
1972
  if(isset(self::$published_layout_data[$post_id])) {
@@ -1974,7 +1974,7 @@ final class FLBuilderModel {
1974
  }
1975
  else {
1976
  $data = get_metadata('post', $post_id, '_fl_builder_data', true);
1977
- self::$published_layout_data[$post_id] = $data;
1978
  }
1979
  }
1980
  // Get draft data?
@@ -1984,15 +1984,15 @@ final class FLBuilderModel {
1984
  }
1985
  else {
1986
  $data = get_metadata('post', $post_id, '_fl_builder_draft', true);
1987
- self::$draft_layout_data[$post_id] = $data;
1988
  }
1989
  }
1990
-
1991
  // Make sure we have an array.
1992
  if(empty($data)) {
1993
  $data = array();
1994
  }
1995
-
1996
  // Clone the layout data to ensure the cache remains intact.
1997
  foreach($data as $node_id => $node) {
1998
  $data[$node_id] = clone $node;
@@ -2001,18 +2001,19 @@ final class FLBuilderModel {
2001
  // Return the data.
2002
  return $data;
2003
  }
2004
-
2005
  /**
2006
  * We use update_metadata here instead of update_post_meta,
2007
- * to ensure revisions are updated accordingly.
2008
- *
2009
  * @method update_layout_data
2010
- */
2011
  static public function update_layout_data($data, $status = null, $post_id = null)
2012
  {
2013
  $post_id = !$post_id ? self::get_post_id() : $post_id;
2014
  $status = !$status ? self::get_node_status() : $status;
2015
-
 
2016
  // Update published data?
2017
  if($status == 'published') {
2018
  update_metadata('post', $post_id, '_fl_builder_data', $data);
@@ -2024,75 +2025,93 @@ final class FLBuilderModel {
2024
  self::$draft_layout_data[$post_id] = $data;
2025
  }
2026
  }
2027
-
2028
  /**
2029
  * @method delete_layout_data
2030
- */
2031
  static public function delete_layout_data($status = null, $post_id = null)
2032
  {
2033
  // Make sure we have a status to delete.
2034
  if(!$status) {
2035
  return;
2036
  }
2037
-
2038
  // Get the post id.
2039
  $post_id = !$post_id ? self::get_post_id() : $post_id;
2040
-
2041
  // Get the data to delete.
2042
  $data = self::get_layout_data($status, $post_id);
2043
-
2044
  // Delete the nodes.
2045
  foreach($data as $node) {
2046
  self::call_module_delete($node);
2047
  }
2048
-
2049
  // Update the layout data.
2050
  self::update_layout_data(array(), $status, $post_id);
2051
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2052
 
2053
  /**
2054
  * @method clear_draft_layout
2055
- */
2056
  static public function clear_draft_layout()
2057
  {
2058
  $post_id = self::get_post_id();
2059
  $data = self::get_layout_data('published', $post_id);
2060
-
2061
  // Delete the old draft layout.
2062
  self::delete_layout_data('draft');
2063
-
2064
  // Save the new draft layout.
2065
  self::update_layout_data($data, 'draft', $post_id);
2066
-
2067
- // Clear the asset cache.
2068
  self::delete_all_asset_cache($post_id);
2069
  }
2070
-
2071
  /**
2072
  * @method save_layout
2073
- */
2074
  static public function save_layout()
2075
  {
2076
  $editor_content = FLBuilder::render_editor_content();
2077
  $post_id = self::get_post_id();
2078
  $data = self::get_layout_data('draft', $post_id);
2079
-
2080
  // Delete the old published layout.
2081
  self::delete_layout_data('published', $post_id);
2082
-
2083
  // Save the new published layout.
2084
  self::update_layout_data($data, 'published', $post_id);
2085
-
2086
- // Clear the asset cache.
2087
  self::delete_all_asset_cache($post_id);
2088
-
2089
  // Enable the builder to take over the post content.
2090
  self::enable();
2091
-
2092
  // Get the post status.
2093
  $post_status = get_post_status($post_id);
2094
  $post_status = strstr($post_status, 'draft') ? 'publish' : $post_status;
2095
-
2096
  // Update the post with stripped down content.
2097
  wp_update_post(array(
2098
  'ID' => self::get_post_id(),
@@ -2100,13 +2119,13 @@ final class FLBuilderModel {
2100
  'post_content' => $editor_content
2101
  ));
2102
  }
2103
-
2104
  /**
2105
  * Duplicates a layout for WPML when the copy from original
2106
  * button has been clicked.
2107
- *
2108
  * @method duplicate_wpml_layout
2109
- */
2110
  static public function duplicate_wpml_layout($original_post_id = null, $new_post_id = null)
2111
  {
2112
  $post_data = self::get_post_data();
@@ -2115,12 +2134,12 @@ final class FLBuilderModel {
2115
  $enabled = get_post_meta($original_post_id, '_fl_builder_enabled', true);
2116
  $published = self::get_layout_data('published', $original_post_id);
2117
  $draft = self::get_layout_data('draft', $original_post_id);
2118
-
2119
  $response = array(
2120
  'enabled' => false,
2121
  'has_layout' => false
2122
  );
2123
-
2124
  if(!empty($enabled)) {
2125
  update_post_meta($new_post_id, '_fl_builder_enabled', true);
2126
  $response['enabled'] = true;
@@ -2133,18 +2152,18 @@ final class FLBuilderModel {
2133
  self::update_layout_data($draft, 'draft', $new_post_id);
2134
  $response['has_layout'] = true;
2135
  }
2136
-
2137
  return $response;
2138
  }
2139
-
2140
  /**
2141
  * @method get_enabled_templates
2142
- */
2143
  static public function get_enabled_templates()
2144
  {
2145
  $key = '_fl_builder_enabled_templates';
2146
  $default = 'enabled';
2147
-
2148
  // Get the value.
2149
  if(is_network_admin()) {
2150
  $value = get_site_option($key);
@@ -2156,7 +2175,7 @@ final class FLBuilderModel {
2156
  else {
2157
  $value = get_option($key);
2158
  }
2159
-
2160
  // Return the value.
2161
  if(!$value) {
2162
  return $default;
@@ -2165,14 +2184,14 @@ final class FLBuilderModel {
2165
  return $value;
2166
  }
2167
  }
2168
-
2169
  /**
2170
  * @method save_user_template
2171
- */
2172
  static public function save_user_template()
2173
  {
2174
  $post_data = self::get_post_data();
2175
-
2176
  $post_id = wp_insert_post(array(
2177
  'post_title' => $post_data['template_name'],
2178
  'post_type' => 'fl-builder-template',
@@ -2180,41 +2199,41 @@ final class FLBuilderModel {
2180
  'ping_status' => 'closed',
2181
  'comment_status' => 'closed'
2182
  ));
2183
-
2184
  // Get the layout data to copy.
2185
  $data = self::get_layout_data();
2186
-
2187
  // Generate new node ids.
2188
  $data = self::generate_new_node_ids($data);
2189
-
2190
  // Save the template layout data.
2191
  self::update_layout_data($data, 'published', $post_id);
2192
  }
2193
-
2194
  /**
2195
  * @method get_user_templates
2196
- */
2197
  static public function get_user_templates()
2198
  {
2199
  return get_posts('post_type=fl-builder-template&orderby=title&order=ASC&posts_per_page=-1');
2200
  }
2201
-
2202
  /**
2203
  * @method delete_user_template
2204
- */
2205
  static public function delete_user_template($template_id = null)
2206
  {
2207
  $post_data = self::get_post_data();
2208
  $template_id = isset($post_data['template_id']) ? $post_data['template_id'] : $template_id;
2209
-
2210
  if(isset($template_id)) {
2211
  wp_delete_post($template_id, true);
2212
  }
2213
  }
2214
-
2215
  /**
2216
  * @method apply_user_template
2217
- */
2218
  static public function apply_user_template($template_id = null, $append = false)
2219
  {
2220
  $post_data = self::get_post_data();
@@ -2223,109 +2242,109 @@ final class FLBuilderModel {
2223
  $row_position = self::next_node_position('row');
2224
 
2225
  if(isset($template_id)) {
2226
-
2227
  // Delete existing nodes?
2228
  if(!$append) {
2229
  self::delete_layout_data('draft');
2230
  }
2231
-
2232
  // Insert new nodes if this is not a blank template.
2233
  if($template_id != 'blank') {
2234
-
2235
  // Get the template data.
2236
  $template_data = self::get_layout_data('published', $template_id);
2237
-
2238
  // Get new ids for the template nodes.
2239
  $template_data = self::generate_new_node_ids($template_data);
2240
-
2241
  // Get the existing layout data.
2242
  $layout_data = self::get_layout_data();
2243
-
2244
  // Reposition rows?
2245
  if($append) {
2246
-
2247
  foreach($template_data as $node_id => $node) {
2248
-
2249
  if($node->type == 'row') {
2250
  $template_data[$node_id]->position += $row_position;
2251
- }
2252
  }
2253
  }
2254
-
2255
  // Merge the data.
2256
  $data = array_merge($layout_data, $template_data);
2257
-
2258
  // Update the layout data.
2259
  self::update_layout_data($data);
2260
  }
2261
-
2262
  // Delete old asset cache.
2263
  self::delete_all_asset_cache();
2264
  }
2265
  }
2266
-
2267
  /**
2268
  * @method save_template
2269
- */
2270
  static public function save_template($settings)
2271
  {
2272
  // Get the layout data.
2273
  $data = self::get_layout_data();
2274
-
2275
  // Get the templates array.
2276
  $templates = self::get_templates();
2277
-
2278
  // Get new ids for the nodes.
2279
  $settings->nodes = self::generate_new_node_ids($data);
2280
 
2281
  // Insert the template into the templates array.
2282
  array_splice($templates, $settings->index, 0, array($settings));
2283
-
2284
  // Save the templates array.
2285
  self::save_templates($templates);
2286
  }
2287
-
2288
  /**
2289
  * @method update_template
2290
- */
2291
  static public function update_template($old_index, $settings)
2292
  {
2293
  // Get the templates array.
2294
  $templates = self::get_templates();
2295
-
2296
  // Remove the template from its old position.
2297
  $template = array_splice($templates, $old_index, 1);
2298
-
2299
  // Update the settings
2300
  foreach($settings as $key => $val) {
2301
  $template[0]->$key = $val;
2302
  }
2303
-
2304
- // Add the template to its new position.
2305
  array_splice($templates, $settings->index, 0, $template);
2306
-
2307
  // Save the templates array.
2308
  self::save_templates($templates);
2309
  }
2310
-
2311
  /**
2312
  * @method delete_template
2313
- */
2314
  static public function delete_template($index)
2315
  {
2316
  // Get the templates array.
2317
  $templates = self::get_templates();
2318
-
2319
  // Remove the template.
2320
  array_splice($templates, $index, 1);
2321
-
2322
  // Save the templates array.
2323
  self::save_templates($templates);
2324
  }
2325
-
2326
  /**
2327
  * @method apply_template
2328
- */
2329
  static public function apply_template($index = 0, $append = false)
2330
  {
2331
  $post_data = self::get_post_data();
@@ -2333,90 +2352,90 @@ final class FLBuilderModel {
2333
  $append = isset($post_data['append']) ? $post_data['append'] : $append;
2334
  $template = self::get_template($index);
2335
  $row_position = self::next_node_position('row');
2336
-
2337
  // Delete existing nodes?
2338
  if(!$append) {
2339
  self::delete_layout_data('draft');
2340
  }
2341
-
2342
  // Only move forward if we have template nodes.
2343
  if(isset($template->nodes)) {
2344
-
2345
  // Get new ids for the template nodes.
2346
  $template_data = self::generate_new_node_ids($template->nodes);
2347
-
2348
  // Get the existing layout data.
2349
  $layout_data = self::get_layout_data();
2350
-
2351
  // Reposition rows?
2352
  if($append) {
2353
-
2354
  foreach($template_data as $node_id => $node) {
2355
-
2356
  if($node->type == 'row') {
2357
  $template_data[$node_id]->position += $row_position;
2358
- }
2359
  }
2360
  }
2361
-
2362
  // Merge the data.
2363
  $data = array_merge($layout_data, $template_data);
2364
-
2365
  // Update the layout data.
2366
  self::update_layout_data($data);
2367
  }
2368
-
2369
  // Delete old asset cache.
2370
  self::delete_all_asset_cache();
2371
  }
2372
-
2373
  /**
2374
  * @method get_template
2375
- */
2376
  static public function get_template($index)
2377
  {
2378
  $templates = self::get_templates();
2379
-
2380
  return $templates[$index];
2381
  }
2382
 
2383
  /**
2384
  * @method get_templates
2385
- */
2386
  static public function get_templates()
2387
  {
2388
  $templates = unserialize(file_get_contents(FL_BUILDER_DIR . 'data/templates.dat'));
2389
-
2390
  return is_array($templates) ? $templates : array();
2391
  }
2392
-
2393
  /**
2394
  * @method save_templates
2395
- */
2396
  static public function save_templates($templates = array())
2397
  {
2398
  // Update the indexes for proper positioning.
2399
  $i = 0;
2400
  $updated = array();
2401
-
2402
  foreach($templates as $template) {
2403
  $template->index = $i;
2404
  $updated[$i] = $template;
2405
  $i++;
2406
  }
2407
-
2408
  // Save the templates array.
2409
  file_put_contents(FL_BUILDER_DIR . 'data/templates.dat', serialize($updated));
2410
  }
2411
-
2412
  /**
2413
  * @method get_branding
2414
- */
2415
  static public function get_branding()
2416
  {
2417
  $key = '_fl_builder_branding';
2418
  $default = __('Page Builder', 'fl-builder');
2419
-
2420
  // Get the value.
2421
  if(is_network_admin() || class_exists('FLBuilderMultisiteSettings')) {
2422
  $value = get_site_option($key);
@@ -2424,7 +2443,7 @@ final class FLBuilderModel {
2424
  else {
2425
  $value = get_option($key);
2426
  }
2427
-
2428
  // Return the value.
2429
  if(!$value) {
2430
  return $default;
@@ -2433,15 +2452,15 @@ final class FLBuilderModel {
2433
  return stripcslashes($value);
2434
  }
2435
  }
2436
-
2437
  /**
2438
  * @method get_branding_icon
2439
- */
2440
  static public function get_branding_icon()
2441
  {
2442
  $key = '_fl_builder_branding_icon';
2443
  $default = FL_BUILDER_URL . 'img/beaver.png';
2444
-
2445
  // Get the value.
2446
  if(is_network_admin() || class_exists('FLBuilderMultisiteSettings')) {
2447
  $value = get_site_option($key);
@@ -2449,7 +2468,7 @@ final class FLBuilderModel {
2449
  else {
2450
  $value = get_option($key);
2451
  }
2452
-
2453
  // Return the value.
2454
  if($value === false) {
2455
  return $default;
@@ -2458,15 +2477,15 @@ final class FLBuilderModel {
2458
  return $value;
2459
  }
2460
  }
2461
-
2462
  /**
2463
  * @method get_editing_capability
2464
- */
2465
  static public function get_editing_capability()
2466
  {
2467
  $key = '_fl_builder_editing_capability';
2468
  $default = 'edit_posts';
2469
-
2470
  // Get the value.
2471
  if(is_network_admin()) {
2472
  $value = get_site_option($key);
@@ -2478,7 +2497,7 @@ final class FLBuilderModel {
2478
  else {
2479
  $value = get_option($key);
2480
  }
2481
-
2482
  // Return the value.
2483
  if(!$value) {
2484
  return $default;
@@ -2487,17 +2506,17 @@ final class FLBuilderModel {
2487
  return $value;
2488
  }
2489
  }
2490
-
2491
  /**
2492
- * We don't delete _fl_builder_enabled, _fl_builder_data and _fl_builder_draft
2493
  * so layouts can be recovered should the plugin be installed again.
2494
  *
2495
  * @method uninstall_database
2496
- */
2497
  static public function uninstall_database()
2498
  {
2499
  if(current_user_can('delete_plugins')) {
2500
-
2501
  // Delete builder settings.
2502
  delete_option('_fl_builder_settings');
2503
  delete_option('_fl_builder_enabled_modules');
@@ -2513,13 +2532,13 @@ final class FLBuilderModel {
2513
  foreach($cache_files as $file) {
2514
  unlink($file);
2515
  }
2516
-
2517
  rmdir($cache_dir['path']);
2518
 
2519
  // Deactivate and delete the plugin.
2520
  deactivate_plugins(array('fl-builder/fl-builder.php'), false, is_network_admin());
2521
  delete_plugins(array('fl-builder/fl-builder.php'));
2522
-
2523
  // Redirect to the plugins page.
2524
  wp_redirect(admin_url('plugins.php?deleted=true&plugin_status=all&paged=1&s='));
2525
  }
11
  /**
12
  * @property $row_layouts
13
  * @type array
14
+ */
15
  static public $row_layouts = array(
16
  '1-col' => array(100),
17
  '2-cols' => array(50, 50),
24
  'left-right-sidebar' => array(25, 50, 25)
25
  );
26
 
27
+ /**
28
  * @property $settings_forms
29
  * @type array
30
  */
31
  static public $settings_forms = array();
32
 
33
+ /**
34
  * @property $modules
35
  * @type array
36
  */
37
  static public $modules = array();
38
+
39
+ /**
40
  * The last node id that was generated by the builder.
41
  * This is saved to ensure the next node id is unique.
42
  *
45
  * @private
46
  */
47
  static private $last_generated_node_id = null;
48
+
49
+ /**
50
  * Cached post data from either the $_POST array
51
  * or from the json decoded fl_builder_data post variable.
52
  *
55
  * @private
56
  */
57
  static private $post_data = null;
58
+
59
+ /**
60
  * An array of cached published layout data by post_id.
61
  *
62
  * @property $published_layout_data
64
  * @private
65
  */
66
  static private $published_layout_data = array();
67
+
68
+ /**
69
  * An array of cached draft layout data by post_id.
70
  *
71
  * @property $draft_layout_data
73
  * @private
74
  */
75
  static private $draft_layout_data = array();
76
+
77
  /**
78
+ * All database updates should be made through
79
  * this method for security.
80
  *
81
  * @method update
82
+ */
83
  static public function update($method = null, $params = array())
84
  {
85
  $post_data = self::get_post_data();
86
  $method = isset($post_data['method']) ? $post_data['method'] : $method;
87
  $post_id = self::get_post_id();
88
+
89
  // User can't edit this post.
90
  if($post_id && !current_user_can('edit_post', $post_id)) {
91
  return false;
92
  }
93
+
94
+ // Method doesn't exist.
95
  else if(!$method) {
96
  return false;
97
  }
98
+
99
  // Method exists.
100
  else if(method_exists('FLBuilderModel', $method)) {
101
+
102
  // Call the method.
103
  $result = call_user_func_array('FLBuilderModel::' . $method, $params);
104
+
105
+ // Render new assets.
106
  if(!isset($post_data['render_assets']) || $post_data['render_assets'] == 1) {
107
  FLBuilder::render_css();
108
  FLBuilder::render_js();
109
  }
110
+
111
  // Return the result.
112
  if(defined('DOING_AJAX')) {
113
  echo json_encode($result);
117
  return $result;
118
  }
119
  }
120
+
121
  return false;
122
  }
123
+
124
  /**
125
  * @method get_edit_url
126
  */
127
  static public function get_edit_url( $post_id = false )
128
  {
129
  global $post;
130
+
131
  if ( false === $post_id ) {
132
  $post_id = $post->ID;
133
  }
134
+
135
  $url = add_query_arg( 'fl_builder', '', get_permalink( $post_id ) );
136
 
137
  if ( class_exists( 'WPMinify' ) ) {
138
  $url = add_query_arg( 'wp-minify-off', '1', $url );
139
  }
140
+
141
  return set_url_scheme( $url );
142
  }
143
+
144
  /**
145
  * @method get_post_data
146
+ */
147
  static public function get_post_data()
148
  {
149
  if(!self::$post_data) {
150
+
151
  self::$post_data = array();
152
+
153
  if(isset($_POST['fl_builder_data'])) {
154
+
155
  $data = self::json_decode_settings($_POST['fl_builder_data']);
156
+
157
  foreach($data as $key => $val) {
158
  self::$post_data[$key] = $val;
159
  }
160
  }
161
  else if(isset($_POST)) {
162
+
163
  foreach($_POST as $key => $val) {
164
  self::$post_data[$key] = $val;
165
  }
166
  }
167
  }
168
+
169
  return self::$post_data;
170
  }
171
+
172
  /**
173
  * @method update_post_data
174
+ */
175
  static public function update_post_data($key, $value)
176
  {
177
  $post_data = self::get_post_data();
178
  $post_data[$key] = $value;
179
  self::$post_data = $post_data;
180
  }
181
+
182
  /**
183
  * @method get_post_types
184
+ */
185
  static public function get_post_types()
186
  {
187
  $key = '_fl_builder_post_types';
188
  $default = array('page', 'fl-builder-template');
189
+
190
  // Get the value.
191
  if(is_network_admin()) {
192
  $value = get_site_option($key);
198
  else {
199
  $value = get_option($key);
200
  }
201
+
202
  // Return the value.
203
  if(!$value) {
204
  return $default;
208
  return $value;
209
  }
210
  }
211
+
212
  /**
213
  * @method get_global_posts
214
+ */
215
  static public function get_global_posts()
216
  {
217
  return apply_filters('fl_builder_global_posts', array());
218
  }
219
+
220
  /**
221
  * @method get_post_id
222
+ */
223
  static public function get_post_id()
224
  {
225
  global $post;
226
+
227
  $post_data = self::get_post_data();
228
+
229
  if(isset($post_data['post_id'])) {
230
  return $post_data['post_id'];
231
  }
236
  return false;
237
  }
238
  }
239
+
240
  /**
241
  * @method is_ssl
242
  */
243
  static public function is_ssl()
244
+ {
245
  return is_ssl() || 0 === stripos( get_option( 'siteurl' ), 'https://' );
246
  }
247
+
248
  /**
249
+ * Checks to see if the builder can be enabled for
250
  * the current post in the main query.
251
  *
252
  * @method is_post_editable
253
  */
254
  static public function is_post_editable()
255
+ {
256
  global $wp_the_query;
257
+
258
  if ( is_singular() && isset( $wp_the_query->post ) ) {
259
+
260
  $post = $wp_the_query->post;
261
  $post_types = self::get_post_types();
262
  $user_can = current_user_can( 'edit_post', $post->ID );
263
+
264
  if ( in_array( $post->post_type, $post_types ) && $user_can ) {
265
  return true;
266
  }
267
  }
268
+
269
  return false;
270
  }
271
+
272
  /**
273
+ * Called by the heartbeat API. Lock the current post
274
  * so only the current user can edit it.
275
  *
276
  * @method lock_post
278
  static public function lock_post($response, $data)
279
  {
280
  if(isset($data['fl_builder_post_lock'])) {
281
+
282
  require_once ABSPATH . 'wp-admin/includes/post.php';
283
+
284
  wp_set_post_lock($data['fl_builder_post_lock']['post_id']);
285
  }
286
  }
287
+
288
  /**
289
  * Checks to see if the builder layout is enabled
290
  * for the current post.
291
  *
292
  * @method is_builder_enabled
293
+ */
294
  static public function is_builder_enabled()
295
  {
296
  if(!is_admin() && post_password_required()) {
300
  return true;
301
  }
302
  else {
303
+
304
  $post_types = self::get_post_types();
305
  $post = get_post(self::get_post_id());
306
+
307
  if($post && in_array($post->post_type, $post_types)) {
308
  return get_post_meta(self::get_post_id(), '_fl_builder_enabled', true);
309
  }
310
  }
311
+
312
  return false;
313
  }
314
+
315
  /**
316
+ * Checks to see if the builder UI is active for
317
  * the current post in the main query.
318
  *
319
  * @method is_builder_active
320
+ */
321
  static public function is_builder_active()
322
  {
323
  if ( self::is_post_editable() && ! is_admin() && ! post_password_required() ) {
324
+
325
  $post_data = self::get_post_data();
326
+
327
  if ( isset( $_GET['fl_builder'] ) ) {
328
  return true;
329
  }
331
  return true;
332
  }
333
  }
334
+
335
  return false;
336
  }
337
+
338
  /**
339
+ * Gets the status to use for working with nodes in
340
+ * the database. Returns draft if the builder is active,
341
+ * otherwise it returns published.
342
  *
343
  * @method get_node_status
344
+ */
345
  static public function get_node_status()
346
  {
347
  return self::is_builder_active() ? 'draft' : 'published';
348
  }
349
+
350
  /**
351
  * Enable the builder layout for the current post.
352
  *
353
  * @method enable
354
+ */
355
  static public function enable()
356
  {
357
  update_post_meta(self::get_post_id(), '_fl_builder_enabled', true);
358
  }
359
+
360
  /**
361
  * Disable the builder layout for the current post.
362
  *
363
  * @method disable
364
+ */
365
  static public function disable()
366
  {
367
  update_post_meta(self::get_post_id(), '_fl_builder_enabled', false);
368
  }
369
+
370
  /**
371
  * Enable the builder editor for the main post in the query.
372
  *
373
  * @method enable_editing
374
+ */
375
  static public function enable_editing()
376
  {
377
  global $wp_the_query;
378
+
379
  if ( self::is_post_editable() ) {
380
+
381
+ $post = $wp_the_query->post;
382
  $published = self::get_layout_data( 'published' );
383
  $draft = self::get_layout_data( 'draft' );
384
+
385
  // Migrate existing post content to the builder?
386
  if ( empty( $published ) && empty( $draft ) && ! empty( $post->post_content ) ) {
387
+
388
  $row = self::add_row();
389
  $cols = self::get_nodes( 'column' );
390
+ $col = array_shift( $cols );
391
  $settings = self::get_module_defaults( 'rich-text' );
392
  $settings->text = wpautop( $post->post_content );
393
+
394
+ self::add_module( 'rich-text', $settings, $col->node );
395
  }
396
  // Create a new draft?
397
  else if ( empty( $draft ) ) {
398
  self::update_layout_data( $published, 'draft', $post->ID );
399
  }
400
+
401
  // Delete old draft asset cache.
402
  self::delete_asset_cache();
403
+
404
  // Lock the post.
405
  require_once ABSPATH . 'wp-admin/includes/post.php';
406
  wp_set_post_lock( $post->ID );
407
  }
408
  }
409
+
410
  /**
411
  * @method get_cache_dir
412
+ */
413
  static public function get_cache_dir()
414
  {
415
  $wp_info = wp_upload_dir();
416
+
417
  // SSL workaround.
418
  if(self::is_ssl()) {
419
  $wp_info['baseurl'] = str_ireplace('http://', 'https://', $wp_info['baseurl']);
420
  }
421
+
422
  // Build the paths.
423
  $dir_info = array(
424
  'path' => $wp_info['basedir'] . '/fl-builder/',
425
  'url' => $wp_info['baseurl'] . '/fl-builder/'
426
  );
427
+
428
  // Create the cache dir if it doesn't exist.
429
  if(!file_exists($dir_info['path'])) {
430
  mkdir($dir_info['path']);
431
  }
432
+
433
  return $dir_info;
434
  }
435
+
436
  /**
437
  * @method get_asset_version
438
+ */
439
  static public function get_asset_version()
440
  {
441
  $post_id = self::get_post_id();
442
  $active = self::is_builder_active();
443
+
444
  if($active) {
445
  return md5(uniqid());
446
  }
448
  return md5(get_post_modified_time('U', false, $post_id));
449
  }
450
  }
451
+
452
  /**
453
  * @method get_asset_info
454
+ */
455
  static public function get_asset_info()
456
  {
457
  $post_data = self::get_post_data();
458
  $post_id = self::get_post_id();
459
  $cache_dir = self::get_cache_dir();
460
+
461
  if(isset($post_data['node_preview'])) {
462
+ $suffix = '-layout-preview';
463
  }
464
  else if(self::is_builder_active()) {
465
+ $suffix = '-layout-draft';
466
  }
467
  else {
468
  $suffix = '-layout';
469
  }
470
+
471
  $info = array(
472
  'css' => $cache_dir['path'] . $post_id . $suffix . '.css',
473
  'css_url' => $cache_dir['url'] . $post_id . $suffix . '.css',
474
  'js' => $cache_dir['path'] . $post_id . $suffix . '.js',
475
  'js_url' => $cache_dir['url'] . $post_id . $suffix . '.js'
476
  );
477
+
478
  return $info;
479
  }
480
+
481
  /**
482
  * @method delete_asset_cache
483
+ */
484
  static public function delete_asset_cache($type = 'all')
485
  {
486
  $info = self::get_asset_info();
487
+
488
  if(($type == 'css' || $type == 'all') && file_exists($info['css'])) {
489
  unlink($info['css']);
490
  }
492
  unlink($info['js']);
493
  }
494
  }
495
+
496
  /**
497
  * @method delete_all_asset_cache
498
+ */
499
  static public function delete_all_asset_cache($post_id = null)
500
  {
501
  $post_id = $post_id == null ? self::get_post_id() : $post_id;
502
  $cache_dir = self::get_cache_dir();
503
+
504
  if($post_id == null) {
505
  array_map('unlink', glob($cache_dir['path'] . '*.css'));
506
  array_map('unlink', glob($cache_dir['path'] . '*.js'));
507
  }
508
+ else {
509
  $css = $cache_dir['path'] . $post_id . '-layout.css';
510
  $css_draft = $cache_dir['path'] . $post_id . '-layout-draft.css';
511
  $css_preview = $cache_dir['path'] . $post_id . '-layout-preview.css';
512
  $js = $cache_dir['path'] . $post_id . '-layout.js';
513
  $js_draft = $cache_dir['path'] . $post_id . '-layout-draft.js';
514
  $js_preview = $cache_dir['path'] . $post_id . '-layout-preview.js';
515
+
516
  if(file_exists($css)) {
517
  unlink($css);
518
  }
533
  }
534
  }
535
  }
536
+
537
  /**
538
  * @method generate_node_id
539
+ */
540
  static public function generate_node_id()
541
  {
542
  $node_id = uniqid();
543
+
544
  if($node_id == self::$last_generated_node_id) {
545
  return self::generate_node_id();
546
  }
547
+
548
  self::$last_generated_node_id = $node_id;
549
+
550
  return $node_id;
551
  }
552
+
553
  /**
554
  * @method generate_new_node_ids
555
+ */
556
  static public function generate_new_node_ids($data)
557
  {
558
  $map = array();
559
  $nodes = array();
560
+
561
  // Map the new node ids to the old.
562
  foreach($data as $node_id => $node) {
563
  $map[$node_id] = self::generate_node_id();
564
  }
565
+
566
  // Replace the old node ids.
567
  foreach($data as $node_id => $node) {
568
+
569
  $nodes[$map[$node_id]] = $node;
570
  $nodes[$map[$node_id]]->node = $map[$node_id];
571
+
572
  if(!empty($node->parent) && isset($map[$node->parent])) {
573
  $nodes[$map[$node_id]]->parent = $map[$node->parent];
574
  }
575
  }
576
+
577
  return $nodes;
578
  }
579
+
580
  /**
581
  * @method get_node
582
+ */
583
  static public function get_node($node_id = null, $status = null)
584
  {
585
  $data = self::get_layout_data($status);
586
  $node = $data[$node_id];
587
+
588
  if(isset($node) && !empty($node->settings)) {
589
  $node->settings = self::get_node_settings($node);
590
  }
591
+
592
  return $node;
593
  }
594
+
595
  /**
596
  * @method get_child_nodes
597
+ */
598
  static public function get_child_nodes($parent_id, $status = null)
599
  {
600
  $data = self::get_layout_data($status);
601
  $nodes = array();
602
+
603
  foreach($data as $node_id => $node) {
604
+
605
  if($node->parent == $parent_id) {
606
  $nodes[$node_id] = $node;
607
  }
608
  }
609
+
610
  return $nodes;
611
  }
612
+
613
  /**
614
  * @method get_nodes
615
+ */
616
  static public function get_nodes($type = null, $parent_id = null, $status = null)
617
  {
618
  $nodes = array();
619
+
620
  // Get the layout data.
621
  if($parent_id == null) {
622
  $data = self::get_layout_data($status);
624
  else {
625
  $data = self::get_child_nodes($parent_id, $status);
626
  }
627
+
628
  // Return all nodes?
629
  if($type == null) {
630
  $nodes = $data;
631
  }
632
  // Return nodes of a certain type.
633
  else {
634
+
635
  foreach($data as $node_id => $node) {
636
+
637
  if($node->type == $type) {
638
  $nodes[$node_id] = $node;
639
  }
640
  }
641
+
642
  uasort($nodes, array('FLBuilderModel', 'order_nodes'));
643
  }
644
+
645
  // Merge default settings.
646
  foreach($nodes as $node_id => $node) {
647
+
648
  if(!empty($node->settings)) {
649
  $nodes[$node_id]->settings = self::get_node_settings($nodes[$node_id]);
650
  }
651
  }
652
+
653
  // Return the nodes.
654
  return $nodes;
655
  }
656
+
657
  /**
658
  * @method get_node_settings
659
+ */
660
  static public function get_node_settings($node)
661
  {
662
  $post_data = self::get_post_data();
663
+
664
  if(isset($post_data['node_preview']) && isset($post_data['node_id']) && $post_data['node_id'] == $node->node) {
665
+
666
  if(!isset($post_data['node_preview_processed_settings'])) {
667
  $settings = $post_data['node_preview'];
668
  $settings = (object)array_merge((array)$node->settings, (array)$settings);
677
  $defaults = self::get_node_defaults($node);
678
  $settings = (object)array_merge((array)$defaults, (array)$node->settings);
679
  }
680
+
681
  return $settings;
682
  }
683
+
684
  /**
685
  * @method process_node_settings
686
+ */
687
  static public function process_node_settings($node, $new_settings)
688
  {
689
  if($node->type == 'row') {
695
  if($node->type == 'module') {
696
  $new_settings = self::process_module_settings($node, $new_settings);
697
  }
698
+
699
  return $new_settings;
700
  }
701
+
702
  /**
703
  * @method get_node_defaults
704
+ */
705
  static public function get_node_defaults($node)
706
  {
707
  $defaults = array();
708
+
709
  if($node->type == 'row') {
710
  $defaults = self::get_row_defaults();
711
  }
715
  else if($node->type == 'module') {
716
  $defaults = self::get_module_defaults($node->settings->type);
717
  }
718
+
719
  return $defaults;
720
  }
721
+
722
  /**
723
  * @method order_nodes
724
+ */
725
  static public function order_nodes($a, $b)
726
  {
727
  return (int)$a->position - (int)$b->position;
729
 
730
  /**
731
  * @method count_nodes
732
+ */
733
  static public function count_nodes($type = 'row', $parent_id = null)
734
  {
735
  return count(self::get_nodes($type, $parent_id));
737
 
738
  /**
739
  * @method next_node_position
740
+ */
741
  static public function next_node_position($type = 'row', $parent_id = null)
742
  {
743
  $nodes = self::get_nodes($type, $parent_id);
744
  $last = array_pop($nodes);
745
+
746
  return $last ? $last->position + 1 : 0;
747
  }
748
+
749
  /**
750
  * @method delete_node
751
+ */
752
  static public function delete_node($node_id = null)
753
  {
754
  // Get the post data.
755
  $post_data = self::get_post_data();
756
+
757
  // Get the layout data.
758
  $data = self::get_layout_data();
759
+
760
  // Get the node id.
761
  if(!$node_id && isset($post_data['node_id'])) {
762
  $node_id = $post_data['node_id'];
763
  }
764
+
765
  // Return if the node doesn't exist.
766
  if(!isset($data[$node_id])) {
767
  return;
768
  }
769
+
770
  // Get the node.
771
+ $node = $data[$node_id];
772
+
773
  // Call the delete method if we're deleting a module.
774
  self::call_module_delete($node);
775
+
776
  // Delete the node.
777
  unset($data[$node_id]);
778
+
779
  // Update the layout data.
780
  self::update_layout_data($data);
781
+
782
  // Reorder existing nodes.
783
  self::reorder_nodes($node->type, $node->parent);
784
+
785
  // Delete the node's children.
786
  self::delete_child_nodes($node_id);
787
  }
788
+
789
  /**
790
  * @method delete_child_nodes
791
+ */
792
  static public function delete_child_nodes($parent_id = null)
793
  {
794
  $children = self::get_nodes(null, $parent_id);
795
+
796
  foreach($children as $child) {
797
  self::delete_node($child->node);
798
  }
799
  }
800
+
801
  /**
802
  * @method call_module_delete
803
+ */
804
  static public function call_module_delete($node)
805
  {
806
  if($node->type == 'module' && isset(self::$modules[$node->settings->type])) {
810
  $instance->delete();
811
  }
812
  }
813
+
814
  /**
815
  * @method reorder_node
816
+ */
817
  static public function reorder_node($node_id = null, $position = 0)
818
  {
819
  $post_data = self::get_post_data();
823
  $nodes = self::get_nodes($node->type, $node->parent);
824
  $position = isset($post_data['position']) ? (int)$post_data['position'] : $position;
825
  $new_pos = 0;
826
+
827
  // Make sure node positions start at zero.
828
  foreach($nodes as $node) {
829
  $data[$node->node]->position = $new_pos;
830
  $new_pos++;
831
  }
832
+
833
  // Get the node and remove it from the array.
834
  $node = $data[$node_id];
835
  $removed = array_splice($nodes, $node->position, 1);
836
  $new_pos = 0;
837
+
838
  // Reposition it in the array.
839
  array_splice($nodes, $position, 0, $removed);
840
 
843
  $data[$node->node]->position = $new_pos;
844
  $new_pos++;
845
  }
846
+
847
  // Update the layout data.
848
  self::update_layout_data($data);
849
  }
850
+
851
  /**
852
  * @method reorder_nodes
853
+ */
854
  static public function reorder_nodes($type = 'row', $parent_id = null)
855
  {
856
  $data = self::get_layout_data();
857
  $nodes = self::get_nodes($type, $parent_id);
858
  $pos = 0;
859
+
860
  foreach($nodes as $node_id => $node) {
861
  $data[$node_id]->position = $pos;
862
  $pos++;
863
  }
864
+
865
  self::update_layout_data($data);
866
  }
867
+
868
  /**
869
  * @method move_node
870
+ */
871
  static public function move_node($node_id = null, $new_parent_id = null, $position = 0)
872
+ {
873
  $post_data = self::get_post_data();
874
  $data = self::get_layout_data();
875
  $node_id = isset($post_data['node_id']) ? $post_data['node_id'] : $node_id;
876
+ $new_parent_id = isset($post_data['new_parent']) ? $post_data['new_parent'] : $new_parent_id;
877
  $position = isset($post_data['position']) ? $post_data['position'] : $position;
878
  $new_parent = self::get_node($new_parent_id);
879
  $node = self::get_node($node_id);
880
+
881
  // Set the node's new parent.
882
  $data[$node_id]->parent = $new_parent->node;
883
+
884
  // Update the layout data.
885
  self::update_layout_data($data);
886
+
887
  // Set the node's new order.
888
  self::reorder_node($node_id, $position);
889
  }
890
+
891
  /**
892
  * @method add_row
893
+ */
894
  static public function add_row($cols = '1-col', $position = false)
895
  {
896
  $post_data = self::get_post_data();
899
  $position = isset($post_data['position']) ? (int)$post_data['position'] : $position;
900
  $settings = self::get_row_defaults();
901
  $row_node_id = self::generate_node_id();
902
+
903
  // Add the row.
904
  $data[$row_node_id] = new StdClass();
905
  $data[$row_node_id]->node = $row_node_id;
907
  $data[$row_node_id]->parent = null;
908
  $data[$row_node_id]->position = self::next_node_position('row');
909
  $data[$row_node_id]->settings = $settings;
910
+
911
  // Update the layout data.
912
  self::update_layout_data($data);
913
+
914
  // Position the row.
915
  if($position !== false) {
916
  self::reorder_node($row_node_id, $position);
917
  }
918
+
919
  // Add a column group.
920
  self::add_col_group($row_node_id, $cols, 0);
921
+
922
  // Return the updated row.
923
  return self::get_node($row_node_id);
924
  }
925
+
926
  /**
927
  * @method copy_row
928
+ */
929
  static public function copy_row($node_id = null)
930
  {
931
  $post_data = self::get_post_data();
935
  $new_row_id = self::generate_node_id();
936
  $col_groups = self::get_child_nodes($node_id);
937
  $new_nodes = array();
938
+
939
  // Add the new row.
940
  $layout_data[$new_row_id] = clone $row;
941
  $layout_data[$new_row_id]->settings = clone $row->settings;
942
+ $layout_data[$new_row_id]->node = $new_row_id;
943
+
944
  // Get the new child nodes.
945
  foreach($col_groups as $col_group_id => $col_group) {
946
+
947
  $new_nodes[$col_group_id] = clone $col_group;
948
  $cols = self::get_child_nodes($col_group_id);
949
+
950
  foreach($cols as $col_id => $col) {
951
+
952
  $new_nodes[$col_id] = clone $col;
953
  $new_nodes[$col_id]->settings = clone $col->settings;
954
  $modules = self::get_child_nodes($col_id);
955
+
956
  foreach($modules as $module_id => $module) {
957
  $new_nodes[$module_id] = clone $module;
958
  $new_nodes[$module_id]->settings = clone $module->settings;
959
  }
960
  }
961
  }
962
+
963
  // Generate new child ids.
964
  $new_nodes = self::generate_new_node_ids($new_nodes);
965
+
966
  // Set col group parent ids to the new row id.
967
  foreach($new_nodes as $child_node_id => $child) {
968
  if($child->type == 'column-group') {
969
  $new_nodes[$child_node_id]->parent = $new_row_id;
970
  }
971
  }
972
+
973
  // Merge the child data.
974
  $layout_data = array_merge($layout_data, $new_nodes);
975
+
976
  // Update the layout data.
977
  self::update_layout_data($layout_data);
978
+
979
  // Position the new row.
980
  self::reorder_node($new_row_id, $row->position + 1);
981
  }
982
+
983
+ /**
984
  * @method get_row_defaults
985
  */
986
  static public function get_row_defaults()
987
  {
988
  return self::get_settings_form_defaults(self::$settings_forms['row']['tabs']);
989
  }
990
+
991
  /**
992
  * @method process_row_settings
993
  */
994
+ static public function process_row_settings($row, $new_settings)
995
  {
996
  // Cache background video data.
997
  if($new_settings->bg_type == 'video') {
998
+
999
  // Video
1000
  $video = FLBuilderPhoto::get_attachment_data($new_settings->bg_video);
1001
+
1002
  if($video) {
1003
+
1004
  $parts = explode('.', $video->filename);
1005
  $video->extension = array_pop($parts);
1006
  $new_settings->bg_video_data = $video;
1007
+
1008
+ // Fallback
1009
  if(!empty($new_settings->bg_video_fallback_src)) {
1010
  $new_settings->bg_video_data->fallback = $new_settings->bg_video_fallback_src;
1011
  }
1014
  }
1015
  }
1016
  }
1017
+
1018
  // Cache background slideshow data.
1019
  if($new_settings->bg_type == 'slideshow' && $new_settings->ss_source == 'wordpress') {
1020
+
1021
  // Make sure we have a photo data object.
1022
  if(!isset($row->settings->ss_photo_data)) {
1023
  $row->settings->ss_photo_data = new StdClass();
1024
  }
1025
+
1026
  // Hijack the slideshow module to get WordPress photo data.
1027
  $ss = new FLSlideshowModule();
1028
  $ss->settings = new StdClass();
1030
  $ss->settings->photo_data = $row->settings->ss_photo_data;
1031
  $new_settings->ss_photo_data = $ss->get_wordpress_photos();
1032
  }
1033
+
1034
  return $new_settings;
1035
  }
1036
+
1037
  /**
1038
  * @method get_row_bg_data
1039
  */
1040
+ static public function get_row_bg_data($row)
1041
  {
1042
  $data = null;
1043
+
1044
  // Background Video
1045
  if($row->settings->bg_type == 'video' && isset($row->settings->bg_video_data)) {
1046
  $data = $row->settings->bg_video_data;
1047
  }
1048
+
1049
  // Background Slideshow
1050
  else if($row->settings->bg_type == 'slideshow' && isset($row->settings->ss_photo_data)) {
1051
  $data = $row->settings->ss_photo_data;
1052
  }
1053
+
1054
  return $data;
1055
  }
1056
+
1057
  /**
1058
  * @method get_row_slideshow_source
1059
  */
1060
+ static public function get_row_slideshow_source($row)
1061
  {
1062
  // Make sure we have a photo data object.
1063
  if(!isset($row->settings->ss_photo_data)) {
1064
  $row->settings->ss_photo_data = new StdClass();
1065
  }
1066
+
1067
  // Hijack the slideshow module to get the source.
1068
  $ss = new FLSlideshowModule();
1069
  $ss->settings = new StdClass();
1071
  $ss->settings->photos = $row->settings->ss_photos;
1072
  $ss->settings->feed_url = $row->settings->ss_feed_url;
1073
  $ss->settings->photo_data = $row->settings->ss_photo_data;
1074
+
1075
  // Return the slideshow source.
1076
  return $ss->get_source();
1077
  }
1078
+
1079
  /**
1080
  * @method add_col_group
1081
  */
1087
  $cols = isset($post_data['cols']) ? $post_data['cols'] : $cols;
1088
  $position = isset($post_data['position']) ? (int)$post_data['position'] : $position;
1089
  $group_node_id = self::generate_node_id();
1090
+
1091
  // Add the column group.
1092
  $data[$group_node_id] = new StdClass();
1093
  $data[$group_node_id]->node = $group_node_id;
1095
  $data[$group_node_id]->parent = $node_id;
1096
  $data[$group_node_id]->position = self::next_node_position('column-group', $node_id);
1097
  $data[$group_node_id]->settings = '';
1098
+
1099
  // Add the columns.
1100
  for($i = 0; $i < count(self::$row_layouts[$cols]); $i++) {
1101
+
1102
  $col_node_id = self::generate_node_id();
1103
  $data[$col_node_id] = new StdClass();
1104
  $data[$col_node_id]->node = $col_node_id;
1108
  $data[$col_node_id]->settings = new StdClass();
1109
  $data[$col_node_id]->settings->size = self::$row_layouts[$cols][$i];
1110
  }
1111
+
1112
  // Update the layout data.
1113
  self::update_layout_data($data);
1114
+
1115
  // Position the column group.
1116
  if($position !== false) {
1117
  self::reorder_node($group_node_id, $position);
1118
  }
1119
+
1120
  // Return the column group.
1121
  return self::get_node($group_node_id);
1122
  }
1123
+
1124
  /**
1125
  * @method process_col_settings
1126
  */
1127
  static public function process_col_settings($col, $new_settings)
1128
  {
1129
  $new_settings->size = self::resize_col($col->node, $new_settings->size);
1130
+
1131
  return $new_settings;
1132
  }
1133
+
1134
  /**
1135
  * @method delete_col
1136
  */
1140
  $node_id = isset($post_data['node_id']) ? $post_data['node_id'] : $node_id;
1141
  $new_width = isset($post_data['new_width']) ? $post_data['new_width'] : $new_width;
1142
  $col = self::get_node($node_id);
1143
+
1144
  // Delete the column.
1145
  self::delete_node($node_id);
1146
+
1147
  // Get the group
1148
  $group = self::get_node($col->parent);
1149
+
1150
  // Get the group children.
1151
  $cols = self::get_nodes('column', $group->node);
1152
+
1153
  // Delete the group if empty.
1154
  if(count($cols) === 0) {
1155
  self::delete_node($group->node);
1156
  }
1157
+
1158
  // Resize the remaining columns.
1159
  else {
1160
+
1161
  // Get the layout data.
1162
  $data = self::get_layout_data();
1163
+
1164
  // Loop through the columns.
1165
  foreach($cols as $col_id => $col) {
1166
+
1167
  // Set the new size.
1168
  $data[$col_id]->settings->size = round($new_width, 2);
1169
+ }
1170
+
1171
  // Update the layout data.
1172
  self::update_layout_data($data);
1173
  }
1174
  }
1175
+
1176
  /**
1177
  * @method resize_col
1178
  */
1188
  $num_cols = count($cols);
1189
  $min_width = 10;
1190
  $max_width = 100 - $min_width;
1191
+
1192
  // Don't resize if only one column or width isn't a number.
1193
  if($num_cols == 1 || !is_numeric($new_width)) {
1194
  return $col->settings->size;
1195
  }
1196
+
1197
  // Find the sibling column to absorb this resize.
1198
  if($pos === 0) {
1199
  $sibling = $cols[1];
1204
  else {
1205
  $sibling = $cols[$pos + 1];
1206
  }
1207
+
1208
  // Find other siblings.
1209
  foreach($cols as $c) {
1210
+
1211
  if($col->node == $c->node) {
1212
  continue;
1213
  }
1214
  if($sibling->node == $c->node) {
1215
  continue;
1216
  }
1217
+
1218
  $siblings[] = $c;
1219
  $max_width -= $c->settings->size;
1220
  $siblings_width += $c->settings->size;
1221
  }
1222
+
1223
  // Make sure the new width isn't too small.
1224
  if($new_width < $min_width) {
1225
  $new_width = $min_width;
1226
  }
1227
+
1228
  // Make sure the new width isn't too big.
1229
  if($new_width > $max_width) {
1230
  $new_width = $max_width;
1231
  }
1232
+
1233
  // Save new sibling size.
1234
  $data[$sibling->node]->settings->size = round(100 - $siblings_width - $new_width, 2);
1235
+
1236
  // Save new column size.
1237
  $data[$col->node]->settings->size = $new_width;
1238
+
1239
  // Update the layout data.
1240
  self::update_layout_data($data);
1241
+
1242
  // Return the new size.
1243
  return $new_width;
1244
  }
1245
+
1246
+ /**
1247
  * @method get_col_defaults
1248
  */
1249
  static public function get_col_defaults()
1250
  {
1251
  return self::get_settings_form_defaults(self::$settings_forms['col']['tabs']);
1252
  }
1253
+
1254
  /**
1255
  * @method load_modules
1256
+ */
1257
  static public function load_modules()
1258
  {
1259
  $path = FL_BUILDER_DIR . 'modules/';
1260
  $dir = dir($path);
1261
  $module_path = '';
1262
+
1263
  while(false !== ($entry = $dir->read())) {
1264
+
1265
  if(!is_dir($path . $entry) || $entry == '.' || $entry == '..') {
1266
  continue;
1267
  }
1268
+
1269
  // Paths to check.
1270
  $module_path = $entry . '/' . $entry . '.php';
1271
  $child_path = get_stylesheet_directory() . '/fl-builder/modules/' . $module_path;
1272
  $theme_path = get_template_directory() . '/fl-builder/modules/' . $module_path;
1273
  $builder_path = FL_BUILDER_DIR . 'modules/' . $module_path;
1274
+
1275
  // Check for the module class in a child theme.
1276
  if(is_child_theme() && file_exists($child_path)) {
1277
  require_once $child_path;
1278
  }
1279
+
1280
  // Check for the module class in a parent theme.
1281
  else if(file_exists($theme_path)) {
1282
  require_once $theme_path;
1283
  }
1284
+
1285
  // Check for the module class in the builder directory.
1286
  else if(file_exists($builder_path)) {
1287
  require_once $builder_path;
1288
  }
1289
  }
1290
  }
1291
+
1292
  /**
1293
  * @method register_module
1294
+ */
1295
  static public function register_module($class, $form)
1296
  {
1297
  if(class_exists($class)) {
1298
+
1299
  // Create a new instance of the module.
1300
  $instance = new $class();
1301
+
1302
  // Only register modules that are enabled.
1303
  if($instance->enabled) {
1304
 
1305
  // Save the instance in the modules array.
1306
  self::$modules[$instance->slug] = $instance;
1307
+
1308
  // Add the form to the instance.
1309
  self::$modules[$instance->slug]->form = $form;
1310
+ self::$modules[$instance->slug]->form['advanced'] = self::$settings_forms['module-advanced'];
1311
  }
1312
  }
1313
  }
1314
+
1315
  /**
1316
  * @method get_enabled_modules
1317
+ */
1318
  static public function get_enabled_modules()
1319
  {
1320
  $key = '_fl_builder_enabled_modules';
1321
  $default = array_keys(self::$modules);
1322
  $default[] = 'all';
1323
+
1324
  // Get the value.
1325
  if(is_network_admin()) {
1326
  $value = get_site_option($key);
1332
  else {
1333
  $value = get_option($key);
1334
  }
1335
+
1336
  // Return the value.
1337
  if(!$value || in_array('all', $value)) {
1338
  return $default;
1341
  return $value;
1342
  }
1343
  }
1344
+
1345
  /**
1346
  * @method get_categorized_modules
1347
+ */
1348
  static public function get_categorized_modules()
1349
  {
1350
  $enabled_modules = self::get_enabled_modules();
1351
+
1352
  $categories = array(
1353
  'Basic Modules' => array(),
1354
  'Advanced Modules' => array(),
1355
  'Other' => array()
1356
  );
1357
+
1358
  // Build the categories array.
1359
  foreach(self::$modules as $module) {
1360
+
1361
  if(!in_array($module->slug, $enabled_modules)) {
1362
  continue;
1363
  }
1365
  $categories[$module->category] = self::get_wp_widgets();
1366
  }
1367
  else if(isset($module->category)) {
1368
+
1369
  if(!isset($categories[$module->category])) {
1370
  $categories[$module->category] = array();
1371
  }
1372
+
1373
  $categories[$module->category][$module->name] = $module;
1374
  }
1375
  else {
1376
  $categories['Other'][$module->name] = $module;
1377
  }
1378
  }
1379
+
1380
  // Sort the modules.
1381
  foreach($categories as $title => $modules) {
1382
  if(count($categories[$title]) == 0) {
1386
  ksort($categories[$title]);
1387
  }
1388
  }
1389
+
1390
  // Return sorted categories.
1391
  return $categories;
1392
  }
1396
  */
1397
  static public function get_module($node_id)
1398
  {
1399
+ $module = self::get_node($node_id);
1400
+
1401
  if(isset(self::$modules[$module->settings->type])) {
1402
+
1403
  $class = get_class(self::$modules[$module->settings->type]);
1404
  $instance = new $class();
1405
  $instance->node = $module->node;
1408
  $instance->settings = $module->settings;
1409
  $instance->type = 'module';
1410
  $instance->form = self::$modules[$module->settings->type]->form;
1411
+
1412
  return $instance;
1413
  }
1414
+
1415
  return false;
1416
  }
1417
 
1423
  $modules = self::get_nodes('module', $col_id);
1424
  $instances = array();
1425
  $i = 0;
1426
+
1427
  foreach($modules as $module) {
1428
+
1429
  if(isset(self::$modules[$module->settings->type])) {
1430
+
1431
  $class = get_class(self::$modules[$module->settings->type]);
1432
  $instances[$i] = new $class();
1433
  $instances[$i]->node = $module->node;
1439
  $i++;
1440
  }
1441
  }
1442
+
1443
  return $instances;
1444
  }
1445
 
1450
  {
1451
  return self::get_modules();
1452
  }
1453
+
1454
  /**
1455
  * @method add_module
1456
  */
1464
  $position = isset($post_data['position']) ? (int)$post_data['position'] : $position;
1465
  $module_node_id = self::generate_node_id();
1466
  $settings->type = $type;
1467
+
1468
  // Run module update method.
1469
  $class = get_class(self::$modules[$type]);
1470
  $instance = new $class();
1471
  $instance->settings = $settings;
1472
  $settings = $instance->update($settings);
1473
+
1474
  // Save the module.
1475
  $data[$module_node_id] = new StdClass();
1476
  $data[$module_node_id]->node = $module_node_id;
1478
  $data[$module_node_id]->parent = $parent_id;
1479
  $data[$module_node_id]->position = self::next_node_position('module', $parent_id);
1480
  $data[$module_node_id]->settings = $settings;
1481
+
1482
  // Update the layout data.
1483
  self::update_layout_data($data);
1484
+
1485
  // Position the module.
1486
  if($position !== false) {
1487
  self::reorder_node($module_node_id, $position);
1488
  }
1489
+
1490
  // Send back the inserted module.
1491
  return self::get_module($module_node_id);
1492
  }
1493
+
1494
  /**
1495
  * @method add_default_module
1496
  */
1503
  $position = isset($post_data['position']) ? (int)$post_data['position'] : $position;
1504
  $settings = self::get_module_defaults($type);
1505
  $module_node_id = self::generate_node_id();
1506
+
1507
+ // Add a new row if we don't have a parent.
1508
  if(!$parent) {
1509
  $row = self::add_row('1-col', $position);
1510
  $col_groups = self::get_nodes('column-group', $row->node);
1514
  $parent_id = $parent->node;
1515
  $position = null;
1516
  }
1517
+
1518
  // Add a new column if the parent is a row.
1519
  else if($parent->type == 'row') {
1520
  $col_group = self::add_col_group($parent->node, '1-col', $position);
1523
  $parent_id = $parent->node;
1524
  $position = null;
1525
  }
1526
+
1527
  // Run module update method.
1528
  $class = get_class(self::$modules[$type]);
1529
  $instance = new $class();
1530
  $instance->settings = $settings;
1531
  $settings = $instance->update($settings);
1532
+
1533
  // Save the module.
1534
  $data = self::get_layout_data();
1535
  $data[$module_node_id] = new StdClass();
1538
  $data[$module_node_id]->parent = $parent_id;
1539
  $data[$module_node_id]->position = self::next_node_position('module', $parent_id);
1540
  $data[$module_node_id]->settings = $settings;
1541
+
1542
  // Update the layout data.
1543
  self::update_layout_data($data);
1544
+
1545
  // Position the module.
1546
  if($position !== false) {
1547
  self::reorder_node($module_node_id, $position);
1548
  }
1549
+
1550
  // Send back the inserted module.
1551
  return self::get_module($module_node_id);
1552
  }
1553
+
1554
  /**
1555
  * @method copy_module
1556
+ */
1557
  static public function copy_module($node_id = null)
1558
  {
1559
  $post_data = self::get_post_data();
1560
  $node_id = isset($post_data['node_id']) ? $post_data['node_id'] : $node_id;
1561
  $module = self::get_module($node_id);
1562
+
1563
  return self::add_module($module->settings->type, $module->settings, $module->parent, $module->position + 1);
1564
  }
1565
+
1566
  /**
1567
  * @method process_module_settings
1568
+ */
1569
  static public function process_module_settings($module, $new_settings)
1570
  {
1571
  // Get a new node instance to work with.
1572
  $class = get_class(self::$modules[$module->settings->type]);
1573
  $instance = new $class();
1574
+
1575
  // Run node delete to clear any cache.
1576
  $instance->settings = $module->settings;
1577
  $instance->delete();
1578
+
1579
  // Run node update.
1580
  $instance->settings = $new_settings;
1581
  $new_settings = $instance->update($new_settings);
1582
+
1583
  return $new_settings;
1584
  }
1585
+
1586
  /**
1587
  * @method get_module_defaults
1588
  */
1589
  static public function get_module_defaults($type)
1590
  {
1591
  $defaults = new StdClass();
1592
+
1593
  if(isset(self::$modules[$type]->form)) {
1594
  $defaults = self::get_settings_form_defaults(self::$modules[$type]->form);
1595
  $defaults->type = $type;
1596
  }
1597
+
1598
  return $defaults;
1599
  }
1600
+
1601
  /**
1602
  * @method get_wp_widgets
1603
  */
1604
  static public function get_wp_widgets()
1605
  {
1606
  global $wp_widget_factory;
1607
+
1608
  $widgets = array();
1609
+
1610
  foreach($wp_widget_factory->widgets as $class => $widget) {
1611
  $widget->class = $class;
1612
  $widgets[$widget->name] = $widget;
1613
  }
1614
+
1615
  ksort($widgets);
1616
+
1617
  return $widgets;
1618
  }
1619
+
1620
  /**
1621
  * @method get_wp_sidebars
1622
  */
1623
  static public function get_wp_sidebars()
1624
  {
1625
  global $wp_registered_sidebars;
1626
+
1627
  $sidebars = array();
1628
+
1629
  foreach($wp_registered_sidebars as $sidebar) {
1630
  $sidebars[$sidebar['name']] = $sidebar;
1631
  }
1632
+
1633
  ksort($sidebars);
1634
+
1635
  return $sidebars;
1636
  }
1637
+
1638
  /**
1639
  * @method load_settings
1640
+ */
1641
  static public function load_settings()
1642
  {
1643
  require_once FL_BUILDER_DIR . 'includes/global-settings.php';
1646
  require_once FL_BUILDER_DIR . 'includes/module-settings.php';
1647
  require_once FL_BUILDER_DIR . 'includes/user-template-settings.php';
1648
  }
1649
+
1650
  /**
1651
  * @method register_settings_form
1652
+ */
1653
  static public function register_settings_form($id, $form)
1654
  {
1655
  self::$settings_forms[$id] = $form;
1656
  }
1657
+
1658
  /**
1659
  * @method get_settings_form_fields
1660
+ */
1661
  static public function get_settings_form_fields($form)
1662
  {
1663
  $fields = array();
1664
+
1665
  foreach ( $form as $tab ) {
1666
  if ( isset( $tab['sections'] ) ) {
1667
  foreach ( $tab['sections'] as $section ) {
1673
  }
1674
  }
1675
  }
1676
+
1677
  return $fields;
1678
  }
1679
+
1680
  /**
1681
  * @method get_settings_form_defaults
1682
  */
1683
  static public function get_settings_form_defaults($tabs = array())
1684
  {
1685
  $defaults = new StdClass();
1686
+
1687
  foreach($tabs as $tab) {
1688
  if(isset($tab['sections'])) {
1689
  foreach($tab['sections'] as $section) {
1690
  if(isset($section['fields'])) {
1691
  foreach($section['fields'] as $name => $field) {
1692
+
1693
  $default = isset($field['default']) ? $field['default'] : '';
1694
  $is_multiple = isset($field['multiple']) && $field['multiple'] === true;
1695
  $supports_multiple = $field['type'] != 'editor' && $field['type'] != 'photo';
1696
+
1697
  if($is_multiple && $supports_multiple) {
1698
  $defaults->$name = array($default);
1699
  }
1705
  }
1706
  }
1707
  }
1708
+
1709
  return $defaults;
1710
  }
1711
+
1712
  /**
1713
  * @method save_settings
1714
  */
1719
  $settings = isset($post_data['settings']) ? $post_data['settings'] : $settings;
1720
  $node = self::get_node($node_id);
1721
  $new_settings = (object)array_merge((array)$node->settings, (array)$settings);
1722
+
1723
  // Process the settings.
1724
  $new_settings = self::process_node_settings($node, $new_settings);
1725
 
1726
  // Save the settings to the node.
1727
  $data = self::get_layout_data();
1728
  $data[$node_id]->settings = $new_settings;
1729
+
1730
  // Update the layout data.
1731
  self::update_layout_data($data);
1732
+
1733
  // Return the new layout.
1734
  if(defined('DOING_AJAX')) {
1735
  FLBuilder::render_css();
1737
  FLBuilder::render_layout();
1738
  }
1739
  }
1740
+
1741
  /**
1742
  * @method json_decode_settings
1743
  */
1747
  $data = json_decode(stripcslashes($data));
1748
  }
1749
  if(is_object($data) || is_array($data)) {
1750
+
1751
  foreach($data as $key => $val) {
1752
+
1753
  $new_val = null;
1754
+
1755
  if(is_string($val)) {
1756
+
1757
  $decoded = json_decode(stripcslashes($val));
1758
+
1759
  if(is_object($decoded) || is_array($decoded)) {
1760
  $new_val = $decoded;
1761
  }
1763
  else if(is_object($val) || is_array($val)) {
1764
  $new_val = self::json_decode_settings($val);
1765
  }
1766
+
1767
  if($new_val) {
1768
+
1769
  if(is_object($data)) {
1770
  $data->{$key} = $new_val;
1771
  }
1775
  }
1776
  }
1777
  }
1778
+
1779
  return $data;
1780
  }
1781
+
1782
  /**
1783
  * @method default_settings
1784
  */
1790
  }
1791
  }
1792
  }
1793
+
1794
+ /**
1795
  * @method get_global_defaults
1796
  */
1797
  static public function get_global_defaults()
1798
  {
1799
  return self::get_settings_form_defaults(self::$settings_forms['global']['tabs']);
1800
  }
1801
+
1802
  /**
1803
  * @method get_global_settings
1804
  */
1806
  {
1807
  $settings = get_option('_fl_builder_settings');
1808
  $defaults = self::get_global_defaults();
1809
+
1810
  if(!$settings) {
1811
  $settings = new StdClass();
1812
  }
1813
+
1814
  return (object)array_merge((array)$defaults, (array)$settings);
1815
  }
1816
+
1817
  /**
1818
  * @method save_global_settings
1819
  */
1823
  $settings = isset($post_data['settings']) ? $post_data['settings'] : $settings;
1824
  $old_settings = self::get_global_settings();
1825
  $new_settings = (object)array_merge((array)$old_settings, (array)$settings);
1826
+
1827
  return update_option('_fl_builder_settings', $settings);
1828
  }
1829
 
1830
  /**
1831
  * @method duplicate_post
1832
+ */
1833
  static public function duplicate_post()
1834
  {
1835
  global $wpdb;
1836
+
1837
  $post_id = self::get_post_id();
1838
  $post = get_post($post_id);
1839
  $current_user = wp_get_current_user();
1840
+
1841
+ // Duplicate the post.
1842
+ $data = array(
1843
+ 'comment_status' => $post->comment_status,
1844
+ 'ping_status' => $post->ping_status,
1845
+ 'post_author' => $current_user->ID,
1846
+ 'post_content' => $post->post_content,
1847
+ 'post_excerpt' => $post->post_excerpt,
1848
+ 'post_name' => $post->post_name,
1849
+ 'post_parent' => $post->post_parent,
1850
+ 'post_password' => $post->post_password,
1851
+ 'post_status' => 'draft',
1852
+ 'post_title' => sprintf( _x( 'Copy of %s', '%s stands for post/page title.', 'fl-builder' ), $post->post_title ),
1853
+ 'post_type' => $post->post_type,
1854
+ 'to_ping' => $post->to_ping,
1855
+ 'menu_order' => $post->menu_order
1856
+ );
1857
+
1858
  // Get the new post id.
1859
  $new_post_id = wp_insert_post($data);
1860
+
1861
  // Duplicate post meta.
1862
  $post_meta = $wpdb->get_results("SELECT meta_key, meta_value FROM {$wpdb->postmeta} WHERE post_id= {$post_id}");
1863
+
1864
  if(count($post_meta) !== 0) {
1865
+
1866
  $sql = "INSERT INTO {$wpdb->postmeta} (post_id, meta_key, meta_value) ";
1867
+
1868
  foreach($post_meta as $meta_info) {
1869
  $meta_key = $meta_info->meta_key;
1870
  $meta_value = addslashes($meta_info->meta_value);
1871
  $sql_select[] = "SELECT {$new_post_id}, '{$meta_key}', '{$meta_value}'";
1872
  }
1873
+
1874
  $sql .= implode(" UNION ALL ", $sql_select);
1875
  $wpdb->query($sql);
1876
  }
1877
+
1878
  // Duplicate post terms.
1879
  $taxonomies = get_object_taxonomies($post->post_type);
1880
+
1881
  foreach($taxonomies as $taxonomy) {
1882
+
1883
  $post_terms = wp_get_object_terms($post_id, $taxonomy);
1884
+
1885
  for($i = 0; $i < count($post_terms); $i++) {
1886
  wp_set_object_terms($new_post_id, $post_terms[$i]->slug, $taxonomy, true);
1887
  }
1888
  }
1889
+
1890
  // Get the duplicated layout data.
1891
  $data = self::get_layout_data('published', $new_post_id);
1892
+
1893
  // Generate new node ids.
1894
  $data = self::generate_new_node_ids($data);
1895
+
1896
  // Save the duplicated layout data.
1897
  self::update_layout_data($data, 'published', $new_post_id);
1898
+
1899
  // Return the new post id.
1900
  return $new_post_id;
1901
  }
1902
+
1903
  /**
1904
  * @method delete_post
1905
+ */
1906
  static public function delete_post($post_id)
1907
  {
1908
  // Delete all published and draft data.
1909
  self::delete_layout_data('published', $post_id);
1910
  self::delete_layout_data('draft', $post_id);
1911
+
1912
  // Delete all css and js.
1913
  self::delete_all_asset_cache($post_id);
1914
  }
1915
+
1916
  /**
1917
  * @method save_revision
1918
+ */
1919
  static public function save_revision($post_id)
1920
  {
1921
  $parent_id = wp_is_post_revision($post_id);
1922
+
1923
  if($parent_id) {
1924
+
1925
  $parent = get_post($parent_id);
1926
  $data = self::get_layout_data('published', $parent->ID);
1927
+
1928
  if(!empty($data)) {
1929
  self::update_layout_data($data, 'published', $post_id);
1930
  }
1931
  }
1932
  }
1933
+
1934
  /**
1935
  * @method restore_revision
1936
+ */
1937
  static public function restore_revision($post_id, $revision_id)
1938
  {
1939
  $post = get_post($post_id);
1940
  $revision = get_post($revision_id);
1941
+
1942
  if($revision) {
1943
+
1944
  $data = self::get_layout_data('published', $revision->ID);
1945
+
1946
  if(!empty($data)) {
1947
  self::update_layout_data($data, 'published', $post_id);
1948
  self::update_layout_data($data, 'draft', $post_id);
1951
  self::delete_layout_data('published', $post_id);
1952
  self::delete_layout_data('draft', $post_id);
1953
  }
1954
+
1955
  self::delete_all_asset_cache();
1956
  }
1957
  }
1958
+
1959
  /**
1960
  * We use get_metadata here instead of get_post_meta,
1961
+ * to ensure revisions are queried accordingly.
1962
  *
1963
  * @method get_layout_data
1964
+ */
1965
  static public function get_layout_data($status = null, $post_id = null)
1966
  {
1967
  $post_id = !$post_id ? self::get_post_id() : $post_id;
1968
  $status = !$status ? self::get_node_status() : $status;
1969
+
1970
  // Get published data?
1971
  if($status == 'published') {
1972
  if(isset(self::$published_layout_data[$post_id])) {
1974
  }
1975
  else {
1976
  $data = get_metadata('post', $post_id, '_fl_builder_data', true);
1977
+ self::$published_layout_data[$post_id] = self::clean_layout_data( $data );
1978
  }
1979
  }
1980
  // Get draft data?
1984
  }
1985
  else {
1986
  $data = get_metadata('post', $post_id, '_fl_builder_draft', true);
1987
+ self::$draft_layout_data[$post_id] = self::clean_layout_data( $data );
1988
  }
1989
  }
1990
+
1991
  // Make sure we have an array.
1992
  if(empty($data)) {
1993
  $data = array();
1994
  }
1995
+
1996
  // Clone the layout data to ensure the cache remains intact.
1997
  foreach($data as $node_id => $node) {
1998
  $data[$node_id] = clone $node;
2001
  // Return the data.
2002
  return $data;
2003
  }
2004
+
2005
  /**
2006
  * We use update_metadata here instead of update_post_meta,
2007
+ * to ensure revisions are updated accordingly.
2008
+ *
2009
  * @method update_layout_data
2010
+ */
2011
  static public function update_layout_data($data, $status = null, $post_id = null)
2012
  {
2013
  $post_id = !$post_id ? self::get_post_id() : $post_id;
2014
  $status = !$status ? self::get_node_status() : $status;
2015
+ $data = self::clean_layout_data( $data );
2016
+
2017
  // Update published data?
2018
  if($status == 'published') {
2019
  update_metadata('post', $post_id, '_fl_builder_data', $data);
2025
  self::$draft_layout_data[$post_id] = $data;
2026
  }
2027
  }
2028
+
2029
  /**
2030
  * @method delete_layout_data
2031
+ */
2032
  static public function delete_layout_data($status = null, $post_id = null)
2033
  {
2034
  // Make sure we have a status to delete.
2035
  if(!$status) {
2036
  return;
2037
  }
2038
+
2039
  // Get the post id.
2040
  $post_id = !$post_id ? self::get_post_id() : $post_id;
2041
+
2042
  // Get the data to delete.
2043
  $data = self::get_layout_data($status, $post_id);
2044
+
2045
  // Delete the nodes.
2046
  foreach($data as $node) {
2047
  self::call_module_delete($node);
2048
  }
2049
+
2050
  // Update the layout data.
2051
  self::update_layout_data(array(), $status, $post_id);
2052
  }
2053
+
2054
+ /**
2055
+ * Ensures the integrity of layout data key/value pairs.
2056
+ *
2057
+ * @method clean_layout_data
2058
+ */
2059
+ static public function clean_layout_data( $data = array() )
2060
+ {
2061
+ $cleaned = array();
2062
+
2063
+ if ( is_array( $data ) ) {
2064
+ foreach ( $data as $node ) {
2065
+ $cleaned[$node->node] = $node;
2066
+ }
2067
+ }
2068
+
2069
+ return $cleaned;
2070
+ }
2071
 
2072
  /**
2073
  * @method clear_draft_layout
2074
+ */
2075
  static public function clear_draft_layout()
2076
  {
2077
  $post_id = self::get_post_id();
2078
  $data = self::get_layout_data('published', $post_id);
2079
+
2080
  // Delete the old draft layout.
2081
  self::delete_layout_data('draft');
2082
+
2083
  // Save the new draft layout.
2084
  self::update_layout_data($data, 'draft', $post_id);
2085
+
2086
+ // Clear the asset cache.
2087
  self::delete_all_asset_cache($post_id);
2088
  }
2089
+
2090
  /**
2091
  * @method save_layout
2092
+ */
2093
  static public function save_layout()
2094
  {
2095
  $editor_content = FLBuilder::render_editor_content();
2096
  $post_id = self::get_post_id();
2097
  $data = self::get_layout_data('draft', $post_id);
2098
+
2099
  // Delete the old published layout.
2100
  self::delete_layout_data('published', $post_id);
2101
+
2102
  // Save the new published layout.
2103
  self::update_layout_data($data, 'published', $post_id);
2104
+
2105
+ // Clear the asset cache.
2106
  self::delete_all_asset_cache($post_id);
2107
+
2108
  // Enable the builder to take over the post content.
2109
  self::enable();
2110
+
2111
  // Get the post status.
2112
  $post_status = get_post_status($post_id);
2113
  $post_status = strstr($post_status, 'draft') ? 'publish' : $post_status;
2114
+
2115
  // Update the post with stripped down content.
2116
  wp_update_post(array(
2117
  'ID' => self::get_post_id(),
2119
  'post_content' => $editor_content
2120
  ));
2121
  }
2122
+
2123
  /**
2124
  * Duplicates a layout for WPML when the copy from original
2125
  * button has been clicked.
2126
+ *
2127
  * @method duplicate_wpml_layout
2128
+ */
2129
  static public function duplicate_wpml_layout($original_post_id = null, $new_post_id = null)
2130
  {
2131
  $post_data = self::get_post_data();
2134
  $enabled = get_post_meta($original_post_id, '_fl_builder_enabled', true);
2135
  $published = self::get_layout_data('published', $original_post_id);
2136
  $draft = self::get_layout_data('draft', $original_post_id);
2137
+
2138
  $response = array(
2139
  'enabled' => false,
2140
  'has_layout' => false
2141
  );
2142
+
2143
  if(!empty($enabled)) {
2144
  update_post_meta($new_post_id, '_fl_builder_enabled', true);
2145
  $response['enabled'] = true;
2152
  self::update_layout_data($draft, 'draft', $new_post_id);
2153
  $response['has_layout'] = true;
2154
  }
2155
+
2156
  return $response;
2157
  }
2158
+
2159
  /**
2160
  * @method get_enabled_templates
2161
+ */
2162
  static public function get_enabled_templates()
2163
  {
2164
  $key = '_fl_builder_enabled_templates';
2165
  $default = 'enabled';
2166
+
2167
  // Get the value.
2168
  if(is_network_admin()) {
2169
  $value = get_site_option($key);
2175
  else {
2176
  $value = get_option($key);
2177
  }
2178
+
2179
  // Return the value.
2180
  if(!$value) {
2181
  return $default;
2184
  return $value;
2185
  }
2186
  }
2187
+
2188
  /**
2189
  * @method save_user_template
2190
+ */
2191
  static public function save_user_template()
2192
  {
2193
  $post_data = self::get_post_data();
2194
+
2195
  $post_id = wp_insert_post(array(
2196
  'post_title' => $post_data['template_name'],
2197
  'post_type' => 'fl-builder-template',
2199
  'ping_status' => 'closed',
2200
  'comment_status' => 'closed'
2201
  ));
2202
+
2203
  // Get the layout data to copy.
2204
  $data = self::get_layout_data();
2205
+
2206
  // Generate new node ids.
2207
  $data = self::generate_new_node_ids($data);
2208
+
2209
  // Save the template layout data.
2210
  self::update_layout_data($data, 'published', $post_id);
2211
  }
2212
+
2213
  /**
2214
  * @method get_user_templates
2215
+ */
2216
  static public function get_user_templates()
2217
  {
2218
  return get_posts('post_type=fl-builder-template&orderby=title&order=ASC&posts_per_page=-1');
2219
  }
2220
+
2221
  /**
2222
  * @method delete_user_template
2223
+ */
2224
  static public function delete_user_template($template_id = null)
2225
  {
2226
  $post_data = self::get_post_data();
2227
  $template_id = isset($post_data['template_id']) ? $post_data['template_id'] : $template_id;
2228
+
2229
  if(isset($template_id)) {
2230
  wp_delete_post($template_id, true);
2231
  }
2232
  }
2233
+
2234
  /**
2235
  * @method apply_user_template
2236
+ */
2237
  static public function apply_user_template($template_id = null, $append = false)
2238
  {
2239
  $post_data = self::get_post_data();
2242
  $row_position = self::next_node_position('row');
2243
 
2244
  if(isset($template_id)) {
2245
+
2246
  // Delete existing nodes?
2247
  if(!$append) {
2248
  self::delete_layout_data('draft');
2249
  }
2250
+
2251
  // Insert new nodes if this is not a blank template.
2252
  if($template_id != 'blank') {
2253
+
2254
  // Get the template data.
2255
  $template_data = self::get_layout_data('published', $template_id);
2256
+
2257
  // Get new ids for the template nodes.
2258
  $template_data = self::generate_new_node_ids($template_data);
2259
+
2260
  // Get the existing layout data.
2261
  $layout_data = self::get_layout_data();
2262
+
2263
  // Reposition rows?
2264
  if($append) {
2265
+
2266
  foreach($template_data as $node_id => $node) {
2267
+
2268
  if($node->type == 'row') {
2269
  $template_data[$node_id]->position += $row_position;
2270
+ }
2271
  }
2272
  }
2273
+
2274
  // Merge the data.
2275
  $data = array_merge($layout_data, $template_data);
2276
+
2277
  // Update the layout data.
2278
  self::update_layout_data($data);
2279
  }
2280
+
2281
  // Delete old asset cache.
2282
  self::delete_all_asset_cache();
2283
  }
2284
  }
2285
+
2286
  /**
2287
  * @method save_template
2288
+ */
2289
  static public function save_template($settings)
2290
  {
2291
  // Get the layout data.
2292
  $data = self::get_layout_data();
2293
+
2294
  // Get the templates array.
2295
  $templates = self::get_templates();
2296
+
2297
  // Get new ids for the nodes.
2298
  $settings->nodes = self::generate_new_node_ids($data);
2299
 
2300
  // Insert the template into the templates array.
2301
  array_splice($templates, $settings->index, 0, array($settings));
2302
+
2303
  // Save the templates array.
2304
  self::save_templates($templates);
2305
  }
2306
+
2307
  /**
2308
  * @method update_template
2309
+ */
2310
  static public function update_template($old_index, $settings)
2311
  {
2312
  // Get the templates array.
2313
  $templates = self::get_templates();
2314
+
2315
  // Remove the template from its old position.
2316
  $template = array_splice($templates, $old_index, 1);
2317
+
2318
  // Update the settings
2319
  foreach($settings as $key => $val) {
2320
  $template[0]->$key = $val;
2321
  }
2322
+
2323
+ // Add the template to its new position.
2324
  array_splice($templates, $settings->index, 0, $template);
2325
+
2326
  // Save the templates array.
2327
  self::save_templates($templates);
2328
  }
2329
+
2330
  /**
2331
  * @method delete_template
2332
+ */
2333
  static public function delete_template($index)
2334
  {
2335
  // Get the templates array.
2336
  $templates = self::get_templates();
2337
+
2338
  // Remove the template.
2339
  array_splice($templates, $index, 1);
2340
+
2341
  // Save the templates array.
2342
  self::save_templates($templates);
2343
  }
2344
+
2345
  /**
2346
  * @method apply_template
2347
+ */
2348
  static public function apply_template($index = 0, $append = false)
2349
  {
2350
  $post_data = self::get_post_data();
2352
  $append = isset($post_data['append']) ? $post_data['append'] : $append;
2353
  $template = self::get_template($index);
2354
  $row_position = self::next_node_position('row');
2355
+
2356
  // Delete existing nodes?
2357
  if(!$append) {
2358
  self::delete_layout_data('draft');
2359
  }
2360
+
2361
  // Only move forward if we have template nodes.
2362
  if(isset($template->nodes)) {
2363
+
2364
  // Get new ids for the template nodes.
2365
  $template_data = self::generate_new_node_ids($template->nodes);
2366
+
2367
  // Get the existing layout data.
2368
  $layout_data = self::get_layout_data();
2369
+
2370
  // Reposition rows?
2371
  if($append) {
2372
+
2373
  foreach($template_data as $node_id => $node) {
2374
+
2375
  if($node->type == 'row') {
2376
  $template_data[$node_id]->position += $row_position;
2377
+ }
2378
  }
2379
  }
2380
+
2381
  // Merge the data.
2382
  $data = array_merge($layout_data, $template_data);
2383
+
2384
  // Update the layout data.
2385
  self::update_layout_data($data);
2386
  }
2387
+
2388
  // Delete old asset cache.
2389
  self::delete_all_asset_cache();
2390
  }
2391
+
2392
  /**
2393
  * @method get_template
2394
+ */
2395
  static public function get_template($index)
2396
  {
2397
  $templates = self::get_templates();
2398
+
2399
  return $templates[$index];
2400
  }
2401
 
2402
  /**
2403
  * @method get_templates
2404
+ */
2405
  static public function get_templates()
2406
  {
2407
  $templates = unserialize(file_get_contents(FL_BUILDER_DIR . 'data/templates.dat'));
2408
+
2409
  return is_array($templates) ? $templates : array();
2410
  }
2411
+
2412
  /**
2413
  * @method save_templates
2414
+ */
2415
  static public function save_templates($templates = array())
2416
  {
2417
  // Update the indexes for proper positioning.
2418
  $i = 0;
2419
  $updated = array();
2420
+
2421
  foreach($templates as $template) {
2422
  $template->index = $i;
2423
  $updated[$i] = $template;
2424
  $i++;
2425
  }
2426
+
2427
  // Save the templates array.
2428
  file_put_contents(FL_BUILDER_DIR . 'data/templates.dat', serialize($updated));
2429
  }
2430
+
2431
  /**
2432
  * @method get_branding
2433
+ */
2434
  static public function get_branding()
2435
  {
2436
  $key = '_fl_builder_branding';
2437
  $default = __('Page Builder', 'fl-builder');
2438
+
2439
  // Get the value.
2440
  if(is_network_admin() || class_exists('FLBuilderMultisiteSettings')) {
2441
  $value = get_site_option($key);
2443
  else {
2444
  $value = get_option($key);
2445
  }
2446
+
2447
  // Return the value.
2448
  if(!$value) {
2449
  return $default;
2452
  return stripcslashes($value);
2453
  }
2454
  }
2455
+
2456
  /**
2457
  * @method get_branding_icon
2458
+ */
2459
  static public function get_branding_icon()
2460
  {
2461
  $key = '_fl_builder_branding_icon';
2462
  $default = FL_BUILDER_URL . 'img/beaver.png';
2463
+
2464
  // Get the value.
2465
  if(is_network_admin() || class_exists('FLBuilderMultisiteSettings')) {
2466
  $value = get_site_option($key);
2468
  else {
2469
  $value = get_option($key);
2470
  }
2471
+
2472
  // Return the value.
2473
  if($value === false) {
2474
  return $default;
2477
  return $value;
2478
  }
2479
  }
2480
+
2481
  /**
2482
  * @method get_editing_capability
2483
+ */
2484
  static public function get_editing_capability()
2485
  {
2486
  $key = '_fl_builder_editing_capability';
2487
  $default = 'edit_posts';
2488
+
2489
  // Get the value.
2490
  if(is_network_admin()) {
2491
  $value = get_site_option($key);
2497
  else {
2498
  $value = get_option($key);
2499
  }
2500
+
2501
  // Return the value.
2502
  if(!$value) {
2503
  return $default;
2506
  return $value;
2507
  }
2508
  }
2509
+
2510
  /**
2511
+ * We don't delete _fl_builder_enabled, _fl_builder_data and _fl_builder_draft
2512
  * so layouts can be recovered should the plugin be installed again.
2513
  *
2514
  * @method uninstall_database
2515
+ */
2516
  static public function uninstall_database()
2517
  {
2518
  if(current_user_can('delete_plugins')) {
2519
+
2520
  // Delete builder settings.
2521
  delete_option('_fl_builder_settings');
2522
  delete_option('_fl_builder_enabled_modules');
2532
  foreach($cache_files as $file) {
2533
  unlink($file);
2534
  }
2535
+
2536
  rmdir($cache_dir['path']);
2537
 
2538
  // Deactivate and delete the plugin.
2539
  deactivate_plugins(array('fl-builder/fl-builder.php'), false, is_network_admin());
2540
  delete_plugins(array('fl-builder/fl-builder.php'));
2541
+
2542
  // Redirect to the plugins page.
2543
  wp_redirect(admin_url('plugins.php?deleted=true&plugin_status=all&paged=1&s='));
2544
  }
classes/{FLBuilderModule.php → class-fl-builder-module.php} RENAMED
@@ -144,11 +144,14 @@ class FLBuilderModule {
144
  $this->enabled = isset($params['enabled']) ? $params['enabled'] : true;
145
  $this->editor_export = isset($params['editor_export']) ? $params['editor_export'] : true;
146
 
147
- if(stristr($dir_path, 'wp-content/themes')) {
148
- $parts = explode('/wp-content', str_ireplace($_SERVER['DOCUMENT_ROOT'], '', $dir_path));
149
- $folder = array_shift($parts);
150
- $this->url = str_ireplace($_SERVER['DOCUMENT_ROOT'] . $folder, site_url(), $dir_path) . '/';
 
 
151
  $this->dir = $dir_path . '/';
 
152
  }
153
  else {
154
  $this->url = isset($params['url']) ? $params['url'] : FL_BUILDER_URL . 'modules/' . $this->slug . '/';
144
  $this->enabled = isset($params['enabled']) ? $params['enabled'] : true;
145
  $this->editor_export = isset($params['editor_export']) ? $params['editor_export'] : true;
146
 
147
+ if(is_child_theme() && stristr($dir_path, get_stylesheet_directory())) {
148
+ $this->url = str_replace(get_stylesheet_directory(), get_stylesheet_directory_uri(), $dir_path) . '/';
149
+ $this->dir = $dir_path . '/';
150
+ }
151
+ else if(stristr($dir_path, get_template_directory())) {
152
+ $this->url = str_replace(get_template_directory(), get_template_directory_uri(), $dir_path) . '/';
153
  $this->dir = $dir_path . '/';
154
+ error_log($this->url);
155
  }
156
  else {
157
  $this->url = isset($params['url']) ? $params['url'] : FL_BUILDER_URL . 'modules/' . $this->slug . '/';
classes/{FLBuilderPhoto.php → class-fl-builder-photo.php} RENAMED
@@ -71,19 +71,19 @@ final class FLBuilderPhoto {
71
  */
72
  static public function get_src_options($selected, $photo)
73
  {
74
- $titles = array(
75
- 'full' => __('Full Size', 'fl-builder'),
76
- 'large' => __('Large', 'fl-builder'),
77
- 'medium' => __('Medium', 'fl-builder'),
78
- 'thumbnail' => __('Thumbnail', 'fl-builder')
79
- );
80
 
81
  foreach($photo->sizes as $key => $val) {
82
-
83
  if(!isset($titles[$key])) {
84
  $titles[$key] = ucwords(str_replace(array('_', '-'), ' ', $key));
85
  }
86
-
87
  echo '<option value="' . $val->url . '" ' . selected($selected, $val->url) . '>' . $titles[$key] . ' - ' . $val->width . ' x ' . $val->height . '</option>';
88
  }
89
  }
71
  */
72
  static public function get_src_options($selected, $photo)
73
  {
74
+ $titles = array(
75
+ 'full' => _x( 'Full Size', 'Image size.', 'fl-builder' ),
76
+ 'large' => _x( 'Large', 'Image size.', 'fl-builder' ),
77
+ 'medium' => _x( 'Medium', 'Image size.', 'fl-builder' ),
78
+ 'thumbnail' => _x( 'Thumbnail', 'Image size.', 'fl-builder' )
79
+ );
80
 
81
  foreach($photo->sizes as $key => $val) {
82
+
83
  if(!isset($titles[$key])) {
84
  $titles[$key] = ucwords(str_replace(array('_', '-'), ' ', $key));
85
  }
86
+
87
  echo '<option value="' . $val->url . '" ' . selected($selected, $val->url) . '>' . $titles[$key] . ' - ' . $val->width . ' x ' . $val->height . '</option>';
88
  }
89
  }
classes/{FLBuilderUpdate.php → class-fl-builder-update.php} RENAMED
File without changes
classes/{FLBuilderUtils.php → class-fl-builder-utils.php} RENAMED
File without changes
classes/{FLBuilder.php → class-fl-builder.php} RENAMED
@@ -8,28 +8,50 @@
8
  final class FLBuilder {
9
 
10
  /**
11
- * @method load_plugin_textdomain
12
- */
13
- static public function load_plugin_textdomain()
14
- {
15
- load_plugin_textdomain('fl-builder', false, basename(FL_BUILDER_DIR) . '/lang/');
16
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17
 
18
  /**
19
- * Custom ajax handeling since wp_ajax only works in the
20
  * admin and we need everything to work on the frontend.
21
  *
22
  * @method ajax
23
- */
24
  static public function ajax()
25
  {
26
  // Only run for logged in users.
27
  if(is_user_logged_in()) {
28
-
29
  // Get builder post data.
30
  $post_data = FLBuilderModel::get_post_data();
31
-
32
- // Get the action.
33
  if(!empty($_REQUEST['fl_action'])) {
34
  $action = $_REQUEST['fl_action'];
35
  }
@@ -49,21 +71,21 @@ final class FLBuilder {
49
 
50
  /**
51
  * @method init
52
- */
53
  static public function init()
54
- {
55
  // Enable editing if the builder is active.
56
  if(FLBuilderModel::is_builder_active()) {
57
-
58
  // Remove 3rd party editor buttons.
59
  remove_all_actions('media_buttons', 999999);
60
  remove_all_actions('media_buttons_context', 999999);
61
-
62
  // Get the post.
63
  require_once ABSPATH . 'wp-admin/includes/post.php';
64
  $post_id = FLBuilderModel::get_post_id();
65
-
66
- // Check to see if the post is locked.
67
  if(wp_check_post_lock($post_id) !== false) {
68
  header('Location: ' . admin_url('/post.php?post=' . $post_id . '&action=edit'));
69
  }
@@ -75,23 +97,23 @@ final class FLBuilder {
75
 
76
  /**
77
  * @method register_module
78
- */
79
  static public function register_module($class, $form)
80
  {
81
  FLBuilderModel::register_module($class, $form);
82
  }
83
-
84
  /**
85
  * @method register_settings_form
86
- */
87
  static public function register_settings_form($id, $form)
88
  {
89
  FLBuilderModel::register_settings_form($id, $form);
90
  }
91
-
92
  /**
93
  * @method no_cache_headers
94
- */
95
  static public function no_cache_headers()
96
  {
97
  if(isset($_GET['fl_builder'])) {
@@ -102,58 +124,58 @@ final class FLBuilder {
102
  header('Expires: Sat, 26 Jul 1997 05:00:00 GMT');
103
  }
104
  }
105
-
106
  /**
107
  * @method default_editor
108
- */
109
  static public function default_editor($type)
110
  {
111
  return FLBuilderModel::is_builder_active() ? 'tinymce' : $type;
112
  }
113
-
114
  /**
115
  * @method add_editor_css
116
- */
117
  static public function add_editor_css($mce_css)
118
  {
119
  if(FLBuilderModel::is_builder_active()) {
120
-
121
  if(!empty($mce_css)) {
122
  $mce_css .= ',';
123
  }
124
-
125
  $mce_css .= FL_BUILDER_URL . 'css/editor.css';
126
  }
127
-
128
  return $mce_css;
129
  }
130
-
131
  /**
132
  * @method editor_buttons_2
133
- */
134
  static public function editor_buttons_2($buttons)
135
  {
136
  if(FLBuilderModel::is_builder_active()) {
137
-
138
  array_shift($buttons);
139
  array_unshift($buttons, 'fontsizeselect');
140
  array_unshift($buttons, 'formatselect');
141
-
142
  if(($key = array_search('wp_help', $buttons)) !== false) {
143
- unset($buttons[$key]);
144
  }
145
  }
146
-
147
  return $buttons;
148
  }
149
-
150
  /**
151
  * @method editor_external_plugins
152
- */
153
  static public function editor_external_plugins($plugins)
154
  {
155
  if(FLBuilderModel::is_builder_active()) {
156
-
157
  $allowed = array(
158
  'anchor',
159
  'code',
@@ -168,46 +190,46 @@ final class FLBuilder {
168
  'advlist',
169
  'wptadv',
170
  );
171
-
172
  foreach($plugins as $key => $val) {
173
  if(!in_array($key, $allowed)) {
174
  unset($plugins[$key]);
175
  }
176
  }
177
  }
178
-
179
  return $plugins;
180
  }
181
-
182
  /**
183
  * @method include_jquery
184
- */
185
  static public function include_jquery()
186
  {
187
  if(FLBuilderModel::is_builder_enabled()) {
188
  include FL_BUILDER_DIR . 'includes/jquery.php';
189
  }
190
  }
191
-
192
  /**
193
  * @method layout_styles_scripts
194
- */
195
  static public function layout_styles_scripts()
196
  {
197
  global $wp_query;
198
  global $post;
199
-
200
  $ver = FL_BUILDER_VERSION;
201
  $css_url = FL_BUILDER_URL . 'css/';
202
  $js_url = FL_BUILDER_URL . 'js/';
203
-
204
  // Register additional CSS
205
  wp_register_style('font-awesome', $css_url . 'font-awesome.min.css', array(), $ver);
206
  wp_register_style('foundation-icons', $css_url . 'foundation-icons.css', array(), $ver);
207
  wp_register_style('fl-slideshow', $css_url . 'fl-slideshow.css', array(), $ver);
208
  wp_register_style('jquery-bxslider', $css_url . 'jquery.bxslider.css', array(), $ver);
209
  wp_register_style('jquery-magnificpopup', $css_url . 'jquery.magnificpopup.css', array(), $ver);
210
-
211
  // Register additional JS
212
  wp_register_script('fl-slideshow', $js_url . 'fl-slideshow.js', array('yui3'), $ver, true);
213
  wp_register_script('fl-gallery-grid', $js_url . 'fl-gallery-grid.js', array('jquery'), $ver, true);
@@ -219,50 +241,50 @@ final class FLBuilder {
219
  wp_register_script('jquery-mosaicflow', $js_url . 'jquery.mosaicflow.min.js', array('jquery'), $ver, true);
220
  wp_register_script('jquery-waypoints', $js_url . 'jquery.waypoints.min.js', array('jquery'), $ver, true);
221
  wp_register_script('jquery-wookmark', $js_url . 'jquery.wookmark.min.js', array('jquery'), $ver, true);
222
-
223
  // YUI 3 (Needed for the slideshow)
224
  if(FLBuilderModel::is_ssl()) {
225
  wp_register_script('yui3', 'https://yui-s.yahooapis.com/3.5.1/build/yui/yui-min.js', array(), '3.5.1', false);
226
  }
227
  else {
228
- wp_register_script('yui3', 'http://yui.yahooapis.com/3.5.1/build/yui/yui-min.js', array(), '3.5.1', false);
229
  }
230
-
231
  // Enqueue assets for posts in the main query.
232
  if ( isset( $wp_query->posts ) ) {
233
  foreach ( $wp_query->posts as $post ) {
234
  self::enqueue_layout_styles_scripts( $post->ID );
235
  }
236
  }
237
-
238
  // Enqueue assets for posts via the fl_builder_global_posts filter.
239
  $post_ids = FLBuilderModel::get_global_posts();
240
-
241
  if(count($post_ids) > 0) {
242
-
243
  $posts = get_posts(array('post__in' => $post_ids, 'post_type' => 'any'));
244
 
245
- foreach($posts as $post) {
246
  self::enqueue_layout_styles_scripts($post->ID);
247
  }
248
  }
249
-
250
  // Reset the main query.
251
  wp_reset_query();
252
  }
253
-
254
  /**
255
  * @method enqueue_layout_styles_scripts
256
- */
257
  static public function enqueue_layout_styles_scripts($post_id)
258
  {
259
  if(FLBuilderModel::is_builder_enabled()) {
260
-
261
  $rows = FLBuilderModel::get_nodes('row');
262
  $modules = FLBuilderModel::get_all_modules();
263
  $asset_info = FLBuilderModel::get_asset_info();
264
  $asset_ver = FLBuilderModel::get_asset_version();
265
-
266
  // Enqueue required row CSS and JS
267
  foreach($rows as $row) {
268
  if($row->settings->bg_type == 'slideshow') {
@@ -271,13 +293,13 @@ final class FLBuilder {
271
  wp_enqueue_style('fl-slideshow');
272
  }
273
  }
274
-
275
  // Enqueue required module CSS and JS
276
  foreach($modules as $module) {
277
-
278
  $module->enqueue_icon_styles();
279
  $module->enqueue_scripts();
280
-
281
  foreach($module->css as $handle => $props) {
282
  wp_enqueue_style($handle, $props[0], $props[1], $props[2], $props[3]);
283
  }
@@ -288,37 +310,37 @@ final class FLBuilder {
288
  wp_enqueue_script('jquery-waypoints');
289
  }
290
  }
291
-
292
  // Enqueue main CSS
293
  if(!file_exists($asset_info['css'])) {
294
  FLBuilder::render_css();
295
  }
296
-
297
  wp_enqueue_style('fl-builder-layout-' . $post_id, $asset_info['css_url'], array(), $asset_ver);
298
-
299
  // Enqueue main JS
300
  if(!file_exists($asset_info['js'])) {
301
  FLBuilder::render_js();
302
  }
303
-
304
  wp_enqueue_script('fl-builder-layout-' . $post_id, $asset_info['js_url'], array(), $asset_ver, true);
305
  }
306
  }
307
-
308
  /**
309
  * @method styles_scripts
310
- */
311
  static public function styles_scripts()
312
  {
313
  if(FLBuilderModel::is_builder_active()) {
314
-
315
  $ver = FL_BUILDER_VERSION;
316
  $css_url = FL_BUILDER_URL . 'css/';
317
  $js_url = FL_BUILDER_URL . 'js/';
318
-
319
  /* We have a custom version of sortable that fixes a bug. */
320
  wp_deregister_script('jquery-ui-sortable');
321
-
322
  /* Frontend builder styles */
323
  wp_enqueue_style('dashicons');
324
  wp_enqueue_style('font-awesome');
@@ -330,12 +352,12 @@ final class FLBuilder {
330
  wp_enqueue_style('fl-lightbox', $css_url . 'fl-lightbox.css', array(), $ver);
331
  wp_enqueue_style('fl-icon-selector', $css_url . 'fl-icon-selector.css', array(), $ver);
332
  wp_enqueue_style('fl-builder', $css_url . 'fl-builder.css', array(), $ver);
333
-
334
  /* RTL Support */
335
  if(is_rtl()) {
336
  wp_enqueue_style('fl-builder-rtl', $css_url . 'fl-builder-rtl.css', array(), $ver);
337
  }
338
-
339
  /* Frontend builder scripts */
340
  wp_enqueue_media();
341
  wp_enqueue_script('heartbeat');
@@ -360,17 +382,17 @@ final class FLBuilder {
360
  wp_enqueue_script('fl-stylesheet', $js_url . 'fl-stylesheet.js', array(), $ver, true);
361
  wp_enqueue_script('fl-builder', $js_url . 'fl-builder.js', array(), $ver, true);
362
  wp_enqueue_script('fl-builder-preview', $js_url . 'fl-builder-preview.js', array(), $ver, true);
363
-
364
  /* Core template settings */
365
  if(file_exists(FL_BUILDER_DIR . 'js/fl-template-settings.js')) {
366
  wp_enqueue_script('fl-template-settings', FL_BUILDER_URL . 'js/fl-template-settings.js', array(), $ver, true);
367
  }
368
-
369
  /* Additional module styles and scripts */
370
  foreach(FLBuilderModel::$modules as $module) {
371
-
372
  $module->enqueue_scripts();
373
-
374
  foreach($module->css as $handle => $props) {
375
  wp_enqueue_style($handle, $props[0], $props[1], $props[2], $props[3]);
376
  }
@@ -380,7 +402,7 @@ final class FLBuilder {
380
  }
381
  }
382
  }
383
-
384
  /**
385
  * @method body_class
386
  */
@@ -392,56 +414,56 @@ final class FLBuilder {
392
  if(FLBuilderModel::is_builder_active() && !current_user_can(FLBuilderModel::get_editing_capability())) {
393
  $classes[] = 'fl-builder-simple';
394
  }
395
-
396
  return $classes;
397
  }
398
-
399
  /**
400
  * @method admin_bar_menu
401
  */
402
  static public function admin_bar_menu($wp_admin_bar)
403
  {
404
  global $wp_the_query;
405
-
406
  if ( FLBuilderModel::is_post_editable() ) {
407
-
408
  $wp_admin_bar->add_node( array(
409
  'id' => 'fl-builder-frontend-edit-link',
410
- 'title' => '<style> #wp-admin-bar-fl-builder-frontend-edit-link .ab-icon:before { content: "\f116" !important; top: 2px; margin-right: 3px; } </style><span class="ab-icon"></span>' . __( FLBuilderModel::get_branding(), 'fl-builder' ),
411
  'href' => FLBuilderModel::get_edit_url( $wp_the_query->post->ID )
412
  ));
413
  }
414
  }
415
-
416
  /**
417
  * @method render_ui
418
  */
419
  static public function render_ui()
420
  {
421
  global $wp_the_query;
422
-
423
  if ( FLBuilderModel::is_builder_active() ) {
424
-
425
  $post_id = $wp_the_query->post->ID;
426
  $categories = FLBuilderModel::get_categorized_modules();
427
  $enabled_templates = FLBuilderModel::get_enabled_templates();
428
-
429
  include FL_BUILDER_DIR . 'includes/ui.php';
430
  include FL_BUILDER_DIR . 'includes/js-config.php';
431
  }
432
  }
433
-
434
  /**
435
- * Renders a preview of the layout to be
436
- * passed back to the builder via AJAX.
437
  *
438
  * @method render_preview
439
  */
440
  static public function render_preview($return = false)
441
- {
442
  self::render_css();
443
  self::render_js();
444
-
445
  if($return) {
446
  return self::render_layout(true);
447
  }
@@ -449,10 +471,10 @@ final class FLBuilder {
449
  self::render_layout();
450
  }
451
  }
452
-
453
  /**
454
  * Renders the layout to be passed back to
455
- * the builder via AJAX for an update.
456
  *
457
  * @method render_layout
458
  */
@@ -460,7 +482,7 @@ final class FLBuilder {
460
  {
461
  global $wp_scripts;
462
  global $wp_styles;
463
-
464
  // Deregister scripts and styles so we can capture those
465
  // registered by content functions such as shortcodes.
466
  if(isset($wp_scripts)) {
@@ -469,25 +491,25 @@ final class FLBuilder {
469
  if(isset($wp_styles)) {
470
  $wp_styles->queue = array();
471
  }
472
-
473
  // Enqueue jQuery again so it's not added by any
474
  // third party shortcodes or plugins.
475
  wp_enqueue_script('jquery');
476
-
477
  // Render the layout.
478
  ob_start();
479
  self::render_rows();
480
  $html = ob_get_clean();
481
-
482
  // Process shortcodes.
483
  ob_start();
484
  echo do_shortcode($html);
485
  $html = ob_get_clean();
486
-
487
- // Print scripts and styles registered by content
488
  // functions such as shortcodes.
489
  ob_start();
490
-
491
  if(isset($wp_scripts)) {
492
  $wp_scripts->done[] = 'jquery';
493
  wp_print_scripts($wp_scripts->queue);
@@ -495,20 +517,20 @@ final class FLBuilder {
495
  if(isset($wp_styles)) {
496
  wp_print_styles($wp_styles->queue);
497
  }
498
-
499
  $html = ob_get_clean() . $html;
500
-
501
- // Get the asset info.
502
  $asset_info = FLBuilderModel::get_asset_info();
503
  $asset_ver = FLBuilderModel::get_asset_version();
504
-
505
  // Build the response.
506
  $response = array(
507
  'html' => $html,
508
  'css' => $asset_info['css_url'] . '?ver=' . $asset_ver,
509
  'js' => $asset_info['js_url'] . '?ver=' . $asset_ver
510
  );
511
-
512
  // Return or echo the response.
513
  if($return) {
514
  return $response;
@@ -518,41 +540,41 @@ final class FLBuilder {
518
  die();
519
  }
520
  }
521
-
522
  /**
523
  * @method render_content
524
  */
525
  static public function render_content($content)
526
  {
527
  global $post;
528
-
529
  $post_id = FLBuilderModel::get_post_id();
530
  $enabled = FLBuilderModel::is_builder_enabled();
531
  $ajax = defined('DOING_AJAX');
532
  $global_posts = FLBuilderModel::get_global_posts();
533
  $is_global = in_array($post->ID, $global_posts);
534
  $in_loop = in_the_loop();
535
-
536
  if($enabled && !$ajax && ($is_global || $in_loop)) {
537
-
538
  // Remove the builder's render_content filter in case apply_filters
539
  // is called again by a widget, module or shortcode.
540
  remove_filter('the_content', 'FLBuilder::render_content');
541
-
542
  // Render the content.
543
  ob_start();
544
  echo '<div class="fl-builder-content fl-builder-content-' . $post_id . '">';
545
  self::render_rows();
546
  echo '</div>';
547
  $content = do_shortcode(ob_get_clean());
548
-
549
  // Reapply the builder's render_content filter.
550
  add_filter('the_content', 'FLBuilder::render_content');
551
  }
552
-
553
  return $content;
554
  }
555
-
556
  /**
557
  * @method render_editor_content
558
  */
@@ -564,52 +586,52 @@ final class FLBuilder {
564
 
565
  // Render the modules.
566
  foreach($rows as $row) {
567
-
568
  $groups = FLBuilderModel::get_nodes('column-group', $row->node);
569
-
570
  foreach($groups as $group) {
571
-
572
  $cols = FLBuilderModel::get_nodes('column', $group->node);
573
-
574
  foreach($cols as $col) {
575
-
576
  $modules = FLBuilderModel::get_modules($col->node);
577
-
578
  foreach($modules as $module) {
579
-
580
  if($module->editor_export) {
581
-
582
- // Don't crop photos to ensure media library photos are rendered.
583
  if($module->settings->type == 'photo') {
584
  $module->settings->crop = false;
585
  }
586
-
587
  FLBuilder::render_module_html($module->settings->type, $module->settings, $module);
588
  }
589
  }
590
  }
591
  }
592
  }
593
-
594
  // Get the content.
595
  $content = ob_get_clean();
596
-
597
  // Remove unnecessary tags.
598
  $content = preg_replace('/<\/?div[^>]*\>/i', '', $content);
599
  $content = preg_replace('/<\/?span[^>]*\>/i', '', $content);
600
  $content = preg_replace('#<script(.*?)>(.*?)</script>#is', '', $content);
601
  $content = preg_replace('/<i [^>]*><\\/i[^>]*>/', '', $content);
602
  $content = preg_replace('/ class=".*?"/', '', $content);
603
-
604
  // Remove empty lines.
605
  $content = preg_replace('/(^[\r\n]*|[\r\n]+)[\s\t]*[\r\n]+/', "\n", $content);
606
-
607
  return $content;
608
  }
609
-
610
  /**
611
  * @method render_settings
612
- */
613
  static public function render_settings($form = array(), $settings, $return = false)
614
  {
615
  $defaults = array(
@@ -618,13 +640,13 @@ final class FLBuilder {
618
  'title' => '',
619
  'tabs' => array()
620
  );
621
-
622
  $form = array_merge($defaults, $form);
623
-
624
  ob_start();
625
  include FL_BUILDER_DIR . 'includes/settings.php';
626
  $html = ob_get_clean();
627
-
628
  if(defined('DOING_AJAX') && !$return) {
629
  echo $html;
630
  die();
@@ -633,10 +655,10 @@ final class FLBuilder {
633
  return $html;
634
  }
635
  }
636
-
637
  /**
638
  * @method render_settings_field
639
- */
640
  static public function render_settings_field($name, $field, $settings)
641
  {
642
  $i = null;
@@ -644,15 +666,15 @@ final class FLBuilder {
644
  $supports_multiple = $field['type'] != 'editor' && $field['type'] != 'photo';
645
  $value = isset($settings->$name) ? $settings->$name : '';
646
  $preview = isset($field['preview']) ? json_encode($field['preview']) : json_encode(array('type' => 'refresh'));
647
-
648
  if($is_multiple && $supports_multiple) {
649
-
650
  $values = $value;
651
  $arr_name = $name;
652
  $name .= '[]';
653
-
654
  echo '<tbody class="fl-field fl-builder-field-multiples" data-type="form" data-preview=\'' . $preview . '\'>';
655
-
656
  for($i = 0; $i < count($values); $i++) {
657
  $value = $values[$i];
658
  echo '<tr class="fl-builder-field-multiple" data-field="'. $arr_name .'">';
@@ -664,17 +686,17 @@ final class FLBuilder {
664
  echo '</td>';
665
  echo '</tr>';
666
  }
667
-
668
  echo '<tr>';
669
-
670
  if(empty($field['label'])) {
671
  echo '<td colspan="2">';
672
  }
673
  else {
674
  echo '<td>&nbsp;</td><td>';
675
  }
676
-
677
- echo '<a href="javascript:void(0);" onclick="return false;" class="fl-builder-field-add fl-builder-button" data-field="'. $arr_name .'">'. __('Add', 'fl-builder') .' '. $field['label'] .'</a>';
678
  echo '</td>';
679
  echo '</tr>';
680
  echo '</tbody>';
@@ -685,17 +707,17 @@ final class FLBuilder {
685
  echo '</tr>';
686
  }
687
  }
688
-
689
  /**
690
  * @method render_settings_form
691
- */
692
  static public function render_settings_form($type = null, $settings = null)
693
  {
694
  $post_data = FLBuilderModel::get_post_data();
695
  $type = isset($post_data['type']) ? $post_data['type'] : $type;
696
  $settings = isset($post_data['settings']) ? $post_data['settings'] : $settings;
697
  $form = FLBuilderModel::$settings_forms[$type];
698
-
699
  if(isset($settings) && !empty($settings)) {
700
  $defaults = FLBuilderModel::get_settings_form_defaults($form['tabs']);
701
  $settings = (object)array_merge((array)$defaults, (array)$settings);
@@ -703,28 +725,28 @@ final class FLBuilder {
703
  else {
704
  $settings = FLBuilderModel::get_settings_form_defaults($form['tabs']);
705
  }
706
-
707
  self::render_settings(array(
708
  'title' => $form['title'],
709
  'tabs' => $form['tabs']
710
  ), $settings);
711
  }
712
-
713
  /**
714
  * @method render_global_settings
715
- */
716
  static public function render_global_settings()
717
  {
718
  $settings = FLBuilderModel::get_global_settings();
719
  $form = FLBuilderModel::$settings_forms['global'];
720
-
721
  self::render_settings(array(
722
  'class' => 'fl-builder-global-settings',
723
  'title' => $form['title'],
724
  'tabs' => $form['tabs']
725
  ), $settings);
726
  }
727
-
728
  /**
729
  * @method register_templates_post_type
730
  */
@@ -733,24 +755,24 @@ final class FLBuilder {
733
  if(FL_BUILDER_LITE === true) {
734
  return;
735
  }
736
-
737
  register_post_type('fl-builder-template', array(
738
  'public' => false,
739
  'labels' => array(
740
- 'name' => _x( 'Layout Templates', 'post type general name', 'fl-builder' ),
741
- 'singular_name' => _x( 'Layout Template', 'post type singular name', 'fl-builder' ),
742
- 'menu_name' => _x( 'Layout Templates', 'admin menu', 'fl-builder' ),
743
- 'name_admin_bar' => _x( 'Layout Template', 'add new on admin bar', 'fl-builder' ),
744
- 'add_new' => _x( 'Add New', 'book', 'fl-builder' ),
745
- 'add_new_item' => __( 'Add New Layout Template', 'fl-builder' ),
746
- 'new_item' => __( 'New Layout Template', 'fl-builder' ),
747
- 'edit_item' => __( 'Edit Layout Template', 'fl-builder' ),
748
- 'view_item' => __( 'View Layout Template', 'fl-builder' ),
749
- 'all_items' => __( 'All Layout Templates', 'fl-builder' ),
750
- 'search_items' => __( 'Search Layout Templates', 'fl-builder' ),
751
- 'parent_item_colon' => __( 'Parent Layout Templates:', 'fl-builder' ),
752
- 'not_found' => __( 'No layout templates found.', 'fl-builder' ),
753
- 'not_found_in_trash' => __( 'No layout templates found in Trash.', 'fl-builder' )
754
  ),
755
  'supports' => array(
756
  'title'
@@ -758,27 +780,27 @@ final class FLBuilder {
758
  'publicly_queryable' => true
759
  ));
760
  }
761
-
762
  /**
763
  * @method render_template_selector
764
  */
765
  static public function render_template_selector()
766
  {
767
  if(file_exists(FL_BUILDER_DIR . 'includes/template-selector.php')) {
768
-
769
  $enabled_templates = FLBuilderModel::get_enabled_templates();
770
  $user_templates = FLBuilderModel::get_user_templates();
771
  $templates = FLBuilderModel::get_templates();
772
  $num_rows = FLBuilderModel::count_nodes('row');
773
-
774
  include FL_BUILDER_DIR . 'includes/template-selector.php';
775
-
776
  if(defined('DOING_AJAX')) {
777
  die();
778
  }
779
  }
780
  }
781
-
782
  /**
783
  * @method render_user_template_settings
784
  */
@@ -786,7 +808,7 @@ final class FLBuilder {
786
  {
787
  $defaults = FLBuilderModel::get_settings_form_defaults(FLBuilderModel::$settings_forms['user_template']['tabs']);
788
  $form = FLBuilderModel::$settings_forms['user_template'];
789
-
790
  FLBuilder::render_settings(array(
791
  'class' => 'fl-builder-user-template-settings',
792
  'title' => $form['title'],
@@ -796,126 +818,126 @@ final class FLBuilder {
796
 
797
  /**
798
  * @method render_template
799
- */
800
- static public function render_template($template)
801
  {
802
  global $post;
803
-
804
  if($post && $post->post_type == 'fl-builder-template') {
805
-
806
  $page = locate_template(array('page.php'));
807
-
808
  if(!empty($page)) {
809
  return $page;
810
  }
811
  }
812
-
813
  return $template;
814
  }
815
-
816
  /**
817
  * @method render_icon_selector
818
- */
819
  static public function render_icon_selector()
820
  {
821
  $icon_sets = FLBuilderIcons::get_sets();
822
-
823
  include FL_BUILDER_DIR . 'includes/icon-selector.php';
824
-
825
  if(defined('DOING_AJAX')) {
826
  die();
827
  }
828
  }
829
-
830
  /**
831
  * @method render_rows
832
  */
833
  static public function render_rows()
834
  {
835
  $rows = FLBuilderModel::get_nodes('row');
836
-
837
  foreach($rows as $row) {
838
  self::render_row($row);
839
  }
840
  }
841
-
842
  /**
843
  * @method render_row
844
- */
845
  static public function render_row($row)
846
  {
847
  $groups = FLBuilderModel::get_nodes('column-group', $row->node);
848
-
849
  include FL_BUILDER_DIR . 'includes/row.php';
850
  }
851
-
852
  /**
853
  * @method render_new_row
854
- */
855
  static public function render_new_row($cols = '1-col', $position = false)
856
  {
857
  $post_data = FLBuilderModel::get_post_data();
858
  $cols = isset($post_data['cols']) ? $post_data['cols'] : $cols;
859
  $position = isset($post_data['position']) ? (int)$post_data['position'] : $position;
860
  $row = FLBuilderModel::add_row($cols, $position);
861
-
862
  self::render_row($row);
863
-
864
  if(defined('DOING_AJAX')) {
865
  die();
866
  }
867
  }
868
-
869
  /**
870
  * @method render_row_class
871
- */
872
  static public function render_row_class($row)
873
  {
874
  echo 'fl-row';
875
  echo ' fl-row-' . $row->settings->width . '-width';
876
  echo ' fl-row-bg-' . $row->settings->bg_type;
877
  echo ' fl-node-' . $row->node;
878
-
879
  if(!empty($row->settings->class)) {
880
- echo ' ' . $row->settings->class;
881
  }
882
  if(!empty($row->settings->responsive_display)) {
883
  echo ' fl-visible-' . $row->settings->responsive_display;
884
  }
885
  }
886
-
887
  /**
888
  * @method render_row_content_class
889
- */
890
  static public function render_row_content_class($row)
891
  {
892
  echo 'fl-row-content';
893
  echo ' fl-row-' . $row->settings->content_width . '-width';
894
  echo ' fl-node-content';
895
  }
896
-
897
  /**
898
  * @method render_row_data_attrs
899
- */
900
  static public function render_row_data_attrs($row)
901
  {
902
  echo ' data-node="' . $row->node . '"';
903
-
904
  if($row->settings->bg_type == 'parallax' && !empty($row->settings->bg_parallax_image_src)) {
905
  echo ' data-parallax-speed="' . $row->settings->bg_parallax_speed . '"';
906
  echo ' data-parallax-image="' . $row->settings->bg_parallax_image_src . '"';
907
  }
908
  }
909
-
910
  /**
911
  * @method render_row_bg
912
- */
913
  static public function render_row_bg($row)
914
  {
915
  if($row->settings->bg_type == 'video') {
916
-
917
  $vid_data = FLBuilderModel::get_row_bg_data($row);
918
-
919
  if($vid_data) {
920
  include FL_BUILDER_DIR . 'includes/row-video.php';
921
  }
@@ -924,10 +946,10 @@ final class FLBuilder {
924
  echo '<div class="fl-bg-slideshow"></div>';
925
  }
926
  }
927
-
928
  /**
929
  * @method render_row_settings
930
- */
931
  static public function render_row_settings($node_id = null)
932
  {
933
  $post_data = FLBuilderModel::get_post_data();
@@ -943,20 +965,20 @@ final class FLBuilder {
943
  'tabs' => $form['tabs']
944
  ), $settings);
945
  }
946
-
947
  /**
948
  * @method render_column_group
949
- */
950
  static public function render_column_group($group)
951
  {
952
  $cols = FLBuilderModel::get_nodes('column', $group->node);
953
-
954
  include FL_BUILDER_DIR . 'includes/column-group.php';
955
  }
956
-
957
  /**
958
  * @method render_new_column_group
959
- */
960
  static public function render_new_column_group($node_id = null, $cols = '1-col', $position = false)
961
  {
962
  $post_data = FLBuilderModel::get_post_data();
@@ -964,17 +986,17 @@ final class FLBuilder {
964
  $cols = isset($post_data['cols']) ? $post_data['cols'] : $cols;
965
  $position = isset($post_data['position']) ? (int)$post_data['position'] : $position;
966
  $group = FLBuilderModel::add_col_group($node_id, $cols, $position);
967
-
968
  self::render_column_group($group);
969
-
970
  if(defined('DOING_AJAX')) {
971
  die();
972
  }
973
  }
974
-
975
  /**
976
  * @method render_column_settings
977
- */
978
  static public function render_column_settings($node_id = null)
979
  {
980
  $post_data = FLBuilderModel::get_post_data();
@@ -990,24 +1012,24 @@ final class FLBuilder {
990
  'tabs' => $form['tabs']
991
  ), $settings);
992
  }
993
-
994
  /**
995
  * @method render_column_class
996
- */
997
  static public function render_column_class($col)
998
  {
999
  echo 'fl-col';
1000
-
1001
  if($col->settings->size <= 50) {
1002
  echo ' fl-col-small';
1003
  }
1004
  if(!empty($col->settings->class)) {
1005
- echo ' ' . $col->settings->class;
1006
  }
1007
  if(!empty($col->settings->responsive_display)) {
1008
  echo ' fl-visible-' . $col->settings->responsive_display;
1009
  }
1010
-
1011
  echo ' fl-node-' . $col->node;
1012
  }
1013
 
@@ -1017,16 +1039,16 @@ final class FLBuilder {
1017
  static public function render_modules($parent_id)
1018
  {
1019
  $modules = FLBuilderModel::get_modules($parent_id);
1020
-
1021
  foreach($modules as $module) {
1022
  $settings = $module->settings;
1023
  include FL_BUILDER_DIR . 'includes/module.php';
1024
  }
1025
  }
1026
-
1027
  /**
1028
  * @method render_new_module_settings
1029
- */
1030
  static public function render_new_module_settings($parent_id = null, $type = null, $position = false)
1031
  {
1032
  $post_data = FLBuilderModel::get_post_data();
@@ -1034,21 +1056,21 @@ final class FLBuilder {
1034
  $type = isset($post_data['type']) ? $post_data['type'] : $type;
1035
  $position = isset($post_data['position']) ? (int)$post_data['position'] : $position;
1036
  $module = FLBuilderModel::add_default_module($parent_id, $type, $position);
1037
-
1038
  // Force the global parent id.
1039
  FLBuilderModel::update_post_data('parent_id', $module->parent);
1040
-
1041
  // Get the settings html.
1042
  ob_start();
1043
  self::render_module_settings($module->node, $module->type, $module->parent, true);
1044
  $settings = ob_get_clean();
1045
-
1046
  // Build the response.
1047
  $response = array(
1048
  'layout' => self::render_preview(true),
1049
  'settings' => $settings
1050
  );
1051
-
1052
  // Echo or return the response.
1053
  if(defined('DOING_AJAX')) {
1054
  echo json_encode($response);
@@ -1058,17 +1080,17 @@ final class FLBuilder {
1058
  return $response;
1059
  }
1060
  }
1061
-
1062
  /**
1063
  * @method render_module_settings
1064
- */
1065
  static public function render_module_settings($node_id = null, $type = null, $parent_id = null, $return = false)
1066
  {
1067
  $post_data = FLBuilderModel::get_post_data();
1068
  $node_id = isset($post_data['node_id']) ? $post_data['node_id'] : $node_id;
1069
  $type = isset($post_data['type']) ? $post_data['type'] : $type;
1070
  $parent_id = isset($post_data['parent_id']) ? $post_data['parent_id'] : $parent_id;
1071
-
1072
  if($node_id) {
1073
  $module = FLBuilderModel::get_module($node_id);
1074
  $settings = $module->settings;
@@ -1077,22 +1099,22 @@ final class FLBuilder {
1077
  $module = FLBuilderModel::$modules[$type];
1078
  $settings = FLBuilderModel::get_module_defaults($type);
1079
  }
1080
-
1081
  if(file_exists($module->dir .'css/settings.css')) {
1082
  echo '<link class="fl-builder-settings-css" rel="stylesheet" href="'. $module->url .'css/settings.css" />';
1083
  }
1084
  if(file_exists($module->dir .'js/settings.js')) {
1085
  echo '<script class="fl-builder-settings-js" src="'. $module->url .'js/settings.js"></script>';
1086
  }
1087
-
1088
  echo self::render_settings(array(
1089
  'class' => 'fl-builder-module-settings fl-builder-'. $type .'-settings',
1090
  'attrs' => 'data-node="'. $node_id .'" data-parent="'. $parent_id .'" data-type="'. $type .'"',
1091
- 'title' => $module->name . __(' Settings', 'fl-builder'),
1092
  'tabs' => $module->form
1093
  ), $settings, $return);
1094
  }
1095
-
1096
  /**
1097
  * @method render_module_html
1098
  */
@@ -1102,29 +1124,29 @@ final class FLBuilder {
1102
  $defaults = FLBuilderModel::get_module_defaults($type);
1103
  $settings = FLBuilderUtils::array_to_object($settings);
1104
  $settings = (object)array_merge((array)$defaults, (array)$settings);
1105
-
1106
  // Module
1107
  $class = get_class(FLBuilderModel::$modules[$type]);
1108
- $module = new $class();
1109
  $module->settings = $settings;
1110
-
1111
  // Shorthand reference to the module's id.
1112
  $id = $module->node;
1113
-
1114
  include $module->dir .'includes/frontend.php';
1115
  }
1116
-
1117
  /**
1118
  * @method render_module_class
1119
- */
1120
  static public function render_module_class($module)
1121
  {
1122
  echo 'fl-module';
1123
  echo ' fl-module-' . $module->settings->type;
1124
  echo ' fl-node-' . $module->node;
1125
-
1126
  if(!empty($module->settings->class)) {
1127
- echo ' ' . $module->settings->class;
1128
  }
1129
  if(!empty($module->settings->responsive_display)) {
1130
  echo ' fl-visible-' . $module->settings->responsive_display;
@@ -1133,22 +1155,22 @@ final class FLBuilder {
1133
  echo ' fl-animation fl-' . $module->settings->animation;
1134
  }
1135
  }
1136
-
1137
  /**
1138
  * @method render_module_data_attrs
1139
- */
1140
  static public function render_module_data_attrs($module)
1141
  {
1142
  echo ' data-node="' . $module->node . '" ';
1143
  echo ' data-animation-delay="' . $module->settings->animation_delay . '" ';
1144
-
1145
  if(FLBuilderModel::is_builder_active()) {
1146
  echo ' data-parent="' . $module->parent . '" ';
1147
  echo ' data-type="' . $module->settings->type . '" ';
1148
  echo ' data-name="' . $module->name . '" ';
1149
  }
1150
  }
1151
-
1152
  /**
1153
  * @method render_module_css
1154
  */
@@ -1159,18 +1181,18 @@ final class FLBuilder {
1159
  $defaults = FLBuilderModel::get_module_defaults($type);
1160
  $settings = FLBuilderUtils::array_to_object($settings);
1161
  $settings = (object)array_merge((array)$defaults, (array)$settings);
1162
-
1163
  // Module
1164
  $class = get_class(FLBuilderModel::$modules[$type]);
1165
- $module = new $class();
1166
  $module->settings = $settings;
1167
-
1168
  include $module->dir .'includes/frontend.css.php';
1169
  }
1170
-
1171
  /**
1172
  * @method render_css
1173
- */
1174
  static public function render_css()
1175
  {
1176
  // Delete the old file.
@@ -1185,10 +1207,10 @@ final class FLBuilder {
1185
  $post_id = FLBuilderModel::get_post_id();
1186
  $post = get_post($post_id);
1187
  $compiled = array();
1188
-
1189
  // Global css
1190
  $css = file_get_contents(FL_BUILDER_DIR . '/css/fl-builder-layout.css');
1191
-
1192
  // Responsive css
1193
  if($global_settings->responsive_enabled) {
1194
  $css .= '@media (max-width: '. $global_settings->medium_breakpoint .'px) { ';
@@ -1198,74 +1220,74 @@ final class FLBuilder {
1198
  $css .= file_get_contents(FL_BUILDER_DIR . '/css/fl-builder-layout-responsive.css');
1199
  $css .= ' }';
1200
  }
1201
-
1202
  // Global row margins
1203
  $css .= '.fl-row-content-wrap { margin: '. $global_settings->row_margins .'px; }';
1204
-
1205
  // Global row padding
1206
  $css .= '.fl-row-content-wrap { padding: '. $global_settings->row_padding .'px; }';
1207
-
1208
  // Global row width
1209
  $css .= '.fl-row-fixed-width { max-width: '. $global_settings->row_width .'px; }';
1210
-
1211
  // Global row content width
1212
  $css .= '.fl-row-content-wrap.fl-row-fixed-width .fl-row-content { max-width: '. $global_settings->row_width .'px; }';
1213
-
1214
  // Row instances
1215
  foreach($rows as $row) {
1216
-
1217
  // Instance row css
1218
  ob_start();
1219
  include FL_BUILDER_DIR . 'includes/row-css.php';
1220
  $css .= ob_get_clean();
1221
-
1222
  // Instance row margins
1223
  $css .= self::render_row_margins($row);
1224
-
1225
  // Instance row padding
1226
  $css .= self::render_row_padding($row);
1227
-
1228
  // Instance row bg positions
1229
  $css .= self::render_row_bg_positions($row);
1230
  $css .= self::render_responsive_row_bg_positions($row);
1231
  }
1232
-
1233
  // Column instances
1234
  foreach($cols as $col) {
1235
-
1236
  // Instance column css
1237
  ob_start();
1238
  include FL_BUILDER_DIR . 'includes/column-css.php';
1239
  $css .= ob_get_clean();
1240
-
1241
  // Instance column margins
1242
  $css .= self::render_column_margins($col);
1243
-
1244
  // Instance column padding
1245
  $css .= self::render_column_padding($col);
1246
  }
1247
-
1248
  // Global module margins
1249
  $css .= '.fl-module-content { margin: '. $global_settings->module_margins .'px; }';
1250
-
1251
  // Modules
1252
  foreach($modules as $module) {
1253
-
1254
  // Global module css
1255
  $file = $module->dir . 'css/frontend.css';
1256
  $file_responsive = $module->dir . 'css/frontend.responsive.css';
1257
-
1258
  // Only include global module css that hasn't been included yet.
1259
  if(!in_array($module->settings->type, $compiled)) {
1260
-
1261
  // Add to the compiled array so we don't include it again.
1262
  $compiled[] = $module->settings->type;
1263
-
1264
  // Get the standard module css.
1265
  if(file_exists($file)) {
1266
  $css .= file_get_contents($file);
1267
  }
1268
-
1269
  // Get the responsive module css.
1270
  if($global_settings->responsive_enabled && file_exists($file_responsive)) {
1271
  $css .= '@media (max-width: '. $global_settings->responsive_breakpoint .'px) { ';
@@ -1273,28 +1295,28 @@ final class FLBuilder {
1273
  $css .= ' }';
1274
  }
1275
  }
1276
-
1277
  // Instance module css
1278
  $file = $module->dir . 'includes/frontend.css.php';
1279
  $settings = $module->settings;
1280
  $id = $module->node;
1281
-
1282
  if(file_exists($file)) {
1283
  ob_start();
1284
  include $file;
1285
  $css .= ob_get_clean();
1286
  }
1287
-
1288
  // Instance module margins
1289
  $css .= self::render_module_margins($module);
1290
  $css .= self::render_responsive_module_margins($module);
1291
  }
1292
-
1293
  // Default page heading
1294
  if($post && !$global_settings->show_default_heading && ($post->post_type == 'page' || $post->post_type == 'fl-builder-template')) {
1295
  $css .= $global_settings->default_heading_selector . ' { display:none; }';
1296
  }
1297
-
1298
  // Save the css
1299
  if(!empty($css)) {
1300
  $css = preg_replace('!/\*[^*]*\*+([^/][^*]*\*+)*/!', '', $css);
@@ -1302,16 +1324,16 @@ final class FLBuilder {
1302
  file_put_contents($asset_info['css'], $css);
1303
  }
1304
  }
1305
-
1306
  /**
1307
  * @method render_row_margins
1308
- */
1309
  static public function render_row_margins($row)
1310
  {
1311
  $settings = $row->settings;
1312
  $margins = '';
1313
  $css = '';
1314
-
1315
  if($settings->margin_top != '') {
1316
  $margins .= 'margin-top:' . $settings->margin_top . 'px;';
1317
  }
@@ -1327,19 +1349,19 @@ final class FLBuilder {
1327
  if($margins != '') {
1328
  $css .= '.fl-node-' . $row->node . ' .fl-row-content-wrap {' . $margins . '}';
1329
  }
1330
-
1331
  return $css;
1332
  }
1333
-
1334
  /**
1335
  * @method render_row_padding
1336
- */
1337
  static public function render_row_padding($row)
1338
  {
1339
  $settings = $row->settings;
1340
  $padding = '';
1341
  $css = '';
1342
-
1343
  if($settings->padding_top != '') {
1344
  $padding .= 'padding-top:' . $settings->padding_top . 'px;';
1345
  }
@@ -1355,19 +1377,19 @@ final class FLBuilder {
1355
  if($padding != '') {
1356
  $css = '.fl-node-' . $row->node . ' .fl-row-content-wrap {' . $padding . '}';
1357
  }
1358
-
1359
  return $css;
1360
  }
1361
-
1362
  /**
1363
  * @method render_row_bg_positions
1364
- */
1365
  static public function render_row_bg_positions($row)
1366
  {
1367
  $settings = $row->settings;
1368
  $positions = '';
1369
  $css = '';
1370
-
1371
  if($settings->margin_top != '' || $settings->border_top != '') {
1372
  $positions .= 'top:' . ($settings->margin_top + $settings->border_top) . 'px;';
1373
  }
@@ -1384,20 +1406,20 @@ final class FLBuilder {
1384
  $css .= '.fl-node-' . $row->node . ' .fl-bg-video {' . $positions . '}';
1385
  $css .= '.fl-node-' . $row->node . ' .fl-bg-slideshow {' . $positions . '}';
1386
  }
1387
-
1388
  return $css;
1389
  }
1390
-
1391
  /**
1392
  * @method render_responsive_row_bg_positions
1393
- */
1394
  static public function render_responsive_row_bg_positions($row)
1395
  {
1396
  $global_settings = FLBuilderModel::get_global_settings();
1397
  $settings = $row->settings;
1398
  $positions = '';
1399
  $css = '';
1400
-
1401
  if($settings->border_top != '') {
1402
  $positions .= 'top:' . $settings->border_top . 'px;';
1403
  }
@@ -1410,19 +1432,19 @@ final class FLBuilder {
1410
  $css .= '.fl-node-' . $row->node . ' .fl-bg-slideshow {' . $positions . '}';
1411
  $css .= ' }';
1412
  }
1413
-
1414
  return $css;
1415
  }
1416
-
1417
  /**
1418
  * @method render_column_margins
1419
- */
1420
  static public function render_column_margins($col)
1421
  {
1422
  $settings = $col->settings;
1423
  $margins = '';
1424
  $css = '';
1425
-
1426
  if($settings->margin_top != '') {
1427
  $margins .= 'margin-top:' . $settings->margin_top . 'px;';
1428
  }
@@ -1438,19 +1460,19 @@ final class FLBuilder {
1438
  if($margins != '') {
1439
  $css .= '.fl-node-' . $col->node . ' .fl-col-content {' . $margins . '}';
1440
  }
1441
-
1442
  return $css;
1443
  }
1444
-
1445
  /**
1446
  * @method render_column_padding
1447
- */
1448
  static public function render_column_padding($col)
1449
  {
1450
  $settings = $col->settings;
1451
  $padding = '';
1452
  $css = '';
1453
-
1454
  if($settings->padding_top != '') {
1455
  $padding .= 'padding-top:' . $settings->padding_top . 'px;';
1456
  }
@@ -1466,19 +1488,19 @@ final class FLBuilder {
1466
  if($padding != '') {
1467
  $css = '.fl-node-' . $col->node . ' .fl-col-content {' . $padding . '}';
1468
  }
1469
-
1470
  return $css;
1471
  }
1472
-
1473
  /**
1474
  * @method render_module_margins
1475
- */
1476
  static public function render_module_margins($module)
1477
  {
1478
  $settings = $module->settings;
1479
  $margins = '';
1480
  $css = '';
1481
-
1482
  if($settings->margin_top != '') {
1483
  $margins .= 'margin-top:' . $settings->margin_top . 'px;';
1484
  }
@@ -1494,13 +1516,13 @@ final class FLBuilder {
1494
  if($margins != '') {
1495
  $css = '.fl-node-' . $module->node . ' .fl-module-content {' . $margins . '}';
1496
  }
1497
-
1498
  return $css;
1499
  }
1500
-
1501
  /**
1502
  * @method render_responsive_module_margins
1503
- */
1504
  static public function render_responsive_module_margins($module)
1505
  {
1506
  $global_settings = FLBuilderModel::get_global_settings();
@@ -1508,7 +1530,7 @@ final class FLBuilder {
1508
  $settings = $module->settings;
1509
  $margins = '';
1510
  $css = '';
1511
-
1512
  if($settings->margin_top != '' && ($settings->margin_top > $default || $settings->margin_top < 0)) {
1513
  $margins .= 'margin-top:' . $default . 'px;';
1514
  }
@@ -1526,13 +1548,13 @@ final class FLBuilder {
1526
  $css .= '.fl-node-' . $module->node . ' .fl-module-content {' . $margins . '}';
1527
  $css .= ' }';
1528
  }
1529
-
1530
  return $css;
1531
  }
1532
-
1533
  /**
1534
  * @method render_js
1535
- */
1536
  static public function render_js()
1537
  {
1538
  // Delete the old file.
@@ -1545,71 +1567,71 @@ final class FLBuilder {
1545
  $asset_info = FLBuilderModel::get_asset_info();
1546
  $compiled = array();
1547
  $js = '';
1548
-
1549
  // Main JS
1550
  $js .= file_get_contents(FL_BUILDER_DIR . 'js/fl-builder-layout.js');
1551
-
1552
  // Instance Row JS
1553
  foreach($rows as $row) {
1554
-
1555
  $settings = $row->settings;
1556
  $id = $row->node;
1557
-
1558
  ob_start();
1559
  include FL_BUILDER_DIR . 'includes/row-js.php';
1560
  $js .= ob_get_clean();
1561
  }
1562
-
1563
  // Modules
1564
  foreach($modules as $module) {
1565
-
1566
  // Global module JS
1567
  $file = $module->dir . 'js/frontend.js';
1568
-
1569
  if(file_exists($file) && !in_array($module->settings->type, $compiled)) {
1570
  $js .= "\n" . file_get_contents($file);
1571
  $compiled[] = $module->settings->type;
1572
  }
1573
-
1574
  // Instance module JS
1575
  $file = $module->dir . 'includes/frontend.js.php';
1576
  $settings = $module->settings;
1577
  $id = $module->node;
1578
-
1579
  if(file_exists($file)) {
1580
  ob_start();
1581
  include $file;
1582
  $js .= ob_get_clean();
1583
  }
1584
  }
1585
-
1586
  // Add the AJAX url global.
1587
  $js .= "var wpAjaxUrl = '" . admin_url('admin-ajax.php') . "';";
1588
-
1589
  // Add the builder url global.
1590
  $js .= "var flBuilderUrl = '" . FL_BUILDER_URL . "';";
1591
-
1592
  // Call the FLBuilder._renderLayoutComplete method if we're currently editing.
1593
  if(stristr($asset_info['js'], '-draft.js') || stristr($asset_info['js'], '-preview.js')) {
1594
  $js .= "; if(typeof FLBuilder !== 'undefined' && typeof FLBuilder._renderLayoutComplete !== 'undefined') FLBuilder._renderLayoutComplete();";
1595
  }
1596
-
1597
  // Include FLJSMin
1598
  if(!class_exists('FLJSMin')) {
1599
- include FL_BUILDER_DIR . 'classes/FLJSMin.php';
1600
  }
1601
-
1602
  // Save the js
1603
  if(!empty($js)) {
1604
  file_put_contents($asset_info['js'], FLJSMin::minify($js));
1605
  }
1606
  }
1607
-
1608
  /**
1609
  * @method log
1610
- */
1611
  static public function log($data)
1612
- {
1613
  ob_start();
1614
  print_r($data);
1615
  error_log(ob_get_clean());
8
  final class FLBuilder {
9
 
10
  /**
11
+ * Localization
12
+ *
13
+ * Load the translation file for current language. Checks the default WordPress
14
+ * languages folder first and then the languages folder inside the plugin.
15
+ *
16
+ * @method load_plugin_textdomain
17
+ */
18
+ static public function load_plugin_textdomain()
19
+ {
20
+ //Traditional WordPress plugin locale filter
21
+ $locale = apply_filters( 'plugin_locale', get_locale(), 'fl-builder' );
22
+
23
+ //Setup paths to current locale file
24
+ $mofile_local = trailingslashit( FL_BUILDER_DIR ) . 'languages/' . $locale . '.mo';
25
+ $mofile_global = trailingslashit( WP_LANG_DIR ) . 'plugins/beaver-builder/' . $locale . '.mo';
26
+
27
+ if ( file_exists( $mofile_local ) ) {
28
+ //Look in local /wp-content/plugins/beaver-builder/languages/ folder
29
+ return load_textdomain( 'fl-builder', $mofile_local );
30
+ }
31
+ else if ( file_exists( $mofile_global ) ) {
32
+ //Look in global /wp-content/languages/plugins/beaver-builder/ folder
33
+ return load_textdomain( 'fl-builder', $mofile_global );
34
+ }
35
+
36
+ //Nothing found
37
+ return false;
38
+ }
39
 
40
  /**
41
+ * Custom ajax handeling since wp_ajax only works in the
42
  * admin and we need everything to work on the frontend.
43
  *
44
  * @method ajax
45
+ */
46
  static public function ajax()
47
  {
48
  // Only run for logged in users.
49
  if(is_user_logged_in()) {
50
+
51
  // Get builder post data.
52
  $post_data = FLBuilderModel::get_post_data();
53
+
54
+ // Get the action.
55
  if(!empty($_REQUEST['fl_action'])) {
56
  $action = $_REQUEST['fl_action'];
57
  }
71
 
72
  /**
73
  * @method init
74
+ */
75
  static public function init()
76
+ {
77
  // Enable editing if the builder is active.
78
  if(FLBuilderModel::is_builder_active()) {
79
+
80
  // Remove 3rd party editor buttons.
81
  remove_all_actions('media_buttons', 999999);
82
  remove_all_actions('media_buttons_context', 999999);
83
+
84
  // Get the post.
85
  require_once ABSPATH . 'wp-admin/includes/post.php';
86
  $post_id = FLBuilderModel::get_post_id();
87
+
88
+ // Check to see if the post is locked.
89
  if(wp_check_post_lock($post_id) !== false) {
90
  header('Location: ' . admin_url('/post.php?post=' . $post_id . '&action=edit'));
91
  }
97
 
98
  /**
99
  * @method register_module
100
+ */
101
  static public function register_module($class, $form)
102
  {
103
  FLBuilderModel::register_module($class, $form);
104
  }
105
+
106
  /**
107
  * @method register_settings_form
108
+ */
109
  static public function register_settings_form($id, $form)
110
  {
111
  FLBuilderModel::register_settings_form($id, $form);
112
  }
113
+
114
  /**
115
  * @method no_cache_headers
116
+ */
117
  static public function no_cache_headers()
118
  {
119
  if(isset($_GET['fl_builder'])) {
124
  header('Expires: Sat, 26 Jul 1997 05:00:00 GMT');
125
  }
126
  }
127
+
128
  /**
129
  * @method default_editor
130
+ */
131
  static public function default_editor($type)
132
  {
133
  return FLBuilderModel::is_builder_active() ? 'tinymce' : $type;
134
  }
135
+
136
  /**
137
  * @method add_editor_css
138
+ */
139
  static public function add_editor_css($mce_css)
140
  {
141
  if(FLBuilderModel::is_builder_active()) {
142
+
143
  if(!empty($mce_css)) {
144
  $mce_css .= ',';
145
  }
146
+
147
  $mce_css .= FL_BUILDER_URL . 'css/editor.css';
148
  }
149
+
150
  return $mce_css;
151
  }
152
+
153
  /**
154
  * @method editor_buttons_2
155
+ */
156
  static public function editor_buttons_2($buttons)
157
  {
158
  if(FLBuilderModel::is_builder_active()) {
159
+
160
  array_shift($buttons);
161
  array_unshift($buttons, 'fontsizeselect');
162
  array_unshift($buttons, 'formatselect');
163
+
164
  if(($key = array_search('wp_help', $buttons)) !== false) {
165
+ unset($buttons[$key]);
166
  }
167
  }
168
+
169
  return $buttons;
170
  }
171
+
172
  /**
173
  * @method editor_external_plugins
174
+ */
175
  static public function editor_external_plugins($plugins)
176
  {
177
  if(FLBuilderModel::is_builder_active()) {
178
+
179
  $allowed = array(
180
  'anchor',
181
  'code',
190
  'advlist',
191
  'wptadv',
192
  );
193
+
194
  foreach($plugins as $key => $val) {
195
  if(!in_array($key, $allowed)) {
196
  unset($plugins[$key]);
197
  }
198
  }
199
  }
200
+
201
  return $plugins;
202
  }
203
+
204
  /**
205
  * @method include_jquery
206
+ */
207
  static public function include_jquery()
208
  {
209
  if(FLBuilderModel::is_builder_enabled()) {
210
  include FL_BUILDER_DIR . 'includes/jquery.php';
211
  }
212
  }
213
+
214
  /**
215
  * @method layout_styles_scripts
216
+ */
217
  static public function layout_styles_scripts()
218
  {
219
  global $wp_query;
220
  global $post;
221
+
222
  $ver = FL_BUILDER_VERSION;
223
  $css_url = FL_BUILDER_URL . 'css/';
224
  $js_url = FL_BUILDER_URL . 'js/';
225
+
226
  // Register additional CSS
227
  wp_register_style('font-awesome', $css_url . 'font-awesome.min.css', array(), $ver);
228
  wp_register_style('foundation-icons', $css_url . 'foundation-icons.css', array(), $ver);
229
  wp_register_style('fl-slideshow', $css_url . 'fl-slideshow.css', array(), $ver);
230
  wp_register_style('jquery-bxslider', $css_url . 'jquery.bxslider.css', array(), $ver);
231
  wp_register_style('jquery-magnificpopup', $css_url . 'jquery.magnificpopup.css', array(), $ver);
232
+
233
  // Register additional JS
234
  wp_register_script('fl-slideshow', $js_url . 'fl-slideshow.js', array('yui3'), $ver, true);
235
  wp_register_script('fl-gallery-grid', $js_url . 'fl-gallery-grid.js', array('jquery'), $ver, true);
241
  wp_register_script('jquery-mosaicflow', $js_url . 'jquery.mosaicflow.min.js', array('jquery'), $ver, true);
242
  wp_register_script('jquery-waypoints', $js_url . 'jquery.waypoints.min.js', array('jquery'), $ver, true);
243
  wp_register_script('jquery-wookmark', $js_url . 'jquery.wookmark.min.js', array('jquery'), $ver, true);
244
+
245
  // YUI 3 (Needed for the slideshow)
246
  if(FLBuilderModel::is_ssl()) {
247
  wp_register_script('yui3', 'https://yui-s.yahooapis.com/3.5.1/build/yui/yui-min.js', array(), '3.5.1', false);
248
  }
249
  else {
250
+ wp_register_script('yui3', 'http://yui.yahooapis.com/3.5.1/build/yui/yui-min.js', array(), '3.5.1', false);
251
  }
252
+
253
  // Enqueue assets for posts in the main query.
254
  if ( isset( $wp_query->posts ) ) {
255
  foreach ( $wp_query->posts as $post ) {
256
  self::enqueue_layout_styles_scripts( $post->ID );
257
  }
258
  }
259
+
260
  // Enqueue assets for posts via the fl_builder_global_posts filter.
261
  $post_ids = FLBuilderModel::get_global_posts();
262
+
263
  if(count($post_ids) > 0) {
264
+
265
  $posts = get_posts(array('post__in' => $post_ids, 'post_type' => 'any'));
266
 
267
+ foreach($posts as $post) {
268
  self::enqueue_layout_styles_scripts($post->ID);
269
  }
270
  }
271
+
272
  // Reset the main query.
273
  wp_reset_query();
274
  }
275
+
276
  /**
277
  * @method enqueue_layout_styles_scripts
278
+ */
279
  static public function enqueue_layout_styles_scripts($post_id)
280
  {
281
  if(FLBuilderModel::is_builder_enabled()) {
282
+
283
  $rows = FLBuilderModel::get_nodes('row');
284
  $modules = FLBuilderModel::get_all_modules();
285
  $asset_info = FLBuilderModel::get_asset_info();
286
  $asset_ver = FLBuilderModel::get_asset_version();
287
+
288
  // Enqueue required row CSS and JS
289
  foreach($rows as $row) {
290
  if($row->settings->bg_type == 'slideshow') {
293
  wp_enqueue_style('fl-slideshow');
294
  }
295
  }
296
+
297
  // Enqueue required module CSS and JS
298
  foreach($modules as $module) {
299
+
300
  $module->enqueue_icon_styles();
301
  $module->enqueue_scripts();
302
+
303
  foreach($module->css as $handle => $props) {
304
  wp_enqueue_style($handle, $props[0], $props[1], $props[2], $props[3]);
305
  }
310
  wp_enqueue_script('jquery-waypoints');
311
  }
312
  }
313
+
314
  // Enqueue main CSS
315
  if(!file_exists($asset_info['css'])) {
316
  FLBuilder::render_css();
317
  }
318
+
319
  wp_enqueue_style('fl-builder-layout-' . $post_id, $asset_info['css_url'], array(), $asset_ver);
320
+
321
  // Enqueue main JS
322
  if(!file_exists($asset_info['js'])) {
323
  FLBuilder::render_js();
324
  }
325
+
326
  wp_enqueue_script('fl-builder-layout-' . $post_id, $asset_info['js_url'], array(), $asset_ver, true);
327
  }
328
  }
329
+
330
  /**
331
  * @method styles_scripts
332
+ */
333
  static public function styles_scripts()
334
  {
335
  if(FLBuilderModel::is_builder_active()) {
336
+
337
  $ver = FL_BUILDER_VERSION;
338
  $css_url = FL_BUILDER_URL . 'css/';
339
  $js_url = FL_BUILDER_URL . 'js/';
340
+
341
  /* We have a custom version of sortable that fixes a bug. */
342
  wp_deregister_script('jquery-ui-sortable');
343
+
344
  /* Frontend builder styles */
345
  wp_enqueue_style('dashicons');
346
  wp_enqueue_style('font-awesome');
352
  wp_enqueue_style('fl-lightbox', $css_url . 'fl-lightbox.css', array(), $ver);
353
  wp_enqueue_style('fl-icon-selector', $css_url . 'fl-icon-selector.css', array(), $ver);
354
  wp_enqueue_style('fl-builder', $css_url . 'fl-builder.css', array(), $ver);
355
+
356
  /* RTL Support */
357
  if(is_rtl()) {
358
  wp_enqueue_style('fl-builder-rtl', $css_url . 'fl-builder-rtl.css', array(), $ver);
359
  }
360
+
361
  /* Frontend builder scripts */
362
  wp_enqueue_media();
363
  wp_enqueue_script('heartbeat');
382
  wp_enqueue_script('fl-stylesheet', $js_url . 'fl-stylesheet.js', array(), $ver, true);
383
  wp_enqueue_script('fl-builder', $js_url . 'fl-builder.js', array(), $ver, true);
384
  wp_enqueue_script('fl-builder-preview', $js_url . 'fl-builder-preview.js', array(), $ver, true);
385
+
386
  /* Core template settings */
387
  if(file_exists(FL_BUILDER_DIR . 'js/fl-template-settings.js')) {
388
  wp_enqueue_script('fl-template-settings', FL_BUILDER_URL . 'js/fl-template-settings.js', array(), $ver, true);
389
  }
390
+
391
  /* Additional module styles and scripts */
392
  foreach(FLBuilderModel::$modules as $module) {
393
+
394
  $module->enqueue_scripts();
395
+
396
  foreach($module->css as $handle => $props) {
397
  wp_enqueue_style($handle, $props[0], $props[1], $props[2], $props[3]);
398
  }
402
  }
403
  }
404
  }
405
+
406
  /**
407
  * @method body_class
408
  */
414
  if(FLBuilderModel::is_builder_active() && !current_user_can(FLBuilderModel::get_editing_capability())) {
415
  $classes[] = 'fl-builder-simple';
416
  }
417
+
418
  return $classes;
419
  }
420
+
421
  /**
422
  * @method admin_bar_menu
423
  */
424
  static public function admin_bar_menu($wp_admin_bar)
425
  {
426
  global $wp_the_query;
427
+
428
  if ( FLBuilderModel::is_post_editable() ) {
429
+
430
  $wp_admin_bar->add_node( array(
431
  'id' => 'fl-builder-frontend-edit-link',
432
+ 'title' => '<style> #wp-admin-bar-fl-builder-frontend-edit-link .ab-icon:before { content: "\f116" !important; top: 2px; margin-right: 3px; } </style><span class="ab-icon"></span>' . FLBuilderModel::get_branding(),
433
  'href' => FLBuilderModel::get_edit_url( $wp_the_query->post->ID )
434
  ));
435
  }
436
  }
437
+
438
  /**
439
  * @method render_ui
440
  */
441
  static public function render_ui()
442
  {
443
  global $wp_the_query;
444
+
445
  if ( FLBuilderModel::is_builder_active() ) {
446
+
447
  $post_id = $wp_the_query->post->ID;
448
  $categories = FLBuilderModel::get_categorized_modules();
449
  $enabled_templates = FLBuilderModel::get_enabled_templates();
450
+
451
  include FL_BUILDER_DIR . 'includes/ui.php';
452
  include FL_BUILDER_DIR . 'includes/js-config.php';
453
  }
454
  }
455
+
456
  /**
457
+ * Renders a preview of the layout to be
458
+ * passed back to the builder via AJAX.
459
  *
460
  * @method render_preview
461
  */
462
  static public function render_preview($return = false)
463
+ {
464
  self::render_css();
465
  self::render_js();
466
+
467
  if($return) {
468
  return self::render_layout(true);
469
  }
471
  self::render_layout();
472
  }
473
  }
474
+
475
  /**
476
  * Renders the layout to be passed back to
477
+ * the builder via AJAX for an update.
478
  *
479
  * @method render_layout
480
  */
482
  {
483
  global $wp_scripts;
484
  global $wp_styles;
485
+
486
  // Deregister scripts and styles so we can capture those
487
  // registered by content functions such as shortcodes.
488
  if(isset($wp_scripts)) {
491
  if(isset($wp_styles)) {
492
  $wp_styles->queue = array();
493
  }
494
+
495
  // Enqueue jQuery again so it's not added by any
496
  // third party shortcodes or plugins.
497
  wp_enqueue_script('jquery');
498
+
499
  // Render the layout.
500
  ob_start();
501
  self::render_rows();
502
  $html = ob_get_clean();
503
+
504
  // Process shortcodes.
505
  ob_start();
506
  echo do_shortcode($html);
507
  $html = ob_get_clean();
508
+
509
+ // Print scripts and styles registered by content
510
  // functions such as shortcodes.
511
  ob_start();
512
+
513
  if(isset($wp_scripts)) {
514
  $wp_scripts->done[] = 'jquery';
515
  wp_print_scripts($wp_scripts->queue);
517
  if(isset($wp_styles)) {
518
  wp_print_styles($wp_styles->queue);
519
  }
520
+
521
  $html = ob_get_clean() . $html;
522
+
523
+ // Get the asset info.
524
  $asset_info = FLBuilderModel::get_asset_info();
525
  $asset_ver = FLBuilderModel::get_asset_version();
526
+
527
  // Build the response.
528
  $response = array(
529
  'html' => $html,
530
  'css' => $asset_info['css_url'] . '?ver=' . $asset_ver,
531
  'js' => $asset_info['js_url'] . '?ver=' . $asset_ver
532
  );
533
+
534
  // Return or echo the response.
535
  if($return) {
536
  return $response;
540
  die();
541
  }
542
  }
543
+
544
  /**
545
  * @method render_content
546
  */
547
  static public function render_content($content)
548
  {
549
  global $post;
550
+
551
  $post_id = FLBuilderModel::get_post_id();
552
  $enabled = FLBuilderModel::is_builder_enabled();
553
  $ajax = defined('DOING_AJAX');
554
  $global_posts = FLBuilderModel::get_global_posts();
555
  $is_global = in_array($post->ID, $global_posts);
556
  $in_loop = in_the_loop();
557
+
558
  if($enabled && !$ajax && ($is_global || $in_loop)) {
559
+
560
  // Remove the builder's render_content filter in case apply_filters
561
  // is called again by a widget, module or shortcode.
562
  remove_filter('the_content', 'FLBuilder::render_content');
563
+
564
  // Render the content.
565
  ob_start();
566
  echo '<div class="fl-builder-content fl-builder-content-' . $post_id . '">';
567
  self::render_rows();
568
  echo '</div>';
569
  $content = do_shortcode(ob_get_clean());
570
+
571
  // Reapply the builder's render_content filter.
572
  add_filter('the_content', 'FLBuilder::render_content');
573
  }
574
+
575
  return $content;
576
  }
577
+
578
  /**
579
  * @method render_editor_content
580
  */
586
 
587
  // Render the modules.
588
  foreach($rows as $row) {
589
+
590
  $groups = FLBuilderModel::get_nodes('column-group', $row->node);
591
+
592
  foreach($groups as $group) {
593
+
594
  $cols = FLBuilderModel::get_nodes('column', $group->node);
595
+
596
  foreach($cols as $col) {
597
+
598
  $modules = FLBuilderModel::get_modules($col->node);
599
+
600
  foreach($modules as $module) {
601
+
602
  if($module->editor_export) {
603
+
604
+ // Don't crop photos to ensure media library photos are rendered.
605
  if($module->settings->type == 'photo') {
606
  $module->settings->crop = false;
607
  }
608
+
609
  FLBuilder::render_module_html($module->settings->type, $module->settings, $module);
610
  }
611
  }
612
  }
613
  }
614
  }
615
+
616
  // Get the content.
617
  $content = ob_get_clean();
618
+
619
  // Remove unnecessary tags.
620
  $content = preg_replace('/<\/?div[^>]*\>/i', '', $content);
621
  $content = preg_replace('/<\/?span[^>]*\>/i', '', $content);
622
  $content = preg_replace('#<script(.*?)>(.*?)</script>#is', '', $content);
623
  $content = preg_replace('/<i [^>]*><\\/i[^>]*>/', '', $content);
624
  $content = preg_replace('/ class=".*?"/', '', $content);
625
+
626
  // Remove empty lines.
627
  $content = preg_replace('/(^[\r\n]*|[\r\n]+)[\s\t]*[\r\n]+/', "\n", $content);
628
+
629
  return $content;
630
  }
631
+
632
  /**
633
  * @method render_settings
634
+ */
635
  static public function render_settings($form = array(), $settings, $return = false)
636
  {
637
  $defaults = array(
640
  'title' => '',
641
  'tabs' => array()
642
  );
643
+
644
  $form = array_merge($defaults, $form);
645
+
646
  ob_start();
647
  include FL_BUILDER_DIR . 'includes/settings.php';
648
  $html = ob_get_clean();
649
+
650
  if(defined('DOING_AJAX') && !$return) {
651
  echo $html;
652
  die();
655
  return $html;
656
  }
657
  }
658
+
659
  /**
660
  * @method render_settings_field
661
+ */
662
  static public function render_settings_field($name, $field, $settings)
663
  {
664
  $i = null;
666
  $supports_multiple = $field['type'] != 'editor' && $field['type'] != 'photo';
667
  $value = isset($settings->$name) ? $settings->$name : '';
668
  $preview = isset($field['preview']) ? json_encode($field['preview']) : json_encode(array('type' => 'refresh'));
669
+
670
  if($is_multiple && $supports_multiple) {
671
+
672
  $values = $value;
673
  $arr_name = $name;
674
  $name .= '[]';
675
+
676
  echo '<tbody class="fl-field fl-builder-field-multiples" data-type="form" data-preview=\'' . $preview . '\'>';
677
+
678
  for($i = 0; $i < count($values); $i++) {
679
  $value = $values[$i];
680
  echo '<tr class="fl-builder-field-multiple" data-field="'. $arr_name .'">';
686
  echo '</td>';
687
  echo '</tr>';
688
  }
689
+
690
  echo '<tr>';
691
+
692
  if(empty($field['label'])) {
693
  echo '<td colspan="2">';
694
  }
695
  else {
696
  echo '<td>&nbsp;</td><td>';
697
  }
698
+
699
+ echo '<a href="javascript:void(0);" onclick="return false;" class="fl-builder-field-add fl-builder-button" data-field="'. $arr_name .'">'. sprintf( _x( 'Add %s', 'Field name to add.', 'fl-builder' ), $field['label'] ) .'</a>';
700
  echo '</td>';
701
  echo '</tr>';
702
  echo '</tbody>';
707
  echo '</tr>';
708
  }
709
  }
710
+
711
  /**
712
  * @method render_settings_form
713
+ */
714
  static public function render_settings_form($type = null, $settings = null)
715
  {
716
  $post_data = FLBuilderModel::get_post_data();
717
  $type = isset($post_data['type']) ? $post_data['type'] : $type;
718
  $settings = isset($post_data['settings']) ? $post_data['settings'] : $settings;
719
  $form = FLBuilderModel::$settings_forms[$type];
720
+
721
  if(isset($settings) && !empty($settings)) {
722
  $defaults = FLBuilderModel::get_settings_form_defaults($form['tabs']);
723
  $settings = (object)array_merge((array)$defaults, (array)$settings);
725
  else {
726
  $settings = FLBuilderModel::get_settings_form_defaults($form['tabs']);
727
  }
728
+
729
  self::render_settings(array(
730
  'title' => $form['title'],
731
  'tabs' => $form['tabs']
732
  ), $settings);
733
  }
734
+
735
  /**
736
  * @method render_global_settings
737
+ */
738
  static public function render_global_settings()
739
  {
740
  $settings = FLBuilderModel::get_global_settings();
741
  $form = FLBuilderModel::$settings_forms['global'];
742
+
743
  self::render_settings(array(
744
  'class' => 'fl-builder-global-settings',
745
  'title' => $form['title'],
746
  'tabs' => $form['tabs']
747
  ), $settings);
748
  }
749
+
750
  /**
751
  * @method register_templates_post_type
752
  */
755
  if(FL_BUILDER_LITE === true) {
756
  return;
757
  }
758
+
759
  register_post_type('fl-builder-template', array(
760
  'public' => false,
761
  'labels' => array(
762
+ 'name' => _x( 'Layout Templates', 'Custom post type label.', 'fl-builder' ),
763
+ 'singular_name' => _x( 'Layout Template', 'Custom post type label.', 'fl-builder' ),
764
+ 'menu_name' => _x( 'Layout Templates', 'Custom post type label.', 'fl-builder' ),
765
+ 'name_admin_bar' => _x( 'Layout Template', 'Custom post type label.', 'fl-builder' ),
766
+ 'add_new' => _x( 'Add New', 'Custom post type label.', 'fl-builder' ),
767
+ 'add_new_item' => _x( 'Add New Layout Template', 'Custom post type label.', 'fl-builder' ),
768
+ 'new_item' => _x( 'New Layout Template', 'Custom post type label.', 'fl-builder' ),
769
+ 'edit_item' => _x( 'Edit Layout Template', 'Custom post type label.', 'fl-builder' ),
770
+ 'view_item' => _x( 'View Layout Template', 'Custom post type label.', 'fl-builder' ),
771
+ 'all_items' => _x( 'All Layout Templates', 'Custom post type label.', 'fl-builder' ),
772
+ 'search_items' => _x( 'Search Layout Templates', 'Custom post type label.', 'fl-builder' ),
773
+ 'parent_item_colon' => _x( 'Parent Layout Templates:', 'Custom post type label.', 'fl-builder' ),
774
+ 'not_found' => _x( 'No layout templates found.', 'Custom post type label.', 'fl-builder' ),
775
+ 'not_found_in_trash' => _x( 'No layout templates found in Trash.', 'Custom post type label.', 'fl-builder' )
776
  ),
777
  'supports' => array(
778
  'title'
780
  'publicly_queryable' => true
781
  ));
782
  }
783
+
784
  /**
785
  * @method render_template_selector
786
  */
787
  static public function render_template_selector()
788
  {
789
  if(file_exists(FL_BUILDER_DIR . 'includes/template-selector.php')) {
790
+
791
  $enabled_templates = FLBuilderModel::get_enabled_templates();
792
  $user_templates = FLBuilderModel::get_user_templates();
793
  $templates = FLBuilderModel::get_templates();
794
  $num_rows = FLBuilderModel::count_nodes('row');
795
+
796
  include FL_BUILDER_DIR . 'includes/template-selector.php';
797
+
798
  if(defined('DOING_AJAX')) {
799
  die();
800
  }
801
  }
802
  }
803
+
804
  /**
805
  * @method render_user_template_settings
806
  */
808
  {
809
  $defaults = FLBuilderModel::get_settings_form_defaults(FLBuilderModel::$settings_forms['user_template']['tabs']);
810
  $form = FLBuilderModel::$settings_forms['user_template'];
811
+
812
  FLBuilder::render_settings(array(
813
  'class' => 'fl-builder-user-template-settings',
814
  'title' => $form['title'],
818
 
819
  /**
820
  * @method render_template
821
+ */
822
+ static public function render_template($template)
823
  {
824
  global $post;
825
+
826
  if($post && $post->post_type == 'fl-builder-template') {
827
+
828
  $page = locate_template(array('page.php'));
829
+
830
  if(!empty($page)) {
831
  return $page;
832
  }
833
  }
834
+
835
  return $template;
836
  }
837
+
838
  /**
839
  * @method render_icon_selector
840
+ */
841
  static public function render_icon_selector()
842
  {
843
  $icon_sets = FLBuilderIcons::get_sets();
844
+
845
  include FL_BUILDER_DIR . 'includes/icon-selector.php';
846
+
847
  if(defined('DOING_AJAX')) {
848
  die();
849
  }
850
  }
851
+
852
  /**
853
  * @method render_rows
854
  */
855
  static public function render_rows()
856
  {
857
  $rows = FLBuilderModel::get_nodes('row');
858
+
859
  foreach($rows as $row) {
860
  self::render_row($row);
861
  }
862
  }
863
+
864
  /**
865
  * @method render_row
866
+ */
867
  static public function render_row($row)
868
  {
869
  $groups = FLBuilderModel::get_nodes('column-group', $row->node);
870
+
871
  include FL_BUILDER_DIR . 'includes/row.php';
872
  }
873
+
874
  /**
875
  * @method render_new_row
876
+ */
877
  static public function render_new_row($cols = '1-col', $position = false)
878
  {
879
  $post_data = FLBuilderModel::get_post_data();
880
  $cols = isset($post_data['cols']) ? $post_data['cols'] : $cols;
881
  $position = isset($post_data['position']) ? (int)$post_data['position'] : $position;
882
  $row = FLBuilderModel::add_row($cols, $position);
883
+
884
  self::render_row($row);
885
+
886
  if(defined('DOING_AJAX')) {
887
  die();
888
  }
889
  }
890
+
891
  /**
892
  * @method render_row_class
893
+ */
894
  static public function render_row_class($row)
895
  {
896
  echo 'fl-row';
897
  echo ' fl-row-' . $row->settings->width . '-width';
898
  echo ' fl-row-bg-' . $row->settings->bg_type;
899
  echo ' fl-node-' . $row->node;
900
+
901
  if(!empty($row->settings->class)) {
902
+ echo apply_filters( 'fl_builder_row_custom_class', ' ' . $row->settings->class, $row );
903
  }
904
  if(!empty($row->settings->responsive_display)) {
905
  echo ' fl-visible-' . $row->settings->responsive_display;
906
  }
907
  }
908
+
909
  /**
910
  * @method render_row_content_class
911
+ */
912
  static public function render_row_content_class($row)
913
  {
914
  echo 'fl-row-content';
915
  echo ' fl-row-' . $row->settings->content_width . '-width';
916
  echo ' fl-node-content';
917
  }
918
+
919
  /**
920
  * @method render_row_data_attrs
921
+ */
922
  static public function render_row_data_attrs($row)
923
  {
924
  echo ' data-node="' . $row->node . '"';
925
+
926
  if($row->settings->bg_type == 'parallax' && !empty($row->settings->bg_parallax_image_src)) {
927
  echo ' data-parallax-speed="' . $row->settings->bg_parallax_speed . '"';
928
  echo ' data-parallax-image="' . $row->settings->bg_parallax_image_src . '"';
929
  }
930
  }
931
+
932
  /**
933
  * @method render_row_bg
934
+ */
935
  static public function render_row_bg($row)
936
  {
937
  if($row->settings->bg_type == 'video') {
938
+
939
  $vid_data = FLBuilderModel::get_row_bg_data($row);
940
+
941
  if($vid_data) {
942
  include FL_BUILDER_DIR . 'includes/row-video.php';
943
  }
946
  echo '<div class="fl-bg-slideshow"></div>';
947
  }
948
  }
949
+
950
  /**
951
  * @method render_row_settings
952
+ */
953
  static public function render_row_settings($node_id = null)
954
  {
955
  $post_data = FLBuilderModel::get_post_data();
965
  'tabs' => $form['tabs']
966
  ), $settings);
967
  }
968
+
969
  /**
970
  * @method render_column_group
971
+ */
972
  static public function render_column_group($group)
973
  {
974
  $cols = FLBuilderModel::get_nodes('column', $group->node);
975
+
976
  include FL_BUILDER_DIR . 'includes/column-group.php';
977
  }
978
+
979
  /**
980
  * @method render_new_column_group
981
+ */
982
  static public function render_new_column_group($node_id = null, $cols = '1-col', $position = false)
983
  {
984
  $post_data = FLBuilderModel::get_post_data();
986
  $cols = isset($post_data['cols']) ? $post_data['cols'] : $cols;
987
  $position = isset($post_data['position']) ? (int)$post_data['position'] : $position;
988
  $group = FLBuilderModel::add_col_group($node_id, $cols, $position);
989
+
990
  self::render_column_group($group);
991
+
992
  if(defined('DOING_AJAX')) {
993
  die();
994
  }
995
  }
996
+
997
  /**
998
  * @method render_column_settings
999
+ */
1000
  static public function render_column_settings($node_id = null)
1001
  {
1002
  $post_data = FLBuilderModel::get_post_data();
1012
  'tabs' => $form['tabs']
1013
  ), $settings);
1014
  }
1015
+
1016
  /**
1017
  * @method render_column_class
1018
+ */
1019
  static public function render_column_class($col)
1020
  {
1021
  echo 'fl-col';
1022
+
1023
  if($col->settings->size <= 50) {
1024
  echo ' fl-col-small';
1025
  }
1026
  if(!empty($col->settings->class)) {
1027
+ echo apply_filters( 'fl_builder_column_custom_class', ' ' . $col->settings->class, $col );
1028
  }
1029
  if(!empty($col->settings->responsive_display)) {
1030
  echo ' fl-visible-' . $col->settings->responsive_display;
1031
  }
1032
+
1033
  echo ' fl-node-' . $col->node;
1034
  }
1035
 
1039
  static public function render_modules($parent_id)
1040
  {
1041
  $modules = FLBuilderModel::get_modules($parent_id);
1042
+
1043
  foreach($modules as $module) {
1044
  $settings = $module->settings;
1045
  include FL_BUILDER_DIR . 'includes/module.php';
1046
  }
1047
  }
1048
+
1049
  /**
1050
  * @method render_new_module_settings
1051
+ */
1052
  static public function render_new_module_settings($parent_id = null, $type = null, $position = false)
1053
  {
1054
  $post_data = FLBuilderModel::get_post_data();
1056
  $type = isset($post_data['type']) ? $post_data['type'] : $type;
1057
  $position = isset($post_data['position']) ? (int)$post_data['position'] : $position;
1058
  $module = FLBuilderModel::add_default_module($parent_id, $type, $position);
1059
+
1060
  // Force the global parent id.
1061
  FLBuilderModel::update_post_data('parent_id', $module->parent);
1062
+
1063
  // Get the settings html.
1064
  ob_start();
1065
  self::render_module_settings($module->node, $module->type, $module->parent, true);
1066
  $settings = ob_get_clean();
1067
+
1068
  // Build the response.
1069
  $response = array(
1070
  'layout' => self::render_preview(true),
1071
  'settings' => $settings
1072
  );
1073
+
1074
  // Echo or return the response.
1075
  if(defined('DOING_AJAX')) {
1076
  echo json_encode($response);
1080
  return $response;
1081
  }
1082
  }
1083
+
1084
  /**
1085
  * @method render_module_settings
1086
+ */
1087
  static public function render_module_settings($node_id = null, $type = null, $parent_id = null, $return = false)
1088
  {
1089
  $post_data = FLBuilderModel::get_post_data();
1090
  $node_id = isset($post_data['node_id']) ? $post_data['node_id'] : $node_id;
1091
  $type = isset($post_data['type']) ? $post_data['type'] : $type;
1092
  $parent_id = isset($post_data['parent_id']) ? $post_data['parent_id'] : $parent_id;
1093
+
1094
  if($node_id) {
1095
  $module = FLBuilderModel::get_module($node_id);
1096
  $settings = $module->settings;
1099
  $module = FLBuilderModel::$modules[$type];
1100
  $settings = FLBuilderModel::get_module_defaults($type);
1101
  }
1102
+
1103
  if(file_exists($module->dir .'css/settings.css')) {
1104
  echo '<link class="fl-builder-settings-css" rel="stylesheet" href="'. $module->url .'css/settings.css" />';
1105
  }
1106
  if(file_exists($module->dir .'js/settings.js')) {
1107
  echo '<script class="fl-builder-settings-js" src="'. $module->url .'js/settings.js"></script>';
1108
  }
1109
+
1110
  echo self::render_settings(array(
1111
  'class' => 'fl-builder-module-settings fl-builder-'. $type .'-settings',
1112
  'attrs' => 'data-node="'. $node_id .'" data-parent="'. $parent_id .'" data-type="'. $type .'"',
1113
+ 'title' => sprintf( _x( '%s Settings', '%s stands for module name.', 'fl-builder' ), $module->name ),
1114
  'tabs' => $module->form
1115
  ), $settings, $return);
1116
  }
1117
+
1118
  /**
1119
  * @method render_module_html
1120
  */
1124
  $defaults = FLBuilderModel::get_module_defaults($type);
1125
  $settings = FLBuilderUtils::array_to_object($settings);
1126
  $settings = (object)array_merge((array)$defaults, (array)$settings);
1127
+
1128
  // Module
1129
  $class = get_class(FLBuilderModel::$modules[$type]);
1130
+ $module = new $class();
1131
  $module->settings = $settings;
1132
+
1133
  // Shorthand reference to the module's id.
1134
  $id = $module->node;
1135
+
1136
  include $module->dir .'includes/frontend.php';
1137
  }
1138
+
1139
  /**
1140
  * @method render_module_class
1141
+ */
1142
  static public function render_module_class($module)
1143
  {
1144
  echo 'fl-module';
1145
  echo ' fl-module-' . $module->settings->type;
1146
  echo ' fl-node-' . $module->node;
1147
+
1148
  if(!empty($module->settings->class)) {
1149
+ echo apply_filters( 'fl_builder_module_custom_class', ' ' . $module->settings->class, $module );
1150
  }
1151
  if(!empty($module->settings->responsive_display)) {
1152
  echo ' fl-visible-' . $module->settings->responsive_display;
1155
  echo ' fl-animation fl-' . $module->settings->animation;
1156
  }
1157
  }
1158
+
1159
  /**
1160
  * @method render_module_data_attrs
1161
+ */
1162
  static public function render_module_data_attrs($module)
1163
  {
1164
  echo ' data-node="' . $module->node . '" ';
1165
  echo ' data-animation-delay="' . $module->settings->animation_delay . '" ';
1166
+
1167
  if(FLBuilderModel::is_builder_active()) {
1168
  echo ' data-parent="' . $module->parent . '" ';
1169
  echo ' data-type="' . $module->settings->type . '" ';
1170
  echo ' data-name="' . $module->name . '" ';
1171
  }
1172
  }
1173
+
1174
  /**
1175
  * @method render_module_css
1176
  */
1181
  $defaults = FLBuilderModel::get_module_defaults($type);
1182
  $settings = FLBuilderUtils::array_to_object($settings);
1183
  $settings = (object)array_merge((array)$defaults, (array)$settings);
1184
+
1185
  // Module
1186
  $class = get_class(FLBuilderModel::$modules[$type]);
1187
+ $module = new $class();
1188
  $module->settings = $settings;
1189
+
1190
  include $module->dir .'includes/frontend.css.php';
1191
  }
1192
+
1193
  /**
1194
  * @method render_css
1195
+ */
1196
  static public function render_css()
1197
  {
1198
  // Delete the old file.
1207
  $post_id = FLBuilderModel::get_post_id();
1208
  $post = get_post($post_id);
1209
  $compiled = array();
1210
+
1211
  // Global css
1212
  $css = file_get_contents(FL_BUILDER_DIR . '/css/fl-builder-layout.css');
1213
+
1214
  // Responsive css
1215
  if($global_settings->responsive_enabled) {
1216
  $css .= '@media (max-width: '. $global_settings->medium_breakpoint .'px) { ';
1220
  $css .= file_get_contents(FL_BUILDER_DIR . '/css/fl-builder-layout-responsive.css');
1221
  $css .= ' }';
1222
  }
1223
+
1224
  // Global row margins
1225
  $css .= '.fl-row-content-wrap { margin: '. $global_settings->row_margins .'px; }';
1226
+
1227
  // Global row padding
1228
  $css .= '.fl-row-content-wrap { padding: '. $global_settings->row_padding .'px; }';
1229
+
1230
  // Global row width
1231
  $css .= '.fl-row-fixed-width { max-width: '. $global_settings->row_width .'px; }';
1232
+
1233
  // Global row content width
1234
  $css .= '.fl-row-content-wrap.fl-row-fixed-width .fl-row-content { max-width: '. $global_settings->row_width .'px; }';
1235
+
1236
  // Row instances
1237
  foreach($rows as $row) {
1238
+
1239
  // Instance row css
1240
  ob_start();
1241
  include FL_BUILDER_DIR . 'includes/row-css.php';
1242
  $css .= ob_get_clean();
1243
+
1244
  // Instance row margins
1245
  $css .= self::render_row_margins($row);
1246
+
1247
  // Instance row padding
1248
  $css .= self::render_row_padding($row);
1249
+
1250
  // Instance row bg positions
1251
  $css .= self::render_row_bg_positions($row);
1252
  $css .= self::render_responsive_row_bg_positions($row);
1253
  }
1254
+
1255
  // Column instances
1256
  foreach($cols as $col) {
1257
+
1258
  // Instance column css
1259
  ob_start();
1260
  include FL_BUILDER_DIR . 'includes/column-css.php';
1261
  $css .= ob_get_clean();
1262
+
1263
  // Instance column margins
1264
  $css .= self::render_column_margins($col);
1265
+
1266
  // Instance column padding
1267
  $css .= self::render_column_padding($col);
1268
  }
1269
+
1270
  // Global module margins
1271
  $css .= '.fl-module-content { margin: '. $global_settings->module_margins .'px; }';
1272
+
1273
  // Modules
1274
  foreach($modules as $module) {
1275
+
1276
  // Global module css
1277
  $file = $module->dir . 'css/frontend.css';
1278
  $file_responsive = $module->dir . 'css/frontend.responsive.css';
1279
+
1280
  // Only include global module css that hasn't been included yet.
1281
  if(!in_array($module->settings->type, $compiled)) {
1282
+
1283
  // Add to the compiled array so we don't include it again.
1284
  $compiled[] = $module->settings->type;
1285
+
1286
  // Get the standard module css.
1287
  if(file_exists($file)) {
1288
  $css .= file_get_contents($file);
1289
  }
1290
+
1291
  // Get the responsive module css.
1292
  if($global_settings->responsive_enabled && file_exists($file_responsive)) {
1293
  $css .= '@media (max-width: '. $global_settings->responsive_breakpoint .'px) { ';
1295
  $css .= ' }';
1296
  }
1297
  }
1298
+
1299
  // Instance module css
1300
  $file = $module->dir . 'includes/frontend.css.php';
1301
  $settings = $module->settings;
1302
  $id = $module->node;
1303
+
1304
  if(file_exists($file)) {
1305
  ob_start();
1306
  include $file;
1307
  $css .= ob_get_clean();
1308
  }
1309
+
1310
  // Instance module margins
1311
  $css .= self::render_module_margins($module);
1312
  $css .= self::render_responsive_module_margins($module);
1313
  }
1314
+
1315
  // Default page heading
1316
  if($post && !$global_settings->show_default_heading && ($post->post_type == 'page' || $post->post_type == 'fl-builder-template')) {
1317
  $css .= $global_settings->default_heading_selector . ' { display:none; }';
1318
  }
1319
+
1320
  // Save the css
1321
  if(!empty($css)) {
1322
  $css = preg_replace('!/\*[^*]*\*+([^/][^*]*\*+)*/!', '', $css);
1324
  file_put_contents($asset_info['css'], $css);
1325
  }
1326
  }
1327
+
1328
  /**
1329
  * @method render_row_margins
1330
+ */
1331
  static public function render_row_margins($row)
1332
  {
1333
  $settings = $row->settings;
1334
  $margins = '';
1335
  $css = '';
1336
+
1337
  if($settings->margin_top != '') {
1338
  $margins .= 'margin-top:' . $settings->margin_top . 'px;';
1339
  }
1349
  if($margins != '') {
1350
  $css .= '.fl-node-' . $row->node . ' .fl-row-content-wrap {' . $margins . '}';
1351
  }
1352
+
1353
  return $css;
1354
  }
1355
+
1356
  /**
1357
  * @method render_row_padding
1358
+ */
1359
  static public function render_row_padding($row)
1360
  {
1361
  $settings = $row->settings;
1362
  $padding = '';
1363
  $css = '';
1364
+
1365
  if($settings->padding_top != '') {
1366
  $padding .= 'padding-top:' . $settings->padding_top . 'px;';
1367
  }
1377
  if($padding != '') {
1378
  $css = '.fl-node-' . $row->node . ' .fl-row-content-wrap {' . $padding . '}';
1379
  }
1380
+
1381
  return $css;
1382
  }
1383
+
1384
  /**
1385
  * @method render_row_bg_positions
1386
+ */
1387
  static public function render_row_bg_positions($row)
1388
  {
1389
  $settings = $row->settings;
1390
  $positions = '';
1391
  $css = '';
1392
+
1393
  if($settings->margin_top != '' || $settings->border_top != '') {
1394
  $positions .= 'top:' . ($settings->margin_top + $settings->border_top) . 'px;';
1395
  }
1406
  $css .= '.fl-node-' . $row->node . ' .fl-bg-video {' . $positions . '}';
1407
  $css .= '.fl-node-' . $row->node . ' .fl-bg-slideshow {' . $positions . '}';
1408
  }
1409
+
1410
  return $css;
1411
  }
1412
+
1413
  /**
1414
  * @method render_responsive_row_bg_positions
1415
+ */
1416
  static public function render_responsive_row_bg_positions($row)
1417
  {
1418
  $global_settings = FLBuilderModel::get_global_settings();
1419
  $settings = $row->settings;
1420
  $positions = '';
1421
  $css = '';
1422
+
1423
  if($settings->border_top != '') {
1424
  $positions .= 'top:' . $settings->border_top . 'px;';
1425
  }
1432
  $css .= '.fl-node-' . $row->node . ' .fl-bg-slideshow {' . $positions . '}';
1433
  $css .= ' }';
1434
  }
1435
+
1436
  return $css;
1437
  }
1438
+
1439
  /**
1440
  * @method render_column_margins
1441
+ */
1442
  static public function render_column_margins($col)
1443
  {
1444
  $settings = $col->settings;
1445
  $margins = '';
1446
  $css = '';
1447
+
1448
  if($settings->margin_top != '') {
1449
  $margins .= 'margin-top:' . $settings->margin_top . 'px;';
1450
  }
1460
  if($margins != '') {
1461
  $css .= '.fl-node-' . $col->node . ' .fl-col-content {' . $margins . '}';
1462
  }
1463
+
1464
  return $css;
1465
  }
1466
+
1467
  /**
1468
  * @method render_column_padding
1469
+ */
1470
  static public function render_column_padding($col)
1471
  {
1472
  $settings = $col->settings;
1473
  $padding = '';
1474
  $css = '';
1475
+
1476
  if($settings->padding_top != '') {
1477
  $padding .= 'padding-top:' . $settings->padding_top . 'px;';
1478
  }
1488
  if($padding != '') {
1489
  $css = '.fl-node-' . $col->node . ' .fl-col-content {' . $padding . '}';
1490
  }
1491
+
1492
  return $css;
1493
  }
1494
+
1495
  /**
1496
  * @method render_module_margins
1497
+ */
1498
  static public function render_module_margins($module)
1499
  {
1500
  $settings = $module->settings;
1501
  $margins = '';
1502
  $css = '';
1503
+
1504
  if($settings->margin_top != '') {
1505
  $margins .= 'margin-top:' . $settings->margin_top . 'px;';
1506
  }
1516
  if($margins != '') {
1517
  $css = '.fl-node-' . $module->node . ' .fl-module-content {' . $margins . '}';
1518
  }
1519
+
1520
  return $css;
1521
  }
1522
+
1523
  /**
1524
  * @method render_responsive_module_margins
1525
+ */
1526
  static public function render_responsive_module_margins($module)
1527
  {
1528
  $global_settings = FLBuilderModel::get_global_settings();
1530
  $settings = $module->settings;
1531
  $margins = '';
1532
  $css = '';
1533
+
1534
  if($settings->margin_top != '' && ($settings->margin_top > $default || $settings->margin_top < 0)) {
1535
  $margins .= 'margin-top:' . $default . 'px;';
1536
  }
1548
  $css .= '.fl-node-' . $module->node . ' .fl-module-content {' . $margins . '}';
1549
  $css .= ' }';
1550
  }
1551
+
1552
  return $css;
1553
  }
1554
+
1555
  /**
1556
  * @method render_js
1557
+ */
1558
  static public function render_js()
1559
  {
1560
  // Delete the old file.
1567
  $asset_info = FLBuilderModel::get_asset_info();
1568
  $compiled = array();
1569
  $js = '';
1570
+
1571
  // Main JS
1572
  $js .= file_get_contents(FL_BUILDER_DIR . 'js/fl-builder-layout.js');
1573
+
1574
  // Instance Row JS
1575
  foreach($rows as $row) {
1576
+
1577
  $settings = $row->settings;
1578
  $id = $row->node;
1579
+
1580
  ob_start();
1581
  include FL_BUILDER_DIR . 'includes/row-js.php';
1582
  $js .= ob_get_clean();
1583
  }
1584
+
1585
  // Modules
1586
  foreach($modules as $module) {
1587
+
1588
  // Global module JS
1589
  $file = $module->dir . 'js/frontend.js';
1590
+
1591
  if(file_exists($file) && !in_array($module->settings->type, $compiled)) {
1592
  $js .= "\n" . file_get_contents($file);
1593
  $compiled[] = $module->settings->type;
1594
  }
1595
+
1596
  // Instance module JS
1597
  $file = $module->dir . 'includes/frontend.js.php';
1598
  $settings = $module->settings;
1599
  $id = $module->node;
1600
+
1601
  if(file_exists($file)) {
1602
  ob_start();
1603
  include $file;
1604
  $js .= ob_get_clean();
1605
  }
1606
  }
1607
+
1608
  // Add the AJAX url global.
1609
  $js .= "var wpAjaxUrl = '" . admin_url('admin-ajax.php') . "';";
1610
+
1611
  // Add the builder url global.
1612
  $js .= "var flBuilderUrl = '" . FL_BUILDER_URL . "';";
1613
+
1614
  // Call the FLBuilder._renderLayoutComplete method if we're currently editing.
1615
  if(stristr($asset_info['js'], '-draft.js') || stristr($asset_info['js'], '-preview.js')) {
1616
  $js .= "; if(typeof FLBuilder !== 'undefined' && typeof FLBuilder._renderLayoutComplete !== 'undefined') FLBuilder._renderLayoutComplete();";
1617
  }
1618
+
1619
  // Include FLJSMin
1620
  if(!class_exists('FLJSMin')) {
1621
+ include FL_BUILDER_DIR . 'classes/class-fl-jsmin.php';
1622
  }
1623
+
1624
  // Save the js
1625
  if(!empty($js)) {
1626
  file_put_contents($asset_info['js'], FLJSMin::minify($js));
1627
  }
1628
  }
1629
+
1630
  /**
1631
  * @method log
1632
+ */
1633
  static public function log($data)
1634
+ {
1635
  ob_start();
1636
  print_r($data);
1637
  error_log(ob_get_clean());
classes/{FLJSMin.php → class-fl-jsmin.php} RENAMED
File without changes
css/fl-builder-layout.css CHANGED
@@ -215,6 +215,9 @@
215
  .fl-icon i {
216
  float: left;
217
  }
 
 
 
218
  .fl-icon-text {
219
  display: table-cell;
220
  text-align: left;
215
  .fl-icon i {
216
  float: left;
217
  }
218
+ .fl-icon i:before {
219
+ border: none !important;
220
+ }
221
  .fl-icon-text {
222
  display: table-cell;
223
  text-align: left;
css/fl-builder.css CHANGED
@@ -172,6 +172,23 @@ html.fl-builder-edit {
172
  display: none;
173
  }
174
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
175
  /* Builder Panel
176
  ------------------------------------------------------ */
177
 
@@ -288,11 +305,6 @@ html.fl-builder-edit {
288
  cursor: move;
289
  }
290
 
291
- /* Upgrade block */
292
- .fl-builder-block-upgrade {
293
- font-weight: bold !important;
294
- }
295
-
296
  /* Drag and Drop
297
  ------------------------------------------------------ */
298
 
172
  display: none;
173
  }
174
 
175
+ /* Upgrade button */
176
+ .fl-builder-upgrade-button {
177
+ background: #f7951e;
178
+ border-color: #de7c04;
179
+ -webkit-box-shadow: inset 0 1px 0 rgba(255,177,82,.5),0 1px 0 rgba(0,0,0,.15);
180
+ box-shadow: inset 0 1px 0 rgba(255,177,82,.5),0 1px 0 rgba(0,0,0,.15);
181
+ color: #fff !important;
182
+ text-decoration: none;
183
+ }
184
+ .fl-builder-upgrade-button:hover {
185
+ background: #de861b;
186
+ border-color: #c46e04;
187
+ -webkit-box-shadow: inset 0 1px 0 rgba(255,177,82,.5),0 1px 0 rgba(0,0,0,.15);
188
+ box-shadow: inset 0 1px 0 rgba(255,177,82,.5),0 1px 0 rgba(0,0,0,.15);
189
+ color: #fff !important;
190
+ }
191
+
192
  /* Builder Panel
193
  ------------------------------------------------------ */
194
 
305
  cursor: move;
306
  }
307
 
 
 
 
 
 
308
  /* Drag and Drop
309
  ------------------------------------------------------ */
310
 
css/fl-icon-selector.css CHANGED
@@ -2,10 +2,21 @@
2
  height: 100%;
3
  }
4
  .fl-icons-filter {
5
- position: absolute;
 
 
6
  right: 10px;
7
  top: 10px;
8
  }
 
 
 
 
 
 
 
 
 
9
  .fl-icons-list {
10
  bottom: 52px;
11
  left: 0;
2
  height: 100%;
3
  }
4
  .fl-icons-filter {
5
+ height: auto !important;
6
+ margin: 0 !important;
7
+ position: absolute !important;
8
  right: 10px;
9
  top: 10px;
10
  }
11
+ .fl-icons-filter select {
12
+ vertical-align: middle;
13
+ width: 160px;
14
+ }
15
+ .fl-icons-filter input {
16
+ line-height: 18px;
17
+ vertical-align: middle;
18
+ width: 160px;
19
+ }
20
  .fl-icons-list {
21
  bottom: 52px;
22
  left: 0;
fl-builder.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Beaver Builder Plugin (Lite Version)
4
  * Plugin URI: http://www.wpbeaverbuilder.com
5
  * Description: A drag and drop frontend WordPress page builder plugin that works with almost any theme!
6
- * Version: 1.4.3
7
  * Author: The Beaver Builder Team
8
  * Author URI: http://www.wpbeaverbuilder.com
9
  * Copyright: (c) 2014 Beaver Builder
@@ -11,29 +11,29 @@
11
  * License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
  * Text Domain: fl-builder
13
  */
14
- define('FL_BUILDER_VERSION', '1.4.3');
15
  define('FL_BUILDER_DIR', plugin_dir_path(__FILE__));
16
  define('FL_BUILDER_URL', plugins_url('/', __FILE__));
17
  define('FL_BUILDER_LITE', true);
18
- define('FL_BUILDER_SUPPORT_URL', 'http://www.wpbeaverbuilder.com/support');
19
- define('FL_BUILDER_UPGRADE_URL', 'http://www.wpbeaverbuilder.com/pricing/?upgrade');
20
  define('FL_BUILDER_DEMO_URL', 'http://demos.wpbeaverbuilder.com');
21
  define('FL_BUILDER_OLD_DEMO_URL', 'http://demos.fastlinemedia.com');
22
  define('FL_BUILDER_DEMO_CACHE_URL', 'http://demos.wpbeaverbuilder.com/wp-content/uploads/fl-builder/');
23
 
24
  /* Classes */
25
- require_once 'classes/FLBuilder.php';
26
- require_once 'classes/FLBuilderAdmin.php';
27
- require_once 'classes/FLBuilderAdminPosts.php';
28
- require_once 'classes/FLBuilderAutoSuggest.php';
29
- require_once 'classes/FLBuilderColor.php';
30
- require_once 'classes/FLBuilderIcons.php';
31
- require_once 'classes/FLBuilderLoop.php';
32
- require_once 'classes/FLBuilderModel.php';
33
- require_once 'classes/FLBuilderModule.php';
34
- require_once 'classes/FLBuilderPhoto.php';
35
- require_once 'classes/FLBuilderUpdate.php';
36
- require_once 'classes/FLBuilderUtils.php';
37
 
38
  /* Includes */
39
  require_once 'includes/compatibility.php';
3
  * Plugin Name: Beaver Builder Plugin (Lite Version)
4
  * Plugin URI: http://www.wpbeaverbuilder.com
5
  * Description: A drag and drop frontend WordPress page builder plugin that works with almost any theme!
6
+ * Version: 1.4.5
7
  * Author: The Beaver Builder Team
8
  * Author URI: http://www.wpbeaverbuilder.com
9
  * Copyright: (c) 2014 Beaver Builder
11
  * License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
  * Text Domain: fl-builder
13
  */
14
+ define('FL_BUILDER_VERSION', '1.4.5');
15
  define('FL_BUILDER_DIR', plugin_dir_path(__FILE__));
16
  define('FL_BUILDER_URL', plugins_url('/', __FILE__));
17
  define('FL_BUILDER_LITE', true);
18
+ define('FL_BUILDER_SUPPORT_URL', 'https://www.wpbeaverbuilder.com/support');
19
+ define('FL_BUILDER_UPGRADE_URL', 'https://www.wpbeaverbuilder.com/pricing/?upgrade');
20
  define('FL_BUILDER_DEMO_URL', 'http://demos.wpbeaverbuilder.com');
21
  define('FL_BUILDER_OLD_DEMO_URL', 'http://demos.fastlinemedia.com');
22
  define('FL_BUILDER_DEMO_CACHE_URL', 'http://demos.wpbeaverbuilder.com/wp-content/uploads/fl-builder/');
23
 
24
  /* Classes */
25
+ require_once 'classes/class-fl-builder.php';
26
+ require_once 'classes/class-fl-builder-admin.php';
27
+ require_once 'classes/class-fl-builder-admin-posts.php';
28
+ require_once 'classes/class-fl-builder-auto-suggest.php';
29
+ require_once 'classes/class-fl-builder-color.php';
30
+ require_once 'classes/class-fl-builder-icons.php';
31
+ require_once 'classes/class-fl-builder-loop.php';
32
+ require_once 'classes/class-fl-builder-model.php';
33
+ require_once 'classes/class-fl-builder-module.php';
34
+ require_once 'classes/class-fl-builder-photo.php';
35
+ require_once 'classes/class-fl-builder-update.php';
36
+ require_once 'classes/class-fl-builder-utils.php';
37
 
38
  /* Includes */
39
  require_once 'includes/compatibility.php';
includes/admin-posts.php CHANGED
@@ -4,8 +4,8 @@
4
  <a href="javascript:void(0);" onclick="return false;" class="fl-enable-builder<?php if($enabled) echo ' fl-active'; ?>"><?php echo FLBuilderModel::get_branding(); ?></a>
5
  </div>
6
  <div class="fl-builder-admin-ui">
7
- <h3><?php echo FLBuilderModel::get_branding() . ' ' . __('is currently active for this page.', 'fl-builder'); ?></h3>
8
- <a href="<?php echo FLBuilderModel::get_edit_url(); ?>" class="fl-launch-builder button button-primary button-large"><?php echo __('Launch', 'fl-builder'). ' ' . FLBuilderModel::get_branding(); ?></a>
9
  </div>
10
  <div class="fl-builder-loading"></div>
11
  </div>
4
  <a href="javascript:void(0);" onclick="return false;" class="fl-enable-builder<?php if($enabled) echo ' fl-active'; ?>"><?php echo FLBuilderModel::get_branding(); ?></a>
5
  </div>
6
  <div class="fl-builder-admin-ui">
7
+ <h3><?php printf( _x( '%s is currently active for this page.', '%s stands for custom branded "Page Builder" name.', 'fl-builder' ), FLBuilderModel::get_branding() ); ?></h3>
8
+ <a href="<?php echo FLBuilderModel::get_edit_url(); ?>" class="fl-launch-builder button button-primary button-large"><?php printf( _x( 'Launch %s', '%s stands for custom branded "Page Builder" name.', 'fl-builder' ), FLBuilderModel::get_branding() ); ?></a>
9
  </div>
10
  <div class="fl-builder-loading"></div>
11
  </div>
includes/admin-settings.php CHANGED
@@ -1,47 +1,47 @@
1
  <div class="wrap<?php if(!class_exists('FLBuilderMultisiteSettings')) echo ' fl-settings-single-install'; ?>">
2
-
3
  <h2 class="fl-settings-heading">
4
  <?php if(FLBuilderModel::get_branding_icon() != '') : ?>
5
  <img src="<?php echo FLBuilderModel::get_branding_icon(); ?>" />
6
  <?php endif; ?>
7
- <span><?php echo FLBuilderModel::get_branding() . ' ' . __('Settings', 'fl-builder'); ?></span>
8
  </h2>
9
-
10
  <?php if(!empty($_POST) && !isset($_POST['email'])) : ?>
11
  <div class="updated">
12
  <p><?php _e('Settings updated!', 'fl-builder'); ?></p>
13
  </div>
14
  <?php endif; ?>
15
-
16
  <div class="fl-settings-nav">
17
  <ul>
18
  <?php if(!class_exists('FLBuilderMultisiteSettings') && FL_BUILDER_LITE !== true) : ?>
19
  <li><a href="#license"><?php _e('License', 'fl-builder'); ?></a></li>
20
  <?php endif; ?>
21
-
22
  <?php if(FL_BUILDER_LITE === true) : ?>
23
  <li><a href="#upgrade"><?php _e('Upgrade', 'fl-builder'); ?></a></li>
24
  <?php endif; ?>
25
-
26
  <li><a href="#modules"><?php _e('Modules', 'fl-builder'); ?></a></li>
27
-
28
  <?php if(FL_BUILDER_LITE !== true) : ?>
29
  <li><a href="#templates"><?php _e('Templates', 'fl-builder'); ?></a></li>
30
  <?php endif; ?>
31
-
32
  <li><a href="#post-types"><?php _e('Post Types', 'fl-builder'); ?></a></li>
33
  <li><a href="#editing"><?php _e('Editing', 'fl-builder'); ?></a></li>
34
-
35
  <?php if(!class_exists('FLBuilderMultisiteSettings') && file_exists(FL_BUILDER_DIR . 'includes/admin-branding.php')) : ?>
36
  <li><a href="#branding"><?php _e('Branding', 'fl-builder'); ?></a></li>
37
  <?php endif; ?>
38
-
39
  <?php if(!class_exists('FLBuilderMultisiteSettings')) : ?>
40
  <li><a href="#uninstall"><?php _e('Uninstall', 'fl-builder'); ?></a></li>
41
  <?php endif; ?>
42
  </ul>
43
  </div>
44
-
45
  <div class="fl-settings-content">
46
 
47
  <?php if(!class_exists('FLBuilderMultisiteSettings') && FL_BUILDER_LITE !== true) : ?>
@@ -55,24 +55,24 @@
55
  <?php if(FL_BUILDER_LITE === true) : ?>
56
  <!-- UPGRADE -->
57
  <div id="fl-upgrade-form" class="fl-settings-form">
58
-
59
  <h3 class="fl-settings-form-header"><?php _e('Upgrade', 'fl-builder'); ?></h3>
60
-
61
  <p><?php _e('You are currently running the lite version of the Beaver Builder plugin. Upgrade today for access to premium features such as advanced modules, templates, support and more!', 'fl-builder'); ?></p>
62
-
63
  <input type="button" class="button button-primary" value="<?php _e('Upgrade Now', 'fl-builder'); ?>" onclick="window.location.href='<?php echo FL_BUILDER_UPGRADE_URL; ?>';" style="margin-right: 10px;">
64
-
65
  <input type="button" class="button button-primary" value="<?php _e('Learn More', 'fl-builder'); ?>" onclick="window.location.href='http://www.wpbeaverbuilder.com/';">
66
-
67
  </div>
68
  <!-- UPGRADE -->
69
  <?php endif; ?>
70
-
71
  <!-- MODULES -->
72
  <div id="fl-modules-form" class="fl-settings-form">
73
-
74
  <h3 class="fl-settings-form-header"><?php _e('Enabled Modules', 'fl-builder'); ?></h3>
75
-
76
  <form id="modules-form" action="<?php echo admin_url('/options-general.php?page=fl-builder-settings#modules'); ?>" method="post">
77
 
78
  <?php if(class_exists('FLBuilderMultisiteSettings')) : ?>
@@ -81,26 +81,26 @@
81
  <?php _e('Override network settings?', 'fl-builder'); ?>
82
  </label>
83
  <?php endif; ?>
84
-
85
  <div class="fl-settings-form-content">
86
-
87
  <p><?php _e('Check or uncheck modules below to enable or disable them.', 'fl-builder'); ?></p>
88
- <?php
89
-
90
  $enabled_modules = FLBuilderModel::get_enabled_modules();
91
  $checked = in_array('all', $enabled_modules) ? 'checked' : '';
92
-
93
  ?>
94
  <label>
95
  <input class="fl-module-all-cb" type="checkbox" name="fl-modules[]" value="all" <?php echo $checked; ?> />
96
- <?php _e('All', 'fl-builder'); ?>
97
  </label>
98
- <?php
99
-
100
- foreach(FLBuilderModel::$modules as $module) :
101
-
102
  $checked = in_array($module->slug, $enabled_modules) ? 'checked' : '';
103
-
104
  ?>
105
  <p>
106
  <label>
@@ -111,7 +111,7 @@
111
  <?php endforeach; ?>
112
  </div>
113
  <p class="submit">
114
- <input type="submit" name="update" class="button-primary" value="Save Module Settings" />
115
  <?php wp_nonce_field('modules', 'fl-modules-nonce'); ?>
116
  </p>
117
  </form>
@@ -121,77 +121,77 @@
121
  <?php if(FL_BUILDER_LITE !== true) : ?>
122
  <!-- TEMPLATES -->
123
  <div id="fl-templates-form" class="fl-settings-form">
124
-
125
  <h3 class="fl-settings-form-header"><?php _e('Template Settings', 'fl-builder'); ?></h3>
126
-
127
  <form id="templates-form" action="<?php echo admin_url('/options-general.php?page=fl-builder-settings#templates'); ?>" method="post">
128
-
129
  <?php if(class_exists('FLBuilderMultisiteSettings')) : ?>
130
  <label>
131
  <input class="fl-override-ms-cb" type="checkbox" name="fl-override-ms" value="1" <?php if(get_option('_fl_builder_enabled_templates')) echo 'checked="checked"'; ?> />
132
  <?php _e('Override network settings?', 'fl-builder'); ?>
133
  </label>
134
  <?php endif; ?>
135
-
136
  <div class="fl-settings-form-content">
137
-
138
  <p><?php _e('Enable or disable templates using the options below.', 'fl-builder'); ?></p>
139
  <?php
140
-
141
  $enabled_templates = FLBuilderModel::get_enabled_templates();
142
-
143
  ?>
144
- <select name="fl-template-settings">
145
- <option value="enabled" <?php selected($enabled_templates, 'enabled'); ?>><?php _e('Enable All Templates'); ?></option>
146
- <option value="core" <?php selected($enabled_templates, 'core'); ?>><?php _e('Enable Core Templates Only'); ?></option>
147
- <option value="user" <?php selected($enabled_templates, 'user'); ?>><?php _e('Enable User Templates Only'); ?></option>
148
- <option value="disabled" <?php selected($enabled_templates, 'disabled'); ?>><?php _e('Disable All Templates'); ?></option>
149
- </select>
150
- </div>
151
  <p class="submit">
152
- <input type="submit" name="update" class="button-primary" value="Save Template Settings" />
153
  <?php wp_nonce_field('templates', 'fl-templates-nonce'); ?>
154
  </p>
155
  </form>
156
  </div>
157
  <!-- TEMPLATES -->
158
  <?php endif; ?>
159
-
160
  <!-- POST TYPES -->
161
  <div id="fl-post-types-form" class="fl-settings-form">
162
-
163
  <h3 class="fl-settings-form-header"><?php _e('Post Types', 'fl-builder'); ?></h3>
164
-
165
  <form id="post-types-form" action="<?php echo admin_url('/options-general.php?page=fl-builder-settings#post-types'); ?>" method="post">
166
-
167
  <?php if(class_exists('FLBuilderMultisiteSettings')) : ?>
168
  <label>
169
  <input class="fl-override-ms-cb" type="checkbox" name="fl-override-ms" value="1" <?php if(get_option('_fl_builder_post_types')) echo 'checked="checked"'; ?> />
170
  <?php _e('Override network settings?', 'fl-builder'); ?>
171
  </label>
172
  <?php endif; ?>
173
-
174
  <div class="fl-settings-form-content">
175
-
176
  <p><?php _e('Select the post types you would like the builder to work with.', 'fl-builder'); ?></p>
177
  <p><?php _e('NOTE: Not all custom post types may be supported.', 'fl-builder'); ?></p>
178
-
179
  <?php
180
-
181
  $saved_post_types = FLBuilderModel::get_post_types();
182
  $post_types = get_post_types(array('public' => true), 'objects');
183
-
184
  foreach($post_types as $post_type) :
185
-
186
  $checked = in_array($post_type->name, $saved_post_types) ? 'checked' : '';
187
-
188
  if($post_type->name == 'attachment') {
189
  continue;
190
  }
191
  if($post_type->name == 'fl-builder-template') {
192
  continue;
193
  }
194
-
195
  ?>
196
  <p>
197
  <label>
@@ -202,61 +202,61 @@
202
  <?php endforeach; ?>
203
  </div>
204
  <p class="submit">
205
- <input type="submit" name="update" class="button-primary" value="Save Post Types" />
206
  <?php wp_nonce_field('post-types', 'fl-post-types-nonce'); ?>
207
  </p>
208
  </form>
209
  </div>
210
  <!-- POST TYPES -->
211
-
212
  <!-- EDITING -->
213
  <div id="fl-editing-form" class="fl-settings-form">
214
-
215
  <h3 class="fl-settings-form-header"><?php _e('Editing Settings', 'fl-builder'); ?></h3>
216
-
217
  <form id="editing-form" action="<?php echo admin_url('/options-general.php?page=fl-builder-settings#editing'); ?>" method="post">
218
-
219
  <?php if(class_exists('FLBuilderMultisiteSettings')) : ?>
220
  <label>
221
  <input class="fl-override-ms-cb" type="checkbox" name="fl-override-ms" value="1" <?php if(get_option('_fl_builder_editing_capability')) echo 'checked="checked"'; ?> />
222
  <?php _e('Override network settings?', 'fl-builder'); ?>
223
  </label>
224
  <?php endif; ?>
225
-
226
  <div class="fl-settings-form-content">
227
-
228
- <p><?php echo sprintf(__('Set the <a href="%s" target="_blank">capability</a> required for users to access advanced builder editing such as adding, deleting or moving modules.', 'fl-builder'), 'http://codex.wordpress.org/Roles_and_Capabilities#Capability_vs._Role_Table'); ?></p>
229
-
230
  <input type="text" name="fl-editing-capability" value="<?php echo esc_html(FLBuilderModel::get_editing_capability()); ?>" class="regular-text" />
231
-
232
  </div>
233
  <p class="submit">
234
- <input type="submit" name="update" class="button-primary" value="Save Editing Settings" />
235
  <?php wp_nonce_field('editing', 'fl-editing-nonce'); ?>
236
  </p>
237
  </form>
238
  </div>
239
  <!-- EDITING -->
240
-
241
  <?php if(file_exists(FL_BUILDER_DIR . 'includes/admin-branding.php')) : ?>
242
  <!-- BRANDING -->
243
  <?php include FL_BUILDER_DIR . 'includes/admin-branding.php'; ?>
244
  <!-- BRANDING -->
245
  <?php endif; ?>
246
-
247
  <!-- UNINSTALL -->
248
  <div id="fl-uninstall-form" class="fl-settings-form">
249
-
250
  <h3 class="fl-settings-form-header"><?php _e('Uninstall', 'fl-builder'); ?></h3>
251
 
252
  <p><?php _e('Clicking the button below will uninstall the page builder plugin and delete all of the data associated with it. You can uninstall or deactivate the page builder from the plugins page instead if you do not wish to delete the data.', 'fl-builder'); ?></p>
253
-
254
- <p><strong><?php _e('NOTE:'); ?></strong> <?php _e('The builder does not delete the post meta _fl_builder_data, _fl_builder_draft and _fl_builder_enabled in case you want to reinstall it later. If you do, the builder will rebuild all of its data using those meta values.', 'fl-builder'); ?></p>
255
-
256
  <?php if(is_multisite()) : ?>
257
- <p><strong style="color:#ff0000;"><?php _e('NOTE:'); ?></strong> <?php _e('This applies to all sites on the network.', 'fl-builder'); ?></p>
258
  <?php endif; ?>
259
-
260
  <form id="uninstall-form" action="<?php echo admin_url('/options-general.php?page=fl-builder-settings'); ?>" method="post">
261
  <p>
262
  <input type="submit" name="uninstall-submit" class="button button-primary" value="<?php _e('Uninstall', 'fl-builder'); ?>">
@@ -265,13 +265,13 @@
265
  </form>
266
  </div>
267
  <!-- UNINSTALL -->
268
-
269
  </div>
270
- </div>
271
  <script type="text/javascript">
272
 
273
  jQuery(function(){
274
-
275
  FLBuilderAdminSettings.strings = {
276
  uninstall: '<?php _e('Please type "uninstall" in the box below to confirm that you really want to uninstall the page builder and all of its data.', 'fl-builder'); ?>'
277
  };
1
  <div class="wrap<?php if(!class_exists('FLBuilderMultisiteSettings')) echo ' fl-settings-single-install'; ?>">
2
+
3
  <h2 class="fl-settings-heading">
4
  <?php if(FLBuilderModel::get_branding_icon() != '') : ?>
5
  <img src="<?php echo FLBuilderModel::get_branding_icon(); ?>" />
6
  <?php endif; ?>
7
+ <span><?php printf( _x( '%s Settings', '%s stands for custom branded "Page Builder" name.', 'fl-builder' ), FLBuilderModel::get_branding() ); ?></span>
8
  </h2>
9
+
10
  <?php if(!empty($_POST) && !isset($_POST['email'])) : ?>
11
  <div class="updated">
12
  <p><?php _e('Settings updated!', 'fl-builder'); ?></p>
13
  </div>
14
  <?php endif; ?>
15
+
16
  <div class="fl-settings-nav">
17
  <ul>
18
  <?php if(!class_exists('FLBuilderMultisiteSettings') && FL_BUILDER_LITE !== true) : ?>
19
  <li><a href="#license"><?php _e('License', 'fl-builder'); ?></a></li>
20
  <?php endif; ?>
21
+
22
  <?php if(FL_BUILDER_LITE === true) : ?>
23
  <li><a href="#upgrade"><?php _e('Upgrade', 'fl-builder'); ?></a></li>
24
  <?php endif; ?>
25
+
26
  <li><a href="#modules"><?php _e('Modules', 'fl-builder'); ?></a></li>
27
+
28
  <?php if(FL_BUILDER_LITE !== true) : ?>
29
  <li><a href="#templates"><?php _e('Templates', 'fl-builder'); ?></a></li>
30
  <?php endif; ?>
31
+
32
  <li><a href="#post-types"><?php _e('Post Types', 'fl-builder'); ?></a></li>
33
  <li><a href="#editing"><?php _e('Editing', 'fl-builder'); ?></a></li>
34
+
35
  <?php if(!class_exists('FLBuilderMultisiteSettings') && file_exists(FL_BUILDER_DIR . 'includes/admin-branding.php')) : ?>
36
  <li><a href="#branding"><?php _e('Branding', 'fl-builder'); ?></a></li>
37
  <?php endif; ?>
38
+
39
  <?php if(!class_exists('FLBuilderMultisiteSettings')) : ?>
40
  <li><a href="#uninstall"><?php _e('Uninstall', 'fl-builder'); ?></a></li>
41
  <?php endif; ?>
42
  </ul>
43
  </div>
44
+
45
  <div class="fl-settings-content">
46
 
47
  <?php if(!class_exists('FLBuilderMultisiteSettings') && FL_BUILDER_LITE !== true) : ?>
55
  <?php if(FL_BUILDER_LITE === true) : ?>
56
  <!-- UPGRADE -->
57
  <div id="fl-upgrade-form" class="fl-settings-form">
58
+
59
  <h3 class="fl-settings-form-header"><?php _e('Upgrade', 'fl-builder'); ?></h3>
60
+
61
  <p><?php _e('You are currently running the lite version of the Beaver Builder plugin. Upgrade today for access to premium features such as advanced modules, templates, support and more!', 'fl-builder'); ?></p>
62
+
63
  <input type="button" class="button button-primary" value="<?php _e('Upgrade Now', 'fl-builder'); ?>" onclick="window.location.href='<?php echo FL_BUILDER_UPGRADE_URL; ?>';" style="margin-right: 10px;">
64
+
65
  <input type="button" class="button button-primary" value="<?php _e('Learn More', 'fl-builder'); ?>" onclick="window.location.href='http://www.wpbeaverbuilder.com/';">
66
+
67
  </div>
68
  <!-- UPGRADE -->
69
  <?php endif; ?>
70
+
71
  <!-- MODULES -->
72
  <div id="fl-modules-form" class="fl-settings-form">
73
+
74
  <h3 class="fl-settings-form-header"><?php _e('Enabled Modules', 'fl-builder'); ?></h3>
75
+
76
  <form id="modules-form" action="<?php echo admin_url('/options-general.php?page=fl-builder-settings#modules'); ?>" method="post">
77
 
78
  <?php if(class_exists('FLBuilderMultisiteSettings')) : ?>
81
  <?php _e('Override network settings?', 'fl-builder'); ?>
82
  </label>
83
  <?php endif; ?>
84
+
85
  <div class="fl-settings-form-content">
86
+
87
  <p><?php _e('Check or uncheck modules below to enable or disable them.', 'fl-builder'); ?></p>
88
+ <?php
89
+
90
  $enabled_modules = FLBuilderModel::get_enabled_modules();
91
  $checked = in_array('all', $enabled_modules) ? 'checked' : '';
92
+
93
  ?>
94
  <label>
95
  <input class="fl-module-all-cb" type="checkbox" name="fl-modules[]" value="all" <?php echo $checked; ?> />
96
+ <?php _ex( 'All', 'Plugin setup page: Modules.', 'fl-builder' ); ?>
97
  </label>
98
+ <?php
99
+
100
+ foreach(FLBuilderModel::$modules as $module) :
101
+
102
  $checked = in_array($module->slug, $enabled_modules) ? 'checked' : '';
103
+
104
  ?>
105
  <p>
106
  <label>
111
  <?php endforeach; ?>
112
  </div>
113
  <p class="submit">
114
+ <input type="submit" name="update" class="button-primary" value="<?php esc_attr_e( 'Save Module Settings', 'fl-builder' ); ?>" />
115
  <?php wp_nonce_field('modules', 'fl-modules-nonce'); ?>
116
  </p>
117
  </form>
121
  <?php if(FL_BUILDER_LITE !== true) : ?>
122
  <!-- TEMPLATES -->
123
  <div id="fl-templates-form" class="fl-settings-form">
124
+
125
  <h3 class="fl-settings-form-header"><?php _e('Template Settings', 'fl-builder'); ?></h3>
126
+
127
  <form id="templates-form" action="<?php echo admin_url('/options-general.php?page=fl-builder-settings#templates'); ?>" method="post">
128
+
129
  <?php if(class_exists('FLBuilderMultisiteSettings')) : ?>
130
  <label>
131
  <input class="fl-override-ms-cb" type="checkbox" name="fl-override-ms" value="1" <?php if(get_option('_fl_builder_enabled_templates')) echo 'checked="checked"'; ?> />
132
  <?php _e('Override network settings?', 'fl-builder'); ?>
133
  </label>
134
  <?php endif; ?>
135
+
136
  <div class="fl-settings-form-content">
137
+
138
  <p><?php _e('Enable or disable templates using the options below.', 'fl-builder'); ?></p>
139
  <?php
140
+
141
  $enabled_templates = FLBuilderModel::get_enabled_templates();
142
+
143
  ?>
144
+ <select name="fl-template-settings">
145
+ <option value="enabled" <?php selected( $enabled_templates, 'enabled' ); ?>><?php _e( 'Enable All Templates', 'fl-builder' ); ?></option>
146
+ <option value="core" <?php selected( $enabled_templates, 'core' ); ?>><?php _e( 'Enable Core Templates Only', 'fl-builder' ); ?></option>
147
+ <option value="user" <?php selected( $enabled_templates, 'user' ); ?>><?php _e( 'Enable User Templates Only', 'fl-builder' ); ?></option>
148
+ <option value="disabled" <?php selected( $enabled_templates, 'disabled' ); ?>><?php _e( 'Disable All Templates', 'fl-builder' ); ?></option>
149
+ </select>
150
+ </div>
151
  <p class="submit">
152
+ <input type="submit" name="update" class="button-primary" value="<?php esc_attr_e( 'Save Template Settings', 'fl-builder' ); ?>" />
153
  <?php wp_nonce_field('templates', 'fl-templates-nonce'); ?>
154
  </p>
155
  </form>
156
  </div>
157
  <!-- TEMPLATES -->
158
  <?php endif; ?>
159
+
160
  <!-- POST TYPES -->
161
  <div id="fl-post-types-form" class="fl-settings-form">
162
+
163
  <h3 class="fl-settings-form-header"><?php _e('Post Types', 'fl-builder'); ?></h3>
164
+
165
  <form id="post-types-form" action="<?php echo admin_url('/options-general.php?page=fl-builder-settings#post-types'); ?>" method="post">
166
+
167
  <?php if(class_exists('FLBuilderMultisiteSettings')) : ?>
168
  <label>
169
  <input class="fl-override-ms-cb" type="checkbox" name="fl-override-ms" value="1" <?php if(get_option('_fl_builder_post_types')) echo 'checked="checked"'; ?> />
170
  <?php _e('Override network settings?', 'fl-builder'); ?>
171
  </label>
172
  <?php endif; ?>
173
+
174
  <div class="fl-settings-form-content">
175
+
176
  <p><?php _e('Select the post types you would like the builder to work with.', 'fl-builder'); ?></p>
177
  <p><?php _e('NOTE: Not all custom post types may be supported.', 'fl-builder'); ?></p>
178
+
179
  <?php
180
+
181
  $saved_post_types = FLBuilderModel::get_post_types();
182
  $post_types = get_post_types(array('public' => true), 'objects');
183
+
184
  foreach($post_types as $post_type) :
185
+
186
  $checked = in_array($post_type->name, $saved_post_types) ? 'checked' : '';
187
+
188
  if($post_type->name == 'attachment') {
189
  continue;
190
  }
191
  if($post_type->name == 'fl-builder-template') {
192
  continue;
193
  }
194
+
195
  ?>
196
  <p>
197
  <label>
202
  <?php endforeach; ?>
203
  </div>
204
  <p class="submit">
205
+ <input type="submit" name="update" class="button-primary" value="<?php esc_attr_e( 'Save Post Types', 'fl-builder' ); ?>" />
206
  <?php wp_nonce_field('post-types', 'fl-post-types-nonce'); ?>
207
  </p>
208
  </form>
209
  </div>
210
  <!-- POST TYPES -->
211
+
212
  <!-- EDITING -->
213
  <div id="fl-editing-form" class="fl-settings-form">
214
+
215
  <h3 class="fl-settings-form-header"><?php _e('Editing Settings', 'fl-builder'); ?></h3>
216
+
217
  <form id="editing-form" action="<?php echo admin_url('/options-general.php?page=fl-builder-settings#editing'); ?>" method="post">
218
+
219
  <?php if(class_exists('FLBuilderMultisiteSettings')) : ?>
220
  <label>
221
  <input class="fl-override-ms-cb" type="checkbox" name="fl-override-ms" value="1" <?php if(get_option('_fl_builder_editing_capability')) echo 'checked="checked"'; ?> />
222
  <?php _e('Override network settings?', 'fl-builder'); ?>
223
  </label>
224
  <?php endif; ?>
225
+
226
  <div class="fl-settings-form-content">
227
+
228
+ <p><?php printf( __( 'Set the <a%s>capability</a> required for users to access advanced builder editing such as adding, deleting or moving modules.', 'fl-builder' ), ' href="http://codex.wordpress.org/Roles_and_Capabilities#Capability_vs._Role_Table" target="_blank"' ); ?></p>
229
+
230
  <input type="text" name="fl-editing-capability" value="<?php echo esc_html(FLBuilderModel::get_editing_capability()); ?>" class="regular-text" />
231
+
232
  </div>
233
  <p class="submit">
234
+ <input type="submit" name="update" class="button-primary" value="<?php esc_attr_e( 'Save Editing Settings', 'fl-builder' ); ?>" />
235
  <?php wp_nonce_field('editing', 'fl-editing-nonce'); ?>
236
  </p>
237
  </form>
238
  </div>
239
  <!-- EDITING -->
240
+
241
  <?php if(file_exists(FL_BUILDER_DIR . 'includes/admin-branding.php')) : ?>
242
  <!-- BRANDING -->
243
  <?php include FL_BUILDER_DIR . 'includes/admin-branding.php'; ?>
244
  <!-- BRANDING -->
245
  <?php endif; ?>
246
+
247
  <!-- UNINSTALL -->
248
  <div id="fl-uninstall-form" class="fl-settings-form">
249
+
250
  <h3 class="fl-settings-form-header"><?php _e('Uninstall', 'fl-builder'); ?></h3>
251
 
252
  <p><?php _e('Clicking the button below will uninstall the page builder plugin and delete all of the data associated with it. You can uninstall or deactivate the page builder from the plugins page instead if you do not wish to delete the data.', 'fl-builder'); ?></p>
253
+
254
+ <p><strong><?php _e( 'NOTE:', 'fl-builder' ); ?></strong> <?php _e( 'The builder does not delete the post meta <code>_fl_builder_data</code>, <code>_fl_builder_draft</code> and <code>_fl_builder_enabled</code> in case you want to reinstall it later. If you do, the builder will rebuild all of its data using those meta values.', 'fl-builder' ); ?></p>
255
+
256
  <?php if(is_multisite()) : ?>
257
+ <p><strong style="color:#ff0000;"><?php _e( 'NOTE:', 'fl-builder' ); ?></strong> <?php _e('This applies to all sites on the network.', 'fl-builder'); ?></p>
258
  <?php endif; ?>
259
+
260
  <form id="uninstall-form" action="<?php echo admin_url('/options-general.php?page=fl-builder-settings'); ?>" method="post">
261
  <p>
262
  <input type="submit" name="uninstall-submit" class="button button-primary" value="<?php _e('Uninstall', 'fl-builder'); ?>">
265
  </form>
266
  </div>
267
  <!-- UNINSTALL -->
268
+
269
  </div>
270
+ </div>
271
  <script type="text/javascript">
272
 
273
  jQuery(function(){
274
+
275
  FLBuilderAdminSettings.strings = {
276
  uninstall: '<?php _e('Please type "uninstall" in the box below to confirm that you really want to uninstall the page builder and all of its data.', 'fl-builder'); ?>'
277
  };
includes/column-settings.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
-
3
  FLBuilder::register_settings_form('col', array(
4
  'title' => __('Column Settings', 'fl-builder'),
5
  'tabs' => array(
@@ -13,7 +13,7 @@ FLBuilder::register_settings_form('col', array(
13
  'type' => 'text',
14
  'label' => __('Column Width', 'fl-builder'),
15
  'default' => '',
16
- 'description' => __('%', 'fl-builder'),
17
  'maxlength' => '5',
18
  'size' => '6',
19
  'preview' => array(
@@ -57,7 +57,7 @@ FLBuilder::register_settings_form('col', array(
57
  'type' => 'none'
58
  )
59
  )
60
- )
61
  ),
62
  'border' => array(
63
  'title' => __('Border', 'fl-builder'),
@@ -68,11 +68,11 @@ FLBuilder::register_settings_form('col', array(
68
  'default' => '',
69
  'help' => __('The type of border to use. Double borders must have a width of at least 3px to render properly.', 'fl-builder'),
70
  'options' => array(
71
- '' => __('None', 'fl-builder'),
72
- 'solid' => __('Solid', 'fl-builder'),
73
- 'dashed' => __('Dashed', 'fl-builder'),
74
- 'dotted' => __('Dotted', 'fl-builder'),
75
- 'double' => __('Double', 'fl-builder')
76
  ),
77
  'toggle' => array(
78
  '' => array(
@@ -118,7 +118,7 @@ FLBuilder::register_settings_form('col', array(
118
  'type' => 'text',
119
  'label' => __('Top Width', 'fl-builder'),
120
  'default' => '1',
121
- 'description' => __('px', 'fl-builder'),
122
  'maxlength' => '3',
123
  'size' => '5',
124
  'placeholder' => '0',
@@ -130,7 +130,7 @@ FLBuilder::register_settings_form('col', array(
130
  'type' => 'text',
131
  'label' => __('Bottom Width', 'fl-builder'),
132
  'default' => '1',
133
- 'description' => __('px', 'fl-builder'),
134
  'maxlength' => '3',
135
  'size' => '5',
136
  'placeholder' => '0',
@@ -142,7 +142,7 @@ FLBuilder::register_settings_form('col', array(
142
  'type' => 'text',
143
  'label' => __('Left Width', 'fl-builder'),
144
  'default' => '1',
145
- 'description' => __('px', 'fl-builder'),
146
  'maxlength' => '3',
147
  'size' => '5',
148
  'placeholder' => '0',
@@ -154,7 +154,7 @@ FLBuilder::register_settings_form('col', array(
154
  'type' => 'text',
155
  'label' => __('Right Width', 'fl-builder'),
156
  'default' => '1',
157
- 'description' => __('px', 'fl-builder'),
158
  'maxlength' => '3',
159
  'size' => '5',
160
  'placeholder' => '0',
@@ -175,7 +175,7 @@ FLBuilder::register_settings_form('col', array(
175
  'class' => array(
176
  'type' => 'text',
177
  'label' => __('CSS Class', 'fl-builder'),
178
- 'help' => __('A custom CSS class that will be applied to this column. Spaces only, no dots.'),
179
  'preview' => array(
180
  'type' => 'none'
181
  )
@@ -183,7 +183,7 @@ FLBuilder::register_settings_form('col', array(
183
  )
184
  ),
185
  'responsive' => array(
186
- 'title' => __('Responsive', 'fl-builder'),
187
  'fields' => array(
188
  'responsive_display' => array(
189
  'type' => 'select',
@@ -196,7 +196,7 @@ FLBuilder::register_settings_form('col', array(
196
  'medium-mobile' => __('Medium &amp; Small Devices Only', 'fl-builder'),
197
  'mobile' => __('Small Devices Only', 'fl-builder'),
198
  ),
199
- 'help' => __('Choose whether to show or hide this column at different device sizes.'),
200
  'preview' => array(
201
  'type' => 'none'
202
  )
@@ -204,7 +204,7 @@ FLBuilder::register_settings_form('col', array(
204
  'medium_size' => array(
205
  'type' => 'select',
206
  'label' => __('Medium Device Width', 'fl-builder'),
207
- 'help' => __('The width of this column on medium devices such as tablets.'),
208
  'options' => array(
209
  'default' => __('Default', 'fl-builder'),
210
  'custom' => __('Custom', 'fl-builder'),
@@ -222,7 +222,7 @@ FLBuilder::register_settings_form('col', array(
222
  'type' => 'text',
223
  'label' => __('Custom Medium Device Width', 'fl-builder'),
224
  'default' => '100',
225
- 'description' => __('%', 'fl-builder'),
226
  'maxlength' => '5',
227
  'size' => '6',
228
  'preview' => array(
@@ -232,7 +232,7 @@ FLBuilder::register_settings_form('col', array(
232
  'responsive_size' => array(
233
  'type' => 'select',
234
  'label' => __('Small Device Width', 'fl-builder'),
235
- 'help' => __('The width of this column on small devices such as phones.'),
236
  'options' => array(
237
  'default' => __('Default', 'fl-builder'),
238
  'custom' => __('Custom', 'fl-builder'),
@@ -248,9 +248,9 @@ FLBuilder::register_settings_form('col', array(
248
  ),
249
  'custom_responsive_size' => array(
250
  'type' => 'text',
251
- 'label' => 'Custom Small Device Width',
252
  'default' => '100',
253
- 'description' => __('%', 'fl-builder'),
254
  'maxlength' => '5',
255
  'size' => '6',
256
  'preview' => array(
@@ -264,9 +264,9 @@ FLBuilder::register_settings_form('col', array(
264
  'fields' => array(
265
  'margin_top' => array(
266
  'type' => 'text',
267
- 'label' => __('Top', 'fl-builder'),
268
  'default' => '',
269
- 'description' => __('px', 'fl-builder'),
270
  'maxlength' => '4',
271
  'size' => '5',
272
  'placeholder' => '0',
@@ -276,9 +276,9 @@ FLBuilder::register_settings_form('col', array(
276
  ),
277
  'margin_bottom' => array(
278
  'type' => 'text',
279
- 'label' => __('Bottom', 'fl-builder'),
280
  'default' => '',
281
- 'description' => __('px', 'fl-builder'),
282
  'maxlength' => '4',
283
  'size' => '5',
284
  'placeholder' => '0',
@@ -288,9 +288,9 @@ FLBuilder::register_settings_form('col', array(
288
  ),
289
  'margin_left' => array(
290
  'type' => 'text',
291
- 'label' => __('Left', 'fl-builder'),
292
  'default' => '',
293
- 'description' => __('px', 'fl-builder'),
294
  'maxlength' => '4',
295
  'size' => '5',
296
  'placeholder' => '0',
@@ -300,9 +300,9 @@ FLBuilder::register_settings_form('col', array(
300
  ),
301
  'margin_right' => array(
302
  'type' => 'text',
303
- 'label' => __('Right', 'fl-builder'),
304
  'default' => '',
305
- 'description' => __('px', 'fl-builder'),
306
  'maxlength' => '4',
307
  'size' => '5',
308
  'placeholder' => '0',
@@ -317,9 +317,9 @@ FLBuilder::register_settings_form('col', array(
317
  'fields' => array(
318
  'padding_top' => array(
319
  'type' => 'text',
320
- 'label' => __('Top', 'fl-builder'),
321
  'default' => '',
322
- 'description' => __('px', 'fl-builder'),
323
  'maxlength' => '4',
324
  'size' => '5',
325
  'placeholder' => '0',
@@ -329,9 +329,9 @@ FLBuilder::register_settings_form('col', array(
329
  ),
330
  'padding_bottom' => array(
331
  'type' => 'text',
332
- 'label' => __('Bottom', 'fl-builder'),
333
  'default' => '',
334
- 'description' => __('px', 'fl-builder'),
335
  'maxlength' => '4',
336
  'size' => '5',
337
  'placeholder' => '0',
@@ -341,9 +341,9 @@ FLBuilder::register_settings_form('col', array(
341
  ),
342
  'padding_left' => array(
343
  'type' => 'text',
344
- 'label' => __('Left', 'fl-builder'),
345
  'default' => '',
346
- 'description' => __('px', 'fl-builder'),
347
  'maxlength' => '4',
348
  'size' => '5',
349
  'placeholder' => '0',
@@ -353,9 +353,9 @@ FLBuilder::register_settings_form('col', array(
353
  ),
354
  'padding_right' => array(
355
  'type' => 'text',
356
- 'label' => __('Right', 'fl-builder'),
357
  'default' => '',
358
- 'description' => __('px', 'fl-builder'),
359
  'maxlength' => '4',
360
  'size' => '5',
361
  'placeholder' => '0',
1
  <?php
2
+
3
  FLBuilder::register_settings_form('col', array(
4
  'title' => __('Column Settings', 'fl-builder'),
5
  'tabs' => array(
13
  'type' => 'text',
14
  'label' => __('Column Width', 'fl-builder'),
15
  'default' => '',
16
+ 'description' => '%',
17
  'maxlength' => '5',
18
  'size' => '6',
19
  'preview' => array(
57
  'type' => 'none'
58
  )
59
  )
60
+ )
61
  ),
62
  'border' => array(
63
  'title' => __('Border', 'fl-builder'),
68
  'default' => '',
69
  'help' => __('The type of border to use. Double borders must have a width of at least 3px to render properly.', 'fl-builder'),
70
  'options' => array(
71
+ '' => _x( 'None', 'Border type.', 'fl-builder' ),
72
+ 'solid' => _x( 'Solid', 'Border type.', 'fl-builder' ),
73
+ 'dashed' => _x( 'Dashed', 'Border type.', 'fl-builder' ),
74
+ 'dotted' => _x( 'Dotted', 'Border type.', 'fl-builder' ),
75
+ 'double' => _x( 'Double', 'Border type.', 'fl-builder' )
76
  ),
77
  'toggle' => array(
78
  '' => array(
118
  'type' => 'text',
119
  'label' => __('Top Width', 'fl-builder'),
120
  'default' => '1',
121
+ 'description' => 'px',
122
  'maxlength' => '3',
123
  'size' => '5',
124
  'placeholder' => '0',
130
  'type' => 'text',
131
  'label' => __('Bottom Width', 'fl-builder'),
132
  'default' => '1',
133
+ 'description' => 'px',
134
  'maxlength' => '3',
135
  'size' => '5',
136
  'placeholder' => '0',
142
  'type' => 'text',
143
  'label' => __('Left Width', 'fl-builder'),
144
  'default' => '1',
145
+ 'description' => 'px',
146
  'maxlength' => '3',
147
  'size' => '5',
148
  'placeholder' => '0',
154
  'type' => 'text',
155
  'label' => __('Right Width', 'fl-builder'),
156
  'default' => '1',
157
+ 'description' => 'px',
158
  'maxlength' => '3',
159
  'size' => '5',
160
  'placeholder' => '0',
175
  'class' => array(
176
  'type' => 'text',
177
  'label' => __('CSS Class', 'fl-builder'),
178
+ 'help' => __( 'A custom CSS class that will be applied to this column. Spaces only, no dots.', 'fl-builder' ),
179
  'preview' => array(
180
  'type' => 'none'
181
  )
183
  )
184
  ),
185
  'responsive' => array(
186
+ 'title' => __('Responsive Layout', 'fl-builder'),
187
  'fields' => array(
188
  'responsive_display' => array(
189
  'type' => 'select',
196
  'medium-mobile' => __('Medium &amp; Small Devices Only', 'fl-builder'),
197
  'mobile' => __('Small Devices Only', 'fl-builder'),
198
  ),
199
+ 'help' => __( 'Choose whether to show or hide this column at different device sizes.', 'fl-builder' ),
200
  'preview' => array(
201
  'type' => 'none'
202
  )
204
  'medium_size' => array(
205
  'type' => 'select',
206
  'label' => __('Medium Device Width', 'fl-builder'),
207
+ 'help' => __( 'The width of this column on medium devices such as tablets.', 'fl-builder' ),
208
  'options' => array(
209
  'default' => __('Default', 'fl-builder'),
210
  'custom' => __('Custom', 'fl-builder'),
222
  'type' => 'text',
223
  'label' => __('Custom Medium Device Width', 'fl-builder'),
224
  'default' => '100',
225
+ 'description' => '%',
226
  'maxlength' => '5',
227
  'size' => '6',
228
  'preview' => array(
232
  'responsive_size' => array(
233
  'type' => 'select',
234
  'label' => __('Small Device Width', 'fl-builder'),
235
+ 'help' => __( 'The width of this column on small devices such as phones.', 'fl-builder' ),
236
  'options' => array(
237
  'default' => __('Default', 'fl-builder'),
238
  'custom' => __('Custom', 'fl-builder'),
248
  ),
249
  'custom_responsive_size' => array(
250
  'type' => 'text',
251
+ 'label' => __( 'Custom Small Device Width', 'fl-builder' ),
252
  'default' => '100',
253
+ 'description' => '%',
254
  'maxlength' => '5',
255
  'size' => '6',
256
  'preview' => array(
264
  'fields' => array(
265
  'margin_top' => array(
266
  'type' => 'text',
267
+ 'label' => __( 'Top', 'fl-builder' ),
268
  'default' => '',
269
+ 'description' => 'px',
270
  'maxlength' => '4',
271
  'size' => '5',
272
  'placeholder' => '0',
276
  ),
277
  'margin_bottom' => array(
278
  'type' => 'text',
279
+ 'label' => __( 'Bottom', 'fl-builder' ),
280
  'default' => '',
281
+ 'description' => 'px',
282
  'maxlength' => '4',
283
  'size' => '5',
284
  'placeholder' => '0',
288
  ),
289
  'margin_left' => array(
290
  'type' => 'text',
291
+ 'label' => __( 'Left', 'fl-builder' ),
292
  'default' => '',
293
+ 'description' => 'px',
294
  'maxlength' => '4',
295
  'size' => '5',
296
  'placeholder' => '0',
300
  ),
301
  'margin_right' => array(
302
  'type' => 'text',
303
+ 'label' => __( 'Right', 'fl-builder' ),
304
  'default' => '',
305
+ 'description' => 'px',
306
  'maxlength' => '4',
307
  'size' => '5',
308
  'placeholder' => '0',
317
  'fields' => array(
318
  'padding_top' => array(
319
  'type' => 'text',
320
+ 'label' => __( 'Top', 'fl-builder' ),
321
  'default' => '',
322
+ 'description' => 'px',
323
  'maxlength' => '4',
324
  'size' => '5',
325
  'placeholder' => '0',
329
  ),
330
  'padding_bottom' => array(
331
  'type' => 'text',
332
+ 'label' => __( 'Bottom', 'fl-builder' ),
333
  'default' => '',
334
+ 'description' => 'px',
335
  'maxlength' => '4',
336
  'size' => '5',
337
  'placeholder' => '0',
341
  ),
342
  'padding_left' => array(
343
  'type' => 'text',
344
+ 'label' => __( 'Left', 'fl-builder' ),
345
  'default' => '',
346
+ 'description' => 'px',
347
  'maxlength' => '4',
348
  'size' => '5',
349
  'placeholder' => '0',
353
  ),
354
  'padding_right' => array(
355
  'type' => 'text',
356
+ 'label' => __( 'Right', 'fl-builder' ),
357
  'default' => '',
358
+ 'description' => 'px',
359
  'maxlength' => '4',
360
  'size' => '5',
361
  'placeholder' => '0',
includes/field-form.php CHANGED
@@ -1,6 +1,6 @@
1
  <div class="fl-form-field fl-builder-custom-field"<?php if(isset($field['preview_text'])) echo ' data-preview-text="'. $field['preview_text'] .'"'; ?>>
2
  <div class="fl-form-field-preview-text">
3
- <?php
4
 
5
  if(isset($field['preview_text']) && is_object($value)) {
6
 
@@ -11,9 +11,9 @@
11
  echo FLBuilderUtils::snippetwop(strip_tags(str_replace('&#39;', "'", $value->$field['preview_text'])), 35);
12
  }
13
  }
14
-
15
  ?>
16
  </div>
17
- <a class="fl-form-field-edit" href="javascript:void(0);" onclick="return false;" data-type="<?php echo $field['form']; ?>"><?php _e('Edit', 'fl-builder'); echo ' ' . $field['label']; ?></a>
18
  <input name="<?php echo $name; ?>" type="hidden" value='<?php echo str_replace("'", '&#39;', json_encode($value)); ?>' />
19
  </div>
1
  <div class="fl-form-field fl-builder-custom-field"<?php if(isset($field['preview_text'])) echo ' data-preview-text="'. $field['preview_text'] .'"'; ?>>
2
  <div class="fl-form-field-preview-text">
3
+ <?php
4
 
5
  if(isset($field['preview_text']) && is_object($value)) {
6
 
11
  echo FLBuilderUtils::snippetwop(strip_tags(str_replace('&#39;', "'", $value->$field['preview_text'])), 35);
12
  }
13
  }
14
+
15
  ?>
16
  </div>
17
+ <a class="fl-form-field-edit" href="javascript:void(0);" onclick="return false;" data-type="<?php echo $field['form']; ?>"><?php printf( _x( 'Edit %s', '%s stands for form field label.', 'fl-builder' ), $field['label'] ); ?></a>
18
  <input name="<?php echo $name; ?>" type="hidden" value='<?php echo str_replace("'", '&#39;', json_encode($value)); ?>' />
19
  </div>
includes/field-link.php CHANGED
@@ -3,7 +3,7 @@
3
  <span class="fl-link-field-select fl-builder-button fl-builder-button-small" href="javascript:void(0);" onclick="return false;"><?php _e('Select', 'fl-builder'); ?></span>
4
  <div class="fl-link-field-search">
5
  <span class="fl-link-field-search-title"><?php _e('Enter a post title to search.', 'fl-builder'); ?></span>
6
- <input type="text" name="<?php echo $name; ?>-search" class="text text-full fl-link-field-search-input" placeholder="<?php _e('Start typing...', 'fl-builder'); ?>" />
7
  <span class="fl-link-field-search-cancel fl-builder-button fl-builder-button-small" href="javascript:void(0);" onclick="return false;"><?php _e('Cancel', 'fl-builder'); ?></span>
8
  </div>
9
  </div>
3
  <span class="fl-link-field-select fl-builder-button fl-builder-button-small" href="javascript:void(0);" onclick="return false;"><?php _e('Select', 'fl-builder'); ?></span>
4
  <div class="fl-link-field-search">
5
  <span class="fl-link-field-search-title"><?php _e('Enter a post title to search.', 'fl-builder'); ?></span>
6
+ <input type="text" name="<?php echo $name; ?>-search" class="text text-full fl-link-field-search-input" placeholder="<?php esc_attr_e( 'Start typing...', 'fl-builder' ); ?>" />
7
  <span class="fl-link-field-search-cancel fl-builder-button fl-builder-button-small" href="javascript:void(0);" onclick="return false;"><?php _e('Cancel', 'fl-builder'); ?></span>
8
  </div>
9
  </div>
includes/field-multiple-photos.php CHANGED
@@ -1,18 +1,13 @@
1
  <div class="fl-multiple-photos-field fl-builder-custom-field<?php if(empty($value)) echo ' fl-multiple-photos-empty'; if(isset($field['class'])) echo ' ' . $field['class']; ?>">
2
  <div class="fl-multiple-photos-count">
3
  <?php
4
-
5
  $count = is_array($value) ? count($value) : false;
6
-
7
- if($count) {
8
- if($count == 1) {
9
- echo $count . __(' Photo Selected', 'fl-builder');
10
- }
11
- else {
12
- echo $count . __(' Photos Selected', 'fl-builder');
13
- }
14
- }
15
-
16
  ?>
17
  </div>
18
  <a class="fl-multiple-photos-select" href="javascript:void(0);" onclick="return false;"><?php _e('Create Gallery', 'fl-builder'); ?></a>
1
  <div class="fl-multiple-photos-field fl-builder-custom-field<?php if(empty($value)) echo ' fl-multiple-photos-empty'; if(isset($field['class'])) echo ' ' . $field['class']; ?>">
2
  <div class="fl-multiple-photos-count">
3
  <?php
4
+
5
  $count = is_array($value) ? count($value) : false;
6
+
7
+ if ( $count ) {
8
+ printf( _n( '1 Photo Selected', '%d Photos Selected', $count, 'fl-builder' ), $count );
9
+ }
10
+
 
 
 
 
 
11
  ?>
12
  </div>
13
  <a class="fl-multiple-photos-select" href="javascript:void(0);" onclick="return false;"><?php _e('Create Gallery', 'fl-builder'); ?></a>
includes/field-suggest.php CHANGED
@@ -1,7 +1,7 @@
1
- <?php
2
 
3
  $action = isset($field['action']) ? $field['action'] : '';
4
  $data = isset($field['data']) ? $field['data'] : '';
5
 
6
  ?>
7
- <input type="text" name="<?php echo $name; ?>" data-value='<?php echo FLBuilderAutoSuggest::get_value($action, $value, $data); ?>' data-action="<?php echo $action; ?>" data-action-data="<?php echo $data; ?>" class="text text-full fl-suggest-field<?php if(isset($field['class'])) echo ' '. $field['class']; ?>" placeholder="<?php if(isset($field['placeholder'])) echo $field['placeholder']; else echo _e('Start typing...', 'fl-builder'); ?>" />
1
+ <?php
2
 
3
  $action = isset($field['action']) ? $field['action'] : '';
4
  $data = isset($field['data']) ? $field['data'] : '';
5
 
6
  ?>
7
+ <input type="text" name="<?php echo $name; ?>" data-value='<?php echo FLBuilderAutoSuggest::get_value($action, $value, $data); ?>' data-action="<?php echo $action; ?>" data-action-data="<?php echo $data; ?>" class="text text-full fl-suggest-field<?php if(isset($field['class'])) echo ' '. $field['class']; ?>" placeholder="<?php if ( isset( $field['placeholder'] ) ) echo esc_attr( $field['placeholder'] ); else esc_attr_e( 'Start typing...', 'fl-builder' ); ?>" />
includes/global-settings.php CHANGED
@@ -1,7 +1,7 @@
1
- <?php
2
 
3
  FLBuilder::register_settings_form('global', array(
4
- 'title' => FLBuilderModel::get_branding() . ' ' . __('Settings', 'fl-builder'),
5
  'tabs' => array(
6
  'general' => array(
7
  'title' => __('General', 'fl-builder'),
@@ -12,7 +12,7 @@ FLBuilder::register_settings_form('global', array(
12
  'fields' => array(
13
  'show_default_heading' => array(
14
  'type' => 'select',
15
- 'label' => __('Show', 'fl-builder'),
16
  'default' => '0',
17
  'options' => array(
18
  '0' => __('No', 'fl-builder'),
@@ -42,7 +42,7 @@ FLBuilder::register_settings_form('global', array(
42
  'default' => '0',
43
  'maxlength' => '3',
44
  'size' => '5',
45
- 'description' => __('px', 'fl-builder')
46
  ),
47
  'row_padding' => array(
48
  'type' => 'text',
@@ -50,7 +50,7 @@ FLBuilder::register_settings_form('global', array(
50
  'default' => '20',
51
  'maxlength' => '3',
52
  'size' => '5',
53
- 'description' => __('px', 'fl-builder')
54
  ),
55
  'row_width' => array(
56
  'type' => 'text',
@@ -58,7 +58,7 @@ FLBuilder::register_settings_form('global', array(
58
  'default' => '1100',
59
  'maxlength' => '4',
60
  'size' => '5',
61
- 'description' => __('px', 'fl-builder'),
62
  'help' => __('All rows will default to this width. You can override this and make a row full width in the settings for each row.', 'fl-builder')
63
  )
64
  )
@@ -72,7 +72,7 @@ FLBuilder::register_settings_form('global', array(
72
  'default' => '20',
73
  'maxlength' => '3',
74
  'size' => '5',
75
- 'description' => __('px', 'fl-builder')
76
  )
77
  )
78
  ),
@@ -81,7 +81,7 @@ FLBuilder::register_settings_form('global', array(
81
  'fields' => array(
82
  'responsive_enabled' => array(
83
  'type' => 'select',
84
- 'label' => __('Enabled', 'fl-builder'),
85
  'default' => '1',
86
  'options' => array(
87
  '0' => __('No', 'fl-builder'),
@@ -99,7 +99,7 @@ FLBuilder::register_settings_form('global', array(
99
  'default' => '992',
100
  'maxlength' => '4',
101
  'size' => '5',
102
- 'description' => __('px', 'fl-builder'),
103
  'help' => __('The browser width at which the layout will adjust for medium devices such as tablets.', 'fl-builder')
104
  ),
105
  'responsive_breakpoint' => array(
@@ -108,7 +108,7 @@ FLBuilder::register_settings_form('global', array(
108
  'default' => '768',
109
  'maxlength' => '4',
110
  'size' => '5',
111
- 'description' => __('px', 'fl-builder'),
112
  'help' => __('The browser width at which the layout will adjust for small devices such as phones.', 'fl-builder')
113
  )
114
  )
1
+ <?php
2
 
3
  FLBuilder::register_settings_form('global', array(
4
+ 'title' => sprintf( _x( '%s Settings', '%s stands for custom branded "Page Builder" name.', 'fl-builder' ), FLBuilderModel::get_branding() ),
5
  'tabs' => array(
6
  'general' => array(
7
  'title' => __('General', 'fl-builder'),
12
  'fields' => array(
13
  'show_default_heading' => array(
14
  'type' => 'select',
15
+ 'label' => _x( 'Show', 'General settings form field label. Intended meaning: "Show page heading?"', 'fl-builder' ),
16
  'default' => '0',
17
  'options' => array(
18
  '0' => __('No', 'fl-builder'),
42
  'default' => '0',
43
  'maxlength' => '3',
44
  'size' => '5',
45
+ 'description' => 'px'
46
  ),
47
  'row_padding' => array(
48
  'type' => 'text',
50
  'default' => '20',
51
  'maxlength' => '3',
52
  'size' => '5',
53
+ 'description' => 'px'
54
  ),
55
  'row_width' => array(
56
  'type' => 'text',
58
  'default' => '1100',
59
  'maxlength' => '4',
60
  'size' => '5',
61
+ 'description' => 'px',
62
  'help' => __('All rows will default to this width. You can override this and make a row full width in the settings for each row.', 'fl-builder')
63
  )
64
  )
72
  'default' => '20',
73
  'maxlength' => '3',
74
  'size' => '5',
75
+ 'description' => 'px'
76
  )
77
  )
78
  ),
81
  'fields' => array(
82
  'responsive_enabled' => array(
83
  'type' => 'select',
84
+ 'label' => _x( 'Enabled', 'General settings form field label. Intended meaning: "Responsive layout enabled?"', 'fl-builder' ),
85
  'default' => '1',
86
  'options' => array(
87
  '0' => __('No', 'fl-builder'),
99
  'default' => '992',
100
  'maxlength' => '4',
101
  'size' => '5',
102
+ 'description' => 'px',
103
  'help' => __('The browser width at which the layout will adjust for medium devices such as tablets.', 'fl-builder')
104
  ),
105
  'responsive_breakpoint' => array(
108
  'default' => '768',
109
  'maxlength' => '4',
110
  'size' => '5',
111
+ 'description' => 'px',
112
  'help' => __('The browser width at which the layout will adjust for small devices such as phones.', 'fl-builder')
113
  )
114
  )
includes/icon-selector.php CHANGED
@@ -1,12 +1,13 @@
1
  <div class="fl-lightbox-header">
2
  <h1><?php _e( 'Select Icon', 'fl-builder' ); ?></h1>
3
- <div class="fl-icons-filter">
4
- <?php _e( 'Filter: ', 'fl-builder' ); ?>
5
- <select>
6
  <?php foreach ( $icon_sets as $set_key => $set_data ) : ?>
7
  <option value="<?php echo $set_key; ?>"><?php echo $set_data['name']; ?></option>
8
  <?php endforeach; ?>
9
  </select>
 
10
  </div>
11
  </div>
12
  <div class="fl-icons-list">
1
  <div class="fl-lightbox-header">
2
  <h1><?php _e( 'Select Icon', 'fl-builder' ); ?></h1>
3
+ <div class="fl-icons-filter fl-builder-settings-fields">
4
+ <select class="fl-icons-filter-select">
5
+ <option value="all"><?php _ex( 'All Libraries', 'Select option for showing all icon libraries.', 'fl-builder' ); ?></option>
6
  <?php foreach ( $icon_sets as $set_key => $set_data ) : ?>
7
  <option value="<?php echo $set_key; ?>"><?php echo $set_data['name']; ?></option>
8
  <?php endforeach; ?>
9
  </select>
10
+ <input type="text" class="fl-icons-filter-text" placeholder="Search..." />
11
  </div>
12
  </div>
13
  <div class="fl-icons-list">
includes/js-config.php CHANGED
@@ -1,6 +1,6 @@
1
  <script>
2
 
3
- var FLBuilderConfig = {
4
  ajaxUrl: '<?php echo get_permalink( $post_id ); ?>',
5
  enabledTemplates: '<?php echo $enabled_templates; ?>',
6
  homeUrl: '<?php echo home_url(); ?>',
@@ -27,7 +27,7 @@ var FLBuilderStrings = {
27
  discard: '<?php _e('Discard Draft', 'fl-builder'); ?>',
28
  discardMessage: '<?php _e('Do you really want to discard this draft? All of your changes that are not published will be lost.', 'fl-builder'); ?>',
29
  draft: '<?php _e('Save Draft', 'fl-builder'); ?>',
30
- duplicate: '<?php _e('Duplicate', 'fl-builder'); ?>',
31
  duplicatePage: '<?php _e('Duplicate This Page', 'fl-builder'); ?>',
32
  duplicateTemplate: '<?php _e('Duplicate This Template', 'fl-builder'); ?>',
33
  editGlobalSettings: '<?php _e('Edit Global Settings', 'fl-builder'); ?>',
@@ -42,7 +42,8 @@ var FLBuilderStrings = {
42
  newColumn: '<?php _e('New Column', 'fl-builder') ?>',
43
  newRow: '<?php _e('New Row', 'fl-builder') ?>',
44
  noResultsFound: '<?php _e('No results found.', 'fl-builder') ?>',
45
- ok: '<?php _e('Ok', 'fl-builder'); ?>',
 
46
  photoSelected: '<?php _e('Photo Selected', 'fl-builder'); ?>',
47
  photosSelected: '<?php _e('Photos Selected', 'fl-builder'); ?>',
48
  publish: '<?php _e('Publish Changes', 'fl-builder'); ?>',
@@ -54,7 +55,7 @@ var FLBuilderStrings = {
54
  selectPhoto: '<?php _e('Select Photo', 'fl-builder'); ?>',
55
  selectPhotos: '<?php _e('Select Photos', 'fl-builder'); ?>',
56
  selectVideo: '<?php _e('Select Video', 'fl-builder'); ?>',
57
- settings: '<?php _e('Settings', 'fl-builder') ?>',
58
  templateAppend: '<?php _e('Append New Layout', 'fl-builder'); ?>',
59
  templateReplace: '<?php _e('Replace Existing Layout', 'fl-builder'); ?>',
60
  templateSaved: '<?php _e('Template Saved!', 'fl-builder'); ?>',
1
  <script>
2
 
3
+ var FLBuilderConfig = {
4
  ajaxUrl: '<?php echo get_permalink( $post_id ); ?>',
5
  enabledTemplates: '<?php echo $enabled_templates; ?>',
6
  homeUrl: '<?php echo home_url(); ?>',
27
  discard: '<?php _e('Discard Draft', 'fl-builder'); ?>',
28
  discardMessage: '<?php _e('Do you really want to discard this draft? All of your changes that are not published will be lost.', 'fl-builder'); ?>',
29
  draft: '<?php _e('Save Draft', 'fl-builder'); ?>',
30
+ duplicate: '<?php _ex( 'Duplicate', 'Duplicate page/post action label.', 'fl-builder' ); ?>',
31
  duplicatePage: '<?php _e('Duplicate This Page', 'fl-builder'); ?>',
32
  duplicateTemplate: '<?php _e('Duplicate This Template', 'fl-builder'); ?>',
33
  editGlobalSettings: '<?php _e('Edit Global Settings', 'fl-builder'); ?>',
42
  newColumn: '<?php _e('New Column', 'fl-builder') ?>',
43
  newRow: '<?php _e('New Row', 'fl-builder') ?>',
44
  noResultsFound: '<?php _e('No results found.', 'fl-builder') ?>',
45
+ ok: '<?php _e( 'OK', 'fl-builder' ); ?>',
46
+ photoPage: '<?php _e('Photo Page', 'fl-builder'); ?>',
47
  photoSelected: '<?php _e('Photo Selected', 'fl-builder'); ?>',
48
  photosSelected: '<?php _e('Photos Selected', 'fl-builder'); ?>',
49
  publish: '<?php _e('Publish Changes', 'fl-builder'); ?>',
55
  selectPhoto: '<?php _e('Select Photo', 'fl-builder'); ?>',
56
  selectPhotos: '<?php _e('Select Photos', 'fl-builder'); ?>',
57
  selectVideo: '<?php _e('Select Video', 'fl-builder'); ?>',
58
+ settings: '<?php _ex( '%s Settings', '%s stands for module name.', 'fl-builder' ); ?>',
59
  templateAppend: '<?php _e('Append New Layout', 'fl-builder'); ?>',
60
  templateReplace: '<?php _e('Replace Existing Layout', 'fl-builder'); ?>',
61
  templateSaved: '<?php _e('Template Saved!', 'fl-builder'); ?>',
includes/module-settings.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
 
3
  $global_settings = FLBuilderModel::get_global_settings();
4
-
5
  FLBuilder::register_settings_form('module-advanced', array(
6
  'title' => __('Advanced', 'fl-builder'),
7
  'sections' => array(
@@ -11,7 +11,7 @@ FLBuilder::register_settings_form('module-advanced', array(
11
  'class' => array(
12
  'type' => 'text',
13
  'label' => __('CSS Class', 'fl-builder'),
14
- 'help' => __('A custom CSS class that will be applied to this module. Spaces only, no dots.'),
15
  'preview' => array(
16
  'type' => 'none'
17
  )
@@ -39,9 +39,9 @@ FLBuilder::register_settings_form('module-advanced', array(
39
  'fields' => array(
40
  'margin_top' => array(
41
  'type' => 'text',
42
- 'label' => __('Top', 'fl-builder'),
43
  'default' => '',
44
- 'description' => __('px', 'fl-builder'),
45
  'maxlength' => '4',
46
  'size' => '5',
47
  'placeholder' => $global_settings->module_margins,
@@ -51,9 +51,9 @@ FLBuilder::register_settings_form('module-advanced', array(
51
  ),
52
  'margin_bottom' => array(
53
  'type' => 'text',
54
- 'label' => __('Bottom', 'fl-builder'),
55
  'default' => '',
56
- 'description' => __('px', 'fl-builder'),
57
  'maxlength' => '4',
58
  'size' => '5',
59
  'placeholder' => $global_settings->module_margins,
@@ -63,9 +63,9 @@ FLBuilder::register_settings_form('module-advanced', array(
63
  ),
64
  'margin_left' => array(
65
  'type' => 'text',
66
- 'label' => __('Left', 'fl-builder'),
67
  'default' => '',
68
- 'description' => __('px', 'fl-builder'),
69
  'maxlength' => '4',
70
  'size' => '5',
71
  'placeholder' => $global_settings->module_margins,
@@ -75,9 +75,9 @@ FLBuilder::register_settings_form('module-advanced', array(
75
  ),
76
  'margin_right' => array(
77
  'type' => 'text',
78
- 'label' => __('Right', 'fl-builder'),
79
  'default' => '',
80
- 'description' => __('px', 'fl-builder'),
81
  'maxlength' => '4',
82
  'size' => '5',
83
  'placeholder' => $global_settings->module_margins,
@@ -94,12 +94,12 @@ FLBuilder::register_settings_form('module-advanced', array(
94
  'type' => 'select',
95
  'label' => __('Style', 'fl-builder'),
96
  'options' => array(
97
- '' => __('None', 'fl-builder'),
98
- 'fade-in' => __('Fade In', 'fl-builder'),
99
- 'slide-left' => __('Slide Left', 'fl-builder'),
100
- 'slide-right' => __('Slide Right', 'fl-builder'),
101
- 'slide-up' => __('Slide Up', 'fl-builder'),
102
- 'slide-down' => __('Slide Down', 'fl-builder'),
103
  ),
104
  'preview' => array(
105
  'type' => 'none'
@@ -111,7 +111,7 @@ FLBuilder::register_settings_form('module-advanced', array(
111
  'default' => '0.0',
112
  'maxlength' => '4',
113
  'size' => '5',
114
- 'description' => 'seconds',
115
  'help' => __('The amount of time in seconds before this animation starts.', 'fl-builder'),
116
  'preview' => array(
117
  'type' => 'none'
1
  <?php
2
 
3
  $global_settings = FLBuilderModel::get_global_settings();
4
+
5
  FLBuilder::register_settings_form('module-advanced', array(
6
  'title' => __('Advanced', 'fl-builder'),
7
  'sections' => array(
11
  'class' => array(
12
  'type' => 'text',
13
  'label' => __('CSS Class', 'fl-builder'),
14
+ 'help' => __( 'A custom CSS class that will be applied to this module. Spaces only, no dots.', 'fl-builder' ),
15
  'preview' => array(
16
  'type' => 'none'
17
  )
39
  'fields' => array(
40
  'margin_top' => array(
41
  'type' => 'text',
42
+ 'label' => __( 'Top', 'fl-builder' ),
43
  'default' => '',
44
+ 'description' => 'px',
45
  'maxlength' => '4',
46
  'size' => '5',
47
  'placeholder' => $global_settings->module_margins,
51
  ),
52
  'margin_bottom' => array(
53
  'type' => 'text',
54
+ 'label' => __( 'Bottom', 'fl-builder' ),
55
  'default' => '',
56
+ 'description' => 'px',
57
  'maxlength' => '4',
58
  'size' => '5',
59
  'placeholder' => $global_settings->module_margins,
63
  ),
64
  'margin_left' => array(
65
  'type' => 'text',
66
+ 'label' => __( 'Left', 'fl-builder' ),
67
  'default' => '',
68
+ 'description' => 'px',
69
  'maxlength' => '4',
70
  'size' => '5',
71
  'placeholder' => $global_settings->module_margins,
75
  ),
76
  'margin_right' => array(
77
  'type' => 'text',
78
+ 'label' => __( 'Right', 'fl-builder' ),
79
  'default' => '',
80
+ 'description' => 'px',
81
  'maxlength' => '4',
82
  'size' => '5',
83
  'placeholder' => $global_settings->module_margins,
94
  'type' => 'select',
95
  'label' => __('Style', 'fl-builder'),
96
  'options' => array(
97
+ '' => _x( 'None', 'Animation style.', 'fl-builder' ),
98
+ 'fade-in' => _x( 'Fade In', 'Animation style.', 'fl-builder' ),
99
+ 'slide-left' => _x( 'Slide Left', 'Animation style.', 'fl-builder' ),
100
+ 'slide-right' => _x( 'Slide Right', 'Animation style.', 'fl-builder' ),
101
+ 'slide-up' => _x( 'Slide Up', 'Animation style.', 'fl-builder' ),
102
+ 'slide-down' => _x( 'Slide Down', 'Animation style.', 'fl-builder' ),
103
  ),
104
  'preview' => array(
105
  'type' => 'none'
111
  'default' => '0.0',
112
  'maxlength' => '4',
113
  'size' => '5',
114
+ 'description' => _x( 'seconds', 'Value unit for form field of time in seconds. Such as: "5 seconds"', 'fl-builder' ),
115
  'help' => __('The amount of time in seconds before this animation starts.', 'fl-builder'),
116
  'preview' => array(
117
  'type' => 'none'
includes/row-settings.php CHANGED
@@ -1,4 +1,4 @@
1
- <?php
2
 
3
  $global_settings = FLBuilderModel::get_global_settings();
4
 
@@ -65,16 +65,16 @@ FLBuilder::register_settings_form('row', array(
65
  'label' => __('Type', 'fl-builder'),
66
  'default' => 'none',
67
  'options' => array(
68
- 'none' => __('None', 'fl-builder'),
69
- 'color' => __('Color', 'fl-builder'),
70
- 'photo' => __('Photo', 'fl-builder'),
71
- 'video' => __('Video', 'fl-builder'),
72
  'slideshow' => array(
73
- 'label' => __('Slideshow', 'fl-builder'),
74
  'premium' => true
75
  ),
76
  'parallax' => array(
77
- 'label' => __('Parallax', 'fl-builder'),
78
  'premium' => true
79
  )
80
  ),
@@ -123,7 +123,7 @@ FLBuilder::register_settings_form('row', array(
123
  'type' => 'none'
124
  )
125
  )
126
- )
127
  ),
128
  'bg_photo' => array(
129
  'title' => __('Background Photo', 'fl-builder'),
@@ -140,10 +140,10 @@ FLBuilder::register_settings_form('row', array(
140
  'label' => __('Repeat', 'fl-builder'),
141
  'default' => 'none',
142
  'options' => array(
143
- 'no-repeat' => __('None', 'fl-builder'),
144
- 'repeat' => __('Tile', 'fl-builder'),
145
- 'repeat-x' => __('Horizontal', 'fl-builder'),
146
- 'repeat-y' => __('Vertical', 'fl-builder')
147
  ),
148
  'help' => __('Repeat applies to how the image should display in the row background. Choosing none will display the image as uploaded. Tile will repeat the image as many times as needed to fill the row horizontally and vertically. You can also specify the image to only repeat horizontally or vertically.', 'fl-builder'),
149
  'preview' => array(
@@ -162,7 +162,7 @@ FLBuilder::register_settings_form('row', array(
162
  'right center' => __('Right Center', 'fl-builder'),
163
  'right bottom' => __('Right Bottom', 'fl-builder'),
164
  'center top' => __('Center Top', 'fl-builder'),
165
- 'center center' => __('Center Center', 'fl-builder'),
166
  'center bottom' => __('Center Bottom', 'fl-builder')
167
  ),
168
  'help' => __('Position will tell the image where it should sit in the row background.', 'fl-builder'),
@@ -175,8 +175,8 @@ FLBuilder::register_settings_form('row', array(
175
  'label' => __('Attachment', 'fl-builder'),
176
  'default' => 'scroll',
177
  'options' => array(
178
- 'scroll' => __('Scroll', 'fl-builder'),
179
- 'fixed' => __('Fixed', 'fl-builder')
180
  ),
181
  'help' => __('Attachment will specify how the image reacts when scrolling a page. When scrolling is selected, the image will scroll with page scrolling. This is the default setting. Fixed will allow the image to scroll within the row background if fill is selected in the scale setting.', 'fl-builder'),
182
  'preview' => array(
@@ -188,9 +188,9 @@ FLBuilder::register_settings_form('row', array(
188
  'label' => __('Scale', 'fl-builder'),
189
  'default' => 'cover',
190
  'options' => array(
191
- '' => __('None', 'fl-builder'),
192
- 'contain' => __('Fit', 'fl-builder'),
193
- 'cover' => __('Fill', 'fl-builder')
194
  ),
195
  'help' => __('Scale applies to how the image should display in the row background. You can select either fill or fit to the row background.', 'fl-builder'),
196
  'preview' => array(
@@ -229,7 +229,7 @@ FLBuilder::register_settings_form('row', array(
229
  'default' => 'wordpress',
230
  'options' => array(
231
  'wordpress' => __('Media Library', 'fl-builder'),
232
- 'smugmug' => __('SmugMug', 'fl-builder')
233
  ),
234
  'help' => __('Pull images from the WordPress media library or a gallery on your SmugMug site by inserting the RSS feed URL from SmugMug. The RSS feed URL can be accessed by using the get a link function in your SmugMug gallery.', 'fl-builder'),
235
  'toggle' => array(
@@ -263,7 +263,7 @@ FLBuilder::register_settings_form('row', array(
263
  'label' => __('Speed', 'fl-builder'),
264
  'default' => '3',
265
  'size' => '5',
266
- 'description' => __('seconds', 'fl-builder'),
267
  'preview' => array(
268
  'type' => 'none'
269
  )
@@ -273,7 +273,7 @@ FLBuilder::register_settings_form('row', array(
273
  'label' => __('Transition', 'fl-builder'),
274
  'default' => 'fade',
275
  'options' => array(
276
- 'none' => __('None', 'fl-builder'),
277
  'fade' => __('Fade', 'fl-builder'),
278
  'kenBurns' => __('Ken Burns', 'fl-builder'),
279
  'slideHorizontal' => __('Slide Horizontal', 'fl-builder'),
@@ -294,7 +294,7 @@ FLBuilder::register_settings_form('row', array(
294
  'label' => __('Transition Speed', 'fl-builder'),
295
  'default' => '1',
296
  'size' => '5',
297
- 'description' => __('seconds', 'fl-builder'),
298
  'preview' => array(
299
  'type' => 'none'
300
  )
@@ -329,7 +329,7 @@ FLBuilder::register_settings_form('row', array(
329
  'default' => 'fast',
330
  'options' => array(
331
  '2' => __('Fast', 'fl-builder'),
332
- '5' => __('Medium', 'fl-builder'),
333
  '8' => __('Slow', 'fl-builder')
334
  ),
335
  'preview' => array(
@@ -347,11 +347,11 @@ FLBuilder::register_settings_form('row', array(
347
  'default' => '',
348
  'help' => __('The type of border to use. Double borders must have a width of at least 3px to render properly.', 'fl-builder'),
349
  'options' => array(
350
- '' => __('None', 'fl-builder'),
351
- 'solid' => __('Solid', 'fl-builder'),
352
- 'dashed' => __('Dashed', 'fl-builder'),
353
- 'dotted' => __('Dotted', 'fl-builder'),
354
- 'double' => __('Double', 'fl-builder')
355
  ),
356
  'toggle' => array(
357
  '' => array(
@@ -397,7 +397,7 @@ FLBuilder::register_settings_form('row', array(
397
  'type' => 'text',
398
  'label' => __('Top Width', 'fl-builder'),
399
  'default' => '1',
400
- 'description' => __('px', 'fl-builder'),
401
  'maxlength' => '3',
402
  'size' => '5',
403
  'placeholder' => '0',
@@ -409,7 +409,7 @@ FLBuilder::register_settings_form('row', array(
409
  'type' => 'text',
410
  'label' => __('Bottom Width', 'fl-builder'),
411
  'default' => '1',
412
- 'description' => __('px', 'fl-builder'),
413
  'maxlength' => '3',
414
  'size' => '5',
415
  'placeholder' => '0',
@@ -421,7 +421,7 @@ FLBuilder::register_settings_form('row', array(
421
  'type' => 'text',
422
  'label' => __('Left Width', 'fl-builder'),
423
  'default' => '0',
424
- 'description' => __('px', 'fl-builder'),
425
  'maxlength' => '3',
426
  'size' => '5',
427
  'placeholder' => '0',
@@ -433,7 +433,7 @@ FLBuilder::register_settings_form('row', array(
433
  'type' => 'text',
434
  'label' => __('Right Width', 'fl-builder'),
435
  'default' => '0',
436
- 'description' => __('px', 'fl-builder'),
437
  'maxlength' => '3',
438
  'size' => '5',
439
  'placeholder' => '0',
@@ -470,7 +470,7 @@ FLBuilder::register_settings_form('row', array(
470
  'medium-mobile' => __('Medium &amp; Small Devices Only', 'fl-builder'),
471
  'mobile' => __('Small Devices Only', 'fl-builder'),
472
  ),
473
- 'help' => __('Choose whether to show or hide this row at different device sizes.'),
474
  'preview' => array(
475
  'type' => 'none'
476
  )
@@ -484,7 +484,7 @@ FLBuilder::register_settings_form('row', array(
484
  'type' => 'text',
485
  'label' => __('Top', 'fl-builder'),
486
  'default' => '',
487
- 'description' => __('px', 'fl-builder'),
488
  'maxlength' => '4',
489
  'size' => '5',
490
  'placeholder' => $global_settings->row_margins,
@@ -496,7 +496,7 @@ FLBuilder::register_settings_form('row', array(
496
  'type' => 'text',
497
  'label' => __('Bottom', 'fl-builder'),
498
  'default' => '',
499
- 'description' => __('px', 'fl-builder'),
500
  'maxlength' => '4',
501
  'size' => '5',
502
  'placeholder' => $global_settings->row_margins,
@@ -508,7 +508,7 @@ FLBuilder::register_settings_form('row', array(
508
  'type' => 'text',
509
  'label' => __('Left', 'fl-builder'),
510
  'default' => '',
511
- 'description' => __('px', 'fl-builder'),
512
  'maxlength' => '4',
513
  'size' => '5',
514
  'placeholder' => $global_settings->row_margins,
@@ -520,7 +520,7 @@ FLBuilder::register_settings_form('row', array(
520
  'type' => 'text',
521
  'label' => __('Right', 'fl-builder'),
522
  'default' => '',
523
- 'description' => __('px', 'fl-builder'),
524
  'maxlength' => '4',
525
  'size' => '5',
526
  'placeholder' => $global_settings->row_margins,
@@ -537,7 +537,7 @@ FLBuilder::register_settings_form('row', array(
537
  'type' => 'text',
538
  'label' => __('Top', 'fl-builder'),
539
  'default' => '',
540
- 'description' => __('px', 'fl-builder'),
541
  'maxlength' => '4',
542
  'size' => '5',
543
  'placeholder' => $global_settings->row_padding,
@@ -549,7 +549,7 @@ FLBuilder::register_settings_form('row', array(
549
  'type' => 'text',
550
  'label' => __('Bottom', 'fl-builder'),
551
  'default' => '',
552
- 'description' => __('px', 'fl-builder'),
553
  'maxlength' => '4',
554
  'size' => '5',
555
  'placeholder' => $global_settings->row_padding,
@@ -561,7 +561,7 @@ FLBuilder::register_settings_form('row', array(
561
  'type' => 'text',
562
  'label' => __('Left', 'fl-builder'),
563
  'default' => '',
564
- 'description' => __('px', 'fl-builder'),
565
  'maxlength' => '4',
566
  'size' => '5',
567
  'placeholder' => $global_settings->row_padding,
@@ -573,7 +573,7 @@ FLBuilder::register_settings_form('row', array(
573
  'type' => 'text',
574
  'label' => __('Right', 'fl-builder'),
575
  'default' => '',
576
- 'description' => __('px', 'fl-builder'),
577
  'maxlength' => '4',
578
  'size' => '5',
579
  'placeholder' => $global_settings->row_padding,
1
+ <?php
2
 
3
  $global_settings = FLBuilderModel::get_global_settings();
4
 
65
  'label' => __('Type', 'fl-builder'),
66
  'default' => 'none',
67
  'options' => array(
68
+ 'none' => _x( 'None', 'Background type.', 'fl-builder' ),
69
+ 'color' => _x( 'Color', 'Background type.', 'fl-builder' ),
70
+ 'photo' => _x( 'Photo', 'Background type.', 'fl-builder' ),
71
+ 'video' => _x( 'Video', 'Background type.', 'fl-builder' ),
72
  'slideshow' => array(
73
+ 'label' => _x( 'Slideshow', 'Background type.', 'fl-builder' ),
74
  'premium' => true
75
  ),
76
  'parallax' => array(
77
+ 'label' => _x( 'Parallax', 'Background type.', 'fl-builder' ),
78
  'premium' => true
79
  )
80
  ),
123
  'type' => 'none'
124
  )
125
  )
126
+ )
127
  ),
128
  'bg_photo' => array(
129
  'title' => __('Background Photo', 'fl-builder'),
140
  'label' => __('Repeat', 'fl-builder'),
141
  'default' => 'none',
142
  'options' => array(
143
+ 'no-repeat' => _x( 'None', 'Background repeat.', 'fl-builder' ),
144
+ 'repeat' => _x( 'Tile', 'Background repeat.', 'fl-builder' ),
145
+ 'repeat-x' => _x( 'Horizontal', 'Background repeat.', 'fl-builder' ),
146
+ 'repeat-y' => _x( 'Vertical', 'Background repeat.', 'fl-builder' )
147
  ),
148
  'help' => __('Repeat applies to how the image should display in the row background. Choosing none will display the image as uploaded. Tile will repeat the image as many times as needed to fill the row horizontally and vertically. You can also specify the image to only repeat horizontally or vertically.', 'fl-builder'),
149
  'preview' => array(
162
  'right center' => __('Right Center', 'fl-builder'),
163
  'right bottom' => __('Right Bottom', 'fl-builder'),
164
  'center top' => __('Center Top', 'fl-builder'),
165
+ 'center center' => __( 'Center', 'fl-builder' ),
166
  'center bottom' => __('Center Bottom', 'fl-builder')
167
  ),
168
  'help' => __('Position will tell the image where it should sit in the row background.', 'fl-builder'),
175
  'label' => __('Attachment', 'fl-builder'),
176
  'default' => 'scroll',
177
  'options' => array(
178
+ 'scroll' => __( 'Scroll', 'fl-builder' ),
179
+ 'fixed' => __( 'Fixed', 'fl-builder' )
180
  ),
181
  'help' => __('Attachment will specify how the image reacts when scrolling a page. When scrolling is selected, the image will scroll with page scrolling. This is the default setting. Fixed will allow the image to scroll within the row background if fill is selected in the scale setting.', 'fl-builder'),
182
  'preview' => array(
188
  'label' => __('Scale', 'fl-builder'),
189
  'default' => 'cover',
190
  'options' => array(
191
+ '' => _x( 'None', 'Background scale.', 'fl-builder' ),
192
+ 'contain' => __( 'Fit', 'fl-builder'),
193
+ 'cover' => __( 'Fill', 'fl-builder')
194
  ),
195
  'help' => __('Scale applies to how the image should display in the row background. You can select either fill or fit to the row background.', 'fl-builder'),
196
  'preview' => array(
229
  'default' => 'wordpress',
230
  'options' => array(
231
  'wordpress' => __('Media Library', 'fl-builder'),
232
+ 'smugmug' => 'SmugMug'
233
  ),
234
  'help' => __('Pull images from the WordPress media library or a gallery on your SmugMug site by inserting the RSS feed URL from SmugMug. The RSS feed URL can be accessed by using the get a link function in your SmugMug gallery.', 'fl-builder'),
235
  'toggle' => array(
263
  'label' => __('Speed', 'fl-builder'),
264
  'default' => '3',
265
  'size' => '5',
266
+ 'description' => _x( 'seconds', 'Value unit for form field of time in seconds. Such as: "5 seconds"', 'fl-builder' ),
267
  'preview' => array(
268
  'type' => 'none'
269
  )
273
  'label' => __('Transition', 'fl-builder'),
274
  'default' => 'fade',
275
  'options' => array(
276
+ 'none' => _x( 'None', 'Slideshow transition type.', 'fl-builder' ),
277
  'fade' => __('Fade', 'fl-builder'),
278
  'kenBurns' => __('Ken Burns', 'fl-builder'),
279
  'slideHorizontal' => __('Slide Horizontal', 'fl-builder'),
294
  'label' => __('Transition Speed', 'fl-builder'),
295
  'default' => '1',
296
  'size' => '5',
297
+ 'description' => _x( 'seconds', 'Value unit for form field of time in seconds. Such as: "5 seconds"', 'fl-builder' ),
298
  'preview' => array(
299
  'type' => 'none'
300
  )
329
  'default' => 'fast',
330
  'options' => array(
331
  '2' => __('Fast', 'fl-builder'),
332
+ '5' => _x( 'Medium', 'Speed.', 'fl-builder' ),
333
  '8' => __('Slow', 'fl-builder')
334
  ),
335
  'preview' => array(
347
  'default' => '',
348
  'help' => __('The type of border to use. Double borders must have a width of at least 3px to render properly.', 'fl-builder'),
349
  'options' => array(
350
+ '' => _x( 'None', 'Border type.', 'fl-builder' ),
351
+ 'solid' => _x( 'Solid', 'Border type.', 'fl-builder' ),
352
+ 'dashed' => _x( 'Dashed', 'Border type.', 'fl-builder' ),
353
+ 'dotted' => _x( 'Dotted', 'Border type.', 'fl-builder' ),
354
+ 'double' => _x( 'Double', 'Border type.', 'fl-builder' )
355
  ),
356
  'toggle' => array(
357
  '' => array(
397
  'type' => 'text',
398
  'label' => __('Top Width', 'fl-builder'),
399
  'default' => '1',
400
+ 'description' => 'px',
401
  'maxlength' => '3',
402
  'size' => '5',
403
  'placeholder' => '0',
409
  'type' => 'text',
410
  'label' => __('Bottom Width', 'fl-builder'),
411
  'default' => '1',
412
+ 'description' => 'px',
413
  'maxlength' => '3',
414
  'size' => '5',
415
  'placeholder' => '0',
421
  'type' => 'text',
422
  'label' => __('Left Width', 'fl-builder'),
423
  'default' => '0',
424
+ 'description' => 'px',
425
  'maxlength' => '3',
426
  'size' => '5',
427
  'placeholder' => '0',
433
  'type' => 'text',
434
  'label' => __('Right Width', 'fl-builder'),
435
  'default' => '0',
436
+ 'description' => 'px',
437
  'maxlength' => '3',
438
  'size' => '5',
439
  'placeholder' => '0',
470
  'medium-mobile' => __('Medium &amp; Small Devices Only', 'fl-builder'),
471
  'mobile' => __('Small Devices Only', 'fl-builder'),
472
  ),
473
+ 'help' => __( 'Choose whether to show or hide this row at different device sizes.', 'fl-builder' ),
474
  'preview' => array(
475
  'type' => 'none'
476
  )
484
  'type' => 'text',
485
  'label' => __('Top', 'fl-builder'),
486
  'default' => '',
487
+ 'description' => 'px',
488
  'maxlength' => '4',
489
  'size' => '5',
490
  'placeholder' => $global_settings->row_margins,
496
  'type' => 'text',
497
  'label' => __('Bottom', 'fl-builder'),
498
  'default' => '',
499
+ 'description' => 'px',
500
  'maxlength' => '4',
501
  'size' => '5',
502
  'placeholder' => $global_settings->row_margins,
508
  'type' => 'text',
509
  'label' => __('Left', 'fl-builder'),
510
  'default' => '',
511
+ 'description' => 'px',
512
  'maxlength' => '4',
513
  'size' => '5',
514
  'placeholder' => $global_settings->row_margins,
520
  'type' => 'text',
521
  'label' => __('Right', 'fl-builder'),
522
  'default' => '',
523
+ 'description' => 'px',
524
  'maxlength' => '4',
525
  'size' => '5',
526
  'placeholder' => $global_settings->row_margins,
537
  'type' => 'text',
538
  'label' => __('Top', 'fl-builder'),
539
  'default' => '',
540
+ 'description' => 'px',
541
  'maxlength' => '4',
542
  'size' => '5',
543
  'placeholder' => $global_settings->row_padding,
549
  'type' => 'text',
550
  'label' => __('Bottom', 'fl-builder'),
551
  'default' => '',
552
+ 'description' => 'px',
553
  'maxlength' => '4',
554
  'size' => '5',
555
  'placeholder' => $global_settings->row_padding,
561
  'type' => 'text',
562
  'label' => __('Left', 'fl-builder'),
563
  'default' => '',
564
+ 'description' => 'px',
565
  'maxlength' => '4',
566
  'size' => '5',
567
  'placeholder' => $global_settings->row_padding,
573
  'type' => 'text',
574
  'label' => __('Right', 'fl-builder'),
575
  'default' => '',
576
+ 'description' => 'px',
577
  'maxlength' => '4',
578
  'size' => '5',
579
  'placeholder' => $global_settings->row_padding,
includes/ui.php CHANGED
@@ -33,6 +33,11 @@
33
  </span>
34
  <?php endif; ?>
35
  <div class="fl-builder-bar-actions">
 
 
 
 
 
36
  <span class="fl-builder-done-button fl-builder-button fl-builder-button-primary"><?php _e('Done', 'fl-builder'); ?></span>
37
  <span class="fl-builder-tools-button fl-builder-button"><?php _e('Tools', 'fl-builder'); ?></span>
38
  <?php if(FL_BUILDER_LITE !== true && $enabled_templates != 'disabled') : ?>
@@ -92,21 +97,6 @@
92
  <?php endif; ?>
93
  </div>
94
  <?php endforeach; ?>
95
- <?php if(stristr(home_url(), 'demo.wpbeaverbuilder.com')) : ?>
96
- <div class="fl-builder-blocks-section">
97
- <span class="fl-builder-blocks-section-title fl-builder-block-upgrade">
98
- <?php _e('Buy Now!', 'fl-builder'); ?>
99
- <i class="fa fa-external-link-square"></i>
100
- </span>
101
- </div>
102
- <?php elseif(FL_BUILDER_LITE === true) : ?>
103
- <div class="fl-builder-blocks-section">
104
- <span class="fl-builder-blocks-section-title fl-builder-block-upgrade">
105
- <?php _e('Upgrade Today!', 'fl-builder'); ?>
106
- <i class="fa fa-external-link-square"></i>
107
- </span>
108
- </div>
109
- <?php endif; ?>
110
  </div>
111
  </div>
112
  </div>
33
  </span>
34
  <?php endif; ?>
35
  <div class="fl-builder-bar-actions">
36
+ <?php if(stristr(home_url(), 'demo.wpbeaverbuilder.com')) : ?>
37
+ <span class="fl-builder-upgrade-button fl-builder-button"><?php _e('Buy Now!', 'fl-builder'); ?></span>
38
+ <?php elseif(FL_BUILDER_LITE === true) : ?>
39
+ <span class="fl-builder-upgrade-button fl-builder-button"><?php _e('Upgrade!', 'fl-builder'); ?></span>
40
+ <?php endif; ?>
41
  <span class="fl-builder-done-button fl-builder-button fl-builder-button-primary"><?php _e('Done', 'fl-builder'); ?></span>
42
  <span class="fl-builder-tools-button fl-builder-button"><?php _e('Tools', 'fl-builder'); ?></span>
43
  <?php if(FL_BUILDER_LITE !== true && $enabled_templates != 'disabled') : ?>
97
  <?php endif; ?>
98
  </div>
99
  <?php endforeach; ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
100
  </div>
101
  </div>
102
  </div>
includes/updater-config.php CHANGED
@@ -3,7 +3,7 @@
3
  if(class_exists('FLUpdater')) {
4
  FLUpdater::add_product(array(
5
  'name' => 'Beaver Builder Plugin (Lite Version)',
6
- 'version' => '1.4.3',
7
  'slug' => 'bb-plugin',
8
  'type' => 'plugin'
9
  ));
3
  if(class_exists('FLUpdater')) {
4
  FLUpdater::add_product(array(
5
  'name' => 'Beaver Builder Plugin (Lite Version)',
6
+ 'version' => '1.4.5',
7
  'slug' => 'bb-plugin',
8
  'type' => 'plugin'
9
  ));
includes/updater/classes/{FLUpdater.php → class-fl-updater.php} RENAMED
@@ -6,11 +6,18 @@
6
  final class FLUpdater {
7
 
8
  /**
9
- * @property $_api_url
10
  * @static
11
  * @private
12
  */
13
- static private $_api_url = 'http://www.wpbeaverbuilder.com/';
 
 
 
 
 
 
 
14
 
15
  /**
16
  * @property $_products
@@ -31,7 +38,7 @@ final class FLUpdater {
31
  public function __construct( $settings = array() )
32
  {
33
  $this->settings = $settings;
34
-
35
  if ( 'plugin' == $settings['type'] ) {
36
  add_filter( 'pre_set_site_transient_update_plugins', array( $this, 'update_check' ) );
37
  add_filter( 'plugins_api', array( $this, 'plugin_info' ), 10, 3 );
@@ -50,8 +57,8 @@ final class FLUpdater {
50
  if(empty($transient->checked)) {
51
  return $transient;
52
  }
53
-
54
- $response = FLUpdater::api_request(array(
55
  'fl-api-method' => 'update_check',
56
  'email' => FLUpdater::get_subscription_email(),
57
  'domain' => network_home_url(),
@@ -59,24 +66,24 @@ final class FLUpdater {
59
  'slug' => $this->settings['slug'],
60
  'version' => $this->settings['version']
61
  ));
62
-
63
  if(isset($response) && $response !== false && is_object($response) && !isset($response->errors)) {
64
-
65
  if($this->settings['type'] == 'plugin') {
66
-
67
  $plugin = self::get_plugin_file($this->settings['slug']);
68
  $new_ver = $response->new_version;
69
  $curr_ver = $this->settings['version'];
70
-
71
  if(version_compare($new_ver, $curr_ver, '>')) {
72
  $transient->response[$plugin] = $response;
73
  }
74
  }
75
  else if($this->settings['type'] == 'theme') {
76
-
77
  $new_ver = $response->new_version;
78
  $curr_ver = $this->settings['version'];
79
-
80
  if(version_compare($new_ver, $curr_ver, '>')) {
81
  $transient->response[$this->settings['slug']] = array(
82
  'new_version' => $response->new_version,
@@ -97,7 +104,7 @@ final class FLUpdater {
97
  {
98
  if ( empty( $response->package ) ) {
99
  echo '<p style="padding:10px 20px; margin-top: 10px; background: #d54e21; color: #fff;">';
100
- echo __('<strong>UPDATE UNAVAILABLE!</strong>');
101
  echo '&nbsp;&nbsp;&nbsp;';
102
  echo __('Please subscribe to enable automatic updates for this plugin.', 'fl-builder');
103
  echo ' <a href="' . $plugin_data['PluginURI'] . '" target="_blank" style="color: #fff; text-decoration: underline;">';
@@ -115,8 +122,8 @@ final class FLUpdater {
115
  if(!isset($args->slug) || $args->slug != $this->settings['slug']) {
116
  return $false;
117
  }
118
-
119
- $response = FLUpdater::api_request(array(
120
  'fl-api-method' => 'plugin_info',
121
  'email' => FLUpdater::get_subscription_email(),
122
  'domain' => network_home_url(),
@@ -124,16 +131,16 @@ final class FLUpdater {
124
  'slug' => $this->settings['slug'],
125
  'version' => $this->settings['version']
126
  ));
127
-
128
  if(isset($response) && is_object($response) && $response !== false) {
129
  $response->name = $this->settings['name'];
130
  $response->sections = (array)$response->sections;
131
  return $response;
132
  }
133
-
134
  return $false;
135
  }
136
-
137
  /**
138
  * @method init
139
  * @static
@@ -141,14 +148,14 @@ final class FLUpdater {
141
  static public function init()
142
  {
143
  include FL_UPDATER_DIR . 'includes/config.php';
144
-
145
  foreach($config as $path) {
146
  if(file_exists($path)) {
147
  require_once $path;
148
  }
149
  }
150
  }
151
-
152
  /**
153
  * @method add_product
154
  * @static
@@ -156,7 +163,7 @@ final class FLUpdater {
156
  static public function add_product($args = array())
157
  {
158
  if(is_array($args) && isset($args['slug'])) {
159
-
160
  if($args['type'] == 'plugin') {
161
  if(file_exists(WP_CONTENT_DIR . '/plugins/' . $args['slug'])) {
162
  self::$_products[$args['name']] = $args;
@@ -171,22 +178,22 @@ final class FLUpdater {
171
  }
172
  }
173
  }
174
-
175
  /**
176
  * @method render_form
177
  * @static
178
  */
179
- static public function render_form()
180
  {
181
  // Activate a subscription?
182
  if(isset($_POST['fl-updater-nonce'])) {
183
  if(wp_verify_nonce($_POST['fl-updater-nonce'], 'updater-nonce')) {
184
- self::save_subscription_email($_POST['email']);
185
  }
186
  }
187
-
188
  $status = self::get_subscription_status();
189
-
190
  // Include the form ui.
191
  include FL_UPDATER_DIR . 'includes/form.php';
192
  }
@@ -198,7 +205,7 @@ final class FLUpdater {
198
  static public function get_subscription_email()
199
  {
200
  $value = get_site_option('fl_themes_subscription_email');
201
-
202
  return $value ? $value : '';
203
  }
204
 
@@ -217,18 +224,18 @@ final class FLUpdater {
217
  */
218
  static public function get_subscription_status()
219
  {
220
- $status = self::api_request(array(
221
  'fl-api-method' => 'subscription_status',
222
  'email' => FLUpdater::get_subscription_email()
223
  ));
224
-
225
  if(isset($status->active) && $status->active) {
226
  return $status;
227
  }
228
-
229
  return false;
230
  }
231
-
232
  /**
233
  * @method get_plugin_file
234
  * @static
@@ -242,24 +249,29 @@ final class FLUpdater {
242
  else {
243
  $file = $slug . '/' . $slug . '.php';
244
  }
245
-
246
  return $file;
247
  }
248
-
249
  /**
250
  * @method api_request
251
  * @static
252
  * @private
253
  */
254
- static private function api_request($args = array())
255
  {
256
- $params = array();
257
-
258
- foreach($args as $key => $val) {
259
- $params[] = $key . '=' . urlencode($val);
260
- }
261
 
262
- return self::remote_get(self::$_api_url . '?' . implode('&', $params));
 
 
 
 
 
 
 
263
  }
264
 
265
  /**
@@ -277,13 +289,13 @@ final class FLUpdater {
277
  if(wp_remote_retrieve_response_code($request) != 200) {
278
  return false;
279
  }
280
-
281
  $response = json_decode(wp_remote_retrieve_body($request));
282
-
283
  if(isset($response->error)) {
284
- return false;
285
  }
286
-
287
  return $response;
288
  }
289
  }
6
  final class FLUpdater {
7
 
8
  /**
9
+ * @property $_store_api_url
10
  * @static
11
  * @private
12
  */
13
+ static private $_store_api_url = 'http://www.wpbeaverbuilder.com/';
14
+
15
+ /**
16
+ * @property $_updates_api_url
17
+ * @static
18
+ * @private
19
+ */
20
+ static private $_updates_api_url = 'http://updates.wpbeaverbuilder.com/';
21
 
22
  /**
23
  * @property $_products
38
  public function __construct( $settings = array() )
39
  {
40
  $this->settings = $settings;
41
+
42
  if ( 'plugin' == $settings['type'] ) {
43
  add_filter( 'pre_set_site_transient_update_plugins', array( $this, 'update_check' ) );
44
  add_filter( 'plugins_api', array( $this, 'plugin_info' ), 10, 3 );
57
  if(empty($transient->checked)) {
58
  return $transient;
59
  }
60
+
61
+ $response = FLUpdater::api_request(self::$_updates_api_url, array(
62
  'fl-api-method' => 'update_check',
63
  'email' => FLUpdater::get_subscription_email(),
64
  'domain' => network_home_url(),
66
  'slug' => $this->settings['slug'],
67
  'version' => $this->settings['version']
68
  ));
69
+
70
  if(isset($response) && $response !== false && is_object($response) && !isset($response->errors)) {
71
+
72
  if($this->settings['type'] == 'plugin') {
73
+
74
  $plugin = self::get_plugin_file($this->settings['slug']);
75
  $new_ver = $response->new_version;
76
  $curr_ver = $this->settings['version'];
77
+
78
  if(version_compare($new_ver, $curr_ver, '>')) {
79
  $transient->response[$plugin] = $response;
80
  }
81
  }
82
  else if($this->settings['type'] == 'theme') {
83
+
84
  $new_ver = $response->new_version;
85
  $curr_ver = $this->settings['version'];
86
+
87
  if(version_compare($new_ver, $curr_ver, '>')) {
88
  $transient->response[$this->settings['slug']] = array(
89
  'new_version' => $response->new_version,
104
  {
105
  if ( empty( $response->package ) ) {
106
  echo '<p style="padding:10px 20px; margin-top: 10px; background: #d54e21; color: #fff;">';
107
+ echo __( '<strong>UPDATE UNAVAILABLE!</strong>', 'fl-builder' );
108
  echo '&nbsp;&nbsp;&nbsp;';
109
  echo __('Please subscribe to enable automatic updates for this plugin.', 'fl-builder');
110
  echo ' <a href="' . $plugin_data['PluginURI'] . '" target="_blank" style="color: #fff; text-decoration: underline;">';
122
  if(!isset($args->slug) || $args->slug != $this->settings['slug']) {
123
  return $false;
124
  }
125
+
126
+ $response = FLUpdater::api_request(self::$_updates_api_url, array(
127
  'fl-api-method' => 'plugin_info',
128
  'email' => FLUpdater::get_subscription_email(),
129
  'domain' => network_home_url(),
131
  'slug' => $this->settings['slug'],
132
  'version' => $this->settings['version']
133
  ));
134
+
135
  if(isset($response) && is_object($response) && $response !== false) {
136
  $response->name = $this->settings['name'];
137
  $response->sections = (array)$response->sections;
138
  return $response;
139
  }
140
+
141
  return $false;
142
  }
143
+
144
  /**
145
  * @method init
146
  * @static
148
  static public function init()
149
  {
150
  include FL_UPDATER_DIR . 'includes/config.php';
151
+
152
  foreach($config as $path) {
153
  if(file_exists($path)) {
154
  require_once $path;
155
  }
156
  }
157
  }
158
+
159
  /**
160
  * @method add_product
161
  * @static
163
  static public function add_product($args = array())
164
  {
165
  if(is_array($args) && isset($args['slug'])) {
166
+
167
  if($args['type'] == 'plugin') {
168
  if(file_exists(WP_CONTENT_DIR . '/plugins/' . $args['slug'])) {
169
  self::$_products[$args['name']] = $args;
178
  }
179
  }
180
  }
181
+
182
  /**
183
  * @method render_form
184
  * @static
185
  */
186
+ static public function render_form()
187
  {
188
  // Activate a subscription?
189
  if(isset($_POST['fl-updater-nonce'])) {
190
  if(wp_verify_nonce($_POST['fl-updater-nonce'], 'updater-nonce')) {
191
+ self::save_subscription_email($_POST['email']);
192
  }
193
  }
194
+
195
  $status = self::get_subscription_status();
196
+
197
  // Include the form ui.
198
  include FL_UPDATER_DIR . 'includes/form.php';
199
  }
205
  static public function get_subscription_email()
206
  {
207
  $value = get_site_option('fl_themes_subscription_email');
208
+
209
  return $value ? $value : '';
210
  }
211
 
224
  */
225
  static public function get_subscription_status()
226
  {
227
+ $status = self::api_request(self::$_store_api_url, array(
228
  'fl-api-method' => 'subscription_status',
229
  'email' => FLUpdater::get_subscription_email()
230
  ));
231
+
232
  if(isset($status->active) && $status->active) {
233
  return $status;
234
  }
235
+
236
  return false;
237
  }
238
+
239
  /**
240
  * @method get_plugin_file
241
  * @static
249
  else {
250
  $file = $slug . '/' . $slug . '.php';
251
  }
252
+
253
  return $file;
254
  }
255
+
256
  /**
257
  * @method api_request
258
  * @static
259
  * @private
260
  */
261
+ static private function api_request($api_url = false, $args = array())
262
  {
263
+ if($api_url) {
264
+
265
+ $params = array();
 
 
266
 
267
+ foreach($args as $key => $val) {
268
+ $params[] = $key . '=' . urlencode($val);
269
+ }
270
+
271
+ return self::remote_get($api_url . '?' . implode('&', $params));
272
+ }
273
+
274
+ return false;
275
  }
276
 
277
  /**
289
  if(wp_remote_retrieve_response_code($request) != 200) {
290
  return false;
291
  }
292
+
293
  $response = json_decode(wp_remote_retrieve_body($request));
294
+
295
  if(isset($response->error)) {
296
+ return false;
297
  }
298
+
299
  return $response;
300
  }
301
  }
includes/updater/includes/form.php CHANGED
@@ -1,42 +1,42 @@
1
  <div class="wrap">
2
-
3
  <?php if(!$status) : ?>
4
  <p style="padding:10px 20px; background: #d54e21; color: #fff;">
5
  <?php _e('UPDATES UNAVAILABLE! Please subscribe or enter your licence key below to enable automatic updates.', 'fl-builder'); ?>
6
  &nbsp;<a style="color: #fff;" href="http://www.wpbeaverbuilder.com/" target="_blank"><?php _e('Subscribe Now', 'fl-builder'); ?> &raquo;</a>
7
  </p>
8
  <?php endif; ?>
9
-
10
  <h3 class="fl-settings-form-header">
11
  <?php _e('Updates &amp; Support Subscription', 'fl-builder'); ?>
12
- <span> &mdash; </span>
13
  <?php if($status) : ?>
14
  <i style="color:#3cb341;"><?php _e('Active!', 'fl-builder'); ?></i>
15
  <?php else : ?>
16
  <i style="color:#ae5842;"><?php _e('Not Active!', 'fl-builder'); ?></i>
17
  <?php endif; ?>
18
  </h3>
19
-
20
  <?php if(isset($_POST['fl-updater-nonce'])) : ?>
21
  <div class="updated">
22
  <p><?php _e('Email address saved!', 'fl-builder'); ?></p>
23
  </div>
24
  <?php endif; ?>
25
-
26
  <p>
27
- <?php echo sprintf(__('Enter your <a href="%s" target="_blank">licence key</a> to enable remote updates and support.', 'fl-builder'), 'http://www.wpbeaverbuilder.com/my-account/') ?>
28
  </p>
29
  <?php if(is_multisite()) : ?>
30
  <p>
31
- <strong><?php _e('NOTE:'); ?></strong> <?php _e('This applies to all sites on the network.', 'fl-builder'); ?>
32
  </p>
33
  <?php endif; ?>
34
  <form action="" method="post">
35
-
36
  <input type="password" name="email" value="<?php echo self::get_subscription_email(); ?>" class="regular-text" />
37
-
38
  <p class="submit">
39
- <input type="submit" name="submit" class="button button-primary" value="<?php _e('Save Subscription Settings', 'fl-builder'); ?>">
40
  <?php wp_nonce_field('updater-nonce', 'fl-updater-nonce'); ?>
41
  </p>
42
  </form>
1
  <div class="wrap">
2
+
3
  <?php if(!$status) : ?>
4
  <p style="padding:10px 20px; background: #d54e21; color: #fff;">
5
  <?php _e('UPDATES UNAVAILABLE! Please subscribe or enter your licence key below to enable automatic updates.', 'fl-builder'); ?>
6
  &nbsp;<a style="color: #fff;" href="http://www.wpbeaverbuilder.com/" target="_blank"><?php _e('Subscribe Now', 'fl-builder'); ?> &raquo;</a>
7
  </p>
8
  <?php endif; ?>
9
+
10
  <h3 class="fl-settings-form-header">
11
  <?php _e('Updates &amp; Support Subscription', 'fl-builder'); ?>
12
+ <span> &mdash; </span>
13
  <?php if($status) : ?>
14
  <i style="color:#3cb341;"><?php _e('Active!', 'fl-builder'); ?></i>
15
  <?php else : ?>
16
  <i style="color:#ae5842;"><?php _e('Not Active!', 'fl-builder'); ?></i>
17
  <?php endif; ?>
18
  </h3>
19
+
20
  <?php if(isset($_POST['fl-updater-nonce'])) : ?>
21
  <div class="updated">
22
  <p><?php _e('Email address saved!', 'fl-builder'); ?></p>
23
  </div>
24
  <?php endif; ?>
25
+
26
  <p>
27
+ <?php echo sprintf( __( 'Enter your <a%s>licence key</a> to enable remote updates and support.', 'fl-builder' ), ' href="http://www.wpbeaverbuilder.com/my-account/" target="_blank"' ) ?>
28
  </p>
29
  <?php if(is_multisite()) : ?>
30
  <p>
31
+ <strong><?php _e( 'NOTE:', 'fl-builder' ); ?></strong> <?php _e('This applies to all sites on the network.', 'fl-builder'); ?>
32
  </p>
33
  <?php endif; ?>
34
  <form action="" method="post">
35
+
36
  <input type="password" name="email" value="<?php echo self::get_subscription_email(); ?>" class="regular-text" />
37
+
38
  <p class="submit">
39
+ <input type="submit" name="submit" class="button button-primary" value="<?php esc_attr_e( 'Save Subscription Settings', 'fl-builder' ); ?>">
40
  <?php wp_nonce_field('updater-nonce', 'fl-updater-nonce'); ?>
41
  </p>
42
  </form>
includes/updater/updater.php CHANGED
@@ -7,7 +7,7 @@ if(!class_exists('FLUpdater') && FL_BUILDER_LITE !== true) {
7
  define('FL_UPDATER_DIR', trailingslashit(dirname(__FILE__)));
8
 
9
  /* Classes */
10
- require_once FL_UPDATER_DIR . 'classes/FLUpdater.php';
11
 
12
  /* Actions */
13
  add_action('fl_themes_license_form', 'FLUpdater::render_form');
7
  define('FL_UPDATER_DIR', trailingslashit(dirname(__FILE__)));
8
 
9
  /* Classes */
10
+ require_once FL_UPDATER_DIR . 'classes/class-fl-updater.php';
11
 
12
  /* Actions */
13
  add_action('fl_themes_license_form', 'FLUpdater::render_form');
includes/user-template-settings.php CHANGED
@@ -1,18 +1,18 @@
1
- <?php
2
 
3
  FLBuilder::register_settings_form('user_template', array(
4
  'title' => __('Save Template', 'fl-builder'),
5
  'tabs' => array(
6
  'general' => array(
7
  'title' => __('General', 'fl-builder'),
8
- 'description' => __('Save the current layout as a template that can be reused under Templates > Your Templates.', 'fl-builder'),
9
  'sections' => array(
10
  'general' => array(
11
  'title' => '',
12
  'fields' => array(
13
  'name' => array(
14
  'type' => 'text',
15
- 'label' => __('Name', 'fl-builder')
16
  )
17
  )
18
  )
1
+ <?php
2
 
3
  FLBuilder::register_settings_form('user_template', array(
4
  'title' => __('Save Template', 'fl-builder'),
5
  'tabs' => array(
6
  'general' => array(
7
  'title' => __('General', 'fl-builder'),
8
+ 'description' => __('Save the current layout as a template that can be reused under <strong>Templates &rarr; Your Templates</strong>.', 'fl-builder'),
9
  'sections' => array(
10
  'general' => array(
11
  'title' => '',
12
  'fields' => array(
13
  'name' => array(
14
  'type' => 'text',
15
+ 'label' => _x( 'Name', 'Template name.', 'fl-builder' )
16
  )
17
  )
18
  )
js/fl-builder.js CHANGED
@@ -333,11 +333,11 @@ var FLBuilder;
333
  $('.fl-builder-done-button').on('click', FLBuilder._doneClicked);
334
  $('.fl-builder-add-content-button').on('click', FLBuilder._showPanel);
335
  $('.fl-builder-templates-button').on('click', FLBuilder._changeTemplateClicked);
 
336
 
337
  /* Panel */
338
  $('.fl-builder-panel-actions .fl-builder-panel-close').on('click', FLBuilder._closePanel);
339
  $('.fl-builder-blocks-section-title').on('click', FLBuilder._blockSectionTitleClicked);
340
- $('.fl-builder-block-upgrade').on('click', FLBuilder._blockUpgradeClicked);
341
 
342
  /* Drag and Drop */
343
  $('body').delegate('.fl-builder-block', 'mousedown', FLBuilder._blockDragInit);
@@ -618,6 +618,15 @@ var FLBuilder;
618
  });
619
  },
620
 
 
 
 
 
 
 
 
 
 
621
  /**
622
  * @method _blockSectionTitleClicked
623
  * @private
@@ -638,15 +647,6 @@ var FLBuilder;
638
  FLBuilder._initScrollbars();
639
  },
640
 
641
- /**
642
- * @method _blockUpgradeClicked
643
- * @private
644
- */
645
- _blockUpgradeClicked: function()
646
- {
647
- window.open(FLBuilderConfig.upgradeUrl);
648
- },
649
-
650
  /* Save Actions
651
  ----------------------------------------------------------*/
652
 
@@ -2074,7 +2074,7 @@ var FLBuilder;
2074
  }
2075
 
2076
  module.addClass('fl-block-overlay-active');
2077
- module.append('<div class="fl-module-overlay fl-block-overlay"><div class="fl-block-overlay-header"><div class="fl-block-overlay-actions"><div class="fl-block-overlay-title">'+ moduleName +'</div><i class="fl-block-move fa fa-arrows fl-tip" title="' + FLBuilderStrings.move + '"></i><i class="fl-block-settings fa fa-wrench fl-tip" title="' + moduleName + ' ' + FLBuilderStrings.settings + '"></i><i class="fl-block-copy fa fa-copy fl-tip" title="' + FLBuilderStrings.duplicate + '"></i><i class="fl-block-columns fa fa-columns fl-tip" title="' + FLBuilderStrings.columnSettings + '"></i><i class="fl-block-remove fa fa-times fl-tip" title="' + FLBuilderStrings.remove + '"></i></div><div class="fl-clear"></div></div></div>');
2078
  FLBuilder._initTipTips();
2079
  }
2080
 
333
  $('.fl-builder-done-button').on('click', FLBuilder._doneClicked);
334
  $('.fl-builder-add-content-button').on('click', FLBuilder._showPanel);
335
  $('.fl-builder-templates-button').on('click', FLBuilder._changeTemplateClicked);
336
+ $('.fl-builder-upgrade-button').on('click', FLBuilder._upgradeClicked);
337
 
338
  /* Panel */
339
  $('.fl-builder-panel-actions .fl-builder-panel-close').on('click', FLBuilder._closePanel);
340
  $('.fl-builder-blocks-section-title').on('click', FLBuilder._blockSectionTitleClicked);
 
341
 
342
  /* Drag and Drop */
343
  $('body').delegate('.fl-builder-block', 'mousedown', FLBuilder._blockDragInit);
618
  });
619
  },
620
 
621
+ /**
622
+ * @method _upgradeClicked
623
+ * @private
624
+ */
625
+ _upgradeClicked: function()
626
+ {
627
+ window.open(FLBuilderConfig.upgradeUrl);
628
+ },
629
+
630
  /**
631
  * @method _blockSectionTitleClicked
632
  * @private
647
  FLBuilder._initScrollbars();
648
  },
649
 
 
 
 
 
 
 
 
 
 
650
  /* Save Actions
651
  ----------------------------------------------------------*/
652
 
2074
  }
2075
 
2076
  module.addClass('fl-block-overlay-active');
2077
+ module.append('<div class="fl-module-overlay fl-block-overlay"><div class="fl-block-overlay-header"><div class="fl-block-overlay-actions"><div class="fl-block-overlay-title">'+ moduleName +'</div><i class="fl-block-move fa fa-arrows fl-tip" title="' + FLBuilderStrings.move + '"></i><i class="fl-block-settings fa fa-wrench fl-tip" title="' + FLBuilderStrings.settings.replace( '%s', moduleName ) + '"></i><i class="fl-block-copy fa fa-copy fl-tip" title="' + FLBuilderStrings.duplicate + '"></i><i class="fl-block-columns fa fa-columns fl-tip" title="' + FLBuilderStrings.columnSettings + '"></i><i class="fl-block-remove fa fa-times fl-tip" title="' + FLBuilderStrings.remove + '"></i></div><div class="fl-clear"></div></div></div>');
2078
  FLBuilder._initTipTips();
2079
  }
2080
 
js/fl-icon-selector.js CHANGED
@@ -4,9 +4,10 @@ var FLIconSelector;
4
 
5
  FLIconSelector = {
6
 
7
- _content: null,
8
- _lightbox: null,
9
- _rendered: false,
 
10
 
11
  open: function(callback)
12
  {
@@ -26,8 +27,8 @@ var FLIconSelector;
26
  FLIconSelector._lightbox.open();
27
  }
28
 
29
- FLIconSelector._lightbox.on('select', function(event, icon){
30
- FLIconSelector._lightbox.off('select');
31
  FLIconSelector._lightbox.close();
32
  callback(icon);
33
  });
@@ -46,29 +47,54 @@ var FLIconSelector;
46
  {
47
  FLIconSelector._content = html;
48
  FLIconSelector._lightbox.setContent(html);
49
- $('.fl-icons-filter select').on('change', FLIconSelector._filter);
 
50
  $('.fl-icons-list i').on('click', FLIconSelector._select);
51
  $('.fl-icon-selector-cancel').on('click', $.proxy(FLIconSelector._lightbox.close, FLIconSelector._lightbox));
52
  },
53
 
54
  _filter: function()
55
  {
56
- var val = $(this).val();
 
57
 
58
- if(val == 'all') {
59
- $('.fl-icons-section').show();
 
60
  }
61
  else {
62
- $('.fl-icons-section').hide();
63
- $('.fl-' + val).show();
 
 
 
 
 
 
 
 
 
 
64
  }
65
  },
66
 
 
 
 
 
 
 
 
 
 
 
 
 
67
  _select: function()
68
  {
69
  var icon = $(this).attr('class');
70
 
71
- FLIconSelector._lightbox.trigger('select', icon);
72
  }
73
  };
74
 
4
 
5
  FLIconSelector = {
6
 
7
+ _content : null,
8
+ _lightbox : null,
9
+ _rendered : false,
10
+ _filterText : '',
11
 
12
  open: function(callback)
13
  {
27
  FLIconSelector._lightbox.open();
28
  }
29
 
30
+ FLIconSelector._lightbox.on('icon-selected', function(event, icon){
31
+ FLIconSelector._lightbox.off('icon-selected');
32
  FLIconSelector._lightbox.close();
33
  callback(icon);
34
  });
47
  {
48
  FLIconSelector._content = html;
49
  FLIconSelector._lightbox.setContent(html);
50
+ $('.fl-icons-filter-select').on('change', FLIconSelector._filter);
51
+ $('.fl-icons-filter-text').on('keyup', FLIconSelector._filter);
52
  $('.fl-icons-list i').on('click', FLIconSelector._select);
53
  $('.fl-icon-selector-cancel').on('click', $.proxy(FLIconSelector._lightbox.close, FLIconSelector._lightbox));
54
  },
55
 
56
  _filter: function()
57
  {
58
+ var section = $( '.fl-icons-filter-select' ).val(),
59
+ text = $( '.fl-icons-filter-text' ).val();
60
 
61
+ // Filter sections.
62
+ if ( 'all' == section ) {
63
+ $( '.fl-icons-section' ).show();
64
  }
65
  else {
66
+ $( '.fl-icons-section' ).hide();
67
+ $( '.fl-' + section ).show();
68
+ }
69
+
70
+ // Filter icons.
71
+ FLIconSelector._filterText = text;
72
+
73
+ if ( '' != text ) {
74
+ $( '.fl-icons-list i' ).each( FLIconSelector._filterIcon );
75
+ }
76
+ else {
77
+ $( '.fl-icons-list i' ).show();
78
  }
79
  },
80
 
81
+ _filterIcon: function()
82
+ {
83
+ var icon = $( this );
84
+
85
+ if ( -1 == icon.attr( 'class' ).indexOf( FLIconSelector._filterText ) ) {
86
+ icon.hide();
87
+ }
88
+ else {
89
+ icon.show();
90
+ }
91
+ },
92
+
93
  _select: function()
94
  {
95
  var icon = $(this).attr('class');
96
 
97
+ FLIconSelector._lightbox.trigger('icon-selected', icon);
98
  }
99
  };
100
 
lang/fl-builder-it_IT.mo DELETED
Binary file
lang/fl-builder-it_IT.po DELETED
@@ -1,3506 +0,0 @@
1
- msgid ""
2
- msgstr ""
3
- "Project-Id-Version: FastLine Page Builder (Pro Version) v1.2.3\n"
4
- "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2014-05-07 14:49-0800\n"
6
- "PO-Revision-Date: 2014-07-14 16:31:24+0000\n"
7
- "Last-Translator: Alessandro Curci <hantarex@gmail.com>\n"
8
- "Language-Team: \n"
9
- "MIME-Version: 1.0\n"
10
- "Content-Type: text/plain; charset=UTF-8\n"
11
- "Content-Transfer-Encoding: 8bit\n"
12
- "Plural-Forms: nplurals=2; plural=n != 1;\n"
13
- "X-Generator: Poedit 1.5.7\n"
14
- "X-Poedit-Language: \n"
15
- "X-Poedit-Country: \n"
16
- "X-Poedit-SourceCharset: UTF-8\n"
17
- "X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;\n"
18
- "X-Poedit-Basepath: .\n"
19
- "X-Poedit-Bookmarks: \n"
20
- "X-Poedit-SearchPath-0: /classes\n"
21
- "X-Textdomain-Support: yes"
22
-
23
- #: modules/accordion/accordion.php:14
24
- #@ fl-builder
25
- msgid "Accordion"
26
- msgstr "Fisarmonica"
27
-
28
- #: modules/accordion/accordion.php:15
29
- #@ fl-builder
30
- msgid "Display a collapsible accordion of items."
31
- msgstr "Mostra una fisarmonica di voci collassabile "
32
-
33
- #: modules/accordion/accordion.php:28
34
- #@ fl-builder
35
- msgid "Items"
36
- msgstr "Voci"
37
-
38
- #: modules/accordion/accordion.php:35
39
- #@ fl-builder
40
- msgid "Item"
41
- msgstr "Voce"
42
-
43
- #: includes/column-settings.php:7
44
- #: includes/module-settings.php:74
45
- #: includes/row-settings.php:9
46
- #: modules/accordion/accordion.php:45
47
- #: modules/button/button.php:66
48
- #: modules/callout/callout.php:230
49
- #: modules/content-slider/content-slider.php:418
50
- #: modules/cta/cta.php:88
51
- #: modules/heading/heading.php:59
52
- #: modules/icon/icon.php:72
53
- #: modules/icon-group/icon-group.php:46
54
- #: modules/separator/separator.php:55
55
- #@ fl-builder
56
- msgid "Style"
57
- msgstr "Stile"
58
-
59
- #: modules/accordion/accordion.php:52
60
- #@ fl-builder
61
- msgid "Border Color"
62
- msgstr "Colore Bordi"
63
-
64
- #: modules/accordion/accordion.php:57
65
- #@ fl-builder
66
- msgid "Label Size"
67
- msgstr "Dimensioni Label"
68
-
69
- #: modules/accordion/accordion.php:60
70
- #: modules/gallery/gallery.php:259
71
- #@ fl-builder
72
- msgid "Small"
73
- msgstr "Piccola"
74
-
75
- #: classes/FLBuilderPhoto.php:77
76
- #: includes/js-config.php:36
77
- #: includes/row-settings.php:269
78
- #: modules/accordion/accordion.php:61
79
- #: modules/gallery/gallery.php:260
80
- #@ fl-builder
81
- msgid "Medium"
82
- msgstr "Media"
83
-
84
- #: classes/FLBuilderPhoto.php:76
85
- #: includes/js-config.php:34
86
- #: modules/accordion/accordion.php:62
87
- #: modules/gallery/gallery.php:261
88
- #@ fl-builder
89
- msgid "Large"
90
- msgstr "Grande"
91
-
92
- #: modules/accordion/accordion.php:67
93
- #@ fl-builder
94
- msgid "Item Spacing"
95
- msgstr "Spazio Voci"
96
-
97
- #: modules/accordion/accordion.php:83
98
- #@ fl-builder
99
- msgid "Add Item"
100
- msgstr "Aggiungi Voce"
101
-
102
- #: includes/global-settings.php:7
103
- #: includes/user-template-settings.php:7
104
- #: modules/accordion/accordion.php:86
105
- #: modules/button/button.php:28
106
- #: modules/callout/callout.php:206
107
- #: modules/contact-form/contact-form.php:57
108
- #: modules/content-slider/content-slider.php:183
109
- #: modules/content-slider/content-slider.php:307
110
- #: modules/cta/cta.php:64
111
- #: modules/gallery/gallery.php:209
112
- #: modules/heading/heading.php:26
113
- #: modules/html/html.php:26
114
- #: modules/icon/icon.php:29
115
- #: modules/icon-group/icon-group.php:124
116
- #: modules/map/map.php:26
117
- #: modules/photo/photo.php:313
118
- #: modules/rich-text/rich-text.php:26
119
- #: modules/separator/separator.php:27
120
- #: modules/sidebar/sidebar.php:27
121
- #: modules/slideshow/slideshow.php:256
122
- #: modules/social-buttons/social-buttons.php:62
123
- #: modules/testimonials/testimonials.php:30
124
- #: modules/testimonials/testimonials.php:191
125
- #: modules/video/video.php:75
126
- #: modules/widget/widget.php:27
127
- #: modules/woocommerce/woocommerce.php:50
128
- #@ fl-builder
129
- msgid "General"
130
- msgstr "Generale"
131
-
132
- #: modules/accordion/accordion.php:93
133
- #@ fl-builder
134
- msgid "Label"
135
- msgstr "Label"
136
-
137
- #: modules/accordion/accordion.php:98
138
- #@ fl-builder
139
- msgid "Content"
140
- msgstr "Contenuto"
141
-
142
- #: modules/button/button.php:14
143
- #: modules/callout/callout.php:453
144
- #: modules/content-slider/content-slider.php:595
145
- #: modules/cta/cta.php:195
146
- #@ fl-builder
147
- msgid "Button"
148
- msgstr "Bottone"
149
-
150
- #: modules/button/button.php:15
151
- #@ fl-builder
152
- msgid "A simple call to action button."
153
- msgstr "Un semplice bottone \"Call to Action\""
154
-
155
- #: includes/column-settings.php:23
156
- #: includes/row-settings.php:42
157
- #: modules/button/button.php:35
158
- #: modules/callout/callout.php:218
159
- #: modules/callout/callout.php:452
160
- #: modules/callout/callout.php:468
161
- #: modules/content-slider/content-slider.php:375
162
- #: modules/content-slider/content-slider.php:610
163
- #: modules/cta/cta.php:76
164
- #: modules/cta/cta.php:202
165
- #@ fl-builder
166
- msgid "Text"
167
- msgstr "Testo"
168
-
169
- #: modules/button/button.php:39
170
- #: modules/callout/callout.php:303
171
- #: modules/callout/callout.php:350
172
- #: modules/callout/callout.php:354
173
- #: modules/icon/icon.php:14
174
- #: modules/icon/icon.php:36
175
- #: modules/icon-group/icon-group.php:36
176
- #: modules/icon-group/icon-group.php:131
177
- #@ fl-builder
178
- msgid "Icon"
179
- msgstr "Icona"
180
-
181
- #: modules/button/button.php:45
182
- #: modules/button/button.php:49
183
- #: modules/callout/callout.php:424
184
- #: modules/callout/callout.php:428
185
- #: modules/content-slider/content-slider.php:566
186
- #: modules/content-slider/content-slider.php:570
187
- #: modules/content-slider/content-slider.php:594
188
- #: modules/cta/cta.php:211
189
- #: modules/heading/heading.php:38
190
- #: modules/heading/heading.php:42
191
- #: modules/icon/icon.php:45
192
- #: modules/icon-group/icon-group.php:135
193
- #: modules/slideshow/slideshow.php:340
194
- #@ fl-builder
195
- msgid "Link"
196
- msgstr "Link"
197
-
198
- #: modules/button/button.php:54
199
- #: modules/callout/callout.php:434
200
- #: modules/content-slider/content-slider.php:576
201
- #: modules/cta/cta.php:216
202
- #: modules/heading/heading.php:47
203
- #: modules/icon/icon.php:50
204
- #: modules/photo/photo.php:416
205
- #@ fl-builder
206
- msgid "Link Target"
207
- msgstr "Link Target"
208
-
209
- #: modules/button/button.php:57
210
- #: modules/callout/callout.php:437
211
- #: modules/content-slider/content-slider.php:579
212
- #: modules/cta/cta.php:219
213
- #: modules/heading/heading.php:50
214
- #: modules/icon/icon.php:53
215
- #: modules/photo/photo.php:419
216
- #@ fl-builder
217
- msgid "Same Window"
218
- msgstr "Finestra Corrente"
219
-
220
- #: modules/button/button.php:58
221
- #: modules/callout/callout.php:438
222
- #: modules/content-slider/content-slider.php:580
223
- #: modules/cta/cta.php:220
224
- #: modules/heading/heading.php:51
225
- #: modules/icon/icon.php:54
226
- #: modules/photo/photo.php:420
227
- #@ fl-builder
228
- msgid "New Window"
229
- msgstr "Nuova Finestra"
230
-
231
- #: modules/button/button.php:69
232
- #: modules/cta/cta.php:168
233
- #: modules/heading/heading.php:62
234
- #: modules/icon/icon.php:75
235
- #: modules/icon-group/icon-group.php:49
236
- #@ fl-builder
237
- #@ default
238
- msgid "Colors"
239
- msgstr "Colori"
240
-
241
- #: includes/column-settings.php:33
242
- #: includes/row-settings.php:93
243
- #: modules/button/button.php:73
244
- #: modules/callout/callout.php:386
245
- #: modules/callout/callout.php:477
246
- #: modules/content-slider/content-slider.php:356
247
- #: modules/content-slider/content-slider.php:619
248
- #: modules/cta/cta.php:178
249
- #: modules/cta/cta.php:230
250
- #: modules/icon/icon.php:89
251
- #: modules/icon-group/icon-group.php:63
252
- #@ fl-builder
253
- msgid "Background Color"
254
- msgstr "Colore di sfondo"
255
-
256
- #: modules/button/button.php:79
257
- #: modules/callout/callout.php:391
258
- #: modules/callout/callout.php:483
259
- #: modules/content-slider/content-slider.php:625
260
- #: modules/cta/cta.php:236
261
- #: modules/icon/icon.php:94
262
- #: modules/icon-group/icon-group.php:68
263
- #@ fl-builder
264
- msgid "Background Hover Color"
265
- msgstr "Colore di sfondo al passaggio"
266
-
267
- #: modules/button/button.php:85
268
- #: modules/callout/callout.php:489
269
- #: modules/content-slider/content-slider.php:521
270
- #: modules/content-slider/content-slider.php:630
271
- #: modules/content-slider/content-slider.php:714
272
- #: modules/cta/cta.php:172
273
- #: modules/cta/cta.php:242
274
- #: modules/heading/heading.php:67
275
- #@ fl-builder
276
- msgid "Text Color"
277
- msgstr "Colore del testo"
278
-
279
- #: modules/button/button.php:91
280
- #: modules/callout/callout.php:495
281
- #: modules/content-slider/content-slider.php:636
282
- #: modules/cta/cta.php:248
283
- #@ fl-builder
284
- msgid "Text Hover Color"
285
- msgstr "Colore del testo al passaggio"
286
-
287
- #: modules/button/button.php:97
288
- #: modules/callout/callout.php:396
289
- #: modules/callout/callout.php:501
290
- #: modules/content-slider/content-slider.php:641
291
- #: modules/cta/cta.php:254
292
- #: modules/icon/icon.php:99
293
- #: modules/icon-group/icon-group.php:73
294
- #@ fl-builder
295
- msgid "Gradient"
296
- msgstr "Gradiente"
297
-
298
- #: includes/global-settings.php:18
299
- #: includes/global-settings.php:87
300
- #: includes/row-settings.php:250
301
- #: modules/button/button.php:100
302
- #: modules/callout/callout.php:399
303
- #: modules/callout/callout.php:504
304
- #: modules/content-slider/content-slider.php:202
305
- #: modules/content-slider/content-slider.php:216
306
- #: modules/content-slider/content-slider.php:250
307
- #: modules/content-slider/content-slider.php:259
308
- #: modules/content-slider/content-slider.php:530
309
- #: modules/content-slider/content-slider.php:644
310
- #: modules/cta/cta.php:257
311
- #: modules/icon/icon.php:102
312
- #: modules/icon-group/icon-group.php:76
313
- #: modules/slideshow/slideshow.php:315
314
- #: modules/slideshow/slideshow.php:325
315
- #: modules/slideshow/slideshow.php:368
316
- #: modules/slideshow/slideshow.php:409
317
- #: modules/slideshow/slideshow.php:428
318
- #: modules/slideshow/slideshow.php:477
319
- #: modules/slideshow/slideshow.php:486
320
- #: modules/slideshow/slideshow.php:495
321
- #: modules/slideshow/slideshow.php:504
322
- #: modules/slideshow/slideshow.php:513
323
- #: modules/slideshow/slideshow.php:522
324
- #: modules/slideshow/slideshow.php:531
325
- #: modules/slideshow/slideshow.php:545
326
- #: modules/slideshow/slideshow.php:560
327
- #: modules/slideshow/slideshow.php:595
328
- #: modules/slideshow/slideshow.php:604
329
- #: modules/slideshow/slideshow.php:613
330
- #: modules/slideshow/slideshow.php:622
331
- #: modules/social-buttons/social-buttons.php:103
332
- #: modules/social-buttons/social-buttons.php:112
333
- #: modules/social-buttons/social-buttons.php:121
334
- #: modules/testimonials/testimonials.php:81
335
- #: modules/testimonials/testimonials.php:120
336
- #: modules/testimonials/testimonials.php:145
337
- #: modules/video/video.php:110
338
- #: modules/video/video.php:119
339
- #@ fl-builder
340
- msgid "No"
341
- msgstr "No"
342
-
343
- #: includes/global-settings.php:19
344
- #: includes/global-settings.php:88
345
- #: includes/row-settings.php:251
346
- #: modules/button/button.php:101
347
- #: modules/callout/callout.php:400
348
- #: modules/callout/callout.php:505
349
- #: modules/content-slider/content-slider.php:203
350
- #: modules/content-slider/content-slider.php:217
351
- #: modules/content-slider/content-slider.php:251
352
- #: modules/content-slider/content-slider.php:260
353
- #: modules/content-slider/content-slider.php:531
354
- #: modules/content-slider/content-slider.php:645
355
- #: modules/cta/cta.php:258
356
- #: modules/icon/icon.php:103
357
- #: modules/icon-group/icon-group.php:77
358
- #: modules/slideshow/slideshow.php:316
359
- #: modules/slideshow/slideshow.php:326
360
- #: modules/slideshow/slideshow.php:369
361
- #: modules/slideshow/slideshow.php:410
362
- #: modules/slideshow/slideshow.php:429
363
- #: modules/slideshow/slideshow.php:478
364
- #: modules/slideshow/slideshow.php:487
365
- #: modules/slideshow/slideshow.php:496
366
- #: modules/slideshow/slideshow.php:505
367
- #: modules/slideshow/slideshow.php:514
368
- #: modules/slideshow/slideshow.php:523
369
- #: modules/slideshow/slideshow.php:532
370
- #: modules/slideshow/slideshow.php:546
371
- #: modules/slideshow/slideshow.php:561
372
- #: modules/slideshow/slideshow.php:596
373
- #: modules/slideshow/slideshow.php:605
374
- #: modules/slideshow/slideshow.php:614
375
- #: modules/slideshow/slideshow.php:623
376
- #: modules/social-buttons/social-buttons.php:102
377
- #: modules/social-buttons/social-buttons.php:111
378
- #: modules/social-buttons/social-buttons.php:120
379
- #: modules/testimonials/testimonials.php:82
380
- #: modules/testimonials/testimonials.php:121
381
- #: modules/testimonials/testimonials.php:146
382
- #: modules/video/video.php:111
383
- #: modules/video/video.php:120
384
- #@ fl-builder
385
- msgid "Yes"
386
- msgstr "Sì"
387
-
388
- #: modules/button/button.php:107
389
- #: modules/callout/callout.php:233
390
- #: modules/cta/cta.php:91
391
- #: modules/heading/heading.php:72
392
- #: modules/icon/icon.php:109
393
- #: modules/icon-group/icon-group.php:83
394
- #@ fl-builder
395
- #@ default
396
- msgid "Structure"
397
- msgstr "Struttura"
398
-
399
- #: includes/row-settings.php:16
400
- #: modules/button/button.php:111
401
- #: modules/content-slider/content-slider.php:476
402
- #@ fl-builder
403
- msgid "Width"
404
- msgstr "Larghezza"
405
-
406
- #: modules/button/button.php:114
407
- #: modules/callout/callout.php:518
408
- #: modules/content-slider/content-slider.php:554
409
- #@ fl-builder
410
- msgid "Auto"
411
- msgstr "Auto"
412
-
413
- #: includes/row-settings.php:20
414
- #: includes/row-settings.php:35
415
- #: modules/button/button.php:115
416
- #: modules/callout/callout.php:519
417
- #@ fl-builder
418
- msgid "Full Width"
419
- msgstr "Larghezza Piena"
420
-
421
- #: modules/button/button.php:138
422
- #: modules/cta/cta.php:109
423
- #: modules/heading/heading.php:76
424
- #: modules/heading/heading.php:126
425
- #: modules/icon/icon.php:121
426
- #: modules/icon-group/icon-group.php:103
427
- #: modules/photo/photo.php:358
428
- #: modules/social-buttons/social-buttons.php:89
429
- #@ fl-builder
430
- msgid "Alignment"
431
- msgstr "Allineamento"
432
-
433
- #: modules/button/button.php:141
434
- #: modules/callout/callout.php:240
435
- #: modules/content-slider/content-slider.php:470
436
- #: modules/cta/cta.php:113
437
- #: modules/heading/heading.php:80
438
- #: modules/heading/heading.php:144
439
- #: modules/icon/icon.php:124
440
- #: modules/icon-group/icon-group.php:106
441
- #: modules/photo/photo.php:362
442
- #: modules/social-buttons/social-buttons.php:92
443
- #@ fl-builder
444
- msgid "Center"
445
- msgstr "Centro"
446
-
447
- #: includes/column-settings.php:182
448
- #: includes/column-settings.php:223
449
- #: includes/module-settings.php:51
450
- #: includes/row-settings.php:407
451
- #: includes/row-settings.php:448
452
- #: modules/button/button.php:142
453
- #: modules/callout/callout.php:241
454
- #: modules/content-slider/content-slider.php:469
455
- #: modules/cta/cta.php:112
456
- #: modules/heading/heading.php:79
457
- #: modules/heading/heading.php:143
458
- #: modules/icon/icon.php:125
459
- #: modules/icon-group/icon-group.php:107
460
- #: modules/photo/photo.php:361
461
- #: modules/social-buttons/social-buttons.php:93
462
- #@ fl-builder
463
- msgid "Left"
464
- msgstr "Sinistra"
465
-
466
- #: includes/column-settings.php:191
467
- #: includes/column-settings.php:232
468
- #: includes/module-settings.php:60
469
- #: includes/row-settings.php:416
470
- #: includes/row-settings.php:457
471
- #: modules/button/button.php:143
472
- #: modules/callout/callout.php:242
473
- #: modules/content-slider/content-slider.php:471
474
- #: modules/cta/cta.php:114
475
- #: modules/heading/heading.php:81
476
- #: modules/heading/heading.php:145
477
- #: modules/icon/icon.php:126
478
- #: modules/icon-group/icon-group.php:108
479
- #: modules/photo/photo.php:363
480
- #: modules/social-buttons/social-buttons.php:94
481
- #@ fl-builder
482
- msgid "Right"
483
- msgstr "Destra"
484
-
485
- #: modules/button/button.php:148
486
- #: modules/callout/callout.php:524
487
- #: modules/content-slider/content-slider.php:655
488
- #: modules/cta/cta.php:268
489
- #: modules/heading/heading.php:99
490
- #: modules/heading/heading.php:150
491
- #@ fl-builder
492
- msgid "Font Size"
493
- msgstr "Dimensione del carattere"
494
-
495
- #: includes/column-settings.php:100
496
- #: includes/column-settings.php:109
497
- #: includes/column-settings.php:118
498
- #: includes/column-settings.php:127
499
- #: includes/column-settings.php:166
500
- #: includes/column-settings.php:175
501
- #: includes/column-settings.php:184
502
- #: includes/column-settings.php:193
503
- #: includes/column-settings.php:207
504
- #: includes/column-settings.php:216
505
- #: includes/column-settings.php:225
506
- #: includes/column-settings.php:234
507
- #: includes/global-settings.php:45
508
- #: includes/global-settings.php:53
509
- #: includes/global-settings.php:61
510
- #: includes/global-settings.php:75
511
- #: includes/global-settings.php:102
512
- #: includes/module-settings.php:35
513
- #: includes/module-settings.php:44
514
- #: includes/module-settings.php:53
515
- #: includes/module-settings.php:62
516
- #: includes/row-settings.php:325
517
- #: includes/row-settings.php:334
518
- #: includes/row-settings.php:343
519
- #: includes/row-settings.php:352
520
- #: includes/row-settings.php:391
521
- #: includes/row-settings.php:400
522
- #: includes/row-settings.php:409
523
- #: includes/row-settings.php:418
524
- #: includes/row-settings.php:432
525
- #: includes/row-settings.php:441
526
- #: includes/row-settings.php:450
527
- #: includes/row-settings.php:459
528
- #: modules/button/button.php:134
529
- #: modules/button/button.php:152
530
- #: modules/button/button.php:160
531
- #: modules/button/button.php:168
532
- #: modules/callout/callout.php:284
533
- #: modules/callout/callout.php:414
534
- #: modules/callout/callout.php:528
535
- #: modules/callout/callout.php:536
536
- #: modules/callout/callout.php:544
537
- #: modules/content-slider/content-slider.php:194
538
- #: modules/content-slider/content-slider.php:274
539
- #: modules/content-slider/content-slider.php:456
540
- #: modules/content-slider/content-slider.php:486
541
- #: modules/content-slider/content-slider.php:494
542
- #: modules/content-slider/content-slider.php:502
543
- #: modules/content-slider/content-slider.php:510
544
- #: modules/content-slider/content-slider.php:659
545
- #: modules/content-slider/content-slider.php:667
546
- #: modules/content-slider/content-slider.php:675
547
- #: modules/cta/cta.php:123
548
- #: modules/cta/cta.php:163
549
- #: modules/cta/cta.php:272
550
- #: modules/cta/cta.php:280
551
- #: modules/cta/cta.php:288
552
- #: modules/gallery/gallery.php:270
553
- #: modules/heading/heading.php:117
554
- #: modules/heading/heading.php:168
555
- #: modules/icon/icon.php:117
556
- #: modules/icon-group/icon-group.php:91
557
- #: modules/icon-group/icon-group.php:99
558
- #: modules/slideshow/slideshow.php:298
559
- #: modules/slideshow/slideshow.php:583
560
- #: modules/testimonials/testimonials.php:69
561
- #@ fl-builder
562
- msgid "px"
563
- msgstr "px"
564
-
565
- #: includes/column-settings.php:201
566
- #: includes/global-settings.php:49
567
- #: includes/row-settings.php:426
568
- #: modules/button/button.php:156
569
- #: modules/callout/callout.php:532
570
- #: modules/content-slider/content-slider.php:663
571
- #: modules/cta/cta.php:276
572
- #@ fl-builder
573
- msgid "Padding"
574
- msgstr "Padding"
575
-
576
- #: modules/button/button.php:164
577
- #: modules/callout/callout.php:540
578
- #: modules/cta/cta.php:284
579
- #@ fl-builder
580
- msgid "Round Corners"
581
- msgstr "Angoli Arrotondati"
582
-
583
- #: modules/callout/callout.php:14
584
- #@ fl-builder
585
- msgid "Callout"
586
- msgstr "Didascalia"
587
-
588
- #: modules/callout/callout.php:15
589
- #@ fl-builder
590
- msgid "A heading and snippet of text with an optional link, icon and image."
591
- msgstr "Un titolo e un estratto di testo con un collegamento, icona e immagine facoltativi."
592
-
593
- #: modules/callout/callout.php:213
594
- #: modules/content-slider/content-slider.php:406
595
- #: modules/content-slider/content-slider.php:421
596
- #: modules/cta/cta.php:71
597
- #: modules/heading/heading.php:14
598
- #: modules/heading/heading.php:33
599
- #: modules/testimonials/testimonials.php:56
600
- #: modules/testimonials/testimonials.php:61
601
- #@ fl-builder
602
- msgid "Heading"
603
- msgstr "Titolo"
604
-
605
- #: modules/callout/callout.php:237
606
- #@ fl-builder
607
- msgid "Overall Alignment"
608
- msgstr "Allineamento Globale"
609
-
610
- #: modules/callout/callout.php:244
611
- #@ fl-builder
612
- msgid "The alignment that will apply to all elements within the callout."
613
- msgstr "L'allineamento che si applica a tutti gli elementi all'interno della didascalia."
614
-
615
- #: modules/callout/callout.php:249
616
- #: modules/cta/cta.php:128
617
- #@ default
618
- msgid "Heading Structure"
619
- msgstr "Struttura del titolo"
620
-
621
- #: modules/callout/callout.php:253
622
- #: modules/content-slider/content-slider.php:425
623
- #: modules/cta/cta.php:132
624
- #@ fl-builder
625
- msgid "Heading Tag"
626
- msgstr "Tag del titolo"
627
-
628
- #: modules/callout/callout.php:266
629
- #: modules/content-slider/content-slider.php:438
630
- #: modules/content-slider/content-slider.php:452
631
- #: modules/cta/cta.php:145
632
- #: modules/testimonials/testimonials.php:65
633
- #@ fl-builder
634
- msgid "Heading Size"
635
- msgstr "Dimensione del titolo"
636
-
637
- #: modules/callout/callout.php:269
638
- #: modules/content-slider/content-slider.php:441
639
- #: modules/cta/cta.php:148
640
- #: modules/heading/heading.php:102
641
- #: modules/heading/heading.php:129
642
- #: modules/heading/heading.php:153
643
- #: modules/woocommerce/woocommerce.php:192
644
- #@ fl-builder
645
- msgid "Default"
646
- msgstr "Predefinito"
647
-
648
- #: modules/button/button.php:116
649
- #: modules/callout/callout.php:270
650
- #: modules/content-slider/content-slider.php:442
651
- #: modules/cta/cta.php:149
652
- #: modules/heading/heading.php:103
653
- #: modules/heading/heading.php:130
654
- #: modules/heading/heading.php:154
655
- #: modules/social-buttons/social-buttons.php:72
656
- #@ fl-builder
657
- msgid "Custom"
658
- msgstr "Personalizzato"
659
-
660
- #: modules/callout/callout.php:280
661
- #: modules/cta/cta.php:159
662
- #@ fl-builder
663
- msgid "Heading Custom Size"
664
- msgstr "Dimensione personalizzata del titolo"
665
-
666
- #: modules/callout/callout.php:291
667
- #@ fl-builder
668
- msgid "Image"
669
- msgstr "Immagine"
670
-
671
- #: modules/callout/callout.php:298
672
- #@ fl-builder
673
- msgid "Image Type"
674
- msgstr "Tipo Immagine"
675
-
676
- #: includes/column-settings.php:59
677
- #: includes/module-settings.php:76
678
- #: includes/row-settings.php:59
679
- #: includes/row-settings.php:122
680
- #: includes/row-settings.php:161
681
- #: includes/row-settings.php:225
682
- #: includes/row-settings.php:284
683
- #: modules/callout/callout.php:301
684
- #: modules/callout/callout.php:329
685
- #: modules/callout/callout.php:451
686
- #: modules/content-slider/content-slider.php:331
687
- #: modules/content-slider/content-slider.php:378
688
- #: modules/content-slider/content-slider.php:593
689
- #: modules/gallery/gallery.php:288
690
- #: modules/photo/photo.php:349
691
- #: modules/photo/photo.php:394
692
- #: modules/slideshow/slideshow.php:339
693
- #: modules/slideshow/slideshow.php:384
694
- #: modules/slideshow/slideshow.php:443
695
- #@ fl-builder
696
- msgid "None"
697
- msgstr "Nessuna"
698
-
699
- #: includes/row-settings.php:61
700
- #: includes/row-settings.php:115
701
- #: includes/row-settings.php:261
702
- #: modules/callout/callout.php:302
703
- #: modules/callout/callout.php:318
704
- #: modules/callout/callout.php:322
705
- #: modules/content-slider/content-slider.php:328
706
- #: modules/content-slider/content-slider.php:397
707
- #: modules/content-slider/content-slider.php:705
708
- #: modules/photo/photo.php:25
709
- #: modules/photo/photo.php:337
710
- #@ fl-builder
711
- msgid "Photo"
712
- msgstr "Foto"
713
-
714
- #: modules/callout/callout.php:326
715
- #: modules/photo/photo.php:346
716
- #: modules/slideshow/slideshow.php:312
717
- #@ fl-builder
718
- msgid "Crop"
719
- msgstr "Ritagliata"
720
-
721
- #: modules/callout/callout.php:330
722
- #: modules/photo/photo.php:350
723
- #@ fl-builder
724
- msgid "Landscape"
725
- msgstr "Paesaggio"
726
-
727
- #: modules/callout/callout.php:331
728
- #: modules/photo/photo.php:351
729
- #@ fl-builder
730
- msgid "Panorama"
731
- msgstr "Panorama"
732
-
733
- #: modules/callout/callout.php:332
734
- #: modules/photo/photo.php:352
735
- #@ fl-builder
736
- msgid "Portrait"
737
- msgstr "Ritratto"
738
-
739
- #: modules/callout/callout.php:333
740
- #: modules/photo/photo.php:353
741
- #@ fl-builder
742
- msgid "Square"
743
- msgstr "Quadro"
744
-
745
- #: includes/row-settings.php:131
746
- #: modules/callout/callout.php:338
747
- #: modules/callout/callout.php:358
748
- #: modules/content-slider/content-slider.php:465
749
- #@ fl-builder
750
- msgid "Position"
751
- msgstr "Posizione"
752
-
753
- #: modules/callout/callout.php:341
754
- #: modules/callout/callout.php:361
755
- #@ fl-builder
756
- msgid "Above Heading"
757
- msgstr "SOpra il titolo"
758
-
759
- #: modules/callout/callout.php:342
760
- #: modules/callout/callout.php:362
761
- #@ fl-builder
762
- msgid "Below Heading"
763
- msgstr "Sotto il titolo"
764
-
765
- #: modules/callout/callout.php:343
766
- #: modules/callout/callout.php:365
767
- #@ fl-builder
768
- msgid "Left of Text and Heading"
769
- msgstr "Alla sinistra del testo e del titolo"
770
-
771
- #: modules/callout/callout.php:344
772
- #: modules/callout/callout.php:366
773
- #@ fl-builder
774
- msgid "Right of Text and Heading"
775
- msgstr "Alla destra del testo e del titolo"
776
-
777
- #: modules/callout/callout.php:363
778
- #@ fl-builder
779
- msgid "Left Heading"
780
- msgstr "Alla sinistra del titolo"
781
-
782
- #: modules/callout/callout.php:364
783
- #@ fl-builder
784
- msgid "Right Heading"
785
- msgstr "Alla destra del titolo"
786
-
787
- #: modules/callout/callout.php:372
788
- #@ fl-builder
789
- msgid "Icon Colors"
790
- msgstr "Colori icona"
791
-
792
- #: includes/column-settings.php:27
793
- #: includes/column-settings.php:37
794
- #: includes/column-settings.php:85
795
- #: includes/row-settings.php:46
796
- #: includes/row-settings.php:60
797
- #: includes/row-settings.php:97
798
- #: includes/row-settings.php:310
799
- #: modules/callout/callout.php:376
800
- #: modules/content-slider/content-slider.php:330
801
- #: modules/icon/icon.php:79
802
- #: modules/icon-group/icon-group.php:53
803
- #: modules/separator/separator.php:34
804
- #@ fl-builder
805
- msgid "Color"
806
- msgstr "Colore"
807
-
808
- #: modules/callout/callout.php:381
809
- #: modules/icon/icon.php:84
810
- #: modules/icon-group/icon-group.php:58
811
- #@ fl-builder
812
- msgid "Hover Color"
813
- msgstr "Colore al passaggio"
814
-
815
- #: modules/callout/callout.php:406
816
- #@ fl-builder
817
- msgid "Icon Structure"
818
- msgstr "Struttura Icona"
819
-
820
- #: modules/callout/callout.php:410
821
- #: modules/icon/icon.php:113
822
- #: modules/icon-group/icon-group.php:87
823
- #@ fl-builder
824
- msgid "Size"
825
- msgstr "Dimensione"
826
-
827
- #: modules/callout/callout.php:421
828
- #: modules/content-slider/content-slider.php:563
829
- #@ fl-builder
830
- msgid "Call To Action"
831
- msgstr "Call To Action"
832
-
833
- #: modules/callout/callout.php:430
834
- #@ fl-builder
835
- msgid "The link applies to the entire module. If choosing a call to action type below, this link will also be used for the text or button."
836
- msgstr "Il collegamento da applicare per l'intero modulo. Se hai scelto il tipo \"call to action\" in basso, questo collegamento sarà utilizzato anche per il testo o bottone."
837
-
838
- #: modules/callout/callout.php:444
839
- #: modules/content-slider/content-slider.php:586
840
- #: modules/cta/cta.php:14
841
- #@ fl-builder
842
- msgid "Call to Action"
843
- msgstr "Call to Action"
844
-
845
- #: includes/column-settings.php:55
846
- #: includes/row-settings.php:56
847
- #: includes/row-settings.php:280
848
- #: modules/callout/callout.php:448
849
- #: modules/content-slider/content-slider.php:324
850
- #: modules/content-slider/content-slider.php:371
851
- #: modules/content-slider/content-slider.php:590
852
- #: modules/content-slider/content-slider.php:689
853
- #: modules/slideshow/slideshow.php:336
854
- #@ fl-builder
855
- msgid "Type"
856
- msgstr "TIpo"
857
-
858
- #: modules/callout/callout.php:473
859
- #: modules/content-slider/content-slider.php:615
860
- #: modules/cta/cta.php:226
861
- #@ fl-builder
862
- msgid "Button Colors"
863
- msgstr "Colori Bottone"
864
-
865
- #: modules/callout/callout.php:511
866
- #: modules/content-slider/content-slider.php:651
867
- #: modules/cta/cta.php:264
868
- #@ fl-builder
869
- msgid "Button Structure"
870
- msgstr "Struttura Bottone"
871
-
872
- #: modules/callout/callout.php:515
873
- #@ fl-builder
874
- msgid "Button Width"
875
- msgstr "Larghezza Bottone"
876
-
877
- #: modules/contact-form/contact-form.php:14
878
- #@ fl-builder
879
- msgid "Contact Form"
880
- msgstr "Form Contatti"
881
-
882
- #: modules/contact-form/contact-form.php:15
883
- #@ fl-builder
884
- msgid "A very simple contact form."
885
- msgstr "Un semplice form contatti"
886
-
887
- #: modules/contact-form/contact-form.php:36
888
- #@ fl-builder
889
- msgid "Contact Form Submission"
890
- msgstr "Inoltro Form Contatti"
891
-
892
- #: modules/contact-form/contact-form.php:64
893
- #@ fl-builder
894
- msgid "Send To Email"
895
- msgstr "Invia ad una Email"
896
-
897
- #: modules/contact-form/contact-form.php:66
898
- #@ fl-builder
899
- msgid "example@mail.com"
900
- msgstr "esempio@mail.com"
901
-
902
- #: modules/contact-form/contact-form.php:67
903
- #@ fl-builder
904
- msgid "The contact form will send to this e-mail"
905
- msgstr "Il contenuto del form contatti sarà inoltrato a questa email"
906
-
907
- #: includes/user-template-settings.php:15
908
- #: modules/contact-form/includes/frontend.php:4
909
- #@ fl-builder
910
- msgid "Name"
911
- msgstr "Nome"
912
-
913
- #: modules/contact-form/includes/frontend.php:5
914
- #@ fl-builder
915
- msgid "Please enter your name."
916
- msgstr "Prego, inserire il proprio nome."
917
-
918
- #: modules/contact-form/includes/frontend.php:10
919
- #@ fl-builder
920
- msgid "Email"
921
- msgstr "Email"
922
-
923
- #: modules/contact-form/includes/frontend.php:11
924
- #@ fl-builder
925
- msgid "Please enter a valid email."
926
- msgstr "Prego, inserire una Email valida."
927
-
928
- #: modules/contact-form/includes/frontend.php:16
929
- #@ fl-builder
930
- msgid "Your Message"
931
- msgstr "Messaggio"
932
-
933
- #: modules/contact-form/includes/frontend.php:17
934
- #@ fl-builder
935
- msgid "Please enter a message."
936
- msgstr "Prego, inserire il testo del messaggio."
937
-
938
- #: modules/contact-form/includes/frontend.php:23
939
- #@ fl-builder
940
- msgid "Send"
941
- msgstr "Invia"
942
-
943
- #: modules/content-slider/content-slider.php:14
944
- #@ fl-builder
945
- msgid "Content Slider"
946
- msgstr "Content Slider"
947
-
948
- #: modules/content-slider/content-slider.php:15
949
- #@ fl-builder
950
- msgid "Displays multiple slides with an optional heading and call to action."
951
- msgstr "Mostra slide multiple con un titolo ed una \"call to action\" facoltativi."
952
-
953
- #: modules/content-slider/content-slider.php:190
954
- #: modules/map/map.php:38
955
- #: modules/separator/separator.php:47
956
- #: modules/slideshow/slideshow.php:294
957
- #@ fl-builder
958
- msgid "Height"
959
- msgstr "Altezza"
960
-
961
- #: modules/content-slider/content-slider.php:195
962
- #@ fl-builder
963
- msgid "This setting is the minimum height of the content slider. Content will expand the height automatically."
964
- msgstr "Questa impostazione è l'altezza minima della content slider. Il contenuto espanderà atomaticamente l'altezza."
965
-
966
- #: modules/content-slider/content-slider.php:199
967
- #: modules/slideshow/slideshow.php:365
968
- #: modules/testimonials/testimonials.php:78
969
- #: modules/video/video.php:107
970
- #@ fl-builder
971
- msgid "Auto Play"
972
- msgstr "Auto Play"
973
-
974
- #: modules/content-slider/content-slider.php:213
975
- #@ fl-builder
976
- msgid "Show Play/Pause"
977
- msgstr "Mostra Play/Pausa"
978
-
979
- #: includes/module-settings.php:86
980
- #: modules/content-slider/content-slider.php:222
981
- #: modules/testimonials/testimonials.php:87
982
- #@ fl-builder
983
- msgid "Delay"
984
- msgstr "Ritardo"
985
-
986
- #: modules/content-slider/content-slider.php:226
987
- #: modules/content-slider/content-slider.php:243
988
- #: modules/testimonials/testimonials.php:91
989
- #: modules/testimonials/testimonials.php:108
990
- #@ fl-builder
991
- msgid "Seconds"
992
- msgstr "Secondi"
993
-
994
- #: includes/row-settings.php:222
995
- #: modules/content-slider/content-slider.php:230
996
- #: modules/slideshow/slideshow.php:381
997
- #: modules/testimonials/testimonials.php:95
998
- #@ fl-builder
999
- msgid "Transition"
1000
- msgstr "Transizione"
1001
-
1002
- #: includes/row-settings.php:240
1003
- #: modules/content-slider/content-slider.php:239
1004
- #: modules/slideshow/slideshow.php:399
1005
- #: modules/testimonials/testimonials.php:104
1006
- #@ fl-builder
1007
- msgid "Transition Speed"
1008
- msgstr "Velocità Transizione"
1009
-
1010
- #: modules/content-slider/content-slider.php:247
1011
- #: modules/testimonials/testimonials.php:117
1012
- #@ fl-builder
1013
- msgid "Show Arrows"
1014
- msgstr "Mostra Frecce"
1015
-
1016
- #: modules/content-slider/content-slider.php:256
1017
- #: modules/testimonials/testimonials.php:142
1018
- #@ fl-builder
1019
- msgid "Show Dots"
1020
- msgstr "Mostra Pallini"
1021
-
1022
- #: includes/column-settings.php:137
1023
- #: includes/module-settings.php:6
1024
- #: includes/row-settings.php:362
1025
- #: modules/content-slider/content-slider.php:266
1026
- #@ fl-builder
1027
- msgid "Advanced"
1028
- msgstr "Avanzate"
1029
-
1030
- #: modules/content-slider/content-slider.php:270
1031
- #@ fl-builder
1032
- msgid "Max Content Width"
1033
- msgstr "Larghezza Massima Contenuto"
1034
-
1035
- #: modules/content-slider/content-slider.php:275
1036
- #@ fl-builder
1037
- msgid "The max width that the content area will be within your slides."
1038
- msgstr "La larghezza massima che l'area contenuto sarà utilizzabile entro le diapositive."
1039
-
1040
- #: modules/content-slider/content-slider.php:282
1041
- #@ fl-builder
1042
- msgid "Slides"
1043
- msgstr "Diapositive"
1044
-
1045
- #: modules/content-slider/content-slider.php:289
1046
- #@ fl-builder
1047
- msgid "Slide"
1048
- msgstr "Diapositiva"
1049
-
1050
- #: modules/content-slider/content-slider.php:304
1051
- #@ fl-builder
1052
- msgid "Slide Settings"
1053
- msgstr "Impostazioni Diapositive"
1054
-
1055
- #: modules/content-slider/content-slider.php:314
1056
- #@ fl-builder
1057
- msgid "Slide Label"
1058
- msgstr "Label Diapositiva"
1059
-
1060
- #: modules/content-slider/content-slider.php:315
1061
- #@ fl-builder
1062
- msgid "A label to identify this slide on the Slides tab of the Content Slider settings."
1063
- msgstr "Un'etichetta per identificare questa diapositiva nella scheda Diapositive delle impostazioni di Content Slider."
1064
-
1065
- #: modules/content-slider/content-slider.php:320
1066
- #@ fl-builder
1067
- msgid "Background Layout"
1068
- msgstr "Layout di sfondo"
1069
-
1070
- #: modules/content-slider/content-slider.php:326
1071
- #@ fl-builder
1072
- msgid "This setting is for the entire background of your slide."
1073
- msgstr "Questa impostazione è per l'intero sfondo della diapositiva."
1074
-
1075
- #: includes/row-settings.php:62
1076
- #: includes/row-settings.php:174
1077
- #: modules/content-slider/content-slider.php:329
1078
- #: modules/video/video.php:19
1079
- #@ fl-builder
1080
- msgid "Video"
1081
- msgstr "Video"
1082
-
1083
- #: includes/row-settings.php:111
1084
- #: modules/content-slider/content-slider.php:352
1085
- #@ fl-builder
1086
- msgid "Background Photo"
1087
- msgstr "Sfondo Foto"
1088
-
1089
- #: modules/content-slider/content-slider.php:361
1090
- #@ fl-builder
1091
- msgid "Background Video Code"
1092
- msgstr "Codice Sfondo Video"
1093
-
1094
- #: modules/content-slider/content-slider.php:367
1095
- #@ fl-builder
1096
- msgid "Content Layout"
1097
- msgstr "Layout Contenuto"
1098
-
1099
- #: modules/content-slider/content-slider.php:373
1100
- #@ fl-builder
1101
- msgid "This allows you to add content over or in addition to the background selection above. The location of the content layout can be selected in the style tab."
1102
- msgstr "Ciò consente di aggiungere contenuti sopra o in aggiunta allo sfondo selezionato sopra. La posizione del layout contenuto può essere selezionata nella scheda \"Stile\"."
1103
-
1104
- #: modules/content-slider/content-slider.php:376
1105
- #@ fl-builder
1106
- msgid "Text &amp; Photo"
1107
- msgstr "Testo &amp; Foto"
1108
-
1109
- #: modules/content-slider/content-slider.php:377
1110
- #@ fl-builder
1111
- msgid "Text &amp; Video"
1112
- msgstr "Testo &amp; Video"
1113
-
1114
- #: modules/content-slider/content-slider.php:401
1115
- #@ fl-builder
1116
- msgid "Video Embed Code"
1117
- msgstr "Codice Embed Video"
1118
-
1119
- #: modules/content-slider/content-slider.php:461
1120
- #@ fl-builder
1121
- msgid "Text Position"
1122
- msgstr "Posizione Testo"
1123
-
1124
- #: modules/content-slider/content-slider.php:467
1125
- #@ fl-builder
1126
- msgid "The position will move the content layout selections left, right or center over the background of the slide."
1127
- msgstr "La posizione sposterà il layout dei contenuti selezionato a sinistra, a destra o al centro sullo sfondo della diapositiva."
1128
-
1129
- #: includes/column-settings.php:16
1130
- #: modules/content-slider/content-slider.php:478
1131
- #: modules/content-slider/content-slider.php:546
1132
- #@ fl-builder
1133
- msgid "%"
1134
- msgstr "%"
1135
-
1136
- #: modules/content-slider/content-slider.php:484
1137
- #@ fl-builder
1138
- msgid "Top Margin"
1139
- msgstr "Margine Superiore"
1140
-
1141
- #: modules/content-slider/content-slider.php:492
1142
- #@ fl-builder
1143
- msgid "Bottom Margin"
1144
- msgstr "Margine Inferiore"
1145
-
1146
- #: modules/content-slider/content-slider.php:500
1147
- #@ fl-builder
1148
- msgid "Left Margin"
1149
- msgstr "MArgine Sinistro"
1150
-
1151
- #: modules/content-slider/content-slider.php:508
1152
- #@ fl-builder
1153
- msgid "Right Margin"
1154
- msgstr "Margine Destro"
1155
-
1156
- #: modules/content-slider/content-slider.php:517
1157
- #@ fl-builder
1158
- msgid "Text Colors"
1159
- msgstr "Colori del testo"
1160
-
1161
- #: modules/content-slider/content-slider.php:527
1162
- #@ fl-builder
1163
- msgid "Text Shadow"
1164
- msgstr "Ombreggiatura Testo"
1165
-
1166
- #: modules/content-slider/content-slider.php:536
1167
- #: modules/content-slider/content-slider.php:720
1168
- #@ fl-builder
1169
- msgid "Text Background Color"
1170
- msgstr "Colore di sfondo del testo"
1171
-
1172
- #: modules/content-slider/content-slider.php:537
1173
- #@ fl-builder
1174
- msgid "The color applies to the overlay behind text over the background selections."
1175
- msgstr "Il colore da applicare alla sovrapposizione, dietro il testo, sopra lo sfondo selezionato."
1176
-
1177
- #: modules/content-slider/content-slider.php:542
1178
- #@ fl-builder
1179
- msgid "Text Background Opacity"
1180
- msgstr "Opacità Sfondo del Testo"
1181
-
1182
- #: modules/content-slider/content-slider.php:550
1183
- #@ fl-builder
1184
- msgid "Text Background Height"
1185
- msgstr "Altezza Sfondo del Testo"
1186
-
1187
- #: modules/content-slider/content-slider.php:552
1188
- #@ fl-builder
1189
- msgid "Auto will allow the overlay to fit however long the text content is. 100% will fit the overlay to the top and bottom of the slide."
1190
- msgstr "Auto consentirà la sovrapposizione e l'adattamento alla lunghezza del contenuto del testo. 100% si adatta alla sovrapposizione alla parte superiore e inferiore della diapositiva."
1191
-
1192
- #: modules/content-slider/content-slider.php:572
1193
- #@ fl-builder
1194
- msgid "The link applies to the entire slide. If choosing a call to action type below, this link will also be used for the text or button."
1195
- msgstr "Il collegamento si applica all'intera diapositiva. Se la scelta di un tipo di chiamata azione in basso, questo collegamento sarà utilizzato anche per il pulsante o testo."
1196
-
1197
- #: modules/content-slider/content-slider.php:671
1198
- #@ fl-builder
1199
- msgid "Border Radius"
1200
- msgstr "Bordi Arrotondati"
1201
-
1202
- #: modules/content-slider/content-slider.php:682
1203
- #@ fl-builder
1204
- msgid "Mobile"
1205
- msgstr "Dispositivo Mobile"
1206
-
1207
- #: modules/content-slider/content-slider.php:685
1208
- #@ fl-builder
1209
- msgid "Mobile Photo"
1210
- msgstr "Foto Dispositivo Mobile"
1211
-
1212
- #: modules/content-slider/content-slider.php:691
1213
- #@ fl-builder
1214
- msgid "You can choose a different photo that the slide will change to on mobile devices or no photo if desired."
1215
- msgstr "È possibile scegliere una foto diversa che la slide cambierà su dispositivi mobili oppure nessuna foto se lo si desidera."
1216
-
1217
- #: modules/content-slider/content-slider.php:693
1218
- #@ fl-builder
1219
- msgid "Use Main Photo"
1220
- msgstr "Usa Foto Principale"
1221
-
1222
- #: modules/content-slider/content-slider.php:694
1223
- #@ fl-builder
1224
- msgid "Choose Another Photo"
1225
- msgstr "Scegli un'altra Foto"
1226
-
1227
- #: modules/content-slider/content-slider.php:695
1228
- #@ fl-builder
1229
- msgid "No Photo"
1230
- msgstr "Nessuna Foto"
1231
-
1232
- #: modules/content-slider/content-slider.php:710
1233
- #@ fl-builder
1234
- msgid "Mobile Text Colors"
1235
- msgstr "Colore Testo Dispositivo Mobile"
1236
-
1237
- #: modules/cta/cta.php:15
1238
- #@ fl-builder
1239
- msgid "Display a heading, subheading and a button."
1240
- msgstr "Visualizzare una intestazione, sottotitolo e un pulsante."
1241
-
1242
- #: modules/cta/cta.php:95
1243
- #: modules/gallery/gallery.php:216
1244
- #: modules/testimonials/testimonials.php:37
1245
- #: modules/woocommerce/woocommerce.php:57
1246
- #@ fl-builder
1247
- msgid "Layout"
1248
- msgstr "Layout"
1249
-
1250
- #: modules/cta/cta.php:98
1251
- #@ fl-builder
1252
- msgid "Inline"
1253
- msgstr "In linea"
1254
-
1255
- #: modules/cta/cta.php:99
1256
- #@ fl-builder
1257
- msgid "Stacked"
1258
- msgstr "Accatastati"
1259
-
1260
- #: modules/cta/cta.php:119
1261
- #: modules/icon-group/icon-group.php:95
1262
- #@ fl-builder
1263
- msgid "Spacing"
1264
- msgstr "Spaziatura"
1265
-
1266
- #: modules/cta/cta.php:184
1267
- #@ fl-builder
1268
- msgid "Background Opacity"
1269
- msgstr "Opacità Sfondo"
1270
-
1271
- #: modules/cta/cta.php:207
1272
- #@ fl-builder
1273
- msgid "Button Link"
1274
- msgstr "Link Bottone"
1275
-
1276
- #: modules/gallery/gallery.php:14
1277
- #@ fl-builder
1278
- msgid "Gallery"
1279
- msgstr "Galleria"
1280
-
1281
- #: modules/gallery/gallery.php:15
1282
- #@ fl-builder
1283
- msgid "Display multiple photos in a gallery view."
1284
- msgstr "Visualizza più foto in una visualizzazione galleria."
1285
-
1286
- #: modules/gallery/gallery.php:219
1287
- #@ fl-builder
1288
- msgid "Collage"
1289
- msgstr "Collage"
1290
-
1291
- #: modules/gallery/gallery.php:220
1292
- #@ fl-builder
1293
- msgid "Grid"
1294
- msgstr "Griglia"
1295
-
1296
- #: includes/row-settings.php:189
1297
- #: modules/gallery/gallery.php:230
1298
- #: modules/slideshow/slideshow.php:263
1299
- #@ fl-builder
1300
- msgid "Source"
1301
- msgstr "Sorgente"
1302
-
1303
- #: includes/row-settings.php:192
1304
- #: modules/gallery/gallery.php:233
1305
- #: modules/photo/photo.php:323
1306
- #: modules/slideshow/slideshow.php:266
1307
- #: modules/video/video.php:85
1308
- #@ fl-builder
1309
- msgid "Media Library"
1310
- msgstr "Libreria Media"
1311
-
1312
- #: includes/row-settings.php:193
1313
- #: modules/gallery/gallery.php:234
1314
- #: modules/slideshow/slideshow.php:267
1315
- #@ fl-builder
1316
- msgid "SmugMug"
1317
- msgstr "SmugMug"
1318
-
1319
- #: includes/row-settings.php:195
1320
- #: modules/gallery/gallery.php:236
1321
- #: modules/slideshow/slideshow.php:269
1322
- #@ fl-builder
1323
- msgid "Pull images from the WordPress media library or a gallery on your SmugMug site by inserting the RSS feed URL from SmugMug. The RSS feed URL can be accessed by using the get a link function in your SmugMug gallery."
1324
- msgstr "Estrarre le immagini dalla libreria multimediale di WordPress o una galleria sul tuo sito SmugMug inserendo l'URL del feed RSS da SmugMug. La URL del feed RSS è possibile accedere utilizzando la funzione Get Link nella tua galleria SmugMug."
1325
-
1326
- #: includes/row-settings.php:207
1327
- #: modules/gallery/gallery.php:248
1328
- #: modules/slideshow/slideshow.php:281
1329
- #@ fl-builder
1330
- msgid "Photos"
1331
- msgstr "Foto"
1332
-
1333
- #: includes/row-settings.php:211
1334
- #: modules/gallery/gallery.php:252
1335
- #: modules/slideshow/slideshow.php:285
1336
- #@ fl-builder
1337
- msgid "Feed URL"
1338
- msgstr "Feed URL"
1339
-
1340
- #: modules/gallery/gallery.php:256
1341
- #@ fl-builder
1342
- msgid "Photo Size"
1343
- msgstr "Dimensione Foto"
1344
-
1345
- #: modules/gallery/gallery.php:266
1346
- #@ fl-builder
1347
- msgid "Photo Spacing"
1348
- msgstr "Spazio Foto"
1349
-
1350
- #: modules/gallery/gallery.php:274
1351
- #@ fl-builder
1352
- msgid "Show Captions"
1353
- msgstr "Mostra Didascalia"
1354
-
1355
- #: modules/gallery/gallery.php:277
1356
- #: modules/photo/photo.php:376
1357
- #@ fl-builder
1358
- msgid "Never"
1359
- msgstr "Mai"
1360
-
1361
- #: modules/gallery/gallery.php:278
1362
- #: modules/photo/photo.php:377
1363
- #@ fl-builder
1364
- msgid "On Hover"
1365
- msgstr "Al passaggio del mouse"
1366
-
1367
- #: modules/gallery/gallery.php:279
1368
- #: modules/photo/photo.php:378
1369
- #@ fl-builder
1370
- msgid "Below Photo"
1371
- msgstr "Sotto la Foto"
1372
-
1373
- #: modules/gallery/gallery.php:281
1374
- #@ fl-builder
1375
- msgid "The caption pulls from whatever text you put in the caption area in the media manager for each image. The caption is also pulled directly from SmugMug if you have captions set in your gallery."
1376
- msgstr "La didascalia estrae da qualsiasi testo si inserisce nella zona di didascalia nel media manager per ogni immagine. La voce è anche tirato direttamente da SmugMug se avete didascalie impostati nella tua galleria."
1377
-
1378
- #: modules/gallery/gallery.php:285
1379
- #: modules/slideshow/slideshow.php:332
1380
- #@ fl-builder
1381
- msgid "Click Action"
1382
- msgstr "Fare clic su Azione"
1383
-
1384
- #: modules/gallery/gallery.php:289
1385
- #@ fl-builder
1386
- msgid "Lightbox"
1387
- msgstr "Lightbox"
1388
-
1389
- #: modules/gallery/gallery.php:290
1390
- #@ fl-builder
1391
- msgid "Photo Link"
1392
- msgstr "Link Foto"
1393
-
1394
- #: modules/heading/heading.php:15
1395
- #@ fl-builder
1396
- msgid "Display a title/page heading."
1397
- msgstr "Visualizza un titolo/pagina intestazione"
1398
-
1399
- #: modules/heading/heading.php:86
1400
- #@ fl-builder
1401
- msgid "Tag"
1402
- msgstr "Tag"
1403
-
1404
- #: modules/heading/heading.php:89
1405
- #@ fl-builder
1406
- msgid "h1"
1407
- msgstr "h1"
1408
-
1409
- #: modules/heading/heading.php:90
1410
- #@ fl-builder
1411
- msgid "h2"
1412
- msgstr "h2"
1413
-
1414
- #: modules/heading/heading.php:91
1415
- #@ fl-builder
1416
- msgid "h3"
1417
- msgstr "h3"
1418
-
1419
- #: modules/heading/heading.php:92
1420
- #@ fl-builder
1421
- msgid "h4"
1422
- msgstr "h4"
1423
-
1424
- #: modules/heading/heading.php:93
1425
- #@ fl-builder
1426
- msgid "h5"
1427
- msgstr "h5"
1428
-
1429
- #: modules/heading/heading.php:94
1430
- #@ fl-builder
1431
- msgid "h6"
1432
- msgstr "h6"
1433
-
1434
- #: modules/heading/heading.php:113
1435
- #: modules/heading/heading.php:164
1436
- #@ fl-builder
1437
- msgid "Custom Font Size"
1438
- msgstr "Personalizza Dimensione Carattere"
1439
-
1440
- #: modules/heading/heading.php:122
1441
- #@ default
1442
- msgid "Mobile Structure"
1443
- msgstr "Struttura Dispositivo Mobile"
1444
-
1445
- #: modules/heading/heading.php:140
1446
- #@ fl-builder
1447
- msgid "Custom Alignment"
1448
- msgstr "Personalizza Allineamento"
1449
-
1450
- #: modules/html/html.php:14
1451
- #@ fl-builder
1452
- msgid "HTML"
1453
- msgstr "HTML"
1454
-
1455
- #: modules/html/html.php:15
1456
- #@ fl-builder
1457
- msgid "Display raw HTML code."
1458
- msgstr "Visualizza codice riga HTML"
1459
-
1460
- #: modules/icon-group/icon-group.php:14
1461
- #@ fl-builder
1462
- msgid "Icon Group"
1463
- msgstr "Icona Gruppo"
1464
-
1465
- #: modules/icon-group/icon-group.php:15
1466
- #@ fl-builder
1467
- msgid "Display a group of linked Font Awesome icons."
1468
- msgstr "Visualizza un gruppo di icone da Font Awesome."
1469
-
1470
- #: modules/icon-group/icon-group.php:29
1471
- #@ fl-builder
1472
- msgid "Icons"
1473
- msgstr "Icone"
1474
-
1475
- #: modules/icon-group/icon-group.php:121
1476
- #@ fl-builder
1477
- msgid "Add Icon"
1478
- msgstr "Aggiungi Icona"
1479
-
1480
- #: modules/icon/icon.php:15
1481
- #@ fl-builder
1482
- msgid "Display a Font Awesome icon and optional title."
1483
- msgstr "Visualizzare un impressionante icona di carattere e il titolo facoltativo."
1484
-
1485
- #: modules/map/map.php:14
1486
- #@ fl-builder
1487
- msgid "Map"
1488
- msgstr "Mappa"
1489
-
1490
- #: modules/map/map.php:15
1491
- #@ fl-builder
1492
- msgid "Display a Google map."
1493
- msgstr "Visualizza una Google Map"
1494
-
1495
- #: modules/map/map.php:33
1496
- #@ fl-builder
1497
- msgid "Address"
1498
- msgstr "Indirizzo"
1499
-
1500
- #: modules/map/map.php:34
1501
- #@ fl-builder
1502
- msgid "1865 Winchester Blvd #202 Campbell, CA 95008"
1503
- msgstr "Roma, 121 Via Garibaldi, RM 00060"
1504
-
1505
- #: includes/row-settings.php:124
1506
- #@ fl-builder
1507
- msgid "Horizontal"
1508
- msgstr "Orizzontale"
1509
-
1510
- #: includes/row-settings.php:125
1511
- #@ fl-builder
1512
- msgid "Vertical"
1513
- msgstr "Verticale"
1514
-
1515
- #: modules/photo/photo.php:26
1516
- #@ fl-builder
1517
- msgid "Upload a photo or display one from the media library."
1518
- msgstr "Carica una foto o visualizzarne una dalla libreria multimediale."
1519
-
1520
- #: modules/photo/photo.php:320
1521
- #@ fl-builder
1522
- msgid "Photo Source"
1523
- msgstr "Sorgente Foto"
1524
-
1525
- #: modules/photo/photo.php:324
1526
- #: modules/photo/photo.php:395
1527
- #@ fl-builder
1528
- msgid "URL"
1529
- msgstr "URL"
1530
-
1531
- #: modules/photo/photo.php:341
1532
- #@ fl-builder
1533
- msgid "Photo URL"
1534
- msgstr "URL Foto"
1535
-
1536
- #: modules/photo/photo.php:373
1537
- #@ fl-builder
1538
- msgid "Show Caption"
1539
- msgstr "Mostra Didascalia"
1540
-
1541
- #: modules/photo/photo.php:383
1542
- #@ fl-builder
1543
- msgid "Caption"
1544
- msgstr "Didascalia"
1545
-
1546
- #: modules/photo/photo.php:392
1547
- #@ fl-builder
1548
- msgid "Link Type"
1549
- msgstr "Tipo Link"
1550
-
1551
- #: modules/photo/photo.php:396
1552
- #@ fl-builder
1553
- msgid "Photo File"
1554
- msgstr "File Foto"
1555
-
1556
- #: modules/photo/photo.php:397
1557
- #@ fl-builder
1558
- msgid "Photo Page"
1559
- msgstr "Foto Pagina "
1560
-
1561
- #: modules/photo/photo.php:407
1562
- #@ fl-builder
1563
- msgid "Link type applies to how the image should be linked on click. You can choose a specific URL, the individual photo or a separate page with the photo."
1564
- msgstr "Tipo di collegamento si applica a come l'immagine dovrebbe essere legata al clic. È possibile scegliere un URL specifico, la singola foto o una pagina separata con la foto."
1565
-
1566
- #: modules/photo/photo.php:411
1567
- #: modules/slideshow/slideshow.php:350
1568
- #@ fl-builder
1569
- msgid "Link URL"
1570
- msgstr "Link URL"
1571
-
1572
- #: modules/woocommerce/woocommerce.php:107
1573
- #: modules/woocommerce/woocommerce.php:178
1574
- #@ fl-builder
1575
- msgid "Columns"
1576
- msgstr "Colonne"
1577
-
1578
- #: modules/woocommerce/woocommerce.php:110
1579
- #: modules/woocommerce/woocommerce.php:181
1580
- #@ fl-builder
1581
- msgid "1"
1582
- msgstr "1"
1583
-
1584
- #: modules/woocommerce/woocommerce.php:111
1585
- #: modules/woocommerce/woocommerce.php:182
1586
- #@ fl-builder
1587
- msgid "2"
1588
- msgstr "2"
1589
-
1590
- #: modules/woocommerce/woocommerce.php:112
1591
- #: modules/woocommerce/woocommerce.php:183
1592
- #@ fl-builder
1593
- msgid "3"
1594
- msgstr "3"
1595
-
1596
- #: modules/woocommerce/woocommerce.php:113
1597
- #: modules/woocommerce/woocommerce.php:184
1598
- #@ fl-builder
1599
- msgid "4"
1600
- msgstr "4"
1601
-
1602
- #: includes/global-settings.php:15
1603
- #@ fl-builder
1604
- msgid "Show"
1605
- msgstr "Mostra"
1606
-
1607
- #: includes/loop-settings.php:28
1608
- #: modules/woocommerce/woocommerce.php:195
1609
- #@ fl-builder
1610
- msgid "Date"
1611
- msgstr "Data"
1612
-
1613
- #: includes/admin-posts.php:3
1614
- #: modules/rich-text/rich-text.php:14
1615
- #@ fl-builder
1616
- msgid "Text Editor"
1617
- msgstr "Testo Editor"
1618
-
1619
- #: modules/rich-text/rich-text.php:15
1620
- #@ fl-builder
1621
- msgid "A WYSIWYG text editor."
1622
- msgstr "Un editor di testo WYSIWYG."
1623
-
1624
- #: modules/separator/separator.php:14
1625
- #@ fl-builder
1626
- msgid "Separator"
1627
- msgstr "Separatore"
1628
-
1629
- #: modules/separator/separator.php:15
1630
- #@ fl-builder
1631
- msgid "A divider line to separate content."
1632
- msgstr "Una linea di divisione per separare il contenuto."
1633
-
1634
- #: includes/column-settings.php:60
1635
- #: includes/row-settings.php:285
1636
- #: modules/separator/separator.php:58
1637
- #@ fl-builder
1638
- msgid "Solid"
1639
- msgstr "Solido"
1640
-
1641
- #: includes/column-settings.php:61
1642
- #: includes/row-settings.php:286
1643
- #: modules/separator/separator.php:59
1644
- #@ fl-builder
1645
- msgid "Dashed"
1646
- msgstr "Tratteggiato"
1647
-
1648
- #: includes/column-settings.php:62
1649
- #: includes/row-settings.php:287
1650
- #: modules/separator/separator.php:60
1651
- #@ fl-builder
1652
- msgid "Dotted"
1653
- msgstr "Puntinato"
1654
-
1655
- #: includes/column-settings.php:63
1656
- #: includes/row-settings.php:288
1657
- #: modules/separator/separator.php:61
1658
- #@ fl-builder
1659
- msgid "Double"
1660
- msgstr "Doppio"
1661
-
1662
- #: modules/sidebar/includes/settings-general.php:5
1663
- #: modules/sidebar/sidebar.php:14
1664
- #@ fl-builder
1665
- msgid "Sidebar"
1666
- msgstr "Sidebar"
1667
-
1668
- #: modules/sidebar/sidebar.php:15
1669
- #@ fl-builder
1670
- msgid "Display a WordPress sidebar that has been registered by the current theme."
1671
- msgstr "Visualizzare una sidebar di WordPress che è stato registrato dal tema corrente."
1672
-
1673
- #: includes/row-settings.php:64
1674
- #: modules/slideshow/slideshow.php:14
1675
- #@ fl-builder
1676
- msgid "Slideshow"
1677
- msgstr "Slideshow"
1678
-
1679
- #: modules/slideshow/slideshow.php:15
1680
- #@ fl-builder
1681
- msgid "Display multiple photos in a slideshow view."
1682
- msgstr "Visualizza più foto in una presentazione."
1683
-
1684
- #: includes/column-settings.php:149
1685
- #: includes/module-settings.php:18
1686
- #: includes/row-settings.php:374
1687
- #: modules/slideshow/slideshow.php:290
1688
- #@ fl-builder
1689
- msgid "Display"
1690
- msgstr "Visualizza"
1691
-
1692
- #: modules/slideshow/slideshow.php:302
1693
- #@ fl-builder
1694
- msgid "Skin Color"
1695
- msgstr "Colore Pelle"
1696
-
1697
- #: modules/slideshow/slideshow.php:305
1698
- #@ fl-builder
1699
- msgid "Light"
1700
- msgstr "Chiara"
1701
-
1702
- #: modules/slideshow/slideshow.php:306
1703
- #@ fl-builder
1704
- msgid "Dark"
1705
- msgstr "Scura"
1706
-
1707
- #: modules/slideshow/slideshow.php:308
1708
- #@ fl-builder
1709
- msgid "If your overall theme/images are lighter in color, light will display buttons in a darker color scheme and vice versa for dark."
1710
- msgstr "Se il tema / immagini complessivamente sono di colore più chiaro, chiaro visualizza i pulsanti in uno schema di colore più scuro e viceversa per scuro."
1711
-
1712
- #: modules/slideshow/slideshow.php:318
1713
- #@ fl-builder
1714
- msgid "Crop set to no will fit the slideshow images to the height you specify and keep the width proportional, whereas crop set to yes will fit the slideshow images to all sides of the content area while cropping the left and right to fit the height you specify."
1715
- msgstr "Non Impostare Crop se si adatta alle immagini della slideshow all'altezza specificata e mantenere il proporzionale larghezza, considerando il crop impostato su si se si adatta alle immagini della presentazione a tutti i lati dell'area di contenuto, mentre il ritaglio destra e sinistra per adattarsi all'altezza specificata."
1716
-
1717
- #: modules/slideshow/slideshow.php:322
1718
- #@ fl-builder
1719
- msgid "Disable Right-Click"
1720
- msgstr "Disabilita Click Destra"
1721
-
1722
- #: modules/slideshow/slideshow.php:358
1723
- #@ fl-builder
1724
- msgid "Playback"
1725
- msgstr "Riproduzione"
1726
-
1727
- #: includes/row-settings.php:215
1728
- #: includes/row-settings.php:265
1729
- #: modules/slideshow/slideshow.php:374
1730
- #@ fl-builder
1731
- msgid "Speed"
1732
- msgstr "Velocità"
1733
-
1734
- #: includes/row-settings.php:218
1735
- #: includes/row-settings.php:243
1736
- #: modules/slideshow/slideshow.php:377
1737
- #: modules/slideshow/slideshow.php:402
1738
- #: modules/slideshow/slideshow.php:570
1739
- #@ fl-builder
1740
- msgid "seconds"
1741
- msgstr "secondi"
1742
-
1743
- #: includes/row-settings.php:226
1744
- #: modules/slideshow/slideshow.php:385
1745
- #@ fl-builder
1746
- msgid "Fade"
1747
- msgstr "Dissolvenza"
1748
-
1749
- #: includes/row-settings.php:227
1750
- #: modules/slideshow/slideshow.php:386
1751
- #@ fl-builder
1752
- msgid "Ken Burns"
1753
- msgstr "Ken Burns"
1754
-
1755
- #: includes/row-settings.php:228
1756
- #: modules/slideshow/slideshow.php:387
1757
- #@ fl-builder
1758
- msgid "Slide Horizontal"
1759
- msgstr "Slide Orizzontale"
1760
-
1761
- #: includes/row-settings.php:229
1762
- #: modules/slideshow/slideshow.php:388
1763
- #@ fl-builder
1764
- msgid "Slide Vertical"
1765
- msgstr "Slide Verticale"
1766
-
1767
- #: includes/row-settings.php:230
1768
- #: modules/slideshow/slideshow.php:389
1769
- #@ fl-builder
1770
- msgid "Blinds"
1771
- msgstr "Oscurabile"
1772
-
1773
- #: includes/row-settings.php:231
1774
- #: modules/slideshow/slideshow.php:390
1775
- #@ fl-builder
1776
- msgid "Bars"
1777
- msgstr "Barre"
1778
-
1779
- #: includes/row-settings.php:232
1780
- #: modules/slideshow/slideshow.php:391
1781
- #@ fl-builder
1782
- msgid "Random Bars"
1783
- msgstr "Barre Casuali"
1784
-
1785
- #: includes/row-settings.php:233
1786
- #: modules/slideshow/slideshow.php:392
1787
- #@ fl-builder
1788
- msgid "Boxes"
1789
- msgstr "Box"
1790
-
1791
- #: includes/row-settings.php:234
1792
- #: modules/slideshow/slideshow.php:393
1793
- #@ fl-builder
1794
- msgid "Random Boxes"
1795
- msgstr "Box Casuali"
1796
-
1797
- #: includes/row-settings.php:235
1798
- #: modules/slideshow/slideshow.php:394
1799
- #@ fl-builder
1800
- msgid "Boxes Grow"
1801
- msgstr "Riga Box"
1802
-
1803
- #: includes/row-settings.php:247
1804
- #: modules/slideshow/slideshow.php:406
1805
- #@ fl-builder
1806
- msgid "Randomize Photos"
1807
- msgstr "Foto Casuali"
1808
-
1809
- #: modules/slideshow/slideshow.php:418
1810
- #@ fl-builder
1811
- msgid "Controls"
1812
- msgstr "Controlli"
1813
-
1814
- #: modules/slideshow/slideshow.php:425
1815
- #: modules/slideshow/slideshow.php:474
1816
- #@ fl-builder
1817
- msgid "Navigation Arrows"
1818
- msgstr "Navigazione frecce"
1819
-
1820
- #: modules/slideshow/slideshow.php:431
1821
- #@ fl-builder
1822
- msgid "Navigational arrows allow the visitor to freely move through the images in your slideshow. These are larger arrows that overlay your slideshow images and are separate from the control bar navigational arrows."
1823
- msgstr "Frecce di navigazione permettono al visitatore di muoversi liberamente attraverso le immagini in slideshow. Queste sono le frecce più grandi che si sovrappongono le immagini della presentazione e che sono separati dalle frecce di navigazione barra di controllo."
1824
-
1825
- #: modules/slideshow/slideshow.php:436
1826
- #@ fl-builder
1827
- msgid "Control Bar"
1828
- msgstr "Barra di controlli"
1829
-
1830
- #: modules/slideshow/slideshow.php:440
1831
- #@ fl-builder
1832
- msgid "Nav Type"
1833
- msgstr "Tipo Navigazione"
1834
-
1835
- #: modules/slideshow/slideshow.php:444
1836
- #@ fl-builder
1837
- msgid "Buttons"
1838
- msgstr "Bottoni"
1839
-
1840
- #: modules/slideshow/slideshow.php:445
1841
- #: modules/slideshow/slideshow.php:575
1842
- #@ fl-builder
1843
- msgid "Thumbs"
1844
- msgstr "Miniature"
1845
-
1846
- #: modules/slideshow/slideshow.php:460
1847
- #@ fl-builder
1848
- msgid "Nav Position"
1849
- msgstr "Posizione Navigazione"
1850
-
1851
- #: includes/column-settings.php:173
1852
- #: includes/column-settings.php:214
1853
- #: includes/module-settings.php:42
1854
- #: includes/row-settings.php:398
1855
- #: includes/row-settings.php:439
1856
- #: modules/slideshow/slideshow.php:463
1857
- #@ fl-builder
1858
- msgid "Bottom"
1859
- msgstr "Basso"
1860
-
1861
- #: includes/column-settings.php:164
1862
- #: includes/column-settings.php:205
1863
- #: includes/module-settings.php:33
1864
- #: includes/row-settings.php:389
1865
- #: includes/row-settings.php:430
1866
- #: modules/slideshow/slideshow.php:464
1867
- #@ fl-builder
1868
- msgid "Top"
1869
- msgstr "Alto"
1870
-
1871
- #: modules/slideshow/slideshow.php:470
1872
- #@ fl-builder
1873
- msgid "Control Bar Buttons"
1874
- msgstr "Controllo Barra Bottoni"
1875
-
1876
- #: modules/slideshow/slideshow.php:483
1877
- #@ fl-builder
1878
- msgid "Play Button"
1879
- msgstr "Bottone Play"
1880
-
1881
- #: modules/slideshow/slideshow.php:492
1882
- #@ fl-builder
1883
- msgid "Fullscreen Button"
1884
- msgstr "Bottone Pieno Schermo"
1885
-
1886
- #: modules/slideshow/slideshow.php:501
1887
- #@ fl-builder
1888
- msgid "Photo Count"
1889
- msgstr "Conteggio Foto"
1890
-
1891
- #: modules/slideshow/slideshow.php:510
1892
- #@ fl-builder
1893
- msgid "Thumbs Button"
1894
- msgstr "Bottone Miniatura"
1895
-
1896
- #: modules/slideshow/slideshow.php:519
1897
- #@ fl-builder
1898
- msgid "Caption Button"
1899
- msgstr "Didascalia Bottone"
1900
-
1901
- #: modules/slideshow/slideshow.php:528
1902
- #@ fl-builder
1903
- msgid "Social Button"
1904
- msgstr "Bottone Social"
1905
-
1906
- #: modules/slideshow/slideshow.php:538
1907
- #@ fl-builder
1908
- msgid "Control Bar Overlay"
1909
- msgstr "Barra di controllo di sovrapposizione"
1910
-
1911
- #: modules/slideshow/slideshow.php:542
1912
- #@ fl-builder
1913
- msgid "Overlay Enabled"
1914
- msgstr "Abilita Barra sovrapposizione"
1915
-
1916
- #: modules/slideshow/slideshow.php:553
1917
- #@ fl-builder
1918
- msgid "Control bar overlay specifies if the control bar buttons you choose overlay your slideshow images or site below the slideshow completely."
1919
- msgstr "Barra di controllo sovrapposizione specifica se i pulsanti della barra di controllo si sovrappongono completamente alle immagini della slideshow o al sito sotto lo slideshow."
1920
-
1921
- #: modules/slideshow/slideshow.php:557
1922
- #@ fl-builder
1923
- msgid "Overlay Hide"
1924
- msgstr "Nascondi sovrapposizione"
1925
-
1926
- #: modules/slideshow/slideshow.php:563
1927
- #@ fl-builder
1928
- msgid "Overlay hide will hide the control bar after however many seconds you specify below. They will reappear upon mouse over."
1929
- msgstr "Nascondere sovrapposizione nasconde la barra di controllo dopo però molti secondi specificato qui di seguito. Essi appariranno al passaggio del mouse."
1930
-
1931
- #: modules/slideshow/slideshow.php:567
1932
- #@ fl-builder
1933
- msgid "Overlay Hide Delay"
1934
- msgstr "Nascondi Ritardo Sovrapposizione "
1935
-
1936
- #: modules/slideshow/slideshow.php:579
1937
- #@ fl-builder
1938
- msgid "Thumbs Size"
1939
- msgstr "Dimensione Miniatura"
1940
-
1941
- #: modules/slideshow/slideshow.php:588
1942
- #@ fl-builder
1943
- msgid "Social"
1944
- msgstr "Social"
1945
-
1946
- #: modules/slideshow/slideshow.php:592
1947
- #@ fl-builder
1948
- msgid "Facebook Button"
1949
- msgstr "Bottone Facebook"
1950
-
1951
- #: modules/slideshow/slideshow.php:601
1952
- #@ fl-builder
1953
- msgid "Twitter Button"
1954
- msgstr "Bottone Twitter"
1955
-
1956
- #: modules/slideshow/slideshow.php:610
1957
- #@ fl-builder
1958
- msgid "Google Plus Button"
1959
- msgstr "Bottone Google Plus"
1960
-
1961
- #: modules/slideshow/slideshow.php:619
1962
- #@ fl-builder
1963
- msgid "Pinterest Button"
1964
- msgstr "Bottone Pinterest"
1965
-
1966
- #: modules/social-buttons/social-buttons.php:14
1967
- #@ fl-builder
1968
- msgid "Social Buttons"
1969
- msgstr "Bottoni Sociali"
1970
-
1971
- #: modules/social-buttons/social-buttons.php:15
1972
- #@ fl-builder
1973
- msgid "Displays social buttons."
1974
- msgstr "Visualizza bottoni sociali"
1975
-
1976
- #: modules/social-buttons/social-buttons.php:69
1977
- #@ fl-builder
1978
- msgid "Target URL"
1979
- msgstr "Destinazione URL "
1980
-
1981
- #: modules/social-buttons/social-buttons.php:73
1982
- #@ fl-builder
1983
- msgid "Current Page"
1984
- msgstr "Pagina Corrente"
1985
-
1986
- #: modules/social-buttons/social-buttons.php:80
1987
- #@ fl-builder
1988
- msgid "The Target URL field correlates to the page you would like your social icons to interface with. For example, if you show Facebook, the user will \"Like\" whatever you put in this field."
1989
- msgstr "Il campo URL di destinazione correlato alla pagina che si desidera con quali icone sociali di desidera interfacciarsi. Ad esempio, se si mostra Facebook, l'utente metterà \"Mi Piace\" in questo campo."
1990
-
1991
- #: modules/social-buttons/social-buttons.php:84
1992
- #@ fl-builder
1993
- msgid "Custom URL"
1994
- msgstr "URL personalizzata"
1995
-
1996
- #: modules/social-buttons/social-buttons.php:99
1997
- #@ fl-builder
1998
- msgid "Show Facebook"
1999
- msgstr "Mostra Facebook"
2000
-
2001
- #: modules/social-buttons/social-buttons.php:108
2002
- #@ fl-builder
2003
- msgid "Show Twitter"
2004
- msgstr "Mostra Twitter"
2005
-
2006
- #: modules/social-buttons/social-buttons.php:117
2007
- #@ fl-builder
2008
- msgid "Show Google+"
2009
- msgstr "Mostra Google+"
2010
-
2011
- #: modules/testimonials/testimonials.php:14
2012
- #: modules/testimonials/testimonials.php:165
2013
- #@ fl-builder
2014
- msgid "Testimonials"
2015
- msgstr "Testimonianze"
2016
-
2017
- #: modules/testimonials/testimonials.php:15
2018
- #@ fl-builder
2019
- msgid "An animated tesimonials area."
2020
- msgstr "Un'area testimonianze animato."
2021
-
2022
- #: modules/testimonials/testimonials.php:40
2023
- #@ fl-builder
2024
- msgid "Wide"
2025
- msgstr "Ampio"
2026
-
2027
- #: modules/testimonials/testimonials.php:41
2028
- #@ fl-builder
2029
- msgid "Compact"
2030
- msgstr "Compatto"
2031
-
2032
- #: modules/testimonials/testimonials.php:51
2033
- #@ fl-builder
2034
- msgid "Wide is for 1 column rows, compact is for multi-column rows."
2035
- msgstr "Ampia è per 1 righe della colonna, compatto è per le righe multi-colonna."
2036
-
2037
- #: modules/testimonials/testimonials.php:74
2038
- #@ fl-builder
2039
- msgid "Slider Settings"
2040
- msgstr "Impostazioni Slider"
2041
-
2042
- #: modules/testimonials/testimonials.php:131
2043
- #@ fl-builder
2044
- msgid "Arrow Color"
2045
- msgstr "Colore Frecce"
2046
-
2047
- #: modules/testimonials/testimonials.php:156
2048
- #@ fl-builder
2049
- msgid "Dot Color"
2050
- msgstr "Colore Puntini"
2051
-
2052
- #: modules/testimonials/testimonials.php:172
2053
- #@ fl-builder
2054
- msgid "Testimonial"
2055
- msgstr "Testimonianza"
2056
-
2057
- #: modules/testimonials/testimonials.php:188
2058
- #@ fl-builder
2059
- msgid "Add Testimonial"
2060
- msgstr "Aggiungi Testimonianza"
2061
-
2062
- #: modules/video/video.php:20
2063
- #@ fl-builder
2064
- msgid "Render a WordPress or embedable video."
2065
- msgstr "Rendering WordPress o un video incorporabile."
2066
-
2067
- #: modules/video/video.php:82
2068
- #@ fl-builder
2069
- msgid "Video Type"
2070
- msgstr "Tipo Video"
2071
-
2072
- #: modules/video/video.php:86
2073
- #@ fl-builder
2074
- msgid "Embed"
2075
- msgstr "Incorporato"
2076
-
2077
- #: modules/widget/includes/frontend.php:21
2078
- #@ default
2079
- msgid " no longer exists."
2080
- msgstr " non esiste più."
2081
-
2082
- #: modules/widget/widget.php:14
2083
- #@ fl-builder
2084
- msgid "Widget"
2085
- msgstr "Widget"
2086
-
2087
- #: modules/widget/widget.php:15
2088
- #@ fl-builder
2089
- msgid "Display a WordPress widget."
2090
- msgstr "Visualizza un widget Wordpress"
2091
-
2092
- #: includes/ui.php:50
2093
- #: modules/widget/widget.php:16
2094
- #@ fl-builder
2095
- msgid "WordPress Widgets"
2096
- msgstr "Widget Wordpress"
2097
-
2098
- #: modules/woocommerce/woocommerce.php:16
2099
- #@ fl-builder
2100
- msgid "WooCommerce"
2101
- msgstr "WooCommerce"
2102
-
2103
- #: modules/woocommerce/woocommerce.php:17
2104
- #@ fl-builder
2105
- msgid "Display products or categories from your WooCommerce store."
2106
- msgstr "Visualizzare i prodotti o categorie dal vostro negozio WooCommerce."
2107
-
2108
- #: modules/woocommerce/woocommerce.php:61
2109
- #@ fl-builder
2110
- msgid "Single Product"
2111
- msgstr "Singolo Prodotto"
2112
-
2113
- #: modules/woocommerce/woocommerce.php:62
2114
- #: modules/woocommerce/woocommerce.php:119
2115
- #@ fl-builder
2116
- msgid "Multiple Products"
2117
- msgstr "Prodotti Multipli"
2118
-
2119
- #: modules/woocommerce/woocommerce.php:63
2120
- #@ fl-builder
2121
- msgid "Add to Cart Button"
2122
- msgstr "Aggiungi Bottone Carello"
2123
-
2124
- #: modules/woocommerce/woocommerce.php:64
2125
- #@ fl-builder
2126
- msgid "Categories"
2127
- msgstr "Categorie"
2128
-
2129
- #: modules/woocommerce/woocommerce.php:65
2130
- #@ fl-builder
2131
- msgid "Cart"
2132
- msgstr "Carrello"
2133
-
2134
- #: modules/woocommerce/woocommerce.php:66
2135
- #@ fl-builder
2136
- msgid "Checkout"
2137
- msgstr "Cassa"
2138
-
2139
- #: modules/woocommerce/woocommerce.php:67
2140
- #@ fl-builder
2141
- msgid "View Order"
2142
- msgstr "Visualizza Ordine"
2143
-
2144
- #: modules/woocommerce/woocommerce.php:68
2145
- #@ fl-builder
2146
- msgid "Pay"
2147
- msgstr "Paga"
2148
-
2149
- #: modules/woocommerce/woocommerce.php:69
2150
- #@ fl-builder
2151
- msgid "Thank You"
2152
- msgstr "Grazie"
2153
-
2154
- #: modules/woocommerce/woocommerce.php:70
2155
- #@ fl-builder
2156
- msgid "Order Tracking"
2157
- msgstr "Tracciamento Ordine"
2158
-
2159
- #: modules/woocommerce/woocommerce.php:71
2160
- #@ fl-builder
2161
- msgid "My Account"
2162
- msgstr "Il Mio Account"
2163
-
2164
- #: modules/woocommerce/woocommerce.php:72
2165
- #@ fl-builder
2166
- msgid "Edit Address"
2167
- msgstr "Modifica Indirizzo"
2168
-
2169
- #: modules/woocommerce/woocommerce.php:73
2170
- #@ fl-builder
2171
- msgid "Change Password"
2172
- msgstr "Cambia Password"
2173
-
2174
- #: modules/woocommerce/woocommerce.php:74
2175
- #@ fl-builder
2176
- msgid "Lost Password"
2177
- msgstr "Password Dimenticata"
2178
-
2179
- #: modules/woocommerce/woocommerce.php:93
2180
- #@ fl-builder
2181
- msgid "Product ID"
2182
- msgstr "ID Prodotto"
2183
-
2184
- #: modules/woocommerce/woocommerce.php:96
2185
- #@ fl-builder
2186
- msgid "As you add products in the WooCommerce Products area, each will be assigned a unique ID. You can find this unique product ID by visiting the Products area and rolling over the product. The unique ID will be the first attribute."
2187
- msgstr "Quando si aggiungono i prodotti nella zona WooCommerce, ognuno verrà assegnato un ID univoco. Potete trovare questo ID prodotto unico per visitare la zona Prodotti del prodotto. L'ID univoco sarà il primo attributo."
2188
-
2189
- #: modules/woocommerce/woocommerce.php:100
2190
- #@ fl-builder
2191
- msgid "Parent Category ID"
2192
- msgstr "ID Categoria Genitore"
2193
-
2194
- #: modules/woocommerce/woocommerce.php:103
2195
- #@ fl-builder
2196
- msgid "As you add product categories in the WooCommerce Products area, each will be assigned a unique ID. This ID can be found by hovering on the category in the categories area under Products and looking in the URL that is displayed in your browser. The ID will be the only number value in the URL."
2197
- msgstr "Quando si aggiungono categorie di prodotti nel settore prodotti WooCommerce, ognuno verrà assegnato ad un ID univoco. Questo ID può essere trovato nella categoria nella zona di categorie in Prodotti e guardando l'URL visualizzato nel browser. L'ID sarà l'unico valore numerico in URL."
2198
-
2199
- #: modules/woocommerce/woocommerce.php:123
2200
- #@ fl-builder
2201
- msgid "Products Source"
2202
- msgstr "Origine Prodotto"
2203
-
2204
- #: modules/woocommerce/woocommerce.php:126
2205
- #@ fl-builder
2206
- msgid "Products IDs"
2207
- msgstr "ID Prodotti"
2208
-
2209
- #: modules/woocommerce/woocommerce.php:127
2210
- #@ fl-builder
2211
- msgid "Product Category"
2212
- msgstr "Categoria Prodotto"
2213
-
2214
- #: modules/woocommerce/woocommerce.php:128
2215
- #@ fl-builder
2216
- msgid "Recent Products"
2217
- msgstr "Prodotti Recenti"
2218
-
2219
- #: modules/woocommerce/woocommerce.php:129
2220
- #@ fl-builder
2221
- msgid "Featured Products"
2222
- msgstr "Prodotti in Evidenzia"
2223
-
2224
- #: modules/woocommerce/woocommerce.php:130
2225
- #@ fl-builder
2226
- msgid "Sale Products"
2227
- msgstr "Prodotti in Offerta"
2228
-
2229
- #: modules/woocommerce/woocommerce.php:131
2230
- #@ fl-builder
2231
- msgid "Best Selling Products"
2232
- msgstr "Prodotti più Venduti"
2233
-
2234
- #: modules/woocommerce/woocommerce.php:132
2235
- #@ fl-builder
2236
- msgid "Top Rated Products"
2237
- msgstr "Prodotti con Alto Punteggio"
2238
-
2239
- #: modules/woocommerce/woocommerce.php:160
2240
- #@ fl-builder
2241
- msgid "Product IDs"
2242
- msgstr "ID Prodotto"
2243
-
2244
- #: modules/woocommerce/woocommerce.php:162
2245
- #@ fl-builder
2246
- msgid "As you add products in the WooCommerce Products area, each will be assigned a unique ID. You can find this unique product ID by visiting the Products area and rolling over the product. The unique ID will be the first attribute and you can add several here separated by a comma."
2247
- msgstr "Quando si aggiungono i prodotti nella zona WooCommerce, ognuno verrà assegnato un ID univoco. Potete trovare questo ID prodotto unico per visitare la zona Prodotti del prodotto. L'ID univoco sarà il primo attributo e si possono aggiungere vari qui separati da una virgola."
2248
-
2249
- #: modules/woocommerce/woocommerce.php:166
2250
- #@ fl-builder
2251
- msgid "Category Slug"
2252
- msgstr "Slug Categoria"
2253
-
2254
- #: modules/woocommerce/woocommerce.php:168
2255
- #@ fl-builder
2256
- msgid "As you add product categories in the WooCommerce Products area, each will be assigned a unique slug or you can edit and add your own. These slugs can be found in the Categories area under WooCommerce Products. Several can be added here separated by a comma."
2257
- msgstr "Quando si aggiungono categorie di prodotti nel settore prodotti WooCommerce, ognuno verrà assegnato un slug unico o è possibile modificare e aggiungere il proprio. Questi slug possono essere trovati nella zona categorie sotto i Prodotti WooCommerce. Diversi possono essere aggiunti qui separati da una virgola."
2258
-
2259
- #: modules/woocommerce/woocommerce.php:172
2260
- #@ fl-builder
2261
- msgid "Number of Products"
2262
- msgstr "Numero di Prodotti"
2263
-
2264
- #: modules/woocommerce/woocommerce.php:189
2265
- #@ fl-builder
2266
- msgid "Sort By"
2267
- msgstr "Ordinamento per"
2268
-
2269
- #: modules/woocommerce/woocommerce.php:193
2270
- #@ fl-builder
2271
- msgid "Popularity"
2272
- msgstr "Popolarità"
2273
-
2274
- #: modules/woocommerce/woocommerce.php:194
2275
- #@ fl-builder
2276
- msgid "Rating"
2277
- msgstr "Valutazione"
2278
-
2279
- #: modules/woocommerce/woocommerce.php:196
2280
- #@ fl-builder
2281
- msgid "Price: Low to High"
2282
- msgstr "Prezzo: Dal più Basso al più Alto"
2283
-
2284
- #: modules/woocommerce/woocommerce.php:197
2285
- #@ fl-builder
2286
- msgid "Price: High to Low"
2287
- msgstr "Prezzo: Dal più Alto al più Basso"
2288
-
2289
- #: classes/FLBuilder.php:386
2290
- #: classes/FLBuilderAdmin.php:220
2291
- #: classes/FLBuilderAdmin.php:275
2292
- #: includes/admin-posts.php:4
2293
- #: includes/ui.php:6
2294
- #@ fl-builder
2295
- msgid "Page Builder"
2296
- msgstr "Page Builder"
2297
-
2298
- #: classes/FLBuilder.php:657
2299
- #@ fl-builder
2300
- msgctxt "post type general name"
2301
- msgid "Layout Templates"
2302
- msgstr "Modelli di layout"
2303
-
2304
- #: classes/FLBuilder.php:658
2305
- #@ fl-builder
2306
- msgctxt "post type singular name"
2307
- msgid "Layout Template"
2308
- msgstr "Modello di layout"
2309
-
2310
- #: classes/FLBuilder.php:659
2311
- #@ fl-builder
2312
- msgctxt "admin menu"
2313
- msgid "Layout Templates"
2314
- msgstr "Modelli di layout"
2315
-
2316
- #: classes/FLBuilder.php:660
2317
- #@ fl-builder
2318
- msgctxt "add new on admin bar"
2319
- msgid "Layout Template"
2320
- msgstr "Modello di layout"
2321
-
2322
- #: classes/FLBuilder.php:661
2323
- #@ fl-builder
2324
- msgctxt "book"
2325
- msgid "Add New"
2326
- msgstr "Aggiungi nuovo"
2327
-
2328
- #: classes/FLBuilder.php:662
2329
- #@ fl-builder
2330
- msgid "Add New Layout Template"
2331
- msgstr "Aggiungi nuovo modello di Layout"
2332
-
2333
- #: classes/FLBuilder.php:663
2334
- #@ fl-builder
2335
- msgid "New Layout Template"
2336
- msgstr "Nuovo modello di Layout"
2337
-
2338
- #: classes/FLBuilder.php:664
2339
- #@ fl-builder
2340
- msgid "Edit Layout Template"
2341
- msgstr "Modifica modello di Layout"
2342
-
2343
- #: classes/FLBuilder.php:665
2344
- #@ fl-builder
2345
- msgid "View Layout Template"
2346
- msgstr "Visualizza modello di Layout"
2347
-
2348
- #: classes/FLBuilder.php:666
2349
- #@ fl-builder
2350
- msgid "All Layout Templates"
2351
- msgstr "Tutti i modelli di Layout"
2352
-
2353
- #: classes/FLBuilder.php:667
2354
- #@ fl-builder
2355
- msgid "Search Layout Templates"
2356
- msgstr "Cerca modelli di Layout"
2357
-
2358
- #: classes/FLBuilder.php:668
2359
- #@ fl-builder
2360
- msgid "Parent Layout Templates:"
2361
- msgstr "Modelli di Layout genitore:"
2362
-
2363
- #: classes/FLBuilder.php:669
2364
- #@ fl-builder
2365
- msgid "No layout templates found."
2366
- msgstr "Nessun modello di Layout trovato."
2367
-
2368
- #: classes/FLBuilder.php:670
2369
- #@ fl-builder
2370
- msgid "No layout templates found in Trash."
2371
- msgstr "Nessun modello di Layout trovato nel cestino."
2372
-
2373
- #: classes/FLBuilder.php:954
2374
- #@ fl-builder
2375
- msgid " Settings"
2376
- msgstr " Impostazioni"
2377
-
2378
- #: classes/FLBuilderAdmin.php:39
2379
- #, php-format
2380
- #@ fl-builder
2381
- msgid "This version of the <strong>FastLine Page Builder</strong> plugin is not compatible with WordPress Multisite. <a href=\"%s\" target=\"_blank\">Please upgrade</a> to the Multisite version of this plugin."
2382
- msgstr "Questa versione del plugin <strong>FastLine Page Builder</strong> non è compatibile con WordPress Multisite. <a href=\"%s\" target=\"_blank\">Si prega di aggiornare</a> alla versione Multisito di questo plugin."
2383
-
2384
- #: classes/FLBuilderAdmin.php:50
2385
- #@ fl-builder
2386
- msgid "The <strong>FastLine Page Builder</strong> plugin requires WordPress version 3.5 or greater. Please update WordPress before activating the plugin."
2387
- msgstr "Il plugin <strong>FastLine Page Builder</strong> richiede WordPress versione 3.5 o superiore. Si prega di aggiornare WordPress prima di attivare il plugin."
2388
-
2389
- #: classes/FLBuilderAdmin.php:85
2390
- #, php-format
2391
- #@ fl-builder
2392
- msgid "FastLine Page Builder activated! <a href=\"%s\">Click here</a> to enable remote updates."
2393
- msgstr "FastLine Page Builder attivato! <a href=\"%s\">Clicca qui</a> per attivare gli aggiornamenti remoti."
2394
-
2395
- #: classes/FLBuilderAdmin.php:288
2396
- #@ fl-builder
2397
- msgid "Upgrade"
2398
- msgstr "Aggiorna"
2399
-
2400
- #: classes/FLBuilderModel.php:1511
2401
- #@ fl-builder
2402
- msgid "Copy of "
2403
- msgstr "Copia di "
2404
-
2405
- #: classes/FLBuilderPhoto.php:75
2406
- #: includes/js-config.php:32
2407
- #@ fl-builder
2408
- msgid "Full Size"
2409
- msgstr "Full-Size"
2410
-
2411
- #: classes/FLBuilderPhoto.php:78
2412
- #: includes/js-config.php:58
2413
- #@ fl-builder
2414
- msgid "Thumbnail"
2415
- msgstr "Miniatura"
2416
-
2417
- #: includes/admin-posts.php:7
2418
- #@ fl-builder
2419
- msgid "The Page Builder is currently active for this page."
2420
- msgstr "Page Builder è attivo per questa pagina."
2421
-
2422
- #: includes/admin-posts.php:8
2423
- #@ fl-builder
2424
- msgid "Launch the Page Builder"
2425
- msgstr "Avvia Page Builder"
2426
-
2427
- #: includes/admin-settings.php:4
2428
- #: includes/global-settings.php:4
2429
- #@ fl-builder
2430
- msgid "Page Builder Settings"
2431
- msgstr "Impostazioni di Page Builder"
2432
-
2433
- #: includes/admin-settings.php:8
2434
- #@ fl-builder
2435
- msgid "License"
2436
- msgstr "Licenza"
2437
-
2438
- #: includes/admin-settings.php:9
2439
- #: includes/global-settings.php:67
2440
- #@ fl-builder
2441
- msgid "Modules"
2442
- msgstr "Moduli"
2443
-
2444
- #: includes/admin-settings.php:11
2445
- #: includes/admin-settings.php:95
2446
- #@ fl-builder
2447
- msgid "Post Types"
2448
- msgstr "Tipi di Post"
2449
-
2450
- #: includes/admin-settings.php:12
2451
- #: includes/admin-settings.php:136
2452
- #: includes/admin-settings.php:148
2453
- #@ fl-builder
2454
- msgid "Uninstall"
2455
- msgstr "Disinstalla"
2456
-
2457
- #: includes/admin-settings.php:27
2458
- #@ fl-builder
2459
- msgid "Enabled Modules"
2460
- msgstr "Moduli abilitati"
2461
-
2462
- #: includes/admin-settings.php:28
2463
- #@ fl-builder
2464
- msgid "Check or uncheck modules below to enable or disable them."
2465
- msgstr "Selezionare o deselezionare i moduli sottostanti per abilitarli o disabilitarli."
2466
-
2467
- #: includes/admin-settings.php:96
2468
- #@ fl-builder
2469
- msgid "Select the post types you would like the builder to work with."
2470
- msgstr "Selezionare i tipi di Post su cui vuoi attivare il builder."
2471
-
2472
- #: includes/admin-settings.php:97
2473
- #@ fl-builder
2474
- msgid "NOTE: Not all custom post types may be supported."
2475
- msgstr "NOTA: Non tutti i tipi di Post personalizzati potrebbero essere supportati."
2476
-
2477
- #: includes/admin-settings.php:138
2478
- #@ fl-builder
2479
- msgid "Clicking the button below will uninstall the page builder plugin and delete all of its data, including all database tables and meta associated with it. You can uninstall or deactivate the page builder from the plugins page instead if you do not wish to delete the data."
2480
- msgstr "Cliccando sul pulsante qui sotto disinstallerà il plugin page builder ed eliminerà tutti i suoi dati, incluse tutte le tabelle del database e meta ad esso associati. È possibile disinstallare o disattivare il page builder dalla pagina plugin se non desideri eliminare i dati."
2481
-
2482
- #: includes/admin-settings.php:140
2483
- #: includes/admin-settings.php:143
2484
- #@ default
2485
- msgid "NOTE:"
2486
- msgstr "NOTA:"
2487
-
2488
- #: includes/admin-settings.php:140
2489
- #@ fl-builder
2490
- msgid "The builder does not delete the post meta \"_fl_builder_layout_export\" and \"_fl_builder_enabled\" in case you want to reinstall it later. If you do, the builder will rebuild all of its data using those meta values."
2491
- msgstr "Il builder non elimina il post meta \"_fl_builder_layout_export\" e \"_fl_builder_enabled\" nel caso si desideri reinstallarlo successivamente. Se lo fai, il builder ricostruirà tutti i suoi dati utilizzando quei valori meta."
2492
-
2493
- #: includes/admin-settings.php:143
2494
- #@ fl-builder
2495
- msgid "This applies to all sites on the network."
2496
- msgstr "Questo si applica a tutti i siti della rete."
2497
-
2498
- #: includes/admin-settings.php:187
2499
- #@ fl-builder
2500
- msgid "Please type \"uninstall\" in the box below to confirm that you really want to uninstall the page builder and all of its data."
2501
- msgstr "Si prega di digitare \"uninstall\" nella casella qui sotto per confermare che si desidera davvero disinstallare il page builder e tutti i dati relativi."
2502
-
2503
- #: includes/column-settings.php:4
2504
- #: includes/js-config.php:18
2505
- #@ fl-builder
2506
- msgid "Column Settings"
2507
- msgstr "Impostazioni Colonna"
2508
-
2509
- #: includes/column-settings.php:14
2510
- #@ fl-builder
2511
- msgid "Column Width"
2512
- msgstr "Larghezza colonna"
2513
-
2514
- #: includes/column-settings.php:42
2515
- #: includes/column-settings.php:90
2516
- #: includes/row-settings.php:102
2517
- #: includes/row-settings.php:315
2518
- #: modules/separator/separator.php:39
2519
- #@ fl-builder
2520
- msgid "Opacity"
2521
- msgstr "Opacità"
2522
-
2523
- #: includes/column-settings.php:51
2524
- #: includes/row-settings.php:276
2525
- #@ fl-builder
2526
- msgid "Border"
2527
- msgstr "Bordo"
2528
-
2529
- #: includes/column-settings.php:57
2530
- #: includes/row-settings.php:282
2531
- #@ fl-builder
2532
- msgid "The type of border to use. Double borders must have a width of at least 3px to render properly."
2533
- msgstr "Il tipo di bordo da utilizzare. Il bordi doppi devono avere una larghezza di almeno 3px per essere visualizzati correttamente."
2534
-
2535
- #: includes/column-settings.php:98
2536
- #: includes/row-settings.php:323
2537
- #@ fl-builder
2538
- msgid "Top Width"
2539
- msgstr "Larghezza superiore"
2540
-
2541
- #: includes/column-settings.php:107
2542
- #: includes/row-settings.php:332
2543
- #@ fl-builder
2544
- msgid "Bottom Width"
2545
- msgstr "Larghezza inferiore"
2546
-
2547
- #: includes/column-settings.php:116
2548
- #: includes/row-settings.php:341
2549
- #@ fl-builder
2550
- msgid "Left Width"
2551
- msgstr "Larghezza sinistra"
2552
-
2553
- #: includes/column-settings.php:125
2554
- #: includes/row-settings.php:350
2555
- #@ fl-builder
2556
- msgid "Right Width"
2557
- msgstr "Larghezza destra"
2558
-
2559
- #: includes/column-settings.php:144
2560
- #: includes/module-settings.php:13
2561
- #: includes/row-settings.php:369
2562
- #@ fl-builder
2563
- msgid "CSS Class"
2564
- msgstr "Classe CSS"
2565
-
2566
- #: includes/column-settings.php:145
2567
- #@ default
2568
- msgid "A custom CSS class that will be applied to this column. Spaces only, no dots."
2569
- msgstr "La classe CSS personalizzata che verrà applicata a questa colonna. Solo spazi, senza punti."
2570
-
2571
- #: includes/column-settings.php:151
2572
- #: includes/module-settings.php:20
2573
- #: includes/row-settings.php:376
2574
- #@ fl-builder
2575
- msgid "Always"
2576
- msgstr "Sempre"
2577
-
2578
- #: includes/column-settings.php:152
2579
- #: includes/module-settings.php:21
2580
- #: includes/row-settings.php:377
2581
- #@ fl-builder
2582
- msgid "Desktop Only"
2583
- msgstr "Solo Desktop"
2584
-
2585
- #: includes/column-settings.php:153
2586
- #: includes/module-settings.php:22
2587
- #: includes/row-settings.php:378
2588
- #@ fl-builder
2589
- msgid "Mobile Only"
2590
- msgstr "Solo Mobile"
2591
-
2592
- #: includes/column-settings.php:155
2593
- #@ default
2594
- msgid "Choose whether to always show this column, only show it on the desktop view or only show it on the mobile view."
2595
- msgstr "Scegliere se mostrare sempre questa colonna, mostrarla nella vista desktop o mostrarlo solo nella visualizzazione mobile."
2596
-
2597
- #: includes/column-settings.php:160
2598
- #: includes/global-settings.php:41
2599
- #: includes/global-settings.php:71
2600
- #: includes/module-settings.php:29
2601
- #: includes/row-settings.php:385
2602
- #@ fl-builder
2603
- msgid "Margins"
2604
- msgstr "Margini"
2605
-
2606
- #: includes/fields.php:65
2607
- #: includes/js-config.php:51
2608
- #@ fl-builder
2609
- msgid "Select Photo"
2610
- msgstr "Seleziona foto"
2611
-
2612
- #: includes/fields.php:74
2613
- #: includes/fields.php:179
2614
- #: includes/template-selector.php:72
2615
- #@ fl-builder
2616
- msgid "Edit"
2617
- msgstr "Modifica"
2618
-
2619
- #: includes/fields.php:75
2620
- #: includes/fields.php:151
2621
- #@ fl-builder
2622
- msgid "Replace"
2623
- msgstr "Sostituisci"
2624
-
2625
- #: includes/fields.php:92
2626
- #@ fl-builder
2627
- msgid " Photo Selected"
2628
- msgstr " Foto selezionata"
2629
-
2630
- #: includes/fields.php:95
2631
- #@ fl-builder
2632
- msgid " Photos Selected"
2633
- msgstr " Foto selezionate"
2634
-
2635
- #: includes/fields.php:101
2636
- #@ fl-builder
2637
- msgid "Create Gallery"
2638
- msgstr "Crea galleria"
2639
-
2640
- #: includes/fields.php:102
2641
- #@ fl-builder
2642
- msgid "Edit Gallery"
2643
- msgstr "Modifica Galleria"
2644
-
2645
- #: includes/fields.php:103
2646
- #@ fl-builder
2647
- msgid "Add Photos"
2648
- msgstr "Aggiungi foto"
2649
-
2650
- #: includes/fields.php:125
2651
- #: includes/js-config.php:53
2652
- #@ fl-builder
2653
- msgid "Select Video"
2654
- msgstr "Seleziona Video"
2655
-
2656
- #: includes/fields.php:139
2657
- #@ fl-builder
2658
- msgid "Replace Video"
2659
- msgstr "Sostituisci Video"
2660
-
2661
- #: includes/fields.php:148
2662
- #: includes/icon-selector.php:23
2663
- #@ fl-builder
2664
- msgid "Select Icon"
2665
- msgstr "Seleziona icona"
2666
-
2667
- #: includes/fields.php:153
2668
- #: includes/js-config.php:46
2669
- #@ fl-builder
2670
- msgid "Remove"
2671
- msgstr "Rimuovi"
2672
-
2673
- #: includes/global-settings.php:8
2674
- #@ fl-builder
2675
- msgid "These settings apply to all posts and pages where the builder is active."
2676
- msgstr "Queste impostazioni si applicano a tutti i post e le pagine in cui il builder è attivo."
2677
-
2678
- #: includes/global-settings.php:11
2679
- #@ fl-builder
2680
- msgid "Default Page Heading"
2681
- msgstr "Intestazione di pagina di default"
2682
-
2683
- #: includes/global-settings.php:26
2684
- #@ fl-builder
2685
- msgid "Choosing no will hide the default theme heading for the \"Page\" post type. You will also be required to enter some basic CSS for this to work if you choose no."
2686
- msgstr "Scegliendo no si nasconderà il titolo predefinito del tema per il tipo di post \"Pagina\". Se si sceglie no vi sarà anche richiesto di inserire alcuni CSS base per far funzionare questo."
2687
-
2688
- #: includes/global-settings.php:30
2689
- #@ fl-builder
2690
- msgid "CSS Selector"
2691
- msgstr "Selettore CSS"
2692
-
2693
- #: includes/global-settings.php:32
2694
- #@ fl-builder
2695
- msgid "Enter a CSS selector for the default page heading to hide it."
2696
- msgstr "Inserire un selettore CSS per nascondere l'intestazione della pagina predefinita."
2697
-
2698
- #: includes/global-settings.php:37
2699
- #@ fl-builder
2700
- msgid "Rows"
2701
- msgstr "Righe"
2702
-
2703
- #: includes/global-settings.php:57
2704
- #@ fl-builder
2705
- msgid "Max Width"
2706
- msgstr "Larghezza massima"
2707
-
2708
- #: includes/global-settings.php:62
2709
- #@ fl-builder
2710
- msgid "All rows will default to this width. You can override this and make a row full width in the settings for each row."
2711
- msgstr "Tutte le righe avranno questa larghezza per impostazione predefinita. Puoi rendere una riga a piena larghezza modificando le impostazioni di ciascuna riga."
2712
-
2713
- #: includes/global-settings.php:80
2714
- #@ fl-builder
2715
- msgid "Mobile Layout"
2716
- msgstr "Layout mobile"
2717
-
2718
- #: includes/global-settings.php:84
2719
- #@ fl-builder
2720
- msgid "Enabled"
2721
- msgstr "Abilitato"
2722
-
2723
- #: includes/global-settings.php:98
2724
- #@ fl-builder
2725
- msgid "Breakpoint"
2726
- msgstr "Breakpoint"
2727
-
2728
- #: includes/icon-selector.php:25
2729
- #@ fl-builder
2730
- msgid "Filter: "
2731
- msgstr "Filtro: "
2732
-
2733
- #: includes/icon-selector.php:48
2734
- #: includes/js-config.php:14
2735
- #: includes/settings.php:66
2736
- #: includes/template-selector.php:91
2737
- #@ fl-builder
2738
- msgid "Cancel"
2739
- msgstr "Annulla"
2740
-
2741
- #: includes/js-config.php:13
2742
- #@ fl-builder
2743
- msgid "What would you like to do?"
2744
- msgstr "Che cosa vorresti fare?"
2745
-
2746
- #: includes/js-config.php:15
2747
- #@ fl-builder
2748
- msgid "Change Template"
2749
- msgstr "Cambia modello"
2750
-
2751
- #: includes/js-config.php:16
2752
- #@ fl-builder
2753
- msgid "Warning! Changing the template will replace your existing layout. Do you really want to do this?"
2754
- msgstr "ATTENZIONE! Cambiare il modello sostituirà il layout esistente. Vuoi davvero fare questo?"
2755
-
2756
- #: includes/js-config.php:17
2757
- #@ fl-builder
2758
- msgid "Column"
2759
- msgstr "Colonna"
2760
-
2761
- #: includes/js-config.php:19
2762
- #@ fl-builder
2763
- msgid "Please select either a background layout or content layout before submitting."
2764
- msgstr "Si prega di selezionare un layout di sfondo o un layout contenuto prima di inviare."
2765
-
2766
- #: includes/js-config.php:20
2767
- #@ fl-builder
2768
- msgid "Do you really want to delete this item?"
2769
- msgstr "Vuoi davvero eliminare questo elemento?"
2770
-
2771
- #: includes/js-config.php:21
2772
- #@ fl-builder
2773
- msgid "Do you really want to delete this module? All content data will be permanently deleted."
2774
- msgstr "Vuoi davvero eliminare questo modulo? Tutti i dati contenuti verranno eliminati definitivamente."
2775
-
2776
- #: includes/js-config.php:22
2777
- #@ fl-builder
2778
- msgid "Do you really want to delete this row? All content data will be permanently deleted."
2779
- msgstr "Vuoi davvero eliminare questa riga? Tutti i dati contenuti verranno eliminati definitivamente."
2780
-
2781
- #: includes/js-config.php:23
2782
- #@ fl-builder
2783
- msgid "Do you really want to delete this template?"
2784
- msgstr "Vuoi davvero eliminare questo modello?"
2785
-
2786
- #: includes/js-config.php:24
2787
- #@ fl-builder
2788
- msgid "Discard Draft"
2789
- msgstr "Scarta bozza"
2790
-
2791
- #: includes/js-config.php:25
2792
- #@ fl-builder
2793
- msgid "Do you really want to discard this draft? All of your changes that are not published will be lost."
2794
- msgstr "Vuoi davvero scartare questa bozza? Tutte le modifiche non pubblicate saranno perse."
2795
-
2796
- #: includes/js-config.php:26
2797
- #@ fl-builder
2798
- msgid "Save Draft"
2799
- msgstr "Salva bozza"
2800
-
2801
- #: includes/js-config.php:27
2802
- #@ fl-builder
2803
- msgid "Duplicate"
2804
- msgstr "Duplica"
2805
-
2806
- #: includes/js-config.php:28
2807
- #@ fl-builder
2808
- msgid "Duplicate This Page"
2809
- msgstr "Duplica questa pagina"
2810
-
2811
- #: includes/js-config.php:29
2812
- #@ fl-builder
2813
- msgid "Duplicate This Template"
2814
- msgstr "Duplica questo modello"
2815
-
2816
- #: includes/js-config.php:30
2817
- #@ fl-builder
2818
- msgid "Edit Global Settings"
2819
- msgstr "Modifica impostazioni globali"
2820
-
2821
- #: includes/js-config.php:31
2822
- #@ fl-builder
2823
- msgid "Drop a row layout or module to get started!"
2824
- msgstr "Rilascia un formato di riga o un modulo per iniziare!"
2825
-
2826
- #: includes/js-config.php:33
2827
- #@ fl-builder
2828
- msgid "Insert"
2829
- msgstr "Inserisci"
2830
-
2831
- #: includes/js-config.php:35
2832
- #@ fl-builder
2833
- msgid "Manage Templates"
2834
- msgstr "Gestione modelli"
2835
-
2836
- #: includes/js-config.php:37
2837
- #@ fl-builder
2838
- msgid "Module"
2839
- msgstr "Modulo"
2840
-
2841
- #: includes/js-config.php:38
2842
- #@ fl-builder
2843
- msgid "Move"
2844
- msgstr "Sposta"
2845
-
2846
- #: includes/js-config.php:39
2847
- #@ fl-builder
2848
- msgid "New Column"
2849
- msgstr "Nuova colonna"
2850
-
2851
- #: includes/js-config.php:40
2852
- #@ fl-builder
2853
- msgid "New Row"
2854
- msgstr "Nuova riga"
2855
-
2856
- #: includes/js-config.php:42
2857
- #@ fl-builder
2858
- msgid "Ok"
2859
- msgstr "Ok"
2860
-
2861
- #: includes/js-config.php:43
2862
- #@ fl-builder
2863
- msgid "Photo Selected"
2864
- msgstr "Foto selezionata"
2865
-
2866
- #: includes/js-config.php:44
2867
- #@ fl-builder
2868
- msgid "Photos Selected"
2869
- msgstr "Foto selezionate"
2870
-
2871
- #: includes/js-config.php:45
2872
- #@ fl-builder
2873
- msgid "Publish Changes"
2874
- msgstr "Pubblica le modifiche"
2875
-
2876
- #: includes/js-config.php:47
2877
- #@ fl-builder
2878
- msgid "Row"
2879
- msgstr "Riga"
2880
-
2881
- #: includes/js-config.php:48
2882
- #: includes/row-settings.php:6
2883
- #@ fl-builder
2884
- msgid "Row Settings"
2885
- msgstr "Impostazioni di riga"
2886
-
2887
- #: includes/js-config.php:49
2888
- #@ fl-builder
2889
- msgid "Save Core Template"
2890
- msgstr "Salva il modello Core"
2891
-
2892
- #: includes/js-config.php:50
2893
- #: includes/user-template-settings.php:4
2894
- #@ fl-builder
2895
- msgid "Save Template"
2896
- msgstr "Salva il modello"
2897
-
2898
- #: includes/js-config.php:52
2899
- #@ fl-builder
2900
- msgid "Select Photos"
2901
- msgstr "Seleziona foto"
2902
-
2903
- #: includes/js-config.php:54
2904
- #@ fl-builder
2905
- msgid "Settings"
2906
- msgstr "Impostazioni"
2907
-
2908
- #: includes/js-config.php:55
2909
- #@ fl-builder
2910
- msgid "Append New Layout"
2911
- msgstr "Aggiungi nuovo Layout"
2912
-
2913
- #: includes/js-config.php:56
2914
- #@ fl-builder
2915
- msgid "Replace Existing Layout"
2916
- msgstr "Sostituisci il Layout esistente"
2917
-
2918
- #: includes/js-config.php:57
2919
- #@ fl-builder
2920
- msgid "Template Saved!"
2921
- msgstr "Modello salvato!"
2922
-
2923
- #: includes/js-config.php:59
2924
- #@ fl-builder
2925
- msgid "The settings you are currently editing will not be saved if you navigate away from this page."
2926
- msgstr "Le impostazioni che stai modificando non verranno salvate se abbandoni questa pagina."
2927
-
2928
- #: includes/module-settings.php:14
2929
- #@ default
2930
- msgid "A custom CSS class that will be applied to this module. Spaces only, no dots."
2931
- msgstr "Una classe CSS personalizzata che verrà applicata a questo modulo. Solo spazi, senza punti."
2932
-
2933
- #: includes/module-settings.php:24
2934
- #@ default
2935
- msgid "Choose whether to always show this module, only show it on the desktop view or only show it on the mobile view."
2936
- msgstr "Scegliere se mostrare sempre questo modulo, mostrarlo solo nella vista desktop o mostrarlo solo nella visualizzazione mobile."
2937
-
2938
- #: includes/module-settings.php:70
2939
- #@ fl-builder
2940
- msgid "Animation"
2941
- msgstr "Animazione"
2942
-
2943
- #: includes/module-settings.php:77
2944
- #@ fl-builder
2945
- msgid "Fade In"
2946
- msgstr "Dissolvenza In entrata"
2947
-
2948
- #: includes/module-settings.php:78
2949
- #@ fl-builder
2950
- msgid "Slide Left"
2951
- msgstr "Scorri sinistra"
2952
-
2953
- #: includes/module-settings.php:79
2954
- #@ fl-builder
2955
- msgid "Slide Right"
2956
- msgstr "Scorri destra"
2957
-
2958
- #: includes/module-settings.php:80
2959
- #@ fl-builder
2960
- msgid "Slide Up"
2961
- msgstr "Scorri sù"
2962
-
2963
- #: includes/module-settings.php:81
2964
- #@ fl-builder
2965
- msgid "Slide Down"
2966
- msgstr "Scorri giù"
2967
-
2968
- #: includes/module-settings.php:91
2969
- #@ fl-builder
2970
- msgid "The amount of time in seconds before this animation starts."
2971
- msgstr "Il periodo di tempo in secondi prima dell'inizio di questa animazione."
2972
-
2973
- #: includes/row-settings.php:19
2974
- #: includes/row-settings.php:34
2975
- #: includes/row-settings.php:152
2976
- #@ fl-builder
2977
- msgid "Fixed"
2978
- msgstr "Fisso"
2979
-
2980
- #: includes/row-settings.php:27
2981
- #@ fl-builder
2982
- msgid "Full width rows span the width of the page from edge to edge. Fixed rows are no wider than the Row Max Width set in the Global Settings."
2983
- msgstr "Le righe a larghezza piena si estendono per la larghezza della pagina da bordo a bordo. Le righe fisse non sono più ampie rispetto alla massima larghezza di riga configurata nelle impostazioni globali."
2984
-
2985
- #: includes/row-settings.php:31
2986
- #@ fl-builder
2987
- msgid "Content Width"
2988
- msgstr "Larghezza contenuto"
2989
-
2990
- #: includes/row-settings.php:37
2991
- #@ fl-builder
2992
- msgid "Full width content spans the width of the page from edge to edge. Fixed content is no wider than the Row Max Width set in the Global Settings."
2993
- msgstr "Il contenuto a larghezza piena si estende per la larghezza della pagina da bordo a bordo. Il contenuto fisso non è più ampio rispetto alla massima larghezza di riga configurata nelle impostazioni globali."
2994
-
2995
- #: includes/row-settings.php:52
2996
- #@ fl-builder
2997
- msgid "Background"
2998
- msgstr "Sfondo"
2999
-
3000
- #: includes/row-settings.php:68
3001
- #@ fl-builder
3002
- msgid "Parallax"
3003
- msgstr "Parallasse"
3004
-
3005
- #: includes/row-settings.php:119
3006
- #@ fl-builder
3007
- msgid "Repeat"
3008
- msgstr "Ripeti"
3009
-
3010
- #: includes/row-settings.php:123
3011
- #@ fl-builder
3012
- msgid "Tile"
3013
- msgstr "Tassello"
3014
-
3015
- #: includes/row-settings.php:127
3016
- #@ fl-builder
3017
- msgid "Repeat applies to how the image should display in the row background. Choosing none will display the image as uploaded. Tile will repeat the image as many times as needed to fill the row horizontally and vertically. You can also specify the image to only repeat horizontally or vertically."
3018
- msgstr "Ripetizione si applica a come dovrebbe essere visualizzata l'immagine sullo sfondo della riga. Scegliendo nessuna visualizzerà l'immagine così come caricata. Tassello ripeterà l'immagine tante volte quanto è necessario per riempire la riga orizzontalmente e verticalmente. È anche possibile specificare di ripetere l'immagine solo orizzontalmente o verticalmente."
3019
-
3020
- #: includes/row-settings.php:134
3021
- #@ fl-builder
3022
- msgid "Left Top"
3023
- msgstr "Sinistra Alto"
3024
-
3025
- #: includes/row-settings.php:135
3026
- #@ fl-builder
3027
- msgid "Left Center"
3028
- msgstr "Sinistra Centro"
3029
-
3030
- #: includes/row-settings.php:136
3031
- #@ fl-builder
3032
- msgid "Left Bottom"
3033
- msgstr "Sinistra Basso"
3034
-
3035
- #: includes/row-settings.php:137
3036
- #@ fl-builder
3037
- msgid "Right Top"
3038
- msgstr "Destra Alto"
3039
-
3040
- #: includes/row-settings.php:138
3041
- #@ fl-builder
3042
- msgid "Right Center"
3043
- msgstr "Destra Centro"
3044
-
3045
- #: includes/row-settings.php:139
3046
- #@ fl-builder
3047
- msgid "Right Bottom"
3048
- msgstr "Destra Basso"
3049
-
3050
- #: includes/row-settings.php:140
3051
- #@ fl-builder
3052
- msgid "Center Top"
3053
- msgstr "Centro Alto"
3054
-
3055
- #: includes/row-settings.php:141
3056
- #@ fl-builder
3057
- msgid "Center Center"
3058
- msgstr "Centro Centro"
3059
-
3060
- #: includes/row-settings.php:142
3061
- #@ fl-builder
3062
- msgid "Center Bottom"
3063
- msgstr "Centro Basso"
3064
-
3065
- #: includes/row-settings.php:144
3066
- #@ fl-builder
3067
- msgid "Position will tell the image where it should sit in the row background."
3068
- msgstr "Posizione dirà all'immagine dove posizionarsi nello sfondo di riga."
3069
-
3070
- #: includes/row-settings.php:148
3071
- #@ fl-builder
3072
- msgid "Attachment"
3073
- msgstr "Ancoraggio"
3074
-
3075
- #: includes/row-settings.php:151
3076
- #@ fl-builder
3077
- msgid "Scroll"
3078
- msgstr "Scorri"
3079
-
3080
- #: includes/row-settings.php:154
3081
- #@ fl-builder
3082
- msgid "Attachment will specify how the image reacts when scrolling a page. When scrolling is selected, the image will scroll with page scrolling. This is the default setting. Fixed will allow the image to scroll within the row background if fill is selected in the scale setting."
3083
- msgstr "L'ancoraggio specificherà come reagisce l'immagine durante lo scorrimento di una pagina. Quando è selezionato lo scorrimento, l'immagine scorre con lo scorrimento della pagina. Questa è l'impostazione predefinita. Fisso permetterà all'immagine di scorrere all'interno dello sfondo di riga se si è selezionato riempimento nelle impostazioni di scala."
3084
-
3085
- #: includes/row-settings.php:158
3086
- #@ fl-builder
3087
- msgid "Scale"
3088
- msgstr "Scala"
3089
-
3090
- #: includes/row-settings.php:162
3091
- #@ fl-builder
3092
- msgid "Fit"
3093
- msgstr "Adatta"
3094
-
3095
- #: includes/row-settings.php:163
3096
- #@ fl-builder
3097
- msgid "Fill"
3098
- msgstr "Riempimento"
3099
-
3100
- #: includes/row-settings.php:165
3101
- #@ fl-builder
3102
- msgid "Scale applies to how the image should display in the row background. You can select either fill or fit to the row background."
3103
- msgstr "Scala si applica a come si dovrebbe visualizzare l'immagine nello sfondo della riga. È possibile selezionare riempimento o adatta allo sfondo di riga."
3104
-
3105
- #: includes/row-settings.php:170
3106
- #@ fl-builder
3107
- msgid "Background Video"
3108
- msgstr "Video di sfondo"
3109
-
3110
- #: includes/row-settings.php:175
3111
- #@ fl-builder
3112
- msgid "An HTML5 video to use as the background of this row. Supported types are MP4, WebM and Ogg."
3113
- msgstr "Un video HTML5 da usare come sfondo di questa riga. I formati supportati sono MP4, WebM e Ogg."
3114
-
3115
- #: includes/row-settings.php:179
3116
- #@ fl-builder
3117
- msgid "Fallback Photo"
3118
- msgstr "Foto alternativa"
3119
-
3120
- #: includes/row-settings.php:180
3121
- #@ fl-builder
3122
- msgid "A photo that will be displayed if the video fails to load."
3123
- msgstr "Una foto che verrà visualizzata se fallisce il caricamento del video."
3124
-
3125
- #: includes/row-settings.php:185
3126
- #@ fl-builder
3127
- msgid "Background Slideshow"
3128
- msgstr "Sfondo Slideshow"
3129
-
3130
- #: includes/row-settings.php:257
3131
- #@ fl-builder
3132
- msgid "Background Parallax"
3133
- msgstr "Sfondo Parallasse"
3134
-
3135
- #: includes/row-settings.php:268
3136
- #@ fl-builder
3137
- msgid "Fast"
3138
- msgstr "Veloce"
3139
-
3140
- #: includes/row-settings.php:270
3141
- #@ fl-builder
3142
- msgid "Slow"
3143
- msgstr "Lento"
3144
-
3145
- #: includes/row-settings.php:370
3146
- #@ fl-builder
3147
- msgid "Add a custom CSS selector here to apply additional styling to this row."
3148
- msgstr "Aggiungere un selettore CSS personalizzato qui per applicare stili aggiuntivi a questa riga."
3149
-
3150
- #: includes/row-settings.php:380
3151
- #@ default
3152
- msgid "Choose whether to always show this row, only show it on the desktop view or only show it on the mobile view."
3153
- msgstr "Scegliere se mostrare sempre questa riga, mostrarla solo nella vista desktop o mostrarla solo nella visualizzazione mobile."
3154
-
3155
- #: classes/FLBuilder.php:594
3156
- #@ fl-builder
3157
- msgid "Add"
3158
- msgstr "Aggiungi"
3159
-
3160
- #: includes/settings.php:62
3161
- #@ fl-builder
3162
- msgid "Save &amp; Finish"
3163
- msgstr "Salva e finisci"
3164
-
3165
- #: includes/settings.php:64
3166
- #@ fl-builder
3167
- msgid "Save &amp; Preview"
3168
- msgstr "Salva e anteprima"
3169
-
3170
- #: includes/template-selector.php:3
3171
- #@ fl-builder
3172
- msgid "Layout Templates"
3173
- msgstr "Modelli di layout"
3174
-
3175
- #: includes/template-selector.php:8
3176
- #@ fl-builder
3177
- msgid "Home Pages"
3178
- msgstr "Pagine Home"
3179
-
3180
- #: includes/template-selector.php:9
3181
- #@ fl-builder
3182
- msgid "Content Pages"
3183
- msgstr "Pagine di contenuto"
3184
-
3185
- #: includes/template-selector.php:13
3186
- #@ fl-builder
3187
- msgid "Your Templates"
3188
- msgstr "I tuoi modelli"
3189
-
3190
- #: includes/template-selector.php:61
3191
- #@ fl-builder
3192
- msgid "You haven't saved any templates yet! To do so, create a layout and save it as a template under Tools > Save Template."
3193
- msgstr "Non hai ancora salvato nessun modello! Per farlo, crea un layout e salvalo come modello con Strumenti > Salva modello."
3194
-
3195
- #: includes/template-selector.php:66
3196
- #@ fl-builder
3197
- msgid "Blank"
3198
- msgstr "Vuoto"
3199
-
3200
- #: includes/template-selector.php:73
3201
- #@ fl-builder
3202
- msgid "Delete"
3203
- msgstr "Elimina"
3204
-
3205
- #: includes/ui.php:9
3206
- #@ fl-builder
3207
- msgid "Done"
3208
- msgstr "Fatto"
3209
-
3210
- #: includes/ui.php:10
3211
- #@ fl-builder
3212
- msgid "Tools"
3213
- msgstr "Strumenti"
3214
-
3215
- #: includes/admin-settings.php:10
3216
- #: includes/ui.php:12
3217
- #@ fl-builder
3218
- msgid "Templates"
3219
- msgstr "Modelli"
3220
-
3221
- #: includes/ui.php:14
3222
- #@ fl-builder
3223
- msgid "Add Content"
3224
- msgstr "Aggiungi contenuto"
3225
-
3226
- #: includes/ui.php:29
3227
- #@ fl-builder
3228
- msgid "Row Layouts"
3229
- msgstr "Layout di riga"
3230
-
3231
- #: includes/ui.php:33
3232
- #@ fl-builder
3233
- msgid "1 Column"
3234
- msgstr "1 Colonna"
3235
-
3236
- #: includes/ui.php:34
3237
- #@ fl-builder
3238
- msgid "2 Columns"
3239
- msgstr "2 Colonne"
3240
-
3241
- #: includes/ui.php:35
3242
- #@ fl-builder
3243
- msgid "3 Columns"
3244
- msgstr "3 Colonne"
3245
-
3246
- #: includes/ui.php:36
3247
- #@ fl-builder
3248
- msgid "4 Columns"
3249
- msgstr "4 Colonne"
3250
-
3251
- #: includes/ui.php:37
3252
- #@ fl-builder
3253
- msgid "5 Columns"
3254
- msgstr "5 Colonne"
3255
-
3256
- #: includes/ui.php:38
3257
- #@ fl-builder
3258
- msgid "6 Columns"
3259
- msgstr "6 Colonne"
3260
-
3261
- #: includes/ui.php:39
3262
- #@ fl-builder
3263
- msgid "Left Sidebar"
3264
- msgstr "Barra laterale sinistra"
3265
-
3266
- #: includes/ui.php:40
3267
- #@ fl-builder
3268
- msgid "Right Sidebar"
3269
- msgstr "Barra laterale destra"
3270
-
3271
- #: includes/ui.php:41
3272
- #@ fl-builder
3273
- msgid "Left &amp; Right Sidebar"
3274
- msgstr "Barra laterale sinistra e destra"
3275
-
3276
- #: includes/ui.php:68
3277
- #@ fl-builder
3278
- msgid "Purchase the Page Builder"
3279
- msgstr "Acquista Page Builder"
3280
-
3281
- #: includes/updater/includes/form.php:4
3282
- #@ fl-builder
3283
- msgid "FastLine Themes Subscription"
3284
- msgstr "Abbonamento FastLine Themes"
3285
-
3286
- #: includes/updater/includes/form.php:7
3287
- #@ fl-builder
3288
- msgid "Active!"
3289
- msgstr "Attivo!"
3290
-
3291
- #: includes/updater/includes/form.php:9
3292
- #@ fl-builder
3293
- msgid "Not Active!"
3294
- msgstr "Non attivo!"
3295
-
3296
- #: includes/updater/includes/form.php:15
3297
- #@ fl-builder
3298
- msgid "Email address saved!"
3299
- msgstr "Indirizzo email salvato!"
3300
-
3301
- #: includes/updater/includes/form.php:20
3302
- #@ fl-builder
3303
- msgid "Enter the email address you used to signup for <a href=\"http://themes.fastlinemedia.com\" target=\"_blank\">FastLine Themes</a> to enable remote updates."
3304
- msgstr "Inserisci l'indirizzo email utilizzato per l'iscrizione a <a href=\\\"http://themes.fastlinemedia.com\\\" target=\\\"_blank\\\">FastLine Themes</a> per abilitare aggiornamenti remoti."
3305
-
3306
- #: includes/updater/includes/form.php:24
3307
- #@ fl-builder
3308
- msgid "email@yourwebsite.com"
3309
- msgstr "email@tuositoweb.com"
3310
-
3311
- #: includes/updater/includes/form.php:27
3312
- #@ fl-builder
3313
- msgid "Save Subscription Settings"
3314
- msgstr "Salvare le impostazioni di abbonamento"
3315
-
3316
- #: includes/user-template-settings.php:8
3317
- #@ fl-builder
3318
- msgid "Save the current layout as a template that can be reused under Tools > Manage Templates."
3319
- msgstr "Salvare il layout attuale come un modello che può essere riutilizzato in Strumenti > Gestione modelli."
3320
-
3321
- #: modules/accordion/accordion.php:16
3322
- #: modules/button/button.php:16
3323
- #: modules/callout/callout.php:16
3324
- #: modules/contact-form/contact-form.php:16
3325
- #: modules/content-slider/content-slider.php:16
3326
- #: modules/cta/cta.php:16
3327
- #: modules/gallery/gallery.php:16
3328
- #: modules/html/html.php:16
3329
- #: modules/icon/icon.php:16
3330
- #: modules/icon-group/icon-group.php:16
3331
- #: modules/map/map.php:16
3332
- #: modules/sidebar/sidebar.php:16
3333
- #: modules/slideshow/slideshow.php:16
3334
- #: modules/social-buttons/social-buttons.php:16
3335
- #: modules/testimonials/testimonials.php:16
3336
- #: modules/woocommerce/woocommerce.php:18
3337
- #@ fl-builder
3338
- msgid "Advanced Modules"
3339
- msgstr "Moduli avanzati"
3340
-
3341
- #: modules/button/button.php:130
3342
- #@ fl-builder
3343
- msgid "Custom Width"
3344
- msgstr "Larghezza personalizzata"
3345
-
3346
- #: modules/heading/heading.php:16
3347
- #: modules/photo/photo.php:27
3348
- #: modules/rich-text/rich-text.php:16
3349
- #: modules/separator/separator.php:16
3350
- #: modules/video/video.php:21
3351
- #@ fl-builder
3352
- msgid "Basic Modules"
3353
- msgstr "Moduli di base"
3354
-
3355
- #: modules/separator/separator.php:63
3356
- #@ fl-builder
3357
- msgid "The type of border to use. Double borders must have a height of at least 3px to render properly."
3358
- msgstr "Il tipo di bordo da utilizzare. I bordi doppi devono avere un'altezza di almeno 3px per essere visualizzati correttamente."
3359
-
3360
- #: modules/video/video.php:116
3361
- #@ fl-builder
3362
- msgid "Loop"
3363
- msgstr "Ripeti"
3364
-
3365
- #: includes/admin-settings.php:39
3366
- #@ fl-builder
3367
- msgid "All"
3368
- msgstr "Tutti"
3369
-
3370
- #: includes/admin-settings.php:67
3371
- #@ fl-builder
3372
- msgid "Template Settings"
3373
- msgstr "Impostazioni modello"
3374
-
3375
- #: includes/admin-settings.php:68
3376
- #@ fl-builder
3377
- msgid "Enable or disable templates using the options below."
3378
- msgstr "Abilita o disabilita i modelli utilizzando le opzioni qui sotto."
3379
-
3380
- #: includes/admin-settings.php:77
3381
- #@ default
3382
- msgid "Enable All Templates"
3383
- msgstr "Abilita tutti i modelli"
3384
-
3385
- #: includes/admin-settings.php:78
3386
- #@ default
3387
- msgid "Enable Core Templates Only"
3388
- msgstr "Abilita solo i modelli Core"
3389
-
3390
- #: includes/admin-settings.php:79
3391
- #@ default
3392
- msgid "Enable User Templates Only"
3393
- msgstr "Abilita solo i modelli utente"
3394
-
3395
- #: includes/admin-settings.php:80
3396
- #@ default
3397
- msgid "Disable All Templates"
3398
- msgstr "Disabilita tutti i modelli"
3399
-
3400
- #: includes/fields.php:300
3401
- #@ fl-builder
3402
- msgid "Start typing..."
3403
- msgstr "Inizia a digitare..."
3404
-
3405
- #: includes/js-config.php:41
3406
- #@ fl-builder
3407
- msgid "No results found."
3408
- msgstr "Nessun risultato trovato."
3409
-
3410
- #: includes/loop-settings.php:19
3411
- #@ fl-builder
3412
- msgid "Post Type"
3413
- msgstr "Tipo di Post"
3414
-
3415
- #: includes/loop-settings.php:25
3416
- #@ fl-builder
3417
- msgid "Order By"
3418
- msgstr "Ordina per"
3419
-
3420
- #: includes/loop-settings.php:27
3421
- #@ fl-builder
3422
- msgid "ID"
3423
- msgstr "ID"
3424
-
3425
- #: includes/loop-settings.php:29
3426
- #@ fl-builder
3427
- msgid "Date Last Modified"
3428
- msgstr "Data dell'ultima modifica"
3429
-
3430
- #: includes/loop-settings.php:30
3431
- #@ fl-builder
3432
- msgid "Title"
3433
- msgstr "Titolo"
3434
-
3435
- #: includes/loop-settings.php:31
3436
- #@ fl-builder
3437
- msgid "Author"
3438
- msgstr "Autore"
3439
-
3440
- #: includes/loop-settings.php:32
3441
- #@ fl-builder
3442
- msgid "Comment Count"
3443
- msgstr "Numero commenti"
3444
-
3445
- #: includes/loop-settings.php:33
3446
- #@ fl-builder
3447
- msgid "Menu Order"
3448
- msgstr "Ordine del menu"
3449
-
3450
- #: includes/loop-settings.php:34
3451
- #@ fl-builder
3452
- msgid "Random"
3453
- msgstr "Casuale"
3454
-
3455
- #: includes/loop-settings.php:41
3456
- #@ fl-builder
3457
- msgid "Order"
3458
- msgstr "Ordine"
3459
-
3460
- #: includes/loop-settings.php:43
3461
- #@ fl-builder
3462
- msgid "Descending"
3463
- msgstr "Decrescente"
3464
-
3465
- #: includes/loop-settings.php:44
3466
- #@ fl-builder
3467
- msgid "Ascending"
3468
- msgstr "Crescente"
3469
-
3470
- #: includes/loop-settings.php:52
3471
- #@ fl-builder
3472
- msgid "Filter"
3473
- msgstr "Filtro"
3474
-
3475
- #: includes/loop-settings.php:63
3476
- #, php-format
3477
- #@ fl-builder
3478
- msgid "Enter a comma separated list of %s. Only these %s will be shown."
3479
- msgstr "Immetti un elenco di %s delimitato da virgole. Saranno mostrati solo questi %s."
3480
-
3481
- #: includes/loop-settings.php:76
3482
- #, php-format
3483
- #@ fl-builder
3484
- msgid "Enter a comma separated list of %s. Only posts with these %s will be shown."
3485
- msgstr "Immetti un elenco di %s delimitato da virgole. Saranno mostrati solo i post con queste %s."
3486
-
3487
- #: includes/loop-settings.php:90
3488
- #@ fl-builder
3489
- msgid "Authors"
3490
- msgstr "Autori"
3491
-
3492
- #: includes/loop-settings.php:91
3493
- #@ fl-builder
3494
- msgid "Enter a comma separated list of authors usernames. Only posts with these authors will be shown."
3495
- msgstr "Immetti un elenco di nomi di autori delimitato da virgole. Verranno visualizzati solo i post di questi autori."
3496
-
3497
- #: includes/ui.php:4
3498
- #@ fl-builder
3499
- msgid "Page Builder Demo"
3500
- msgstr "Dimostrazione di Page Builder"
3501
-
3502
- #: modules/woocommerce/woocommerce.php:60
3503
- #@ fl-builder
3504
- msgid "Choose…"
3505
- msgstr "Scegli..."
3506
-
<