Page Builder by SiteOrigin - Version 2.16.0

Version Description

  • 04 January 2022 =
  • Added a new global Mobile Widget Bottom Margin setting.
  • Added a new global Mobile Cell Bottom Margin setting.
  • Legacy Widgets: Updated for PHP 8 compatibility.
  • WordPress 5.9 Compatibility: Resolved row ordering issue.
  • jQuery: Resolved jQuery Migrate notice. Updated ready function.
  • Full-Width Containers Using CSS: Theme container no longer removed on pages without full-width rows.
  • Developer: Resolved JavaScript error when all style fields removed.
  • Developer: Added panels_title_check_sub_fields to allow for sub-field detection.
Download this release

Release Info

Developer SiteOrigin
Plugin Icon 128x128 Page Builder by SiteOrigin
Version 2.16.0
Comparing to
See all releases

Code changes from version 2.15.3 to 2.16.0

inc/admin.php CHANGED
@@ -8,7 +8,7 @@
8
  class SiteOrigin_Panels_Admin {
9
 
10
  /**
11
- * @var bool Store that we're in the save post action, to prevent infinite loops
12
  */
13
  private $in_save_post;
14
 
@@ -27,7 +27,7 @@ class SiteOrigin_Panels_Admin {
27
 
28
  add_action( 'after_switch_theme', array( $this, 'update_home_on_theme_change' ) );
29
 
30
- // Enqueuing admin scripts
31
  add_action( 'admin_print_scripts-post-new.php', array( $this, 'enqueue_admin_scripts' ) );
32
  add_action( 'admin_print_scripts-post.php', array( $this, 'enqueue_admin_scripts' ) );
33
  add_action( 'admin_print_scripts-appearance_page_so_panels_home_page', array(
@@ -37,20 +37,20 @@ class SiteOrigin_Panels_Admin {
37
  add_action( 'admin_print_scripts-widgets.php', array( $this, 'enqueue_admin_scripts' ) );
38
  add_action( 'admin_print_scripts-edit.php', array( $this, 'footer_column_css' ) );
39
 
40
- // Enqueue the admin styles
41
  add_action( 'admin_print_styles-post-new.php', array( $this, 'enqueue_admin_styles' ) );
42
  add_action( 'admin_print_styles-post.php', array( $this, 'enqueue_admin_styles' ) );
43
  add_action( 'admin_print_styles-appearance_page_so_panels_home_page', array( $this, 'enqueue_admin_styles' ) );
44
  add_action( 'admin_print_styles-widgets.php', array( $this, 'enqueue_admin_styles' ) );
45
 
46
- // The help tab
47
  add_action( 'load-page.php', array( $this, 'add_help_tab' ), 12 );
48
  add_action( 'load-post-new.php', array( $this, 'add_help_tab' ), 12 );
49
  add_action( 'load-appearance_page_so_panels_home_page', array( $this, 'add_help_tab' ), 12 );
50
 
51
  add_action( 'customize_controls_print_scripts', array( $this, 'js_templates' ) );
52
 
53
- // Register all the admin actions
54
  add_action( 'wp_ajax_so_panels_builder_content', array( $this, 'action_builder_content' ) );
55
  add_action( 'wp_ajax_so_panels_builder_content_json', array( $this, 'action_builder_content_json' ) );
56
  add_action( 'wp_ajax_so_panels_widget_form', array( $this, 'action_widget_form' ) );
@@ -63,12 +63,11 @@ class SiteOrigin_Panels_Admin {
63
  SiteOrigin_Panels_Admin_Widgets_Bundle::single();
64
  SiteOrigin_Panels_Admin_Layouts::single();
65
 
66
- // Check to make sure we have all the correct markup
67
  SiteOrigin_Panels_Admin_Dashboard::single();
68
 
69
  $this->in_save_post = false;
70
 
71
-
72
  // Enqueue Yoast compatibility
73
  add_action( 'admin_print_scripts-post-new.php', array( $this, 'enqueue_seo_compat' ), 100 );
74
  add_action( 'admin_print_scripts-post.php', array( $this, 'enqueue_seo_compat' ), 100 );
@@ -80,13 +79,13 @@ class SiteOrigin_Panels_Admin {
80
  SiteOrigin_Panels_Compat_ACF_Widgets::single();
81
  }
82
 
83
- // Block editor specific actions
84
  if ( function_exists( 'register_block_type' ) ) {
85
  add_action( 'admin_notices', array( $this, 'admin_notices' ) );
86
  add_filter( 'gutenberg_can_edit_post_type', array( $this, 'show_classic_editor_for_panels' ), 10, 2 );
87
  add_filter( 'use_block_editor_for_post_type', array( $this, 'show_classic_editor_for_panels' ), 10, 2 );
88
  add_action( 'admin_print_scripts-edit.php', array( $this, 'add_panels_add_new_button' ) );
89
- if( siteorigin_panels_setting( 'admin-post-state' ) ) {
90
  add_filter( 'display_post_states', array( $this, 'add_panels_post_state' ), 10, 2 );
91
  }
92
  }
@@ -103,13 +102,13 @@ class SiteOrigin_Panels_Admin {
103
  /**
104
  * Do some general admin initialization
105
  */
106
- public function admin_init_widget_count(){
107
- if( siteorigin_panels_setting( 'admin-widget-count' ) ) {
108
 
109
- // Add the custom columns
110
  $post_types = siteorigin_panels_setting( 'post-types' );
111
- if( ! empty( $post_types ) ) {
112
- foreach( $post_types as $post_type ) {
113
  add_filter( 'manage_' . $post_type . 's_columns' , array( $this, 'add_custom_column' ) );
114
  add_action( 'manage_' . $post_type . 's_custom_column' , array( $this, 'display_custom_column' ), 10, 2 );
115
  }
@@ -125,8 +124,8 @@ class SiteOrigin_Panels_Admin {
125
  static function is_admin() {
126
  $screen = get_current_screen();
127
  $is_panels_page = ( $screen->base == 'post' && in_array( $screen->id, siteorigin_panels_setting( 'post-types' ) ) ) ||
128
- in_array( $screen->base, array( 'appearance_page_so_panels_home_page', 'widgets', 'customize' ) ) ||
129
- self::is_block_editor();
130
 
131
  return apply_filters( 'siteorigin_panels_is_admin_page', $is_panels_page );
132
  }
@@ -161,7 +160,7 @@ class SiteOrigin_Panels_Admin {
161
  * @return array
162
  */
163
  function plugin_action_links( $links ) {
164
- if( ! is_array( $links ) ) {
165
  return $links;
166
  }
167
 
@@ -169,7 +168,7 @@ class SiteOrigin_Panels_Admin {
169
  $links[] = '<a href="' . admin_url( 'options-general.php?page=siteorigin_panels' ) . '">' . __( 'Settings', 'siteorigin-panels' ) . '</a>';
170
  $links[] = '<a href="http://siteorigin.com/threads/plugin-page-builder/">' . __( 'Support', 'siteorigin-panels' ) . '</a>';
171
 
172
- if( SiteOrigin_Panels::display_premium_teaser() ) {
173
  $links[] = '<a href="' . esc_url( SiteOrigin_Panels::premium_url() ) . '" style="color: #3db634" target="_blank" rel="noopener noreferrer">' . __('Addons', 'siteorigin-panels') . '</a>';
174
  }
175
 
@@ -223,7 +222,7 @@ class SiteOrigin_Panels_Admin {
223
  */
224
  function save_post( $post_id ) {
225
  // Check that everything is valid with this save.
226
- if(
227
  $this->in_save_post ||
228
  ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) ||
229
  empty( $_POST['_sopanels_nonce'] ) ||
@@ -257,7 +256,7 @@ class SiteOrigin_Panels_Admin {
257
  // Use `update_metadata` instead of `update_post_meta` to prevent saving to parent post when it's a revision, e.g. preview.
258
  update_metadata( 'post', $post_id, 'panels_data', map_deep( $panels_data, array( 'SiteOrigin_Panels_Admin', 'double_slash_string' ) ) );
259
 
260
- if( siteorigin_panels_setting( 'copy-content' ) ) {
261
  // Store a version of the HTML in post_content
262
  $post_parent_id = wp_is_post_revision( $post_id );
263
  $layout_id = ( ! empty( $post_parent_id ) ) ? $post_parent_id : $post_id;
@@ -269,9 +268,9 @@ class SiteOrigin_Panels_Admin {
269
  SiteOrigin_Panels_Post_Content_Filters::remove_filters();
270
  unset( $GLOBALS[ 'SITEORIGIN_PANELS_POST_CONTENT_RENDER' ] );
271
 
272
- // Update the post_content
273
  $post->post_content = $post_content;
274
- if( siteorigin_panels_setting( 'copy-styles' ) ) {
275
  $post->post_content .= "\n\n";
276
  $post->post_content .= '<style type="text/css" class="panels-style" data-panels-style-for-post="' . (int) $layout_id . '">';
277
  $post->post_content .= '@import url(' . SiteOrigin_Panels::front_css_url() . '); ';
@@ -282,7 +281,7 @@ class SiteOrigin_Panels_Admin {
282
  }
283
 
284
  } else {
285
- // There are no widgets or rows, so delete the panels data
286
  delete_post_meta( $post_id, 'panels_data' );
287
  }
288
 
@@ -317,7 +316,7 @@ class SiteOrigin_Panels_Admin {
317
  function enqueue_admin_scripts( $prefix = '', $force = false ) {
318
  $screen = get_current_screen();
319
  if ( $force || self::is_admin() ) {
320
- // Media is required for row styles
321
  wp_enqueue_media();
322
  wp_enqueue_script(
323
  'so-panels-admin',
@@ -341,9 +340,9 @@ class SiteOrigin_Panels_Admin {
341
  $widgets = $this->get_widgets();
342
  $directory_enabled = get_user_meta( get_current_user_id(), 'so_panels_directory_enabled', true );
343
 
344
- // This is the widget we'll use for default text
345
- if( ! empty( $widgets[ 'SiteOrigin_Widget_Editor_Widget' ] ) ) $text_widget = 'SiteOrigin_Widget_Editor_Widget';
346
- else if( ! empty( $widgets[ 'WP_Widget_Text' ] ) ) $text_widget = 'WP_Widget_Text';
347
  else $text_widget = false;
348
  $text_widget = apply_filters( 'siteorigin_panels_text_widget_class', $text_widget );
349
 
@@ -367,7 +366,7 @@ class SiteOrigin_Panels_Admin {
367
  'row_layouts' => apply_filters( 'siteorigin_panels_row_layouts', array() ),
368
  'directory_enabled' => ! empty( $directory_enabled ),
369
  'copy_content' => siteorigin_panels_setting( 'copy-content' ),
370
- 'cache' => array(),
371
  'instant_open' => siteorigin_panels_setting( 'instant-open-widgets' ),
372
  'default_columns' => apply_filters( 'siteorigin_panels_default_row_columns', array(
373
  array(
@@ -378,9 +377,9 @@ class SiteOrigin_Panels_Admin {
378
  ),
379
  ) ),
380
 
381
- // Settings for the contextual menu
382
  'contextual' => array(
383
- // Developers can change which widgets are displayed by default using this filter
384
  'default_widgets' => apply_filters( 'siteorigin_panels_contextual_default_widgets', array(
385
  'SiteOrigin_Widget_Editor_Widget',
386
  'SiteOrigin_Widget_Button_Widget',
@@ -396,18 +395,18 @@ class SiteOrigin_Panels_Admin {
396
  'description' => __( "Page Builder doesn't know about this widget.", 'siteorigin-panels' ),
397
  ),
398
  'time' => array(
399
- // TRANSLATORS: Number of seconds since
400
  'seconds' => __( '%d seconds', 'siteorigin-panels' ),
401
- // TRANSLATORS: Number of minutes since
402
  'minutes' => __( '%d minutes', 'siteorigin-panels' ),
403
- // TRANSLATORS: Number of hours since
404
  'hours' => __( '%d hours', 'siteorigin-panels' ),
405
 
406
- // TRANSLATORS: A single second since
407
  'second' => __( '%d second', 'siteorigin-panels' ),
408
- // TRANSLATORS: A single minute since
409
  'minute' => __( '%d minute', 'siteorigin-panels' ),
410
- // TRANSLATORS: A single hour since
411
  'hour' => __( '%d hour', 'siteorigin-panels' ),
412
 
413
  // TRANSLATORS: Time ago - eg. "1 minute before".
@@ -415,57 +414,57 @@ class SiteOrigin_Panels_Admin {
415
  'now' => __( 'Now', 'siteorigin-panels' ),
416
  ),
417
  'history' => array(
418
- // History messages
419
  'current' => __( 'Current', 'siteorigin-panels' ),
420
  'revert' => __( 'Original', 'siteorigin-panels' ),
421
  'restore' => __( 'Version restored', 'siteorigin-panels' ),
422
  'back_to_editor' => __( 'Converted to editor', 'siteorigin-panels' ),
423
 
424
- // Widgets
425
- // TRANSLATORS: Message displayed in the history when a widget is deleted
426
  'widget_deleted' => __( 'Widget deleted', 'siteorigin-panels' ),
427
- // TRANSLATORS: Message displayed in the history when a widget is added
428
  'widget_added' => __( 'Widget added', 'siteorigin-panels' ),
429
- // TRANSLATORS: Message displayed in the history when a widget is edited
430
  'widget_edited' => __( 'Widget edited', 'siteorigin-panels' ),
431
- // TRANSLATORS: Message displayed in the history when a widget is duplicated
432
  'widget_duplicated' => __( 'Widget duplicated', 'siteorigin-panels' ),
433
- // TRANSLATORS: Message displayed in the history when a widget position is changed
434
  'widget_moved' => __( 'Widget moved', 'siteorigin-panels' ),
435
 
436
  // Rows
437
- // TRANSLATORS: Message displayed in the history when a row is deleted
438
  'row_deleted' => __( 'Row deleted', 'siteorigin-panels' ),
439
- // TRANSLATORS: Message displayed in the history when a row is added
440
  'row_added' => __( 'Row added', 'siteorigin-panels' ),
441
- // TRANSLATORS: Message displayed in the history when a row is edited
442
  'row_edited' => __( 'Row edited', 'siteorigin-panels' ),
443
- // TRANSLATORS: Message displayed in the history when a row position is changed
444
  'row_moved' => __( 'Row moved', 'siteorigin-panels' ),
445
- // TRANSLATORS: Message displayed in the history when a row is duplicated
446
  'row_duplicated' => __( 'Row duplicated', 'siteorigin-panels' ),
447
- // TRANSLATORS: Message displayed in the history when a row is pasted
448
  'row_pasted' => __( 'Row pasted', 'siteorigin-panels' ),
449
 
450
- // Cells
451
  'cell_resized' => __( 'Cell resized', 'siteorigin-panels' ),
452
 
453
- // Prebuilt
454
  'prebuilt_loaded' => __( 'Prebuilt layout loaded', 'siteorigin-panels' ),
455
  ),
456
 
457
- // general localization
458
  'prebuilt_loading' => __( 'Loading prebuilt layout', 'siteorigin-panels' ),
459
  'confirm_use_builder' => __( "Would you like to copy this editor's existing content to Page Builder?", 'siteorigin-panels' ),
460
  'confirm_stop_builder' => __( "Would you like to clear your Page Builder content and revert to using the standard visual editor?", 'siteorigin-panels' ),
461
- // TRANSLATORS: This is the title for a widget called "Layout Builder"
462
  'layout_widget' => __( 'Layout Builder Widget', 'siteorigin-panels' ),
463
  // TRANSLATORS: A standard confirmation message
464
  'dropdown_confirm' => __( 'Are you sure?', 'siteorigin-panels' ),
465
  // TRANSLATORS: When a layout file is ready to be inserted. %s is the filename.
466
  'ready_to_insert' => __( '%s is ready to insert.', 'siteorigin-panels' ),
467
 
468
- // Everything for the contextual menu
469
  'contextual' => array(
470
  'add_widget_below' => __( 'Add Widget Below', 'siteorigin-panels' ),
471
  'add_widget_cell' => __( 'Add Widget to Cell', 'siteorigin-panels' ),
@@ -499,16 +498,16 @@ class SiteOrigin_Panels_Admin {
499
  ),
500
  'welcomeMessage' => array(
501
  'addingDisabled' => __( 'Hmmm... Adding layout elements is not enabled. Please check if Page Builder has been configured to allow adding elements.', 'siteorigin-panels' ),
502
- 'oneEnabled' => __( 'Add a {{%= items[0] %}} to get started.', 'siteorigin-panels' ),
503
- 'twoEnabled' => __( 'Add a {{%= items[0] %}} or {{%= items[1] %}} to get started.', 'siteorigin-panels' ),
504
- 'threeEnabled' => __( 'Add a {{%= items[0] %}}, {{%= items[1] %}} or {{%= items[2] %}} to get started.', 'siteorigin-panels' ),
505
- 'addWidgetButton' => "<a href='#' class='so-tool-button so-widget-add'>" . __( 'Widget', 'siteorigin-panels' ) . "</a>",
506
- 'addRowButton' => "<a href='#' class='so-tool-button so-row-add'>" . __( 'Row', 'siteorigin-panels' ) . "</a>",
507
- 'addPrebuiltButton' => "<a href='#' class='so-tool-button so-prebuilt-add'>" . __( 'Prebuilt Layout', 'siteorigin-panels' ) . "</a>",
508
- 'docsMessage' => sprintf(
509
- __( 'Read our %s if you need help.', 'siteorigin-panels' ),
510
- "<a href='https://siteorigin.com/page-builder/documentation/' target='_blank' rel='noopener noreferrer'>" . __( 'documentation', 'siteorigin-panels' ) . "</a>"
511
- ),
512
  ),
513
  ),
514
  'plupload' => array(
@@ -523,14 +522,14 @@ class SiteOrigin_Panels_Admin {
523
  'prebuiltDefaultScreenshot' => siteorigin_panels_url( 'css/images/prebuilt-default.png' ),
524
  'loadOnAttach' => $load_on_attach ,
525
  'siteoriginWidgetRegex' => str_replace( '*+', '*', get_shortcode_regex( array( 'siteorigin_widget' ) ) ),
526
- 'forms' => array(
527
  'loadingFailed' => __( 'Unknown error. Failed to load the form. Please check your internet connection, contact your web site administrator, or try again later.', 'siteorigin-panels' ),
528
  )
529
  ) );
530
 
531
  $js_widgets = array();
532
  if ( $screen->base != 'widgets' ) {
533
- // Render all the widget forms. A lot of widgets use this as a chance to enqueue their scripts
534
  $original_post = isset( $GLOBALS['post'] ) ? $GLOBALS['post'] : null; // Make sure widgets don't change the global post.
535
  global $wp_widget_factory;
536
  foreach ( $wp_widget_factory->widgets as $widget_obj ) {
@@ -563,7 +562,7 @@ class SiteOrigin_Panels_Admin {
563
  }
564
  }
565
 
566
- public function enqueue_seo_compat(){
567
  if ( self::is_admin() ) {
568
  if (
569
  defined( 'WPSEO_FILE' ) &&
@@ -592,10 +591,10 @@ class SiteOrigin_Panels_Admin {
592
  }
593
 
594
  /**
595
- * Enqueue the admin panel styles
596
  *
597
  * @param string $prefix
598
- * @param bool $force Should we force the enqueue
599
  *
600
  * @action admin_print_styles-post-new.php
601
  * @action admin_print_styles-post.php
@@ -624,8 +623,8 @@ class SiteOrigin_Panels_Admin {
624
  || ( $screen->id == 'appearance_page_so_panels_home_page' )
625
  ) {
626
  $screen->add_help_tab( array(
627
- 'id' => 'panels-help-tab', //unique id for the tab
628
- 'title' => __( 'Page Builder', 'siteorigin-panels' ), //unique visible title for the tab
629
  'callback' => array( $this, 'help_tab_content' )
630
  ) );
631
  }
@@ -646,7 +645,7 @@ class SiteOrigin_Panels_Admin {
646
  function get_current_admin_panels_data() {
647
  $screen = get_current_screen();
648
 
649
- // Localize the panels with the panels data
650
  if ( $screen->base == 'appearance_page_so_panels_home_page' ) {
651
  $home_page_id = get_option( 'page_on_front' );
652
  if ( empty( $home_page_id ) ) {
@@ -656,13 +655,13 @@ class SiteOrigin_Panels_Admin {
656
  $panels_data = ! empty( $home_page_id ) ? get_post_meta( $home_page_id, 'panels_data', true ) : null;
657
 
658
  if ( is_null( $panels_data ) ) {
659
- // Load the default layout
660
  $layouts = apply_filters( 'siteorigin_panels_prebuilt_layouts', array() );
661
 
662
  $home_name = siteorigin_panels_setting( 'home-page-default' ) ? siteorigin_panels_setting( 'home-page-default' ) : 'home';
663
  $panels_data = ! empty( $layouts[ $home_name ] ) ? $layouts[ $home_name ] : current( $layouts );
664
  } elseif ( empty( $panels_data ) ) {
665
- // The current page_on_front isn't using page builder
666
  return false;
667
  }
668
 
@@ -683,7 +682,7 @@ class SiteOrigin_Panels_Admin {
683
  }
684
 
685
  /**
686
- * Save home page
687
  */
688
  function save_home_page() {
689
  if ( ! isset( $_POST['_sopanels_home_nonce'] ) || ! wp_verify_nonce( $_POST['_sopanels_home_nonce'], 'save' ) ) {
@@ -696,7 +695,7 @@ class SiteOrigin_Panels_Admin {
696
  return;
697
  }
698
 
699
- // Check that the home page ID is set and the home page exists
700
  $page_id = get_option( 'page_on_front' );
701
  if ( empty( $page_id ) ) {
702
  $page_id = get_option( 'siteorigin_panels_home_page_id' );
@@ -705,9 +704,9 @@ class SiteOrigin_Panels_Admin {
705
  $post_content = wp_unslash( $_POST['post_content'] );
706
 
707
  if ( ! $page_id || get_post_meta( $page_id, 'panels_data', true ) == '' ) {
708
- // Lets create a new page
709
  $page_id = wp_insert_post( array(
710
- // TRANSLATORS: This is the default name given to a user's home page
711
  'post_title' => __( 'Home Page', 'siteorigin-panels' ),
712
  'post_status' => ! empty( $_POST['siteorigin_panels_home_enabled'] ) ? 'publish' : 'draft',
713
  'post_type' => 'page',
@@ -717,7 +716,7 @@ class SiteOrigin_Panels_Admin {
717
  update_option( 'page_on_front', $page_id );
718
  update_option( 'siteorigin_panels_home_page_id', $page_id );
719
 
720
- // Action triggered when creating a new home page through the custom home page interface
721
  do_action( 'siteorigin_panels_create_home_page', $page_id );
722
  } else {
723
  // `wp_insert_post` does it's own sanitization, but it seems `wp_update_post` doesn't.
@@ -729,7 +728,7 @@ class SiteOrigin_Panels_Admin {
729
 
730
  $page = get_post( $page_id );
731
 
732
- // Save the updated page data
733
  $old_panels_data = get_post_meta( $page_id, 'panels_data', true );
734
  $panels_data = json_decode( wp_unslash( $_POST['panels_data'] ), true );
735
  $panels_data['widgets'] = $this->process_raw_widgets(
@@ -751,7 +750,7 @@ class SiteOrigin_Panels_Admin {
751
  $template = get_post_meta( $page_id, '_wp_page_template', true );
752
  $home_template = siteorigin_panels_setting( 'home-template' );
753
  if ( ( $template == '' || $template == 'default' ) && ! empty( $home_template ) ) {
754
- // Set the home page template
755
  update_post_meta( $page_id, '_wp_page_template', $home_template );
756
  }
757
 
@@ -761,10 +760,10 @@ class SiteOrigin_Panels_Admin {
761
  update_option( 'siteorigin_panels_home_page_id', $page_id );
762
  wp_publish_post( $page_id );
763
  } else {
764
- // We're disabling this home page
765
  update_option( 'show_on_front', 'posts' );
766
 
767
- // Change the post status to draft
768
  $post = get_post( $page_id );
769
  if ( $post->post_status != 'draft' ) {
770
  global $wpdb;
@@ -794,7 +793,7 @@ class SiteOrigin_Panels_Admin {
794
  }
795
 
796
  if ( siteorigin_panels_setting( 'home-page' ) && siteorigin_panels_setting( 'home-template' ) && $page_id && get_post_meta( $page_id, 'panels_data', true ) !== '' ) {
797
- // Lets update the home page to use the home template that this theme supports
798
  update_post_meta( $page_id, '_wp_page_template', siteorigin_panels_setting( 'home-template' ) );
799
  }
800
  }
@@ -815,10 +814,14 @@ class SiteOrigin_Panels_Admin {
815
  'groups' => array(),
816
  );
817
 
818
- // Get Page Builder specific widget options
819
  if ( isset( $widget_obj->widget_options['panels_title'] ) ) {
820
  $widgets[ $class ]['panels_title'] = $widget_obj->widget_options['panels_title'];
821
  }
 
 
 
 
822
  if ( isset( $widget_obj->widget_options['panels_groups'] ) ) {
823
  $widgets[ $class ]['groups'] = $widget_obj->widget_options['panels_groups'];
824
  }
@@ -828,7 +831,7 @@ class SiteOrigin_Panels_Admin {
828
 
829
  }
830
 
831
- // Other plugins can manipulate the list of widgets. Possibly to add recommended widgets
832
  $widgets = apply_filters( 'siteorigin_panels_widgets', $widgets );
833
 
834
  // Exclude these temporarily, as they won't work until we have a reliable way to enqueue their admin form scripts.
@@ -845,14 +848,14 @@ class SiteOrigin_Panels_Admin {
845
  }
846
  }
847
 
848
- // Sort the widgets alphabetically
849
  uasort( $widgets, array( $this, 'widgets_sorter' ) );
850
 
851
  return $widgets;
852
  }
853
 
854
  /**
855
- * Sorts widgets for get_widgets function by title
856
  *
857
  * @param $a
858
  * @param $b
@@ -886,16 +889,16 @@ class SiteOrigin_Panels_Admin {
886
  }
887
 
888
  $old_widgets_by_id = array();
889
- if( ! empty( $old_widgets ) ) {
890
- foreach( $old_widgets as $widget ) {
891
- if( ! empty( $widget[ 'panels_info' ][ 'widget_id' ] ) ) {
892
  $old_widgets_by_id[ $widget[ 'panels_info' ][ 'widget_id' ] ] = $widget;
893
  unset( $old_widgets_by_id[ $widget[ 'panels_info' ][ 'widget_id' ] ][ 'panels_info' ] );
894
  }
895
  }
896
  }
897
 
898
- foreach( $widgets as $i => & $widget ) {
899
  if ( ! is_array( $widget ) ) {
900
  continue;
901
  }
@@ -914,11 +917,11 @@ class SiteOrigin_Panels_Admin {
914
  if ( ! empty( $the_widget ) &&
915
  method_exists( $the_widget, 'update' ) ) {
916
 
917
- if(
918
  ! empty( $old_widgets_by_id ) &&
919
  ! empty( $widget[ 'panels_info' ][ 'widget_id' ] ) &&
920
  ! empty( $old_widgets_by_id[ $widget[ 'panels_info' ][ 'widget_id' ] ] )
921
- ){
922
  $old_widget = $old_widgets_by_id[ $widget[ 'panels_info' ][ 'widget_id' ] ];
923
  }
924
  else {
@@ -936,8 +939,8 @@ class SiteOrigin_Panels_Admin {
936
  }
937
  }
938
 
939
- if( $escape_classes ) {
940
- // Escaping for namespaced widgets
941
  $info[ 'class' ] = preg_replace( '/\\\\+/', '\\\\\\\\', $info['class'] );
942
  }
943
 
@@ -955,7 +958,7 @@ class SiteOrigin_Panels_Admin {
955
  }
956
 
957
  /**
958
- * Render a widget form with all the Page Builder specific fields
959
  *
960
  * @param string $widget_class The class of the widget
961
  * @param array $instance Widget values
@@ -1018,7 +1021,7 @@ class SiteOrigin_Panels_Admin {
1018
  '</p></div>';
1019
  }
1020
 
1021
- // Allow other themes and plugins to change the missing widget form
1022
  return apply_filters( 'siteorigin_panels_missing_widget_form', $form, $widget_class, $instance );
1023
  }
1024
 
@@ -1045,14 +1048,14 @@ class SiteOrigin_Panels_Admin {
1045
  }
1046
  $form = ob_get_clean();
1047
 
1048
- // Convert the widget field naming into ones that Page Builder uses
1049
  $exp = preg_quote( $the_widget->get_field_name( '____' ) );
1050
  $exp = str_replace( '____', '(.*?)', $exp );
1051
  $form = preg_replace( '/' . $exp . '/', 'widgets[' . preg_replace( '/\$(\d)/', '\\\$$1', $widget_number ) . '][$1]', $form );
1052
 
1053
  $form = apply_filters( 'siteorigin_panels_widget_form', $form, $widget_class, $instance );
1054
 
1055
- // Add all the information fields
1056
  return $form;
1057
  }
1058
 
@@ -1081,7 +1084,7 @@ class SiteOrigin_Panels_Admin {
1081
 
1082
  $is_js_widget = in_array( get_class( $widget ), $js_widgets ) &&
1083
  // Need to check this for `WP_Widget_Text` which was not a JS widget before 4.8
1084
- method_exists( $widget, 'render_control_template_scripts' );
1085
 
1086
  return $is_js_widget;
1087
  }
@@ -1120,7 +1123,7 @@ class SiteOrigin_Panels_Admin {
1120
  wp_die();
1121
  }
1122
 
1123
- // echo the content
1124
  $old_panels_data = get_post_meta( $_POST['post_id'], 'panels_data', true );
1125
  $panels_data = json_decode( wp_unslash( $_POST['panels_data'] ), true );
1126
  $panels_data['widgets'] = $this->process_raw_widgets(
@@ -1130,7 +1133,7 @@ class SiteOrigin_Panels_Admin {
1130
  );
1131
  $panels_data = SiteOrigin_Panels_Styles_Admin::single()->sanitize_all( $panels_data );
1132
 
1133
- // Create a version of the builder data for post content
1134
  SiteOrigin_Panels_Post_Content_Filters::add_filters();
1135
  $GLOBALS[ 'SITEORIGIN_PANELS_POST_CONTENT_RENDER' ] = true;
1136
  echo SiteOrigin_Panels::renderer()->render( (int) $_POST['post_id'], false, $panels_data );
@@ -1168,7 +1171,7 @@ class SiteOrigin_Panels_Admin {
1168
  wp_die();
1169
  }
1170
 
1171
- // echo the content
1172
  $panels_data = json_decode( wp_unslash( $_POST['panels_data'] ), true );
1173
  $panels_data['widgets'] = $this->process_raw_widgets(
1174
  $panels_data['widgets'],
@@ -1178,7 +1181,7 @@ class SiteOrigin_Panels_Admin {
1178
  $panels_data = SiteOrigin_Panels_Styles_Admin::single()->sanitize_all( $panels_data );
1179
  $return['sanitized_panels_data'] = $panels_data;
1180
 
1181
- // Create a version of the builder data for post content
1182
  SiteOrigin_Panels_Post_Content_Filters::add_filters();
1183
  $GLOBALS[ 'SITEORIGIN_PANELS_POST_CONTENT_RENDER' ] = true;
1184
  $return['post_content'] = SiteOrigin_Panels::renderer()->render( (int) $_POST['post_id'], false, $panels_data );
@@ -1193,7 +1196,7 @@ class SiteOrigin_Panels_Admin {
1193
  }
1194
 
1195
  /**
1196
- * Display a widget form with the provided data
1197
  */
1198
  function action_widget_form() {
1199
  if ( empty( $_REQUEST['_panelsnonce'] ) || ! wp_verify_nonce( $_REQUEST['_panelsnonce'], 'panels_action' ) ) {
@@ -1225,7 +1228,7 @@ class SiteOrigin_Panels_Admin {
1225
  }
1226
 
1227
  /**
1228
- * Preview in the live editor when there is no public view of the item
1229
  */
1230
  function action_live_editor_preview() {
1231
  if ( empty( $_REQUEST['_panelsnonce'] ) || ! wp_verify_nonce( $_REQUEST['_panelsnonce'], 'live-editor-preview' ) ) {
@@ -1238,7 +1241,7 @@ class SiteOrigin_Panels_Admin {
1238
  }
1239
 
1240
  /**
1241
- * Preview in the block editor.
1242
  */
1243
  public function layout_block_preview() {
1244
 
@@ -1283,16 +1286,16 @@ class SiteOrigin_Panels_Admin {
1283
  }
1284
 
1285
  /**
1286
- * Add a column that indicates if a column is powered by Page Builder
1287
  *
1288
  * @param $columns
1289
  *
1290
  * @return array
1291
  */
1292
- function add_custom_column( $columns ){
1293
  $index = array_search( 'comments', array_keys( $columns ) );
1294
 
1295
- if( empty( $index ) ) {
1296
  $columns = array_merge(
1297
  $columns,
1298
  array( 'panels' => __( 'Page Builder', 'siteorigin-panels' ) )
@@ -1307,11 +1310,11 @@ class SiteOrigin_Panels_Admin {
1307
  return $columns;
1308
  }
1309
 
1310
- function display_custom_column( $column, $post_id ){
1311
- if( $column != 'panels' ) return;
1312
 
1313
  $panels_data = get_post_meta( $post_id, 'panels_data', true );
1314
- if( ! empty( $panels_data['widgets'] ) ) {
1315
  $widgets_count = count( $panels_data['widgets'] );
1316
  printf( _n( '%s Widget', '%s Widgets', $widgets_count, 'siteorigin-panels' ), $widgets_count );
1317
  }
@@ -1320,16 +1323,16 @@ class SiteOrigin_Panels_Admin {
1320
  }
1321
  }
1322
 
1323
- public function footer_column_css(){
1324
- if( siteorigin_panels_setting( 'admin-widget-count' ) ) {
1325
  $screen = get_current_screen();
1326
  $post_types = siteorigin_panels_setting( 'post-types' );
1327
 
1328
- if(
1329
  $screen->base == 'edit' &&
1330
  is_array( $post_types ) &&
1331
  in_array( $screen->post_type, $post_types )
1332
- ){
1333
  ?><style type="text/css">.column-panels{ width: 10% }</style><?php
1334
  }
1335
  }
@@ -1342,11 +1345,11 @@ class SiteOrigin_Panels_Admin {
1342
  *
1343
  * @return string
1344
  */
1345
- public static function double_slash_string( $value ){
1346
  return is_string( $value ) ? addcslashes( $value, '\\' ) : $value;
1347
  }
1348
 
1349
- public function get_layout_directories(){
1350
 
1351
  }
1352
 
@@ -1462,7 +1465,7 @@ class SiteOrigin_Panels_Admin {
1462
  if ( $show_classic_admin_notice ) {
1463
  $settings_url = self_admin_url( 'options-general.php?page=siteorigin_panels' );
1464
  $notice = sprintf(
1465
- __( 'This post type is set to use the Classic Editor by default for new posts. If youd like to change this to the block editor, please go to <a href="%s" class="components-notice__action is-link">Page Builder Settings</a> and uncheck <strong>Use Classic Editor for new posts</strong>' ),
1466
  $settings_url
1467
  );
1468
  ?>
@@ -1654,7 +1657,7 @@ class SiteOrigin_Panels_Admin {
1654
 
1655
  $show = in_array( $post_type, siteorigin_panels_setting( 'post-types' ) );
1656
 
1657
- // WooCommerce product type doesn't support block editor...
1658
  $show = $show && ! ( class_exists( 'WooCommerce' ) && $post_type == 'product' );
1659
 
1660
  if ( class_exists( 'SiteOrigin_Premium_Plugin_Cpt_Builder' ) ) {
8
  class SiteOrigin_Panels_Admin {
9
 
10
  /**
11
+ * @var bool Store that we're in the save post action, to prevent infinite loops.
12
  */
13
  private $in_save_post;
14
 
27
 
28
  add_action( 'after_switch_theme', array( $this, 'update_home_on_theme_change' ) );
29
 
30
+ // Enqueuing admin scripts.
31
  add_action( 'admin_print_scripts-post-new.php', array( $this, 'enqueue_admin_scripts' ) );
32
  add_action( 'admin_print_scripts-post.php', array( $this, 'enqueue_admin_scripts' ) );
33
  add_action( 'admin_print_scripts-appearance_page_so_panels_home_page', array(
37
  add_action( 'admin_print_scripts-widgets.php', array( $this, 'enqueue_admin_scripts' ) );
38
  add_action( 'admin_print_scripts-edit.php', array( $this, 'footer_column_css' ) );
39
 
40
+ // Enqueue the admin styles.
41
  add_action( 'admin_print_styles-post-new.php', array( $this, 'enqueue_admin_styles' ) );
42
  add_action( 'admin_print_styles-post.php', array( $this, 'enqueue_admin_styles' ) );
43
  add_action( 'admin_print_styles-appearance_page_so_panels_home_page', array( $this, 'enqueue_admin_styles' ) );
44
  add_action( 'admin_print_styles-widgets.php', array( $this, 'enqueue_admin_styles' ) );
45
 
46
+ // The help tab.
47
  add_action( 'load-page.php', array( $this, 'add_help_tab' ), 12 );
48
  add_action( 'load-post-new.php', array( $this, 'add_help_tab' ), 12 );
49
  add_action( 'load-appearance_page_so_panels_home_page', array( $this, 'add_help_tab' ), 12 );
50
 
51
  add_action( 'customize_controls_print_scripts', array( $this, 'js_templates' ) );
52
 
53
+ // Register all the admin actions.
54
  add_action( 'wp_ajax_so_panels_builder_content', array( $this, 'action_builder_content' ) );
55
  add_action( 'wp_ajax_so_panels_builder_content_json', array( $this, 'action_builder_content_json' ) );
56
  add_action( 'wp_ajax_so_panels_widget_form', array( $this, 'action_widget_form' ) );
63
  SiteOrigin_Panels_Admin_Widgets_Bundle::single();
64
  SiteOrigin_Panels_Admin_Layouts::single();
65
 
66
+ // Check to make sure we have all the correct markup.
67
  SiteOrigin_Panels_Admin_Dashboard::single();
68
 
69
  $this->in_save_post = false;
70
 
 
71
  // Enqueue Yoast compatibility
72
  add_action( 'admin_print_scripts-post-new.php', array( $this, 'enqueue_seo_compat' ), 100 );
73
  add_action( 'admin_print_scripts-post.php', array( $this, 'enqueue_seo_compat' ), 100 );
79
  SiteOrigin_Panels_Compat_ACF_Widgets::single();
80
  }
81
 
82
+ // Block editor specific actions.
83
  if ( function_exists( 'register_block_type' ) ) {
84
  add_action( 'admin_notices', array( $this, 'admin_notices' ) );
85
  add_filter( 'gutenberg_can_edit_post_type', array( $this, 'show_classic_editor_for_panels' ), 10, 2 );
86
  add_filter( 'use_block_editor_for_post_type', array( $this, 'show_classic_editor_for_panels' ), 10, 2 );
87
  add_action( 'admin_print_scripts-edit.php', array( $this, 'add_panels_add_new_button' ) );
88
+ if ( siteorigin_panels_setting( 'admin-post-state' ) ) {
89
  add_filter( 'display_post_states', array( $this, 'add_panels_post_state' ), 10, 2 );
90
  }
91
  }
102
  /**
103
  * Do some general admin initialization
104
  */
105
+ public function admin_init_widget_count() {
106
+ if ( siteorigin_panels_setting( 'admin-widget-count' ) ) {
107
 
108
+ // Add the custom columns.
109
  $post_types = siteorigin_panels_setting( 'post-types' );
110
+ if ( ! empty( $post_types ) ) {
111
+ foreach ( $post_types as $post_type ) {
112
  add_filter( 'manage_' . $post_type . 's_columns' , array( $this, 'add_custom_column' ) );
113
  add_action( 'manage_' . $post_type . 's_custom_column' , array( $this, 'display_custom_column' ), 10, 2 );
114
  }
124
  static function is_admin() {
125
  $screen = get_current_screen();
126
  $is_panels_page = ( $screen->base == 'post' && in_array( $screen->id, siteorigin_panels_setting( 'post-types' ) ) ) ||
127
+ in_array( $screen->base, array( 'appearance_page_so_panels_home_page', 'widgets', 'customize' ) ) ||
128
+ self::is_block_editor();
129
 
130
  return apply_filters( 'siteorigin_panels_is_admin_page', $is_panels_page );
131
  }
160
  * @return array
161
  */
162
  function plugin_action_links( $links ) {
163
+ if ( ! is_array( $links ) ) {
164
  return $links;
165
  }
166
 
168
  $links[] = '<a href="' . admin_url( 'options-general.php?page=siteorigin_panels' ) . '">' . __( 'Settings', 'siteorigin-panels' ) . '</a>';
169
  $links[] = '<a href="http://siteorigin.com/threads/plugin-page-builder/">' . __( 'Support', 'siteorigin-panels' ) . '</a>';
170
 
171
+ if ( SiteOrigin_Panels::display_premium_teaser() ) {
172
  $links[] = '<a href="' . esc_url( SiteOrigin_Panels::premium_url() ) . '" style="color: #3db634" target="_blank" rel="noopener noreferrer">' . __('Addons', 'siteorigin-panels') . '</a>';
173
  }
174
 
222
  */
223
  function save_post( $post_id ) {
224
  // Check that everything is valid with this save.
225
+ if (
226
  $this->in_save_post ||
227
  ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) ||
228
  empty( $_POST['_sopanels_nonce'] ) ||
256
  // Use `update_metadata` instead of `update_post_meta` to prevent saving to parent post when it's a revision, e.g. preview.
257
  update_metadata( 'post', $post_id, 'panels_data', map_deep( $panels_data, array( 'SiteOrigin_Panels_Admin', 'double_slash_string' ) ) );
258
 
259
+ if ( siteorigin_panels_setting( 'copy-content' ) ) {
260
  // Store a version of the HTML in post_content
261
  $post_parent_id = wp_is_post_revision( $post_id );
262
  $layout_id = ( ! empty( $post_parent_id ) ) ? $post_parent_id : $post_id;
268
  SiteOrigin_Panels_Post_Content_Filters::remove_filters();
269
  unset( $GLOBALS[ 'SITEORIGIN_PANELS_POST_CONTENT_RENDER' ] );
270
 
271
+ // Update the post_content.
272
  $post->post_content = $post_content;
273
+ if ( siteorigin_panels_setting( 'copy-styles' ) ) {
274
  $post->post_content .= "\n\n";
275
  $post->post_content .= '<style type="text/css" class="panels-style" data-panels-style-for-post="' . (int) $layout_id . '">';
276
  $post->post_content .= '@import url(' . SiteOrigin_Panels::front_css_url() . '); ';
281
  }
282
 
283
  } else {
284
+ // There are no widgets or rows, so delete the panels data.
285
  delete_post_meta( $post_id, 'panels_data' );
286
  }
287
 
316
  function enqueue_admin_scripts( $prefix = '', $force = false ) {
317
  $screen = get_current_screen();
318
  if ( $force || self::is_admin() ) {
319
+ // Media is required for row styles.
320
  wp_enqueue_media();
321
  wp_enqueue_script(
322
  'so-panels-admin',
340
  $widgets = $this->get_widgets();
341
  $directory_enabled = get_user_meta( get_current_user_id(), 'so_panels_directory_enabled', true );
342
 
343
+ // This is the widget we'll use for default text.
344
+ if ( ! empty( $widgets[ 'SiteOrigin_Widget_Editor_Widget' ] ) ) $text_widget = 'SiteOrigin_Widget_Editor_Widget';
345
+ else if ( ! empty( $widgets[ 'WP_Widget_Text' ] ) ) $text_widget = 'WP_Widget_Text';
346
  else $text_widget = false;
347
  $text_widget = apply_filters( 'siteorigin_panels_text_widget_class', $text_widget );
348
 
366
  'row_layouts' => apply_filters( 'siteorigin_panels_row_layouts', array() ),
367
  'directory_enabled' => ! empty( $directory_enabled ),
368
  'copy_content' => siteorigin_panels_setting( 'copy-content' ),
369
+ 'cache' => array(),
370
  'instant_open' => siteorigin_panels_setting( 'instant-open-widgets' ),
371
  'default_columns' => apply_filters( 'siteorigin_panels_default_row_columns', array(
372
  array(
377
  ),
378
  ) ),
379
 
380
+ // Settings for the contextual menu.
381
  'contextual' => array(
382
+ // Developers can change which widgets are displayed by default using this filter.
383
  'default_widgets' => apply_filters( 'siteorigin_panels_contextual_default_widgets', array(
384
  'SiteOrigin_Widget_Editor_Widget',
385
  'SiteOrigin_Widget_Button_Widget',
395
  'description' => __( "Page Builder doesn't know about this widget.", 'siteorigin-panels' ),
396
  ),
397
  'time' => array(
398
+ // TRANSLATORS: Number of seconds since.
399
  'seconds' => __( '%d seconds', 'siteorigin-panels' ),
400
+ // TRANSLATORS: Number of minutes since.
401
  'minutes' => __( '%d minutes', 'siteorigin-panels' ),
402
+ // TRANSLATORS: Number of hours since.
403
  'hours' => __( '%d hours', 'siteorigin-panels' ),
404
 
405
+ // TRANSLATORS: A single second since.
406
  'second' => __( '%d second', 'siteorigin-panels' ),
407
+ // TRANSLATORS: A single minute since.
408
  'minute' => __( '%d minute', 'siteorigin-panels' ),
409
+ // TRANSLATORS: A single hour since.
410
  'hour' => __( '%d hour', 'siteorigin-panels' ),
411
 
412
  // TRANSLATORS: Time ago - eg. "1 minute before".
414
  'now' => __( 'Now', 'siteorigin-panels' ),
415
  ),
416
  'history' => array(
417
+ // History messages.
418
  'current' => __( 'Current', 'siteorigin-panels' ),
419
  'revert' => __( 'Original', 'siteorigin-panels' ),
420
  'restore' => __( 'Version restored', 'siteorigin-panels' ),
421
  'back_to_editor' => __( 'Converted to editor', 'siteorigin-panels' ),
422
 
423
+ // Widgets.
424
+ // TRANSLATORS: Message displayed in the history when a widget is deleted.
425
  'widget_deleted' => __( 'Widget deleted', 'siteorigin-panels' ),
426
+ // TRANSLATORS: Message displayed in the history when a widget is added.
427
  'widget_added' => __( 'Widget added', 'siteorigin-panels' ),
428
+ // TRANSLATORS: Message displayed in the history when a widget is edited.
429
  'widget_edited' => __( 'Widget edited', 'siteorigin-panels' ),
430
+ // TRANSLATORS: Message displayed in the history when a widget is duplicated.
431
  'widget_duplicated' => __( 'Widget duplicated', 'siteorigin-panels' ),
432
+ // TRANSLATORS: Message displayed in the history when a widget position is changed.
433
  'widget_moved' => __( 'Widget moved', 'siteorigin-panels' ),
434
 
435
  // Rows
436
+ // TRANSLATORS: Message displayed in the history when a row is deleted.
437
  'row_deleted' => __( 'Row deleted', 'siteorigin-panels' ),
438
+ // TRANSLATORS: Message displayed in the history when a row is added.
439
  'row_added' => __( 'Row added', 'siteorigin-panels' ),
440
+ // TRANSLATORS: Message displayed in the history when a row is edited.
441
  'row_edited' => __( 'Row edited', 'siteorigin-panels' ),
442
+ // TRANSLATORS: Message displayed in the history when a row position is changed.
443
  'row_moved' => __( 'Row moved', 'siteorigin-panels' ),
444
+ // TRANSLATORS: Message displayed in the history when a row is duplicated.
445
  'row_duplicated' => __( 'Row duplicated', 'siteorigin-panels' ),
446
+ // TRANSLATORS: Message displayed in the history when a row is pasted.
447
  'row_pasted' => __( 'Row pasted', 'siteorigin-panels' ),
448
 
449
+ // Cells.
450
  'cell_resized' => __( 'Cell resized', 'siteorigin-panels' ),
451
 
452
+ // Prebuilt.
453
  'prebuilt_loaded' => __( 'Prebuilt layout loaded', 'siteorigin-panels' ),
454
  ),
455
 
456
+ // General localization.
457
  'prebuilt_loading' => __( 'Loading prebuilt layout', 'siteorigin-panels' ),
458
  'confirm_use_builder' => __( "Would you like to copy this editor's existing content to Page Builder?", 'siteorigin-panels' ),
459
  'confirm_stop_builder' => __( "Would you like to clear your Page Builder content and revert to using the standard visual editor?", 'siteorigin-panels' ),
460
+ // TRANSLATORS: This is the title for a widget called "Layout Builder".
461
  'layout_widget' => __( 'Layout Builder Widget', 'siteorigin-panels' ),
462
  // TRANSLATORS: A standard confirmation message
463
  'dropdown_confirm' => __( 'Are you sure?', 'siteorigin-panels' ),
464
  // TRANSLATORS: When a layout file is ready to be inserted. %s is the filename.
465
  'ready_to_insert' => __( '%s is ready to insert.', 'siteorigin-panels' ),
466
 
467
+ // Everything for the contextual menu.
468
  'contextual' => array(
469
  'add_widget_below' => __( 'Add Widget Below', 'siteorigin-panels' ),
470
  'add_widget_cell' => __( 'Add Widget to Cell', 'siteorigin-panels' ),
498
  ),
499
  'welcomeMessage' => array(
500
  'addingDisabled' => __( 'Hmmm... Adding layout elements is not enabled. Please check if Page Builder has been configured to allow adding elements.', 'siteorigin-panels' ),
501
+ 'oneEnabled' => __( 'Add a {{%= items[0] %}} to get started.', 'siteorigin-panels' ),
502
+ 'twoEnabled' => __( 'Add a {{%= items[0] %}} or {{%= items[1] %}} to get started.', 'siteorigin-panels' ),
503
+ 'threeEnabled' => __( 'Add a {{%= items[0] %}}, {{%= items[1] %}} or {{%= items[2] %}} to get started.', 'siteorigin-panels' ),
504
+ 'addWidgetButton' => "<a href='#' class='so-tool-button so-widget-add'>" . __( 'Widget', 'siteorigin-panels' ) . "</a>",
505
+ 'addRowButton' => "<a href='#' class='so-tool-button so-row-add'>" . __( 'Row', 'siteorigin-panels' ) . "</a>",
506
+ 'addPrebuiltButton' => "<a href='#' class='so-tool-button so-prebuilt-add'>" . __( 'Prebuilt Layout', 'siteorigin-panels' ) . "</a>",
507
+ 'docsMessage' => sprintf(
508
+ __( 'Read our %s if you need help.', 'siteorigin-panels' ),
509
+ "<a href='https://siteorigin.com/page-builder/documentation/' target='_blank' rel='noopener noreferrer'>" . __( 'documentation', 'siteorigin-panels' ) . "</a>"
510
+ ),
511
  ),
512
  ),
513
  'plupload' => array(
522
  'prebuiltDefaultScreenshot' => siteorigin_panels_url( 'css/images/prebuilt-default.png' ),
523
  'loadOnAttach' => $load_on_attach ,
524
  'siteoriginWidgetRegex' => str_replace( '*+', '*', get_shortcode_regex( array( 'siteorigin_widget' ) ) ),
525
+ 'forms' => array(
526
  'loadingFailed' => __( 'Unknown error. Failed to load the form. Please check your internet connection, contact your web site administrator, or try again later.', 'siteorigin-panels' ),
527
  )
528
  ) );
529
 
530
  $js_widgets = array();
531
  if ( $screen->base != 'widgets' ) {
532
+ // Render all the widget forms. A lot of widgets use this as a chance to enqueue their scripts.
533
  $original_post = isset( $GLOBALS['post'] ) ? $GLOBALS['post'] : null; // Make sure widgets don't change the global post.
534
  global $wp_widget_factory;
535
  foreach ( $wp_widget_factory->widgets as $widget_obj ) {
562
  }
563
  }
564
 
565
+ public function enqueue_seo_compat() {
566
  if ( self::is_admin() ) {
567
  if (
568
  defined( 'WPSEO_FILE' ) &&
591
  }
592
 
593
  /**
594
+ * Enqueue the admin panel styles.
595
  *
596
  * @param string $prefix
597
+ * @param bool $force Should we force the enqueue.
598
  *
599
  * @action admin_print_styles-post-new.php
600
  * @action admin_print_styles-post.php
623
  || ( $screen->id == 'appearance_page_so_panels_home_page' )
624
  ) {
625
  $screen->add_help_tab( array(
626
+ 'id' => 'panels-help-tab', // Unique id for the tab.
627
+ 'title' => __( 'Page Builder', 'siteorigin-panels' ), // Unique visible title for the tab.
628
  'callback' => array( $this, 'help_tab_content' )
629
  ) );
630
  }
645
  function get_current_admin_panels_data() {
646
  $screen = get_current_screen();
647
 
648
+ // Localize the panels with the panels data.
649
  if ( $screen->base == 'appearance_page_so_panels_home_page' ) {
650
  $home_page_id = get_option( 'page_on_front' );
651
  if ( empty( $home_page_id ) ) {
655
  $panels_data = ! empty( $home_page_id ) ? get_post_meta( $home_page_id, 'panels_data', true ) : null;
656
 
657
  if ( is_null( $panels_data ) ) {
658
+ // Load the default layout.
659
  $layouts = apply_filters( 'siteorigin_panels_prebuilt_layouts', array() );
660
 
661
  $home_name = siteorigin_panels_setting( 'home-page-default' ) ? siteorigin_panels_setting( 'home-page-default' ) : 'home';
662
  $panels_data = ! empty( $layouts[ $home_name ] ) ? $layouts[ $home_name ] : current( $layouts );
663
  } elseif ( empty( $panels_data ) ) {
664
+ // The current page_on_front isn't using Page Builder.
665
  return false;
666
  }
667
 
682
  }
683
 
684
  /**
685
+ * Save home page.
686
  */
687
  function save_home_page() {
688
  if ( ! isset( $_POST['_sopanels_home_nonce'] ) || ! wp_verify_nonce( $_POST['_sopanels_home_nonce'], 'save' ) ) {
695
  return;
696
  }
697
 
698
+ // Check that the home page ID is set and the home page exists.
699
  $page_id = get_option( 'page_on_front' );
700
  if ( empty( $page_id ) ) {
701
  $page_id = get_option( 'siteorigin_panels_home_page_id' );
704
  $post_content = wp_unslash( $_POST['post_content'] );
705
 
706
  if ( ! $page_id || get_post_meta( $page_id, 'panels_data', true ) == '' ) {
707
+ // Lets create a new page.
708
  $page_id = wp_insert_post( array(
709
+ // TRANSLATORS: This is the default name given to a user's home page.
710
  'post_title' => __( 'Home Page', 'siteorigin-panels' ),
711
  'post_status' => ! empty( $_POST['siteorigin_panels_home_enabled'] ) ? 'publish' : 'draft',
712
  'post_type' => 'page',
716
  update_option( 'page_on_front', $page_id );
717
  update_option( 'siteorigin_panels_home_page_id', $page_id );
718
 
719
+ // Action triggered when creating a new home page through the custom home page interface.
720
  do_action( 'siteorigin_panels_create_home_page', $page_id );
721
  } else {
722
  // `wp_insert_post` does it's own sanitization, but it seems `wp_update_post` doesn't.
728
 
729
  $page = get_post( $page_id );
730
 
731
+ // Save the updated page data.
732
  $old_panels_data = get_post_meta( $page_id, 'panels_data', true );
733
  $panels_data = json_decode( wp_unslash( $_POST['panels_data'] ), true );
734
  $panels_data['widgets'] = $this->process_raw_widgets(
750
  $template = get_post_meta( $page_id, '_wp_page_template', true );
751
  $home_template = siteorigin_panels_setting( 'home-template' );
752
  if ( ( $template == '' || $template == 'default' ) && ! empty( $home_template ) ) {
753
+ // Set the home page template.
754
  update_post_meta( $page_id, '_wp_page_template', $home_template );
755
  }
756
 
760
  update_option( 'siteorigin_panels_home_page_id', $page_id );
761
  wp_publish_post( $page_id );
762
  } else {
763
+ // We're disabling this home page.
764
  update_option( 'show_on_front', 'posts' );
765
 
766
+ // Change the post status to draft.
767
  $post = get_post( $page_id );
768
  if ( $post->post_status != 'draft' ) {
769
  global $wpdb;
793
  }
794
 
795
  if ( siteorigin_panels_setting( 'home-page' ) && siteorigin_panels_setting( 'home-template' ) && $page_id && get_post_meta( $page_id, 'panels_data', true ) !== '' ) {
796
+ // Lets update the home page to use the home template that this theme supports.
797
  update_post_meta( $page_id, '_wp_page_template', siteorigin_panels_setting( 'home-template' ) );
798
  }
799
  }
814
  'groups' => array(),
815
  );
816
 
817
+ // Get Page Builder specific widget options.
818
  if ( isset( $widget_obj->widget_options['panels_title'] ) ) {
819
  $widgets[ $class ]['panels_title'] = $widget_obj->widget_options['panels_title'];
820
  }
821
+ if ( isset( $widget_obj->widget_options['panels_title_check_sub_fields'] ) ) {
822
+ $widgets[ $class ]['panels_title_check_sub_fields'] = $widget_obj->widget_options['panels_title_check_sub_fields'];
823
+ }
824
+
825
  if ( isset( $widget_obj->widget_options['panels_groups'] ) ) {
826
  $widgets[ $class ]['groups'] = $widget_obj->widget_options['panels_groups'];
827
  }
831
 
832
  }
833
 
834
+ // Other plugins can manipulate the list of widgets. Possibly to add recommended widgets.
835
  $widgets = apply_filters( 'siteorigin_panels_widgets', $widgets );
836
 
837
  // Exclude these temporarily, as they won't work until we have a reliable way to enqueue their admin form scripts.
848
  }
849
  }
850
 
851
+ // Sort the widgets alphabetically.
852
  uasort( $widgets, array( $this, 'widgets_sorter' ) );
853
 
854
  return $widgets;
855
  }
856
 
857
  /**
858
+ * Sorts widgets for get_widgets function by title.
859
  *
860
  * @param $a
861
  * @param $b
889
  }
890
 
891
  $old_widgets_by_id = array();
892
+ if ( ! empty( $old_widgets ) ) {
893
+ foreach ( $old_widgets as $widget ) {
894
+ if ( ! empty( $widget[ 'panels_info' ][ 'widget_id' ] ) ) {
895
  $old_widgets_by_id[ $widget[ 'panels_info' ][ 'widget_id' ] ] = $widget;
896
  unset( $old_widgets_by_id[ $widget[ 'panels_info' ][ 'widget_id' ] ][ 'panels_info' ] );
897
  }
898
  }
899
  }
900
 
901
+ foreach ( $widgets as $i => & $widget ) {
902
  if ( ! is_array( $widget ) ) {
903
  continue;
904
  }
917
  if ( ! empty( $the_widget ) &&
918
  method_exists( $the_widget, 'update' ) ) {
919
 
920
+ if (
921
  ! empty( $old_widgets_by_id ) &&
922
  ! empty( $widget[ 'panels_info' ][ 'widget_id' ] ) &&
923
  ! empty( $old_widgets_by_id[ $widget[ 'panels_info' ][ 'widget_id' ] ] )
924
+ ) {
925
  $old_widget = $old_widgets_by_id[ $widget[ 'panels_info' ][ 'widget_id' ] ];
926
  }
927
  else {
939
  }
940
  }
941
 
942
+ if ( $escape_classes ) {
943
+ // Escaping for namespaced widgets.
944
  $info[ 'class' ] = preg_replace( '/\\\\+/', '\\\\\\\\', $info['class'] );
945
  }
946
 
958
  }
959
 
960
  /**
961
+ * Render a widget form with all the Page Builder specific fields.
962
  *
963
  * @param string $widget_class The class of the widget
964
  * @param array $instance Widget values
1021
  '</p></div>';
1022
  }
1023
 
1024
+ // Allow other themes and plugins to change the missing widget form.
1025
  return apply_filters( 'siteorigin_panels_missing_widget_form', $form, $widget_class, $instance );
1026
  }
1027
 
1048
  }
1049
  $form = ob_get_clean();
1050
 
1051
+ // Convert the widget field naming into ones that Page Builder uses.
1052
  $exp = preg_quote( $the_widget->get_field_name( '____' ) );
1053
  $exp = str_replace( '____', '(.*?)', $exp );
1054
  $form = preg_replace( '/' . $exp . '/', 'widgets[' . preg_replace( '/\$(\d)/', '\\\$$1', $widget_number ) . '][$1]', $form );
1055
 
1056
  $form = apply_filters( 'siteorigin_panels_widget_form', $form, $widget_class, $instance );
1057
 
1058
+ // Add all the information fields.
1059
  return $form;
1060
  }
1061
 
1084
 
1085
  $is_js_widget = in_array( get_class( $widget ), $js_widgets ) &&
1086
  // Need to check this for `WP_Widget_Text` which was not a JS widget before 4.8
1087
+ method_exists( $widget, 'render_control_template_scripts' );
1088
 
1089
  return $is_js_widget;
1090
  }
1123
  wp_die();
1124
  }
1125
 
1126
+ // Echo the content.
1127
  $old_panels_data = get_post_meta( $_POST['post_id'], 'panels_data', true );
1128
  $panels_data = json_decode( wp_unslash( $_POST['panels_data'] ), true );
1129
  $panels_data['widgets'] = $this->process_raw_widgets(
1133
  );
1134
  $panels_data = SiteOrigin_Panels_Styles_Admin::single()->sanitize_all( $panels_data );
1135
 
1136
+ // Create a version of the builder data for post content.
1137
  SiteOrigin_Panels_Post_Content_Filters::add_filters();
1138
  $GLOBALS[ 'SITEORIGIN_PANELS_POST_CONTENT_RENDER' ] = true;
1139
  echo SiteOrigin_Panels::renderer()->render( (int) $_POST['post_id'], false, $panels_data );
1171
  wp_die();
1172
  }
1173
 
1174
+ // Echo the content.
1175
  $panels_data = json_decode( wp_unslash( $_POST['panels_data'] ), true );
1176
  $panels_data['widgets'] = $this->process_raw_widgets(
1177
  $panels_data['widgets'],
1181
  $panels_data = SiteOrigin_Panels_Styles_Admin::single()->sanitize_all( $panels_data );
1182
  $return['sanitized_panels_data'] = $panels_data;
1183
 
1184
+ // Create a version of the builder data for post content.
1185
  SiteOrigin_Panels_Post_Content_Filters::add_filters();
1186
  $GLOBALS[ 'SITEORIGIN_PANELS_POST_CONTENT_RENDER' ] = true;
1187
  $return['post_content'] = SiteOrigin_Panels::renderer()->render( (int) $_POST['post_id'], false, $panels_data );
1196
  }
1197
 
1198
  /**
1199
+ * Display a widget form with the provided data.
1200
  */
1201
  function action_widget_form() {
1202
  if ( empty( $_REQUEST['_panelsnonce'] ) || ! wp_verify_nonce( $_REQUEST['_panelsnonce'], 'panels_action' ) ) {
1228
  }
1229
 
1230
  /**
1231
+ * Preview in the live editor when there is no public view of the item.
1232
  */
1233
  function action_live_editor_preview() {
1234
  if ( empty( $_REQUEST['_panelsnonce'] ) || ! wp_verify_nonce( $_REQUEST['_panelsnonce'], 'live-editor-preview' ) ) {
1241
  }
1242
 
1243
  /**
1244
+ * Preview in the Block Editor.
1245
  */
1246
  public function layout_block_preview() {
1247
 
1286
  }
1287
 
1288
  /**
1289
+ * Add a column that indicates if a column is powered by Page Builder.
1290
  *
1291
  * @param $columns
1292
  *
1293
  * @return array
1294
  */
1295
+ function add_custom_column( $columns ) {
1296
  $index = array_search( 'comments', array_keys( $columns ) );
1297
 
1298
+ if ( empty( $index ) ) {
1299
  $columns = array_merge(
1300
  $columns,
1301
  array( 'panels' => __( 'Page Builder', 'siteorigin-panels' ) )
1310
  return $columns;
1311
  }
1312
 
1313
+ function display_custom_column( $column, $post_id ) {
1314
+ if ( $column != 'panels' ) return;
1315
 
1316
  $panels_data = get_post_meta( $post_id, 'panels_data', true );
1317
+ if ( ! empty( $panels_data['widgets'] ) ) {
1318
  $widgets_count = count( $panels_data['widgets'] );
1319
  printf( _n( '%s Widget', '%s Widgets', $widgets_count, 'siteorigin-panels' ), $widgets_count );
1320
  }
1323
  }
1324
  }
1325
 
1326
+ public function footer_column_css() {
1327
+ if ( siteorigin_panels_setting( 'admin-widget-count' ) ) {
1328
  $screen = get_current_screen();
1329
  $post_types = siteorigin_panels_setting( 'post-types' );
1330
 
1331
+ if (
1332
  $screen->base == 'edit' &&
1333
  is_array( $post_types ) &&
1334
  in_array( $screen->post_type, $post_types )
1335
+ ) {
1336
  ?><style type="text/css">.column-panels{ width: 10% }</style><?php
1337
  }
1338
  }
1345
  *
1346
  * @return string
1347
  */
1348
+ public static function double_slash_string( $value ) {
1349
  return is_string( $value ) ? addcslashes( $value, '\\' ) : $value;
1350
  }
1351
 
1352
+ public function get_layout_directories() {
1353
 
1354
  }
1355
 
1465
  if ( $show_classic_admin_notice ) {
1466
  $settings_url = self_admin_url( 'options-general.php?page=siteorigin_panels' );
1467
  $notice = sprintf(
1468
+ __( "This post type is set to use the Classic Editor by default for new posts. If you'd like to change this to the Block Editor, please go to <a href='%s' class='components-notice__action is-link'>Page Builder Settings</a> and disable <strong>Use Classic Editor for New Posts</strong>." ),
1469
  $settings_url
1470
  );
1471
  ?>
1657
 
1658
  $show = in_array( $post_type, siteorigin_panels_setting( 'post-types' ) );
1659
 
1660
+ // WooCommerce product type doesn't support Block Editor.
1661
  $show = $show && ! ( class_exists( 'WooCommerce' ) && $post_type == 'product' );
1662
 
1663
  if ( class_exists( 'SiteOrigin_Premium_Plugin_Cpt_Builder' ) ) {
inc/renderer.php CHANGED
@@ -111,6 +111,19 @@ class SiteOrigin_Panels_Renderer {
111
  // we need to remove the cell widths on mobile.
112
  $css_container_cutoff = $this->container['css_override'] && isset( $row['style']['row_stretch'] ) && $row['style']['row_stretch'] == 'full' ? ":$panels_mobile_width" : 1920;
113
 
 
 
 
 
 
 
 
 
 
 
 
 
 
114
  // Add the cell sizing
115
  foreach ( $row['cells'] as $ci => $cell ) {
116
  $weight = apply_filters( 'siteorigin_panels_css_cell_weight', $cell['weight'], $row, $ri, $cell, $ci - 1, $panels_data, $post_id );
@@ -165,6 +178,10 @@ class SiteOrigin_Panels_Renderer {
165
  $post_id
166
  );
167
 
 
 
 
 
168
  if ( ! empty( $panels_mobile_widget_mobile_margin ) ) {
169
  $css->add_widget_css(
170
  $post_id,
@@ -271,7 +288,7 @@ class SiteOrigin_Panels_Renderer {
271
  $css->add_cell_css( $post_id, $ri, $ci, '', array(
272
  'margin-bottom' => apply_filters(
273
  'siteorigin_panels_css_cell_mobile_margin_bottom',
274
- $settings['margin-bottom'] . 'px',
275
  $cell,
276
  $ci,
277
  $row,
@@ -328,7 +345,11 @@ class SiteOrigin_Panels_Renderer {
328
  ), $panels_mobile_width );
329
  }
330
 
331
- if ( $this->container['css_override'] ) {
 
 
 
 
332
  $css->add_css(
333
  esc_html( $this->container['selector'] ),
334
  array(
111
  // we need to remove the cell widths on mobile.
112
  $css_container_cutoff = $this->container['css_override'] && isset( $row['style']['row_stretch'] ) && $row['style']['row_stretch'] == 'full' ? ":$panels_mobile_width" : 1920;
113
 
114
+ if (
115
+ $this->container['css_override'] &&
116
+ ! $this->container['full_width'] &&
117
+ ! empty( $row['style'] ) &&
118
+ ! empty( $row['style']['row_stretch'] ) &&
119
+ (
120
+ $row['style']['row_stretch'] == 'full' ||
121
+ $row['style']['row_stretch'] == 'stretch'
122
+ )
123
+ ) {
124
+ $this->container['full_width'] = true;
125
+ }
126
+
127
  // Add the cell sizing
128
  foreach ( $row['cells'] as $ci => $cell ) {
129
  $weight = apply_filters( 'siteorigin_panels_css_cell_weight', $cell['weight'], $row, $ri, $cell, $ci - 1, $panels_data, $post_id );
178
  $post_id
179
  );
180
 
181
+ if ( empty( $panels_mobile_widget_mobile_margin ) && ! empty( $settings['widget-mobile-margin-bottom'] ) ) {
182
+ $panels_mobile_widget_mobile_margin = '0 0 ' . $settings[ 'widget-mobile-margin-bottom'] . 'px';
183
+ }
184
+
185
  if ( ! empty( $panels_mobile_widget_mobile_margin ) ) {
186
  $css->add_widget_css(
187
  $post_id,
288
  $css->add_cell_css( $post_id, $ri, $ci, '', array(
289
  'margin-bottom' => apply_filters(
290
  'siteorigin_panels_css_cell_mobile_margin_bottom',
291
+ $settings['mobile-cell-margin'] . 'px',
292
  $cell,
293
  $ci,
294
  $row,
345
  ), $panels_mobile_width );
346
  }
347
 
348
+ // Do we need to remove the theme container on this page?
349
+ if (
350
+ $this->container['css_override'] &&
351
+ $this->container['full_width'] // Does this layout have full width layouts?
352
+ ) {
353
  $css->add_css(
354
  esc_html( $this->container['selector'] ),
355
  array(
inc/settings.php CHANGED
@@ -40,7 +40,7 @@ class SiteOrigin_Panels_Settings {
40
  }
41
 
42
  /**
43
- * Get a settings value
44
  *
45
  * @param string $key
46
  *
@@ -54,18 +54,18 @@ class SiteOrigin_Panels_Settings {
54
  $current_settings = get_option( 'siteorigin_panels_settings', false );
55
 
56
  if ( $current_settings === false ) {
57
- // We can't find the settings, so try access old settings
58
  $current_settings = get_option( 'siteorigin_panels_display', array() );
59
  $post_types = get_option( 'siteorigin_panels_post_types' );
60
  if ( ! empty( $post_types ) ) {
61
  $current_settings['post-types'] = $post_types;
62
  }
63
 
64
- // Store the old settings in the new field
65
  update_option( 'siteorigin_panels_settings', $current_settings );
66
  }
67
 
68
- // Get the settings provided by the theme
69
  $theme_settings = get_theme_support( 'siteorigin-panels' );
70
  if ( ! empty( $theme_settings ) ) {
71
  $theme_settings = $theme_settings[0];
@@ -129,6 +129,7 @@ class SiteOrigin_Panels_Settings {
129
  // New install.
130
  $parallax_type = 'modern';
131
  $live_editor_close_after = true;
 
132
  } else {
133
  $live_editor_close_after = false;
134
  // Parallax Type.
@@ -142,10 +143,10 @@ class SiteOrigin_Panels_Settings {
142
  // If all else fails, fallback to modern.
143
  $parallax_type = 'modern';
144
  }
 
145
  }
146
 
147
-
148
- // The general fields
149
  $defaults['post-types'] = array( 'page', 'post' );
150
  $defaults['live-editor-quick-link'] = true;
151
  $defaults['live-editor-quick-link-close-after'] = $live_editor_close_after;
@@ -159,27 +160,29 @@ class SiteOrigin_Panels_Settings {
159
  $defaults['sidebars-emulator'] = true;
160
  $defaults['layout-block-default-mode'] = 'preview';
161
 
162
- // Widgets fields
163
  $defaults['title-html'] = '<h3 class="widget-title">{{title}}</h3>';
164
  $defaults['add-widget-class'] = apply_filters( 'siteorigin_panels_default_add_widget_class', true );
165
  $defaults['bundled-widgets'] = get_option( 'siteorigin_panels_is_using_bundled', false );
166
  $defaults['recommended-widgets'] = true;
167
  $defaults['instant-open-widgets'] = true;
168
 
169
- // The layout fields
170
- $defaults['responsive'] = true;
171
- $defaults['tablet-layout'] = false;
172
- $defaults['legacy-layout'] = 'auto';
173
- $defaults['tablet-width'] = 1024;
174
- $defaults['mobile-width'] = 780;
175
- $defaults['margin-bottom'] = 30;
176
- $defaults['row-mobile-margin-bottom'] = '';
177
- $defaults['margin-bottom-last-row'] = false;
178
- $defaults['margin-sides'] = 30;
179
- $defaults['full-width-container'] = 'body';
180
- $defaults['output-css-header'] = 'auto';
181
-
182
- // Content fields
 
 
183
  $defaults['copy-content'] = true;
184
  $defaults['copy-styles'] = false;
185
 
@@ -187,7 +190,7 @@ class SiteOrigin_Panels_Settings {
187
  }
188
 
189
  /**
190
- * Set the option on whether to add widget classes for known themes
191
  *
192
  * @param $add_class
193
  *
@@ -201,7 +204,6 @@ class SiteOrigin_Panels_Settings {
201
  break;
202
  }
203
 
204
-
205
  return $add_class;
206
  }
207
 
@@ -241,7 +243,7 @@ class SiteOrigin_Panels_Settings {
241
  }
242
 
243
  /**
244
- * Display the Page Builder settings page
245
  */
246
  function display_settings_page() {
247
  $settings_fields = $this->fields = apply_filters( 'siteorigin_panels_settings_fields', array() );
@@ -249,7 +251,7 @@ class SiteOrigin_Panels_Settings {
249
  }
250
 
251
  /**
252
- * Add a settings help tab
253
  */
254
  function add_help_tab() {
255
  $screen = get_current_screen();
@@ -272,7 +274,8 @@ class SiteOrigin_Panels_Settings {
272
  * @return mixed
273
  */
274
  function settings_fields( $fields ) {
275
- // The post types fields
 
276
 
277
  $fields['general'] = array(
278
  'title' => __( 'General', 'siteorigin-panels' ),
@@ -335,14 +338,14 @@ class SiteOrigin_Panels_Settings {
335
  'description' => __( 'Disable row/widget background parallax when the browser is smaller than the mobile width.', 'siteorigin-panels' ),
336
  );
337
 
338
- // Legacy Parallax settings.
339
  $fields['general']['fields']['parallax-motion'] = array(
340
  'type' => 'float',
341
  'label' => __( 'Limit Parallax Motion', 'siteorigin-panels' ),
342
- 'description' => __( 'How many pixels of scrolling results in a single pixel of parallax motion. 0 means automatic. Lower values give more noticeable effect.', 'siteorigin-panels' ),
343
  );
344
 
345
- // New Parallax settings.
346
  $fields['general']['fields']['parallax-delay'] = array(
347
  'type' => 'float',
348
  'label' => __( 'Parallax Delay', 'siteorigin-panels' ),
@@ -391,7 +394,7 @@ class SiteOrigin_Panels_Settings {
391
  'description' => __( 'Whether to display SiteOrigin Layout Blocks in edit mode or preview mode in the Block Editor.', 'siteorigin-panels' ),
392
  );
393
 
394
- // The widgets fields
395
 
396
  $fields['widgets'] = array(
397
  'title' => __( 'Widgets', 'siteorigin-panels' ),
@@ -428,15 +431,13 @@ class SiteOrigin_Panels_Settings {
428
  'description' => __( 'Open a widget form as soon as it\'s added to a page.', 'siteorigin-panels' ),
429
  );
430
 
431
- // The layout fields
432
 
433
  $fields['layout'] = array(
434
  'title' => __( 'Layout', 'siteorigin-panels' ),
435
  'fields' => array(),
436
  );
437
 
438
- // The layout fields
439
-
440
  $fields['layout']['fields']['responsive'] = array(
441
  'type' => 'checkbox',
442
  'label' => __( 'Responsive Layout', 'siteorigin-panels' ),
@@ -484,7 +485,7 @@ class SiteOrigin_Panels_Settings {
484
  $fields['layout']['fields']['row-mobile-margin-bottom'] = array(
485
  'type' => 'number',
486
  'unit' => 'px',
487
- 'label' => __( 'Row Mobile Bottom Margin', 'siteorigin-panels' ),
488
  'description' => __( 'The default margin below rows on mobile.', 'siteorigin-panels' ),
489
  );
490
 
@@ -494,6 +495,20 @@ class SiteOrigin_Panels_Settings {
494
  'description' => __( 'Allow margin below the last row.', 'siteorigin-panels' ),
495
  );
496
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
497
  $fields['layout']['fields']['margin-sides'] = array(
498
  'type' => 'number',
499
  'unit' => 'px',
@@ -520,7 +535,7 @@ class SiteOrigin_Panels_Settings {
520
  'description' => __( 'This setting is only applicable in the Classic Editor.', 'siteorigin-panels' ),
521
  );
522
 
523
- // The content fields
524
 
525
  $fields['content'] = array(
526
  'title' => __( 'Content', 'siteorigin-panels' ),
@@ -543,7 +558,7 @@ class SiteOrigin_Panels_Settings {
543
  }
544
 
545
  /**
546
- * Display a settings field
547
  *
548
  * @param $field_id
549
  * @param $field
@@ -557,21 +572,21 @@ class SiteOrigin_Panels_Settings {
557
  case 'text':
558
  case 'float':
559
  ?><input name="<?php echo esc_attr( $field_name ) ?>"
560
- class="panels-setting-<?php echo esc_attr( $field['type'] ) ?>" type="text"
561
- value="<?php echo esc_attr( $value ) ?>" /> <?php
562
  break;
563
 
564
  case 'password':
565
  ?><input name="<?php echo esc_attr( $field_name ) ?>"
566
- class="panels-setting-<?php echo esc_attr( $field['type'] ) ?>" type="password"
567
- value="<?php echo esc_attr( $value ) ?>" /> <?php
568
  break;
569
 
570
  case 'number':
571
  ?>
572
  <input name="<?php echo esc_attr( $field_name ) ?>" type="number"
573
- class="panels-setting-<?php echo esc_attr( $field['type'] ) ?>"
574
- value="<?php echo esc_attr( $value ) ?>"/>
575
  <?php
576
  if ( ! empty( $field['unit'] ) ) {
577
  echo esc_html( $field['unit'] );
@@ -580,15 +595,15 @@ class SiteOrigin_Panels_Settings {
580
 
581
  case 'html':
582
  ?><textarea name="<?php echo esc_attr( $field_name ) ?>"
583
- class="panels-setting-<?php echo esc_attr( $field['type'] ) ?> widefat"
584
- rows="<?php echo ! empty( $field['rows'] ) ? (int) $field['rows'] : 2 ?>"><?php echo esc_textarea( $value ) ?></textarea> <?php
585
  break;
586
 
587
  case 'checkbox':
588
  ?>
589
  <label class="widefat">
590
  <input name="<?php echo esc_attr( $field_name ) ?>"
591
- type="checkbox" <?php checked( ! empty( $value ) ) ?> />
592
  <?php echo ! empty( $field['checkbox_text'] ) ? esc_html( $field['checkbox_text'] ) : __( 'Enabled', 'siteorigin-panels' ) ?>
593
  </label>
594
  <?php
@@ -610,7 +625,7 @@ class SiteOrigin_Panels_Settings {
610
  ?>
611
  <label class="widefat">
612
  <input name="<?php echo esc_attr( $field_name ) ?>[<?php echo esc_attr( $option_id ) ?>]"
613
- type="checkbox" <?php checked( in_array( $option_id, $value ) ) ?> />
614
  <?php echo esc_html( $option ) ?>
615
  </label>
616
  <?php
@@ -709,10 +724,10 @@ class SiteOrigin_Panels_Settings {
709
  }
710
  }
711
 
712
- // Don't let mobile width go below 320
713
  $values[ 'mobile-width' ] = max( $values[ 'mobile-width' ], 320 );
714
 
715
- // Save the values to the database
716
  update_option( 'siteorigin_panels_settings', $values );
717
  do_action( 'siteorigin_panels_save_settings', $values );
718
  $this->settings = wp_parse_args( $values, $this->settings );
@@ -720,7 +735,7 @@ class SiteOrigin_Panels_Settings {
720
  }
721
 
722
  /**
723
- * Get a post type array
724
  *
725
  * @return array
726
  */
@@ -737,7 +752,7 @@ class SiteOrigin_Panels_Settings {
737
  $types[ $key ] = $value;
738
  }
739
 
740
- // These are post types we know we don't want to show Page Builder on
741
  unset( $types['ml-slider'] );
742
 
743
  foreach ( $types as $type_id => $type ) {
40
  }
41
 
42
  /**
43
+ * Get a settings value.
44
  *
45
  * @param string $key
46
  *
54
  $current_settings = get_option( 'siteorigin_panels_settings', false );
55
 
56
  if ( $current_settings === false ) {
57
+ // We can't find the settings, so try access old settings.
58
  $current_settings = get_option( 'siteorigin_panels_display', array() );
59
  $post_types = get_option( 'siteorigin_panels_post_types' );
60
  if ( ! empty( $post_types ) ) {
61
  $current_settings['post-types'] = $post_types;
62
  }
63
 
64
+ // Store the old settings in the new field.
65
  update_option( 'siteorigin_panels_settings', $current_settings );
66
  }
67
 
68
+ // Get the settings provided by the theme.
69
  $theme_settings = get_theme_support( 'siteorigin-panels' );
70
  if ( ! empty( $theme_settings ) ) {
71
  $theme_settings = $theme_settings[0];
129
  // New install.
130
  $parallax_type = 'modern';
131
  $live_editor_close_after = true;
132
+ $mobile_cell_margin = 30;
133
  } else {
134
  $live_editor_close_after = false;
135
  // Parallax Type.
143
  // If all else fails, fallback to modern.
144
  $parallax_type = 'modern';
145
  }
146
+ $mobile_cell_margin = isset( $so_settings['margin-bottom'] ) ? $so_settings['margin-bottom'] : 30;
147
  }
148
 
149
+ // General fields.
 
150
  $defaults['post-types'] = array( 'page', 'post' );
151
  $defaults['live-editor-quick-link'] = true;
152
  $defaults['live-editor-quick-link-close-after'] = $live_editor_close_after;
160
  $defaults['sidebars-emulator'] = true;
161
  $defaults['layout-block-default-mode'] = 'preview';
162
 
163
+ // Widgets fields.
164
  $defaults['title-html'] = '<h3 class="widget-title">{{title}}</h3>';
165
  $defaults['add-widget-class'] = apply_filters( 'siteorigin_panels_default_add_widget_class', true );
166
  $defaults['bundled-widgets'] = get_option( 'siteorigin_panels_is_using_bundled', false );
167
  $defaults['recommended-widgets'] = true;
168
  $defaults['instant-open-widgets'] = true;
169
 
170
+ // Layout fields.
171
+ $defaults['responsive'] = true;
172
+ $defaults['tablet-layout'] = false;
173
+ $defaults['legacy-layout'] = 'auto';
174
+ $defaults['tablet-width'] = 1024;
175
+ $defaults['mobile-width'] = 780;
176
+ $defaults['margin-bottom'] = 30;
177
+ $defaults['row-mobile-margin-bottom'] = '';
178
+ $defaults['mobile-cell-margin'] = $mobile_cell_margin;
179
+ $defaults['widget-mobile-margin-bottom'] = '';
180
+ $defaults['margin-bottom-last-row'] = false;
181
+ $defaults['margin-sides'] = 30;
182
+ $defaults['full-width-container'] = 'body';
183
+ $defaults['output-css-header'] = 'auto';
184
+
185
+ // Content fields.
186
  $defaults['copy-content'] = true;
187
  $defaults['copy-styles'] = false;
188
 
190
  }
191
 
192
  /**
193
+ * Set the option on whether to add widget classes for known themes.
194
  *
195
  * @param $add_class
196
  *
204
  break;
205
  }
206
 
 
207
  return $add_class;
208
  }
209
 
243
  }
244
 
245
  /**
246
+ * Display the Page Builder settings page.
247
  */
248
  function display_settings_page() {
249
  $settings_fields = $this->fields = apply_filters( 'siteorigin_panels_settings_fields', array() );
251
  }
252
 
253
  /**
254
+ * Add a settings help tab.
255
  */
256
  function add_help_tab() {
257
  $screen = get_current_screen();
274
  * @return mixed
275
  */
276
  function settings_fields( $fields ) {
277
+
278
+ // General settings.
279
 
280
  $fields['general'] = array(
281
  'title' => __( 'General', 'siteorigin-panels' ),
338
  'description' => __( 'Disable row/widget background parallax when the browser is smaller than the mobile width.', 'siteorigin-panels' ),
339
  );
340
 
341
+ // Legacy Parallax.
342
  $fields['general']['fields']['parallax-motion'] = array(
343
  'type' => 'float',
344
  'label' => __( 'Limit Parallax Motion', 'siteorigin-panels' ),
345
+ 'description' => __( 'How many pixels of scrolling results in a single pixel of parallax motion. 0 means automatic. Lower values give a more noticeable effect.', 'siteorigin-panels' ),
346
  );
347
 
348
+ // Modern Parallax.
349
  $fields['general']['fields']['parallax-delay'] = array(
350
  'type' => 'float',
351
  'label' => __( 'Parallax Delay', 'siteorigin-panels' ),
394
  'description' => __( 'Whether to display SiteOrigin Layout Blocks in edit mode or preview mode in the Block Editor.', 'siteorigin-panels' ),
395
  );
396
 
397
+ // Widgets settings.
398
 
399
  $fields['widgets'] = array(
400
  'title' => __( 'Widgets', 'siteorigin-panels' ),
431
  'description' => __( 'Open a widget form as soon as it\'s added to a page.', 'siteorigin-panels' ),
432
  );
433
 
434
+ // Layout settings.
435
 
436
  $fields['layout'] = array(
437
  'title' => __( 'Layout', 'siteorigin-panels' ),
438
  'fields' => array(),
439
  );
440
 
 
 
441
  $fields['layout']['fields']['responsive'] = array(
442
  'type' => 'checkbox',
443
  'label' => __( 'Responsive Layout', 'siteorigin-panels' ),
485
  $fields['layout']['fields']['row-mobile-margin-bottom'] = array(
486
  'type' => 'number',
487
  'unit' => 'px',
488
+ 'label' => __( 'Mobile Row Bottom Margin', 'siteorigin-panels' ),
489
  'description' => __( 'The default margin below rows on mobile.', 'siteorigin-panels' ),
490
  );
491
 
495
  'description' => __( 'Allow margin below the last row.', 'siteorigin-panels' ),
496
  );
497
 
498
+ $fields['layout']['fields']['mobile-cell-margin'] = array(
499
+ 'type' => 'number',
500
+ 'unit' => 'px',
501
+ 'label' => __( 'Mobile Cell Bottom Margin', 'siteorigin-panels' ),
502
+ 'description' => __( 'The default vertical space between cells in a collapsed mobile row.', 'siteorigin-panels' ),
503
+ );
504
+
505
+ $fields['layout']['fields']['widget-mobile-margin-bottom'] = array(
506
+ 'type' => 'number',
507
+ 'unit' => 'px',
508
+ 'label' => __( 'Mobile Widget Bottom Margin', 'siteorigin-panels' ),
509
+ 'description' => __( 'The default widget bottom margin on mobile.', 'siteorigin-panels' ),
510
+ );
511
+
512
  $fields['layout']['fields']['margin-sides'] = array(
513
  'type' => 'number',
514
  'unit' => 'px',
535
  'description' => __( 'This setting is only applicable in the Classic Editor.', 'siteorigin-panels' ),
536
  );
537
 
538
+ // Content settings.
539
 
540
  $fields['content'] = array(
541
  'title' => __( 'Content', 'siteorigin-panels' ),
558
  }
559
 
560
  /**
561
+ * Display a settings field.
562
  *
563
  * @param $field_id
564
  * @param $field
572
  case 'text':
573
  case 'float':
574
  ?><input name="<?php echo esc_attr( $field_name ) ?>"
575
+ class="panels-setting-<?php echo esc_attr( $field['type'] ) ?>" type="text"
576
+ value="<?php echo esc_attr( $value ) ?>" /> <?php
577
  break;
578
 
579
  case 'password':
580
  ?><input name="<?php echo esc_attr( $field_name ) ?>"
581
+ class="panels-setting-<?php echo esc_attr( $field['type'] ) ?>" type="password"
582
+ value="<?php echo esc_attr( $value ) ?>" /> <?php
583
  break;
584
 
585
  case 'number':
586
  ?>
587
  <input name="<?php echo esc_attr( $field_name ) ?>" type="number"
588
+ class="panels-setting-<?php echo esc_attr( $field['type'] ) ?>"
589
+ value="<?php echo esc_attr( $value ) ?>"/>
590
  <?php
591
  if ( ! empty( $field['unit'] ) ) {
592
  echo esc_html( $field['unit'] );
595
 
596
  case 'html':
597
  ?><textarea name="<?php echo esc_attr( $field_name ) ?>"
598
+ class="panels-setting-<?php echo esc_attr( $field['type'] ) ?> widefat"
599
+ rows="<?php echo ! empty( $field['rows'] ) ? (int) $field['rows'] : 2 ?>"><?php echo esc_textarea( $value ) ?></textarea> <?php
600
  break;
601
 
602
  case 'checkbox':
603
  ?>
604
  <label class="widefat">
605
  <input name="<?php echo esc_attr( $field_name ) ?>"
606
+ type="checkbox" <?php checked( ! empty( $value ) ) ?> />
607
  <?php echo ! empty( $field['checkbox_text'] ) ? esc_html( $field['checkbox_text'] ) : __( 'Enabled', 'siteorigin-panels' ) ?>
608
  </label>
609
  <?php
625
  ?>
626
  <label class="widefat">
627
  <input name="<?php echo esc_attr( $field_name ) ?>[<?php echo esc_attr( $option_id ) ?>]"
628
+ type="checkbox" <?php checked( in_array( $option_id, $value ) ) ?> />
629
  <?php echo esc_html( $option ) ?>
630
  </label>
631
  <?php
724
  }
725
  }
726
 
727
+ // Don't let mobile width go below 320.
728
  $values[ 'mobile-width' ] = max( $values[ 'mobile-width' ], 320 );
729
 
730
+ // Save the values to the database.
731
  update_option( 'siteorigin_panels_settings', $values );
732
  do_action( 'siteorigin_panels_save_settings', $values );
733
  $this->settings = wp_parse_args( $values, $this->settings );
735
  }
736
 
737
  /**
738
+ * Get a post type array.
739
  *
740
  * @return array
741
  */
752
  $types[ $key ] = $value;
753
  }
754
 
755
+ // These are post types we know we don't want to show Page Builder on.
756
  unset( $types['ml-slider'] );
757
 
758
  foreach ( $types as $type_id => $type ) {
inc/styles.php CHANGED
@@ -344,10 +344,10 @@ class SiteOrigin_Panels_Styles {
344
  );
345
 
346
  $fields['mobile_cell_margin'] = array(
347
- 'name' => __( 'Mobile Cell Margins', 'siteorigin-panels' ),
348
  'type' => 'measurement',
349
  'group' => 'mobile_layout',
350
- 'description' => sprintf( __( 'Vertical space between cells in a collapsed mobile row. Default is %spx.', 'siteorigin-panels' ), siteorigin_panels_setting( 'margin-bottom' ) ),
351
  'priority' => 5,
352
  );
353
 
344
  );
345
 
346
  $fields['mobile_cell_margin'] = array(
347
+ 'name' => __( 'Mobile Cell Bottom Margin', 'siteorigin-panels' ),
348
  'type' => 'measurement',
349
  'group' => 'mobile_layout',
350
+ 'description' => sprintf( __( 'Vertical space between cells in a collapsed mobile row. Default is %spx.', 'siteorigin-panels' ), ! empty( siteorigin_panels_setting( 'mobile-cell-margin' ) ) ? siteorigin_panels_setting( 'mobile-cell-margin' ) : siteorigin_panels_setting( 'margin-bottom' ) ),
351
  'priority' => 5,
352
  );
353
 
js/siteorigin-panels.js CHANGED
@@ -2797,7 +2797,7 @@ jQuery( function ( $ ) {
2797
 
2798
  // WP 5.7+: Prevent undesired "restore content" notice.
2799
  if ( typeof window.wp.autosave !== 'undefined' && jQuery( '#siteorigin-panels-metabox' ).length ) {
2800
- jQuery( document ).on( 'ready', function( e ) {
2801
  var blog_id = typeof window.autosaveL10n !== 'undefined' && window.autosaveL10n.blog_id;
2802
 
2803
  // Ensure sessionStorage is working, and we were able to find a blog id.
@@ -3731,20 +3731,38 @@ module.exports = Backbone.Model.extend( {
3731
  * Iterate an array and find a valid field we can use for a title. Supports multidimensional arrays.
3732
  *
3733
  * @param values An array containing field values.
 
 
 
 
3734
  * @returns string The title we found. If we weren't able to find one, it returns false.
3735
  */
3736
- getTitleFromValues: function( values, thisView ) {
3737
  var widgetTitle = false;
3738
  for ( const k in values ) {
3739
  if ( typeof values[ k ] == 'object' ) {
3740
- // Field is an array, check child for valid titles.
3741
- widgetTitle = thisView.getTitleFromValues( values[ k ], thisView );
 
 
 
 
 
 
 
 
 
 
 
 
 
3742
  if ( widgetTitle ) {
3743
  break;
3744
  }
3745
  // Ensure field isn't a required WB field, and if its not, confirm it's valid.
3746
  } else if (
3747
- k.charAt(0) !== '_' &&
 
3748
  k !== 'so_sidebar_emulator_id' &&
3749
  k !== 'option_name' &&
3750
  thisView.isValidTitle( values[ k ] )
@@ -3783,15 +3801,15 @@ module.exports = Backbone.Model.extend( {
3783
  var widgetTitle = false;
3784
 
3785
  // Check titleFields for valid titles.
3786
- _.each( titleFields, function( title ) {
3787
- if ( ! widgetTitle && thisView.isValidTitle( values[ title ] ) ) {
3788
- widgetTitle = thisView.cleanTitle( values[ title ] );
3789
- return false;
3790
- }
3791
- } );
3792
 
3793
  if ( ! widgetTitle && ! titleFieldOnly ) {
3794
- // No titles were found. Let's check the rest of the fields for a valid title..
3795
  widgetTitle = this.getTitleFromValues( values, thisView );
3796
  }
3797
 
@@ -4532,8 +4550,9 @@ module.exports = Backbone.View.extend( {
4532
  var builderID = builderView.$el.attr( 'id' );
4533
 
4534
  // Create the sortable for the rows
4535
- this.rowsSortable = this.$( '.so-rows-container' ).sortable( {
4536
- appendTo: '#wpwrap',
 
4537
  items: '.so-row-container',
4538
  handle: '.so-row-move',
4539
  // For the block editor, where it's possible to have multiple Page Builder blocks on a page.
@@ -6714,14 +6733,17 @@ module.exports = Backbone.View.extend( {
6714
  * Toggle Visibility: Check if row is hidden and apply fade as needed.
6715
  */
6716
  toggleVisibilityFade: function() {
6717
- var currentRowStyle = this.model.attributes.style;
 
 
 
6718
  if (
6719
- this.checkIfStyleExists( currentRowStyle, 'disable_row' ) ||
6720
- this.checkIfStyleExists( currentRowStyle, 'disable_desktop' ) ||
6721
- this.checkIfStyleExists( currentRowStyle, 'disable_tablet' ) ||
6722
- this.checkIfStyleExists( currentRowStyle, 'disable_mobile' ) ||
6723
- this.checkIfStyleExists( currentRowStyle, 'disable_logged_in' ) ||
6724
- this.checkIfStyleExists( currentRowStyle, 'disable_logged_out' )
6725
  ) {
6726
  this.$el.addClass( 'so-hidden-row' );
6727
  } else {
@@ -7482,14 +7504,17 @@ module.exports = Backbone.View.extend( {
7482
  * Toggle Visibility: Check if row is hidden and apply fade as needed.
7483
  */
7484
  toggleVisibilityFade: function() {
7485
- var currentRowStyle = this.model.attributes.style;
 
 
 
7486
  if (
7487
- this.checkIfStyleExists( currentRowStyle, 'disable_widget' ) ||
7488
- this.checkIfStyleExists( currentRowStyle, 'disable_desktop' ) ||
7489
- this.checkIfStyleExists( currentRowStyle, 'disable_tablet' ) ||
7490
- this.checkIfStyleExists( currentRowStyle, 'disable_mobile' ) ||
7491
- this.checkIfStyleExists( currentRowStyle, 'disable_logged_in' ) ||
7492
- this.checkIfStyleExists( currentRowStyle, 'disable_logged_out' )
7493
  ) {
7494
  this.$el.addClass( 'so-hidden-widget' );
7495
  } else {
2797
 
2798
  // WP 5.7+: Prevent undesired "restore content" notice.
2799
  if ( typeof window.wp.autosave !== 'undefined' && jQuery( '#siteorigin-panels-metabox' ).length ) {
2800
+ jQuery( function( e ) {
2801
  var blog_id = typeof window.autosaveL10n !== 'undefined' && window.autosaveL10n.blog_id;
2802
 
2803
  // Ensure sessionStorage is working, and we were able to find a blog id.
3731
  * Iterate an array and find a valid field we can use for a title. Supports multidimensional arrays.
3732
  *
3733
  * @param values An array containing field values.
3734
+ * @returns object thisView The current widget instance.
3735
+ * @returns object fields The fields we're specifically check for.
3736
+ * @param object check_sub_fields Whether we should check sub fields.
3737
+ *
3738
  * @returns string The title we found. If we weren't able to find one, it returns false.
3739
  */
3740
+ getTitleFromValues: function( values, thisView, fields = false, check_sub_fields = true ) {
3741
  var widgetTitle = false;
3742
  for ( const k in values ) {
3743
  if ( typeof values[ k ] == 'object' ) {
3744
+ if ( check_sub_fields ) {
3745
+ // Field is an object, check child for valid titles.
3746
+ widgetTitle = thisView.getTitleFromValues( values[ k ], thisView, fields );
3747
+ if ( widgetTitle ) {
3748
+ break;
3749
+ }
3750
+ }
3751
+ // Check for predefined title fields.
3752
+ } else if ( typeof fields == 'object' ) {
3753
+ for ( var i = 0; i < fields.length; i++ ) {
3754
+ if ( k == fields[i] ) {
3755
+ widgetTitle = thisView.cleanTitle( values[ k ] )
3756
+ break;
3757
+ }
3758
+ }
3759
  if ( widgetTitle ) {
3760
  break;
3761
  }
3762
  // Ensure field isn't a required WB field, and if its not, confirm it's valid.
3763
  } else if (
3764
+ typeof fields != 'object' &&
3765
+ k.charAt( 0 ) !== '_' &&
3766
  k !== 'so_sidebar_emulator_id' &&
3767
  k !== 'option_name' &&
3768
  thisView.isValidTitle( values[ k ] )
3801
  var widgetTitle = false;
3802
 
3803
  // Check titleFields for valid titles.
3804
+ widgetTitle = this.getTitleFromValues(
3805
+ values,
3806
+ thisView,
3807
+ titleFields,
3808
+ typeof widgetData.panels_title_check_sub_fields != 'undefined' ? widgetData.panels_title_check_sub_fields : false
3809
+ );
3810
 
3811
  if ( ! widgetTitle && ! titleFieldOnly ) {
3812
+ // No titles were found. Let's check the rest of the fields for a valid title.
3813
  widgetTitle = this.getTitleFromValues( values, thisView );
3814
  }
3815
 
4550
  var builderID = builderView.$el.attr( 'id' );
4551
 
4552
  // Create the sortable for the rows
4553
+ var wpVersion = $( 'body' ).attr( 'class' ).match( /branch-([0-9-]+)/ )[0].replace( /\D/g,'' );
4554
+ this.rowsSortable = this.$( '.so-rows-container:not(.sow-row-color)' ).sortable( {
4555
+ appendTo: wpVersion >= 59 ? 'parent' : '#wpwrap',
4556
  items: '.so-row-container',
4557
  handle: '.so-row-move',
4558
  // For the block editor, where it's possible to have multiple Page Builder blocks on a page.
6733
  * Toggle Visibility: Check if row is hidden and apply fade as needed.
6734
  */
6735
  toggleVisibilityFade: function() {
6736
+ var styles = this.model.attributes.style;
6737
+ if ( typeof styles == 'undefined' ) {
6738
+ return;
6739
+ }
6740
  if (
6741
+ this.checkIfStyleExists( styles, 'disable_row' ) ||
6742
+ this.checkIfStyleExists( styles, 'disable_desktop' ) ||
6743
+ this.checkIfStyleExists( styles, 'disable_tablet' ) ||
6744
+ this.checkIfStyleExists( styles, 'disable_mobile' ) ||
6745
+ this.checkIfStyleExists( styles, 'disable_logged_in' ) ||
6746
+ this.checkIfStyleExists( styles, 'disable_logged_out' )
6747
  ) {
6748
  this.$el.addClass( 'so-hidden-row' );
6749
  } else {
7504
  * Toggle Visibility: Check if row is hidden and apply fade as needed.
7505
  */
7506
  toggleVisibilityFade: function() {
7507
+ var styles = this.model.attributes.style;
7508
+ if ( typeof styles == 'undefined' ) {
7509
+ return;
7510
+ }
7511
  if (
7512
+ this.checkIfStyleExists( styles, 'disable_widget' ) ||
7513
+ this.checkIfStyleExists( styles, 'disable_desktop' ) ||
7514
+ this.checkIfStyleExists( styles, 'disable_tablet' ) ||
7515
+ this.checkIfStyleExists( styles, 'disable_mobile' ) ||
7516
+ this.checkIfStyleExists( styles, 'disable_logged_in' ) ||
7517
+ this.checkIfStyleExists( styles, 'disable_logged_out' )
7518
  ) {
7519
  this.$el.addClass( 'so-hidden-widget' );
7520
  } else {
js/siteorigin-panels.min.js CHANGED
@@ -5,4 +5,4 @@
5
  * @copyright Greg Priday 2013 - 2016 - <https://siteorigin.com/>
6
  * @license GPL 3.0 http://www.gnu.org/licenses/gpl.html
7
  */
8
- var s={};window.panels=s,window.siteoriginPanels=s,s.helpers={},s.helpers.clipboard=e("./helpers/clipboard"),s.helpers.utils=e("./helpers/utils"),s.helpers.editor=e("./helpers/editor"),s.helpers.serialize=e("./helpers/serialize"),s.helpers.pageScroll=e("./helpers/page-scroll"),s.helpers.accessibility=e("./helpers/accessibility"),s.model={},s.model.widget=e("./model/widget"),s.model.cell=e("./model/cell"),s.model.row=e("./model/row"),s.model.builder=e("./model/builder"),s.model.historyEntry=e("./model/history-entry"),s.collection={},s.collection.widgets=e("./collection/widgets"),s.collection.cells=e("./collection/cells"),s.collection.rows=e("./collection/rows"),s.collection.historyEntries=e("./collection/history-entries"),s.view={},s.view.widget=e("./view/widget"),s.view.cell=e("./view/cell"),s.view.row=e("./view/row"),s.view.builder=e("./view/builder"),s.view.dialog=e("./view/dialog"),s.view.styles=e("./view/styles"),s.view.liveEditor=e("./view/live-editor"),s.dialog={},s.dialog.builder=e("./dialog/builder"),s.dialog.widgets=e("./dialog/widgets"),s.dialog.widget=e("./dialog/widget"),s.dialog.prebuilt=e("./dialog/prebuilt"),s.dialog.row=e("./dialog/row"),s.dialog.history=e("./dialog/history"),s.utils={},s.utils.menu=e("./utils/menu"),jQuery.fn.soPanelsSetupBuilderWidget=e("./jquery/setup-builder-widget"),jQuery((function(e){var t,i,s,l,o=e("#siteorigin-panels-metabox");if(s=e("form#post"),o.length&&s.length)t=o,i=o.find(".siteorigin-panels-data-field"),l={editorType:"tinyMCE",postId:e("#post_ID").val(),editorId:"#content",builderType:o.data("builder-type"),builderSupports:o.data("builder-supports"),loadOnAttach:panelsOptions.loadOnAttach&&1==e("#auto_draft").val(),loadLiveEditor:1==o.data("live-editor"),liveEditorCloseAfter:1==o.data("live-editor-close"),editorPreview:t.data("preview-url")};else if(e(".siteorigin-panels-builder-form").length){var n=e(".siteorigin-panels-builder-form");t=n.find(".siteorigin-panels-builder-container"),i=n.find('input[name="panels_data"]'),s=n,l={editorType:"standalone",postId:n.data("post-id"),editorId:"#post_content",builderType:n.data("type"),builderSupports:n.data("builder-supports"),loadLiveEditor:!1,liveEditorCloseAfter:!1,editorPreview:n.data("preview-url")}}if(!_.isUndefined(t)){var r=window.siteoriginPanels,a=new r.model.builder,d=new r.view.builder({model:a,config:l});e(document).trigger("before_panels_setup",d),d.render().attach({container:t}).setDataField(i).attachToEditor(),s.on("submit",(function(){a.refreshPanelsData()})),t.removeClass("so-panels-loading"),e(document).trigger("panels_setup",d,window.panels),window.soPanelsBuilderView=d}e(document).on("widget-added",(function(t,i){e(i).find(".siteorigin-page-builder-widget").soPanelsSetupBuilderWidget()})),e("body").hasClass("wp-customizer")||e((function(){e(".siteorigin-page-builder-widget").soPanelsSetupBuilderWidget()})),e(window).on("keyup",(function(t){27===t.which&&e(".so-panels-dialog-wrapper, .so-panels-live-editor").filter(":visible").last().find(".so-title-bar .so-close, .live-editor-close").trigger("click")}))})),void 0!==window.wp.autosave&&jQuery("#siteorigin-panels-metabox").length&&jQuery(document).on("ready",(function(e){var t=void 0!==window.autosaveL10n&&window.autosaveL10n.blog_id;if(("object"==typeof window.sessionStorage||t)&&(stored_obj=window.sessionStorage.getItem("wp-autosave-"+t),stored_obj)){stored_obj=JSON.parse(stored_obj);var i=stored_obj["post_"+jQuery("#post_ID").val()];"object"==typeof i&&jQuery("#content").val(i.content)}}))},{"./collection/cells":1,"./collection/history-entries":2,"./collection/rows":3,"./collection/widgets":4,"./dialog/builder":5,"./dialog/history":6,"./dialog/prebuilt":7,"./dialog/row":8,"./dialog/widget":9,"./dialog/widgets":10,"./helpers/accessibility":11,"./helpers/clipboard":12,"./helpers/editor":13,"./helpers/page-scroll":14,"./helpers/serialize":15,"./helpers/utils":16,"./jquery/setup-builder-widget":17,"./model/builder":19,"./model/cell":20,"./model/history-entry":21,"./model/row":22,"./model/widget":23,"./utils/menu":24,"./view/builder":25,"./view/cell":26,"./view/dialog":27,"./view/live-editor":28,"./view/row":29,"./view/styles":30,"./view/widget":31}],19:[function(e,t,i){t.exports=Backbone.Model.extend({layoutPosition:{BEFORE:"before",AFTER:"after",REPLACE:"replace"},rows:{},defaults:{data:{widgets:[],grids:[],grid_cells:[]}},initialize:function(){this.set("rows",new panels.collection.rows)},addRow:function(e,t,i){i=_.extend({noAnimate:!1},i);var s=new panels.collection.cells(t);e=_.extend({collection:this.get("rows"),cells:s},e);var l=new panels.model.row(e);return l.builder=this,this.get("rows").add(l,i),l},loadPanelsData:function(e,t){try{t===this.layoutPosition.BEFORE?e=this.concatPanelsData(e,this.getPanelsData()):t===this.layoutPosition.AFTER&&(e=this.concatPanelsData(this.getPanelsData(),e)),this.emptyRows(),this.set("data",JSON.parse(JSON.stringify(e)),{silent:!0});var i,s=[];if(_.isUndefined(e.grid_cells))return void this.trigger("load_panels_data");for(var l=0;l<e.grid_cells.length;l++)i=parseInt(e.grid_cells[l].grid),_.isUndefined(s[i])&&(s[i]=[]),s[i].push(e.grid_cells[l]);var o=this;if(_.each(s,(function(t,i){var s={};_.isUndefined(e.grids[i].style)||(s.style=e.grids[i].style),_.isUndefined(e.grids[i].ratio)||(s.ratio=e.grids[i].ratio),_.isUndefined(e.grids[i].ratio_direction)||(s.ratio_direction=e.grids[i].ratio_direction),_.isUndefined(e.grids[i].color_label)||(s.color_label=e.grids[i].color_label),_.isUndefined(e.grids[i].label)||(s.label=e.grids[i].label),o.addRow(s,t,{noAnimate:!0})})),_.isUndefined(e.widgets))return;_.each(e.widgets,(function(e){var t=null;_.isUndefined(e.panels_info)?(t=e.info,delete e.info):(t=e.panels_info,delete e.panels_info);var i=o.get("rows").at(parseInt(t.grid)).get("cells").at(parseInt(t.cell)),s=new panels.model.widget({class:t.class,values:e});_.isUndefined(t.style)||s.set("style",t.style),_.isUndefined(t.read_only)||s.set("read_only",t.read_only),_.isUndefined(t.widget_id)?s.set("widget_id",panels.helpers.utils.generateUUID()):s.set("widget_id",t.widget_id),_.isUndefined(t.label)||s.set("label",t.label),s.cell=i,i.get("widgets").add(s,{noAnimate:!0})})),this.trigger("load_panels_data")}catch(e){console.log("Error loading data: "+e.message)}},concatPanelsData:function(e,t){if(_.isUndefined(t)||_.isUndefined(t.grids)||_.isEmpty(t.grids)||_.isUndefined(t.grid_cells)||_.isEmpty(t.grid_cells))return e;if(_.isUndefined(e)||_.isUndefined(e.grids)||_.isEmpty(e.grids))return t;var i,s=e.grids.length,l=_.isUndefined(e.widgets)?0:e.widgets.length,o={grids:[],grid_cells:[],widgets:[]};for(o.grids=e.grids.concat(t.grids),_.isUndefined(e.grid_cells)||(o.grid_cells=e.grid_cells.slice()),_.isUndefined(e.widgets)||(o.widgets=e.widgets.slice()),i=0;i<t.grid_cells.length;i++){var n=t.grid_cells[i];n.grid=parseInt(n.grid)+s,o.grid_cells.push(n)}if(!_.isUndefined(t.widgets))for(i=0;i<t.widgets.length;i++){var r=t.widgets[i];r.panels_info.grid=parseInt(r.panels_info.grid)+s,r.panels_info.id=parseInt(r.panels_info.id)+l,o.widgets.push(r)}return o},getPanelsData:function(){var e={widgets:[],grids:[],grid_cells:[]},t=0;return this.get("rows").each((function(i,s){i.get("cells").each((function(i,l){i.get("widgets").each((function(i,o){var n={class:i.get("class"),raw:i.get("raw"),grid:s,cell:l,id:t++,widget_id:i.get("widget_id"),style:i.get("style"),label:i.get("label")};_.isEmpty(n.widget_id)&&(n.widget_id=panels.helpers.utils.generateUUID());var r=_.extend(_.clone(i.get("values")),{panels_info:n});e.widgets.push(r)})),e.grid_cells.push({grid:s,index:l,weight:i.get("weight"),style:i.get("style")})})),e.grids.push({cells:i.get("cells").length,style:i.get("style"),ratio:i.get("ratio"),ratio_direction:i.get("ratio_direction"),color_label:i.get("color_label"),label:i.get("label")})})),e},refreshPanelsData:function(e){e=_.extend({silent:!1},e);var t=this.get("data"),i=this.getPanelsData();this.set("data",i,{silent:!0}),e.silent||JSON.stringify(i)===JSON.stringify(t)||(this.trigger("change"),this.trigger("change:data"),this.trigger("refresh_panels_data",i,e))},emptyRows:function(){return _.invoke(this.get("rows").toArray(),"destroy"),this.get("rows").reset(),this},isValidLayoutPosition:function(e){return e===this.layoutPosition.BEFORE||e===this.layoutPosition.AFTER||e===this.layoutPosition.REPLACE},getPanelsDataFromHtml:function(e,t){var i,s=this,l=jQuery('<div id="wrapper">'+e+"</div>");if(l.find(".panel-layout .panel-grid").length){var o={grids:[],grid_cells:[],widgets:[]},n=new RegExp(panelsOptions.siteoriginWidgetRegex,"i"),r=(i=document.createElement("div"),function(e){return e&&"string"==typeof e&&(e=(e=e.replace(/<script[^>]*>([\S\s]*?)<\/script>/gim,"")).replace(/<\/?\w(?:[^"'>]|"[^"]*"|'[^']*')*>/gim,""),i.innerHTML=e,e=i.textContent,i.textContent=""),e}),a=function(e){var t=e.find("div");if(!t.length)return e.html();for(var i=0;i<t.length-1&&t.eq(i).text().trim()==t.eq(i+1).text().trim();i++);var s=t.eq(i).find(".widget-title:header"),l="";return s.length&&(l=s.html(),s.remove()),{title:l,text:t.eq(i).html()}},d=l.find(".panel-layout").eq(0),c=function(e,t){return jQuery(t).closest(".panel-layout").is(d)};return l.find("> .panel-layout > .panel-grid").filter(c).each((function(e,i){var l=jQuery(i),d=l.find(".panel-grid-cell").filter(c);o.grids.push({cells:d.length,style:l.data("style"),ratio:l.data("ratio"),ratio_direction:l.data("ratio-direction"),color_label:l.data("color-label"),label:l.data("label")}),d.each((function(i,l){var d=jQuery(l),h=d.find(".so-panel").filter(c);o.grid_cells.push({grid:e,weight:_.isUndefined(d.data("weight"))?1:parseFloat(d.data("weight")),style:d.data("style")}),h.each((function(l,d){var c=jQuery(d),h=c.find(".panel-widget-style").length?c.find(".panel-widget-style").html():c.html(),u={grid:e,cell:i,style:c.data("style"),raw:!1,label:c.data("label")};h=h.trim();var p=n.exec(h);if(!_.isNull(p)&&""===h.replace(n,"").trim()){try{var g=/class="(.*?)"/.exec(p[3]),f=jQuery(p[5]),w=JSON.parse(r(f.val())).instance;u.class=g[1].replace(/\\\\+/g,"\\"),u.raw=!1,w.panels_info=u,o.widgets.push(w)}catch(e){u.class=t,o.widgets.push(_.extend(a(c),{filter:"1",type:"visual",panels_info:u}))}return!0}return-1!==h.indexOf("panel-layout")&&jQuery("<div>"+h+"</div>").find(".panel-layout .panel-grid").length?(u.class="SiteOrigin_Panels_Widgets_Layout",o.widgets.push({panels_data:s.getPanelsDataFromHtml(h,t),panels_info:u}),!0):(u.class=t,o.widgets.push(_.extend(a(c),{filter:"1",type:"visual",panels_info:u})),!0)}))}))})),l.find(".panel-layout").remove(),l.find("style[data-panels-style-for-post]").remove(),l.html().replace(/^\s+|\s+$/gm,"").length&&(o.grids.push({cells:1,style:{}}),o.grid_cells.push({grid:o.grids.length-1,weight:1}),o.widgets.push({filter:"1",text:l.html().replace(/^\s+|\s+$/gm,""),title:"",type:"visual",panels_info:{class:t,raw:!1,grid:o.grids.length-1,cell:0}})),o}return{grid_cells:[{grid:0,weight:1}],grids:[{cells:1}],widgets:[{filter:"1",text:e,title:"",type:"visual",panels_info:{class:t,raw:!1,grid:0,cell:0}}]}}})},{}],20:[function(e,t,i){t.exports=Backbone.Model.extend({widgets:{},row:null,defaults:{weight:0,style:{}},indexes:null,initialize:function(){this.set("widgets",new panels.collection.widgets),this.on("destroy",this.onDestroy,this)},onDestroy:function(){_.invoke(this.get("widgets").toArray(),"destroy"),this.get("widgets").reset()},clone:function(e,t){_.isUndefined(e)&&(e=this.row),t=_.extend({cloneWidgets:!0},t);var i=new this.constructor(this.attributes);return i.set("collection",e.get("cells"),{silent:!0}),i.row=e,t.cloneWidgets&&this.get("widgets").each((function(e){i.get("widgets").add(e.clone(i,t),{silent:!0})})),i}})},{}],21:[function(e,t,i){t.exports=Backbone.Model.extend({defaults:{text:"",data:"",time:null,count:1}})},{}],22:[function(e,t,i){t.exports=Backbone.Model.extend({builder:null,defaults:{style:{}},indexes:null,initialize:function(){_.isEmpty(this.get("cells"))?this.set("cells",new panels.collection.cells):this.get("cells").each(function(e){e.row=this}.bind(this)),this.on("destroy",this.onDestroy,this)},setCells:function(e){var t=this.get("cells")||new panels.collection.cells,i=[];t.each((function(s,l){var o=e.at(l);if(o)s.set("weight",o.get("weight"));else{for(var n=t.at(e.length-1),r=s.get("widgets").models.slice(),a=0;a<r.length;a++)r[a].moveToCell(n,{silent:!1});i.push(s)}})),_.each(i,(function(e){t.remove(e)})),e.length>t.length&&_.each(e.slice(t.length,e.length),function(e){e.set({collection:t}),e.row=this,t.add(e)}.bind(this)),this.reweightCells()},reweightCells:function(){var e=0,t=this.get("cells");t.each((function(t){e+=t.get("weight")})),t.each((function(t){t.set("weight",t.get("weight")/e)})),this.trigger("reweight_cells")},onDestroy:function(){_.invoke(this.get("cells").toArray(),"destroy"),this.get("cells").reset()},clone:function(e){_.isUndefined(e)&&(e=this.builder);var t=new this.constructor(this.attributes);t.set("collection",e.get("rows"),{silent:!0}),t.builder=e;var i=new panels.collection.cells;return this.get("cells").each((function(e){i.add(e.clone(t),{silent:!0})})),t.set("cells",i),t}})},{}],23:[function(e,t,i){t.exports=Backbone.Model.extend({cell:null,defaults:{class:null,missing:!1,values:{},raw:!1,style:{},read_only:!1,widget_id:""},indexes:null,initialize:function(){var e=this.get("class");!_.isUndefined(panelsOptions.widgets[e])&&panelsOptions.widgets[e].installed||this.set("missing",!0)},getWidgetField:function(e){return _.isUndefined(panelsOptions.widgets[this.get("class")])?"title"===e||"description"===e?panelsOptions.loc.missing_widget[e]:"":this.has("label")&&!_.isEmpty(this.get("label"))?this.get("label"):panelsOptions.widgets[this.get("class")][e]},moveToCell:function(e,t,i){return t=_.extend({silent:!0},t),this.cell=e,this.collection.remove(this,t),e.get("widgets").add(this,_.extend({at:i},t)),this.trigger("move_to_cell",e,i),this},setValues:function(e){var t=!1;JSON.stringify(e)!==JSON.stringify(this.get("values"))&&(t=!0),this.set("values",e,{silent:!0}),t&&(this.trigger("change",this),this.trigger("change:values"))},clone:function(e,t){_.isUndefined(e)&&(e=this.cell);var i=new this.constructor(this.attributes),s=JSON.parse(JSON.stringify(this.get("values"))),l=function(e){return _.each(e,(function(t,i){_.isString(i)&&"_"===i[0]?delete e[i]:_.isObject(e[i])&&l(e[i])})),e};return s=l(s),"SiteOrigin_Panels_Widgets_Layout"===this.get("class")&&(s.builder_id=Math.random().toString(36).substr(2)),i.set("widget_id",""),i.set("values",s,{silent:!0}),i.set("collection",e.get("widgets"),{silent:!0}),i.cell=e,i.isDuplicate=!0,i},isValidTitle:function(e){return!_.isUndefined(e)&&_.isString(e)&&""!==e&&"on"!==e&&"true"!==e&&"false"!==e&&"_"!==e[0]&&!_.isFinite(e)},cleanTitle:function(e){var t=(e=e.replace(/<\/?[^>]+(>|$)/g,"")).split(" ");return(t=t.slice(0,20)).join(" ")},getTitleFromValues:function(e,t){var i=!1;for(const s in e)if("object"==typeof e[s]){if(i=t.getTitleFromValues(e[s],t))break}else if("_"!==s.charAt(0)&&"so_sidebar_emulator_id"!==s&&"option_name"!==s&&t.isValidTitle(e[s])){i=t.cleanTitle(e[s]);break}return i},getTitle:function(){var e=panelsOptions.widgets[this.get("class")],t=[],i=!1;if(_.isUndefined(e))return this.get("class").replace(/_/g," ");if(_.isUndefined(e.panels_title))t=["title","text"];else{if(!1===e.panels_title)return panelsOptions.widgets[this.get("class")].description;t.push(e.panels_title),i=!0}var s=this.get("values"),l=this,o=!1;return _.each(t,(function(e){if(!o&&l.isValidTitle(s[e]))return o=l.cleanTitle(s[e]),!1})),o||i||(o=this.getTitleFromValues(s,l)),o||this.getWidgetField("description")}})},{}],24:[function(e,t,i){var s=window.panels,l=jQuery;t.exports=Backbone.View.extend({wrapperTemplate:_.template(s.helpers.utils.processTemplate(l("#siteorigin-panels-context-menu").html())),sectionTemplate:_.template(s.helpers.utils.processTemplate(l("#siteorigin-panels-context-menu-section").html())),contexts:[],active:!1,events:{"keyup .so-search-wrapper input":"searchKeyUp"},initialize:function(){this.listenContextMenu(),this.render(),this.attach()},listenContextMenu:function(){var e=this;l(window).on("contextmenu",(function(t){return e.active&&!e.isOverEl(e.$el,t)?(e.closeMenu(),e.active=!1,t.preventDefault(),!1):!!e.active||(e.active=!1,e.trigger("activate_context",t,e),void(e.active&&(t.preventDefault(),e.openMenu({left:t.pageX,top:t.pageY}))))}))},render:function(){this.setElement(this.wrapperTemplate())},attach:function(){this.$el.appendTo("body")},openMenu:function(e){this.trigger("open_menu"),l(window).on("keyup",{menu:this},this.keyboardListen),l(window).on("click",{menu:this},this.clickOutsideListen),this.$el.css("max-height",l(window).height()-20),e.left+this.$el.outerWidth()+10>=l(window).width()&&(e.left=l(window).width()-this.$el.outerWidth()-10),e.left<=0&&(e.left=10),e.top+this.$el.outerHeight()-l(window).scrollTop()+10>=l(window).height()&&(e.top=l(window).height()+l(window).scrollTop()-this.$el.outerHeight()-10),e.left<=0&&(e.left=10),this.$el.css({left:e.left+1,top:e.top+1}).show(),this.$(".so-search-wrapper input").trigger("focus")},closeMenu:function(){this.trigger("close_menu"),l(window).off("keyup",this.keyboardListen),l(window).off("click",this.clickOutsideListen),this.active=!1,this.$el.empty().hide()},keyboardListen:function(e){var t=e.data.menu;switch(e.which){case 27:t.closeMenu()}},clickOutsideListen:function(e){var t=e.data.menu;3!==e.which&&t.$el.is(":visible")&&!t.isOverEl(t.$el,e)&&t.closeMenu()},addSection:function(e,t,i,s){var o=this;t=_.extend({display:5,defaultDisplay:!1,search:!0,sectionTitle:"",searchPlaceholder:"",titleKey:"title"},t);var n=l(this.sectionTemplate({settings:t,items:i})).attr("id","panels-menu-section-"+e);this.$el.append(n),n.find(".so-item:not(.so-confirm)").on("click",(function(){var e=l(this);s(e.data("key")),o.closeMenu()})),n.find(".so-item.so-confirm").on("click",(function(){var e=l(this);if(e.hasClass("so-confirming"))return s(e.data("key")),void o.closeMenu();e.data("original-text",e.html()).addClass("so-confirming").html('<span class="dashicons dashicons-yes"></span> '+panelsOptions.loc.dropdown_confirm),setTimeout((function(){e.removeClass("so-confirming"),e.html(e.data("original-text"))}),2500)})),n.data("settings",t).find(".so-search-wrapper input").trigger("keyup"),this.active=!0},hasSection:function(e){return this.$el.find("#panels-menu-section-"+e).length>0},searchKeyUp:function(e){var t=l(e.currentTarget),i=t.closest(".so-section"),s=i.data("settings");if(38===e.which||40===e.which){var o=i.find("ul li:visible"),n=o.filter(".so-active").eq(0);if(n.length){o.removeClass("so-active");var r=o.index(n);38===e.which?n=r-1<0?o.last():o.eq(r-1):40===e.which&&(n=r+1>=o.length?o.first():o.eq(r+1))}else 38===e.which?n=o.last():40===e.which&&(n=o.first());return n.addClass("so-active"),!1}if(13===e.which)return 1===i.find("ul li:visible").length?(i.find("ul li:visible").trigger("click"),!1):(i.find("ul li.so-active:visible").trigger("click"),!1);if(""===t.val())if(s.defaultDisplay){i.find(".so-item").hide();for(var a=0;a<s.defaultDisplay.length;a++)i.find('.so-item[data-key="'+s.defaultDisplay[a]+'"]').show()}else i.find(".so-item").show();else i.find(".so-item").hide().each((function(){var e=l(this);-1!==e.html().toLowerCase().indexOf(t.val().toLowerCase())&&e.show()}));i.find(".so-item:visible:gt("+(s.display-1)+")").hide(),0===i.find(".so-item:visible").length&&""!==t.val()?i.find(".so-no-results").show():i.find(".so-no-results").hide()},isOverEl:function(e,t){var i=[[e.offset().left,e.offset().top],[e.offset().left+e.outerWidth(),e.offset().top+e.outerHeight()]];return t.pageX>=i[0][0]&&t.pageX<=i[1][0]&&t.pageY>=i[0][1]&&t.pageY<=i[1][1]}})},{}],25:[function(e,t,i){var s=window.panels,l=jQuery;t.exports=Backbone.View.extend({config:{},template:_.template(s.helpers.utils.processTemplate(l("#siteorigin-panels-builder").html())),dialogs:{},rowsSortable:null,dataField:!1,currentData:"",contentPreview:"",attachedToEditor:!1,attachedVisible:!1,liveEditor:void 0,menu:!1,activeCell:null,events:{"click .so-tool-button.so-widget-add":"displayAddWidgetDialog","click .so-tool-button.so-row-add":"displayAddRowDialog","click .so-tool-button.so-prebuilt-add":"displayAddPrebuiltDialog","click .so-tool-button.so-history":"displayHistoryDialog","click .so-tool-button.so-live-editor":"displayLiveEditor","keyup .so-tool-button":function(e){s.helpers.accessibility.triggerClickOnEnter(e)}},rows:null,initialize:function(e){var t=this;return this.config=_.extend({loadLiveEditor:!1,liveEditorCloseAfter:!1,builderSupports:{}},e.config),this.config.builderSupports=_.extend({addRow:!0,editRow:!0,deleteRow:!0,moveRow:!0,addWidget:!0,editWidget:!0,deleteWidget:!0,moveWidget:!0,prebuilt:!0,history:!0,liveEditor:!0,revertToEditor:!0},this.config.builderSupports),e.config.loadLiveEditor&&this.on("builder_live_editor_added",(function(){this.displayLiveEditor()})),this.dialogs={widgets:new s.dialog.widgets,row:new s.dialog.row,prebuilt:new s.dialog.prebuilt},$panelsMetabox=l("#siteorigin-panels-metabox"),$panelsMetabox.length&&(this.contentPreview=l.parseHTML($panelsMetabox.data("preview-markup"))),_.each(this.dialogs,(function(e,i,s){s[i].setBuilder(t)})),this.dialogs.row.setRowDialogType("create"),this.listenTo(this.model.get("rows"),"add",this.onAddRow),l(window).on("resize",(function(e){e.target===window&&t.trigger("builder_resize")})),this.listenTo(this.model,"change:data load_panels_data",this.storeModelData),this.listenTo(this.model,"change:data load_panels_data",this.toggleWelcomeDisplay),this.on("builder_attached_to_editor",this.handleContentChange,this),this.on("content_change",this.handleContentChange,this),this.on("display_builder",this.handleDisplayBuilder,this),this.on("hide_builder",this.handleHideBuilder,this),this.on("builder_rendered builder_resize",this.handleBuilderSizing,this),this.on("display_builder",this.wrapEditorExpandAdjust,this),this.menu=new s.utils.menu({}),this.listenTo(this.menu,"activate_context",this.activateContextMenu),this.config.loadOnAttach&&this.on("builder_attached_to_editor",(function(){this.displayAttachedBuilder({confirm:!1})}),this),this},render:function(){return this.setElement(this.template()),this.$el.attr("id","siteorigin-panels-builder-"+this.cid).addClass("so-builder-container"),this.trigger("builder_rendered"),this},attach:function(e){(e=_.extend({container:!1,dialog:!1},e)).dialog?(this.dialog=new s.dialog.builder,this.dialog.builder=this):(this.$el.appendTo(e.container),this.metabox=e.container.closest(".postbox"),this.initSortable(),this.trigger("attached_to_container",e.container)),this.trigger("builder_attached"),this.supports("liveEditor")&&this.addLiveEditor(),this.supports("history")&&this.addHistoryBrowser();var t=this.$(".so-builder-toolbar"),i=this.$(".so-panels-welcome-message"),l=panelsOptions.loc.welcomeMessage,o=[];this.supports("addWidget")?o.push(l.addWidgetButton):t.find(".so-widget-add").hide(),this.supports("addRow")?o.push(l.addRowButton):t.find(".so-row-add").hide(),this.supports("prebuilt")?o.push(l.addPrebuiltButton):t.find(".so-prebuilt-add").hide();var n="";3===o.length?n=l.threeEnabled:2===o.length?n=l.twoEnabled:1===o.length?n=l.oneEnabled:0===o.length&&(n=l.addingDisabled);var r=_.template(s.helpers.utils.processTemplate(n))({items:o})+" "+l.docsMessage;return i.find(".so-message-wrapper").html(r),this},attachToEditor:function(){if("tinyMCE"!==this.config.editorType)return this;this.attachedToEditor=!0;var e=this.metabox,t=this;l("#wp-content-wrap .wp-editor-tabs").find(".wp-switch-editor").on("click",(function(e){e.preventDefault(),l("#wp-content-editor-container").show(),l("#wp-content-wrap").removeClass("panels-active"),l("#content-resize-handle").show(),t.trigger("hide_builder")})).end().append(l('<button type="button" id="content-panels" class="hide-if-no-js wp-switch-editor switch-panels">'+e.find("h2.hndle").html()+"</button>").on("click",(function(e){t.displayAttachedBuilder({confirm:!0})&&e.preventDefault()}))),this.supports("revertToEditor")&&e.find(".so-switch-to-standard").on("click keyup",(function(i){i.preventDefault(),"keyup"==i.type&&13!=i.which||confirm(panelsOptions.loc.confirm_stop_builder)&&(t.addHistoryEntry("back_to_editor"),t.model.loadPanelsData(!1),l("#wp-content-wrap").show(),e.hide(),l(window).trigger("resize"),t.attachedVisible=!1,t.trigger("hide_builder"))})).show(),e.insertAfter("#wp-content-wrap").hide().addClass("attached-to-editor");var i=this.model.get("data");_.isEmpty(i.widgets)&&_.isEmpty(i.grids)&&this.supports("revertToEditor")||this.displayAttachedBuilder({confirm:!1});var s=function(){var e=t.$(".so-builder-toolbar");if(t.$el.hasClass("so-display-narrow"))return e.css({top:0,left:0,width:"100%",position:"absolute"}),void t.$el.css("padding-top",e.outerHeight()+"px");var i=l(window).scrollTop()-t.$el.offset().top;"fixed"===l("#wpadminbar").css("position")&&(i+=l("#wpadminbar").outerHeight());var s=0,o=t.$el.outerHeight()-e.outerHeight()+20;i>s&&i<o?"fixed"!==e.css("position")&&e.css({top:l("#wpadminbar").outerHeight(),left:t.$el.offset().left+"px",width:t.$el.outerWidth()+"px",position:"fixed"}):e.css({top:Math.min(Math.max(i,0),t.$el.outerHeight()-e.outerHeight()+20)+"px",left:0,width:"100%",position:"absolute"}),t.$el.css("padding-top",e.outerHeight()+"px")};return this.on("builder_resize",s,this),l(document).on("scroll",s),s(),this.trigger("builder_attached_to_editor"),this},displayAttachedBuilder:function(e){if((e=_.extend({confirm:!0},e)).confirm){var t="undefined"!=typeof tinyMCE&&tinyMCE.get("content");if(""!==(t&&_.isFunction(t.getContent)?t.getContent():l("textarea#content").val())&&!confirm(panelsOptions.loc.confirm_use_builder))return!1}return l("#wp-content-wrap").hide(),l("#editor-expand-toggle").on("change.editor-expand",(function(){l(this).prop("checked")||l("#wp-content-wrap").hide()})),this.metabox.show().find("> .inside").show(),l(window).trigger("resize"),l(document).trigger("scroll"),this.attachedVisible=!0,this.trigger("display_builder"),!0},initSortable:function(){if(!this.supports("moveRow"))return this;var e=this,t=e.$el.attr("id");return this.rowsSortable=this.$(".so-rows-container").sortable({appendTo:"#wpwrap",items:".so-row-container",handle:".so-row-move",connectWith:"#"+t+".so-rows-container,.block-editor .so-rows-container",axis:"y",tolerance:"pointer",scroll:!1,remove:function(t,i){e.model.get("rows").remove(l(i.item).data("view").model,{silent:!0}),e.model.refreshPanelsData()},receive:function(t,i){e.model.get("rows").add(l(i.item).data("view").model,{silent:!0,at:l(i.item).index()}),e.model.refreshPanelsData()},stop:function(t,i){var s=l(i.item),o=s.data("view"),n=e.model.get("rows");n.get(o.model)&&(e.addHistoryEntry("row_moved"),n.remove(o.model,{silent:!0}),n.add(o.model,{silent:!0,at:s.index()}),o.trigger("move",s.index()),e.model.refreshPanelsData())}}),this},refreshSortable:function(){_.isNull(this.rowsSortable)||this.rowsSortable.sortable("refresh")},setDataField:function(e,t){if(t=_.extend({load:!0},t),this.dataField=e,this.dataField.data("builder",this),t.load&&""!==e.val()){var i=this.dataField.val();try{i=JSON.parse(i)}catch(e){console.log("Failed to parse Page Builder layout data from supplied data field."),i={}}this.setData(i)}return this},setData:function(e){this.model.loadPanelsData(e),this.currentData=e,this.toggleWelcomeDisplay()},getData:function(){return this.model.get("data")},storeModelData:function(){var e=JSON.stringify(this.model.get("data"));l(this.dataField).val()!==e&&(l(this.dataField).val(e),l(this.dataField).trigger("change"),this.trigger("content_change"))},onAddRow:function(e,t,i){i=_.extend({noAnimate:!1},i);var l=new s.view.row({model:e});l.builder=this,l.render(),_.isUndefined(i.at)||t.length<=1?l.$el.appendTo(this.$(".so-rows-container")):l.$el.insertAfter(this.$(".so-rows-container .so-row-container").eq(i.at-1)),!1===i.noAnimate&&l.visualCreate(),this.refreshSortable(),l.resizeRow(),this.trigger("row_added")},displayAddWidgetDialog:function(){this.dialogs.widgets.openDialog()},displayAddRowDialog:function(){var e=new s.model.row,t=new s.collection.cells(panelsOptions.default_columns);t.each((function(t){t.row=e})),e.set("cells",t),e.builder=this.model,this.dialogs.row.setRowModel(e),this.dialogs.row.openDialog()},displayAddPrebuiltDialog:function(){this.dialogs.prebuilt.openDialog()},displayHistoryDialog:function(){this.dialogs.history.openDialog()},pasteRowHandler:function(){var e=s.helpers.clipboard.getModel("row-model");!_.isEmpty(e)&&e instanceof s.model.row&&(this.addHistoryEntry("row_pasted"),e.builder=this.model,this.model.get("rows").add(e,{at:this.model.get("rows").indexOf(this.model)+1}),this.model.refreshPanelsData())},getActiveCell:function(e){if(e=_.extend({createCell:!0},e),!this.model.get("rows").length){if(!e.createCell)return null;this.model.addRow({},[{weight:1}],{noAnimate:!0})}var t=this.activeCell;return _.isEmpty(t)||-1===this.model.get("rows").indexOf(t.model.row)?this.model.get("rows").last().get("cells").first():t.model},addLiveEditor:function(){if(_.isEmpty(this.config.editorPreview))return this;if(this.liveEditor=new s.view.liveEditor({builder:this,previewUrl:this.config.editorPreview}),this.liveEditor.hasPreviewUrl()){var e=!1;if(s.helpers.editor.isBlockEditor())if("auto-draft"!=wp.data.select("core/editor").getEditedPostAttribute("status"))e=!0;else{l(".editor-post-save-draft").trigger("click");var t=setInterval(function(){wp.data.select("core/editor").isSavingPost()||wp.data.select("core/editor").isAutosavingPost()||!wp.data.select("core/editor").didPostSaveRequestSucceed()||(clearInterval(t),this.$(".so-builder-toolbar .so-live-editor").show())}.bind(this),250)}else e=!0;e&&this.$(".so-builder-toolbar .so-live-editor").show()}return this.trigger("builder_live_editor_added"),this},displayLiveEditor:function(){_.isUndefined(this.liveEditor)||this.liveEditor.open()},addHistoryBrowser:function(){if(_.isEmpty(this.config.editorPreview))return this;this.dialogs.history=new s.dialog.history,this.dialogs.history.builder=this,this.dialogs.history.entries.builder=this.model,this.dialogs.history.setRevertEntry(this.model),this.$(".so-builder-toolbar .so-history").show()},addHistoryEntry:function(e,t){_.isUndefined(t)&&(t=null),_.isUndefined(this.dialogs.history)||this.dialogs.history.entries.addEntry(e,t)},supports:function(e){return"rowAction"===e?this.supports("addRow")||this.supports("editRow")||this.supports("deleteRow"):"widgetAction"===e?this.supports("addWidget")||this.supports("editWidget")||this.supports("deleteWidget"):!_.isUndefined(this.config.builderSupports[e])&&this.config.builderSupports[e]},handleContentChange:function(){if(panelsOptions.copy_content&&(s.helpers.editor.isBlockEditor()||s.helpers.editor.isClassicEditor(this))){var e=this.model.getPanelsData();_.isEmpty(e.widgets)||l.post(panelsOptions.ajaxurl,{action:"so_panels_builder_content_json",panels_data:JSON.stringify(e),post_id:this.config.postId},function(e){this.contentPreview&&""!==e.post_content&&this.updateEditorContent(e.post_content),""!==e.preview&&(this.contentPreview=e.preview)}.bind(this))}},updateEditorContent:function(e){if("tinyMCE"!==this.config.editorType||"undefined"==typeof tinyMCE||_.isNull(tinyMCE.get("content"))){l(this.config.editorId).val(e).trigger("change").trigger("keyup")}else{var t=tinyMCE.get("content");t.setContent(e),t.fire("change"),t.fire("keyup")}this.triggerSeoChange()},triggerSeoChange:function(){"undefined"==typeof YoastSEO||_.isNull(YoastSEO)||_.isNull(YoastSEO.app.refresh)||YoastSEO.app.refresh(),"undefined"==typeof rankMathEditor||_.isNull(rankMathEditor)||_.isNull(rankMathEditor.refresh)||rankMathEditor.refresh("content")},handleDisplayBuilder:function(){var e="undefined"!=typeof tinyMCE&&tinyMCE.get("content"),t=e&&_.isFunction(e.getContent)?e.getContent():l("textarea#content").val();if((_.isEmpty(this.model.get("data"))||_.isEmpty(this.model.get("data").widgets)&&_.isEmpty(this.model.get("data").grids))&&""!==t){var i=panelsOptions.text_widget;if(_.isEmpty(i))return;this.model.loadPanelsData(this.model.getPanelsDataFromHtml(t,i)),this.model.trigger("change"),this.model.trigger("change:data")}l("#post-status-info").addClass("for-siteorigin-panels")},handleHideBuilder:function(){l("#post-status-info").show().removeClass("for-siteorigin-panels")},wrapEditorExpandAdjust:function(){try{for(var e,t=(l.hasData(window)&&l._data(window)).events.scroll,i=0;i<t.length;i++)if("editor-expand"===t[i].namespace){e=t[i],l(window).off("scroll",e.handler),l(window).on("scroll",function(t){this.attachedVisible||e.handler(t)}.bind(this));break}}catch(e){return}},handleBuilderSizing:function(){var e=this.$el.width();return e?(e<575?this.$el.addClass("so-display-narrow"):this.$el.removeClass("so-display-narrow"),this):this},setDialogParents:function(e,t){_.each(this.dialogs,(function(i,s,l){l[s].setParent(e,t)})),this.on("add_dialog",(function(i){i.setParent(e,t)}),this)},toggleWelcomeDisplay:function(){this.model.get("rows").isEmpty()?this.$(".so-panels-welcome-message").show():this.$(".so-panels-welcome-message").hide()},activateContextMenu:function(e,t){if(l.contains(this.$el.get(0),e.target)){var i=l([]).add(this.$(".so-panels-welcome-message:visible")).add(this.$(".so-rows-container > .so-row-container")).add(this.$(".so-cells > .cell")).add(this.$(".cell-wrapper > .so-widget")).filter((function(i){return t.isOverEl(l(this),e)})),s=i.last().data("view");void 0!==s&&void 0!==s.buildContextualMenu?s.buildContextualMenu(e,t):i.last().hasClass("so-panels-welcome-message")&&this.buildContextualMenu(e,t)}},buildContextualMenu:function(e,t){var i={};this.supports("addRow")&&(i.add_row={title:panelsOptions.loc.contextual.add_row}),s.helpers.clipboard.canCopyPaste()&&s.helpers.clipboard.isModel("row-model")&&this.supports("addRow")&&(i.paste_row={title:panelsOptions.loc.contextual.row_paste}),_.isEmpty(i)||t.addSection("builder-actions",{sectionTitle:panelsOptions.loc.contextual.row_actions,search:!1},i,function(e){switch(e){case"add_row":this.displayAddRowDialog();break;case"paste_row":this.pasteRowHandler()}}.bind(this))}})},{}],26:[function(e,t,i){var s=window.panels,l=jQuery;t.exports=Backbone.View.extend({template:_.template(s.helpers.utils.processTemplate(l("#siteorigin-panels-builder-cell").html())),events:{"click .cell-wrapper":"handleCellClick"},row:null,widgetSortable:null,initialize:function(){this.listenTo(this.model.get("widgets"),"add",this.onAddWidget)},render:function(){var e={weight:this.model.get("weight"),totalWeight:this.row.model.get("cells").totalWeight()};this.setElement(this.template(e)),this.$el.data("view",this);var t=this;return this.model.get("widgets").each((function(e){var i=new s.view.widget({model:e});i.cell=t,i.render(),i.$el.appendTo(t.$(".widgets-container"))})),this.initSortable(),this.initResizable(),this},initSortable:function(){if(!this.row.builder.supports("moveWidget"))return this;var e=this,t=e.row.builder,i=t.$el.attr("id"),s=t.model;return this.widgetSortable=this.$(".widgets-container").sortable({placeholder:"so-widget-sortable-highlight",connectWith:"#"+i+" .so-cells .cell .widgets-container,.block-editor .so-cells .cell .widgets-container",tolerance:"pointer",scroll:!1,over:function(t,i){e.row.builder.trigger("widget_sortable_move")},remove:function(t,i){e.model.get("widgets").remove(l(i.item).data("view").model,{silent:!0}),s.refreshPanelsData()},receive:function(t,i){var o=l(i.item).data("view");o.cell=e;var n=o.model;n.cell=e.model,e.model.get("widgets").add(n,{silent:!0,at:l(i.item).index()}),s.refreshPanelsData()},stop:function(t,i){var o=l(i.item),n=o.data("view"),r=o.closest(".cell").data("view");e.model.get("widgets").get(n.model)&&(e.row.builder.addHistoryEntry("widget_moved"),n.model.moveToCell(r.model,{},o.index()),n.cell=r,s.refreshPanelsData())},helper:function(e,t){var i=t.clone().css({width:t.outerWidth()+"px","z-index":1e4,position:"fixed"}).addClass("widget-being-dragged").appendTo("body");return t.outerWidth()>720&&i.animate({"margin-left":e.pageX-t.offset().left-240,width:480},"fast"),i}}),this},refreshSortable:function(){_.isNull(this.widgetSortable)||this.widgetSortable.sortable("refresh")},initResizable:function(){if(!this.row.builder.supports("editRow"))return this;var e,t=this.$(".resize-handle").css("position","absolute"),i=this.row.$el,s=this;return t.draggable({axis:"x",containment:i,start:function(t,i){if(e=s.$el.prev().data("view"),!_.isUndefined(e)){var o=s.$el.clone().appendTo(i.helper).css({position:"absolute",top:"0",width:s.$el.outerWidth(),left:5,height:s.$el.outerHeight()});o.find(".resize-handle").remove();var n=e.$el.clone().appendTo(i.helper).css({position:"absolute",top:"0",width:e.$el.outerWidth()+"px",right:5,height:e.$el.outerHeight()+"px"});n.find(".resize-handle").remove(),l(this).data({newCellClone:o,prevCellClone:n})}},drag:function(i,o){var n=s.row.$el.width()+10,r=s.model.get("weight")-(o.position.left+t.outerWidth()/2)/n,a=e.model.get("weight")+(o.position.left+t.outerWidth()/2)/n;l(this).data("newCellClone").css("width",n*r+"px").find(".preview-cell-weight").html(Math.round(1e3*r)/10),l(this).data("prevCellClone").css("width",n*a+"px").find(".preview-cell-weight").html(Math.round(1e3*a)/10)},stop:function(i,o){l(this).data("newCellClone").remove(),l(this).data("prevCellClone").remove();var n=s.row.$el.width()+10,r=s.model.get("weight")-(o.position.left+t.outerWidth()/2)/n,a=e.model.get("weight")+(o.position.left+t.outerWidth()/2)/n;r>.02&&a>.02&&(s.row.builder.addHistoryEntry("cell_resized"),s.model.set("weight",r),e.model.set("weight",a),s.row.resizeRow()),o.helper.css("left",-t.outerWidth()/2+"px"),s.row.builder.model.refreshPanelsData()}}),this},onAddWidget:function(e,t,i){i=_.extend({noAnimate:!1},i);var l=new s.view.widget({model:e});l.cell=this,_.isUndefined(e.isDuplicate)&&(e.isDuplicate=!1),l.render({loadForm:e.isDuplicate}),_.isUndefined(i.at)||t.length<=1?l.$el.appendTo(this.$(".widgets-container")):l.$el.insertAfter(this.$(".widgets-container .so-widget").eq(i.at-1)),!1===i.noAnimate&&l.visualCreate(),this.refreshSortable(),this.row.resizeRow(),this.row.builder.trigger("widget_added",l)},handleCellClick:function(e){this.row.builder.$el.find(".so-cells .cell").removeClass("cell-selected"),this.row.builder.activeCell!==this||this.model.get("widgets").length?(this.$el.addClass("cell-selected"),this.row.builder.activeCell=this):this.row.builder.activeCell=null},pasteHandler:function(){var e=s.helpers.clipboard.getModel("widget-model");!_.isEmpty(e)&&e instanceof s.model.widget&&(this.row.builder.addHistoryEntry("widget_pasted"),e.cell=this.model,this.model.get("widgets").add(e),this.row.builder.model.refreshPanelsData())},buildContextualMenu:function(e,t){var i=this;t.hasSection("add-widget-below")||t.addSection("add-widget-cell",{sectionTitle:panelsOptions.loc.contextual.add_widget_cell,searchPlaceholder:panelsOptions.loc.contextual.search_widgets,defaultDisplay:panelsOptions.contextual.default_widgets},panelsOptions.widgets,(function(e){i.row.builder.trigger("before_user_adds_widget"),i.row.builder.addHistoryEntry("widget_added");var t=new s.model.widget({class:e});t.cell=i.model,t.cell.get("widgets").add(t),i.row.builder.model.refreshPanelsData(),i.row.builder.trigger("after_user_adds_widget",t)}));var l={};this.row.builder.supports("addWidget")&&s.helpers.clipboard.isModel("widget-model")&&(l.paste={title:panelsOptions.loc.contextual.cell_paste_widget}),_.isEmpty(l)||t.addSection("cell-actions",{sectionTitle:panelsOptions.loc.contextual.cell_actions,search:!1},l,function(e){switch(e){case"paste":this.pasteHandler()}this.row.builder.model.refreshPanelsData()}.bind(this)),this.row.buildContextualMenu(e,t)}})},{}],27:[function(e,t,i){var s=window.panels,l=jQuery;t.exports=Backbone.View.extend({dialogTemplate:_.template(s.helpers.utils.processTemplate(l("#siteorigin-panels-dialog").html())),dialogTabTemplate:_.template(s.helpers.utils.processTemplate(l("#siteorigin-panels-dialog-tab").html())),tabbed:!1,rendered:!1,builder:!1,className:"so-panels-dialog-wrapper",dialogClass:"",dialogIcon:"",parentDialog:!1,dialogOpen:!1,editableLabel:!1,events:{"click .so-close":"closeDialog","keyup .so-close":function(e){s.helpers.accessibility.triggerClickOnEnter(e)},"click .so-nav.so-previous":"navToPrevious","keyup .so-nav.so-previous":function(e){s.helpers.accessibility.triggerClickOnEnter(e)},"click .so-nav.so-next":"navToNext","keyup .so-nav.so-next":function(e){s.helpers.accessibility.triggerClickOnEnter(e)}},initialize:function(){this.once("open_dialog",this.render),this.once("open_dialog",this.attach),this.once("open_dialog",this.setDialogClass),this.trigger("initialize_dialog",this),_.isUndefined(this.initializeDialog)||this.initializeDialog(),_.bindAll(this,"initSidebars","hasSidebar","onResize","toggleLeftSideBar","toggleRightSideBar")},getNextDialog:function(){return null},getPrevDialog:function(){return null},setDialogClass:function(){""!==this.dialogClass&&this.$(".so-panels-dialog").addClass(this.dialogClass)},setBuilder:function(e){return this.builder=e,e.trigger("add_dialog",this,this.builder),this},attach:function(){return this.$el.appendTo("body"),this},parseDialogContent:function(e,t){t=_.extend({cid:this.cid},t);var i=l(_.template(s.helpers.utils.processTemplate(e))(t)),o={title:i.find(".title").html(),buttons:i.find(".buttons").html(),content:i.find(".content").html()};return i.has(".left-sidebar")&&(o.left_sidebar=i.find(".left-sidebar").html()),i.has(".right-sidebar")&&(o.right_sidebar=i.find(".right-sidebar").html()),o},renderDialog:function(e){if(e=_.extend({editableLabel:this.editableLabel,dialogIcon:this.dialogIcon},e),this.$el.html(this.dialogTemplate(e)).hide(),this.$el.data("view",this),this.$el.addClass("so-panels-dialog-wrapper"),!1!==this.parentDialog){var t=l('<h3 class="so-parent-link"></h3>').html(this.parentDialog.text+'<div class="so-separator"></div>');t.on("click",function(e){e.preventDefault(),this.closeDialog(),this.parentDialog.dialog.openDialog()}.bind(this)),this.$(".so-title-bar .so-title").before(t)}return this.$(".so-title-bar .so-title-editable").length&&this.initEditableLabel(),setTimeout(this.initSidebars,1),this},initSidebars:function(){var e=this.$(".so-show-left-sidebar").hide(),t=this.$(".so-show-right-sidebar").hide(),i=this.hasSidebar("left"),s=this.hasSidebar("right");(i||s)&&(l(window).on("resize",this.onResize),i&&(e.show(),e.on("click",this.toggleLeftSideBar)),s&&(t.show(),t.on("click",this.toggleRightSideBar))),this.onResize()},initTabs:function(){var e=this.$(".so-sidebar-tabs li a");if(0===e.length)return this;var t=this;return e.on("click",(function(e){e.preventDefault();var i=l(this);t.$(".so-sidebar-tabs li").removeClass("tab-active"),t.$(".so-content .so-content-tabs > *").hide(),i.parent().addClass("tab-active");var s=i.attr("href");if(!_.isUndefined(s)&&"#"===s.charAt(0)){var o=s.split("#")[1];t.$(".so-content .so-content-tabs .tab-"+o).show()}t.trigger("tab_click",i)})),this.$(".so-sidebar-tabs li a").first().trigger("click"),this},initToolbar:function(){this.$(".so-toolbar .so-buttons .so-toolbar-button").on("click keyup",function(e){e.preventDefault(),"keyup"==e.type&&13!=e.which||this.trigger("button_click",l(e.currentTarget))}.bind(this)),this.$(".so-toolbar .so-buttons .so-dropdown-button").on("click",function(e){e.preventDefault();var t=l(e.currentTarget).siblings(".so-dropdown-links-wrapper");t.is(".hidden")?t.removeClass("hidden"):t.addClass("hidden")}.bind(this)),l("html").on("click",function(e){this.$(".so-dropdown-links-wrapper").not(".hidden").each((function(t,i){var s=l(i),o=l(e.target);0!==o.length&&(o.is(".so-needs-confirm")&&!o.is(".so-confirmed")||o.is(".so-dropdown-button"))||s.addClass("hidden")}))}.bind(this))},initEditableLabel:function(){var e=this.$(".so-title-bar .so-title-editable");e.on("keypress",(function(t){var i="keypress"===t.type&&13===t.keyCode;if(i){var s=l(":tabbable"),o=s.index(e);s.eq(o+1).trigger("focus"),window.getSelection().removeAllRanges()}return!i})).on("blur",function(){var t=e.text().replace(/^\s+|\s+$/gm,"");t!==e.data("original-value").replace(/^\s+|\s+$/gm,"")&&(e.text(t),this.trigger("edit_label",t))}.bind(this)).on("focus",(function(){e.data("original-value",e.text()),s.helpers.utils.selectElementContents(this)}))},setupDialog:function(){this.openDialog(),this.closeDialog()},refreshDialogNav:function(){this.$(".so-title-bar .so-nav").show().removeClass("so-disabled");var e=this.getNextDialog(),t=this.$(".so-title-bar .so-next"),i=this.getPrevDialog(),s=this.$(".so-title-bar .so-previous");null===e?t.hide():!1===e?(t.addClass("so-disabled"),t.attr("tabindex",-1)):t.attr("tabindex",0),null===i?s.hide():!1===i?(s.addClass("so-disabled"),s.attr("tabindex",-1)):s.attr("tabindex",0)},openDialog:function(e){(e=_.extend({silent:!1},e)).silent||this.trigger("open_dialog"),this.dialogOpen=!0,this.refreshDialogNav(),s.helpers.pageScroll.lock(),this.onResize(),this.$el.show(),e.silent||(this.trigger("open_dialog_complete"),this.builder.trigger("open_dialog",this),l(document).trigger("open_dialog",this))},closeDialog:function(e){(e=_.extend({silent:!1},e)).silent||this.trigger("close_dialog"),this.dialogOpen=!1,this.$el.hide(),s.helpers.pageScroll.unlock(),e.silent||(this.trigger("close_dialog_complete"),this.builder.trigger("close_dialog",this))},navToPrevious:function(){this.closeDialog();var e=this.getPrevDialog();null!==e&&!1!==e&&e.openDialog()},navToNext:function(){this.closeDialog();var e=this.getNextDialog();null!==e&&!1!==e&&e.openDialog()},getFormValues:function(e){_.isUndefined(e)&&(e=".so-content");var t,i=this.$(e),s={};return i.find("[name]").each((function(){var e=l(this);try{var i=/([A-Za-z_]+)\[(.*)\]/.exec(e.attr("name"));if(_.isEmpty(i))return!0;_.isUndefined(i[2])?t=e.attr("name"):(t=i[2].split("][")).unshift(i[1]),t=t.map((function(e){return!isNaN(parseFloat(e))&&isFinite(e)?parseInt(e):e}));var o=s,n=null,r=!!_.isString(e.attr("type"))&&e.attr("type").toLowerCase();if("checkbox"===r)n=e.is(":checked")?""===e.val()||e.val():null;else if("radio"===r){if(!e.is(":checked"))return;n=e.val()}else if("SELECT"===e.prop("tagName")){var a=e.find("option:selected");1===a.length?n=e.find("option:selected").val():a.length>1&&(n=_.map(e.find("option:selected"),(function(e,t){return l(e).val()})))}else n=e.val();if(!_.isUndefined(e.data("panels-filter")))switch(e.data("panels-filter")){case"json_parse":try{n=JSON.parse(n)}catch(e){n=""}}if(e.parents(".acf-repeater").length){if(""==n)return;t.slice(t[2],t.length)}if(null!==n)for(var d=0;d<t.length;d++)d===t.length-1?""===t[d]?o.push(n):o[t[d]]=n:(_.isUndefined(o[t[d]])&&(""===t[d+1]?o[t[d]]=[]:o[t[d]]={}),o=o[t[d]])}catch(t){console.log("Field ["+e.attr("name")+"] could not be processed and was skipped - "+t.message)}})),s},setStatusMessage:function(e,t,i){var s=i?'<span class="dashicons dashicons-warning"></span>'+e:e;this.$(".so-toolbar .so-status").html(s),!_.isUndefined(t)&&t?this.$(".so-toolbar .so-status").addClass("so-panels-loading"):this.$(".so-toolbar .so-status").removeClass("so-panels-loading")},setParent:function(e,t){this.parentDialog={text:e,dialog:t}},onResize:function(){var e=window.matchMedia("(max-width: 980px)");["left","right"].forEach(function(t){var i=this.$(".so-"+t+"-sidebar"),s=this.$(".so-show-"+t+"-sidebar");this.hasSidebar(t)?(s.hide(),e.matches?(s.show(),s.closest(".so-title-bar").addClass("so-has-"+t+"-button"),i.hide(),i.closest(".so-panels-dialog").removeClass("so-panels-dialog-has-"+t+"-sidebar")):(s.hide(),s.closest(".so-title-bar").removeClass("so-has-"+t+"-button"),i.show(),i.closest(".so-panels-dialog").addClass("so-panels-dialog-has-"+t+"-sidebar"))):(i.hide(),s.hide())}.bind(this))},hasSidebar:function(e){return this.$(".so-"+e+"-sidebar").children().length>0},toggleLeftSideBar:function(){this.toggleSidebar("left")},toggleRightSideBar:function(){this.toggleSidebar("right")},toggleSidebar:function(e){var t=this.$(".so-"+e+"-sidebar");t.is(":visible")?t.hide():t.show()}})},{}],28:[function(e,t,i){var s=window.panels,l=jQuery;t.exports=Backbone.View.extend({template:_.template(s.helpers.utils.processTemplate(l("#siteorigin-panels-live-editor").html())),previewScrollTop:0,loadTimes:[],previewFrameId:1,previewUrl:null,previewIframe:null,events:{"click .live-editor-close":"close","click .live-editor-save":"closeAndSave","click .live-editor-collapse":"collapse","click .live-editor-mode":"mobileToggle","keyup .live-editor-mode":function(e){s.helpers.accessibility.triggerClickOnEnter(e)}},initialize:function(e){e=_.extend({builder:!1,previewUrl:!1},e),_.isEmpty(e.previewUrl)&&(e.previewUrl=panelsOptions.ajaxurl+"&action=so_panels_live_editor_preview"),this.builder=e.builder,this.previewUrl=e.previewUrl,this.listenTo(this.builder.model,"refresh_panels_data",this.handleRefreshData),this.listenTo(this.builder.model,"load_panels_data",this.handleLoadData)},render:function(){if(this.setElement(this.template()),this.$el.hide(),l("#submitdiv #save-post").length>0){var e=this.$el.find(".live-editor-save");e.text(e.data("save"))}var t=!1;l(document).on("mousedown",(function(){t=!0})).on("mouseup",(function(){t=!1}));var i=this;return this.$el.on("mouseenter focusin",".so-widget",(function(){var e=l(this).data("live-editor-preview-widget");t||void 0===e||!e.length||i.$(".so-preview-overlay").is(":visible")||(i.highlightElement(e),i.scrollToElement(e))})),this.$el.on("mouseleave focusout",".so-widget",function(){this.resetHighlights()}.bind(this)),this.listenTo(this.builder,"open_dialog",(function(){this.resetHighlights()})),this},attach:function(){this.$el.appendTo("body")},open:function(){if(""===this.$el.html()&&this.render(),0===this.$el.closest("body").length&&this.attach(),s.helpers.pageScroll.lock(),this.$el.is(":visible"))return this;if(this.$el.show(),this.refreshPreview(this.builder.model.getPanelsData()),l(".live-editor-close").trigger("focus"),this.originalContainer=this.builder.$el.parent(),this.builder.$el.appendTo(this.$(".so-live-editor-builder")),this.builder.$(".so-tool-button.so-live-editor").hide(),this.builder.trigger("builder_resize"),"auto-draft"===l("#original_post_status").val()&&!this.autoSaved){var e=this;wp.autosave&&(""===l('#title[name="post_title"]').val()&&l('#title[name="post_title"]').val(panelsOptions.loc.draft).trigger("keydown"),l(document).one("heartbeat-tick.autosave",(function(){e.autoSaved=!0,e.refreshPreview(e.builder.model.getPanelsData())})),wp.autosave.server.triggerSave())}},close:function(e=!0){return this.$el.is(":visible")?e&&this.builder.config.liveEditorCloseAfter?(l("#wp-admin-bar-view a")[0].click(),this):(this.$el.hide(),s.helpers.pageScroll.unlock(),this.builder.$el.appendTo(this.originalContainer),this.builder.$(".so-tool-button.so-live-editor").show(),void this.builder.trigger("builder_resize")):this},closeAndSave:function(){this.close(!1),l(".block-editor-page").length?l(".editor-post-publish-button")[0].click():l('#submitdiv input[type="submit"][name="save"]')[0].click()},collapse:function(){this.$el.toggleClass("so-collapsed")},highlightElement:function(e){_.isUndefined(this.resetHighlightTimeout)||clearTimeout(this.resetHighlightTimeout),this.previewIframe.contents().find("body").find(".panel-grid .panel-grid-cell .so-panel").filter((function(){return 0===l(this).parents(".so-panel").length})).not(e).addClass("so-panels-faded"),e.removeClass("so-panels-faded").addClass("so-panels-highlighted")},resetHighlights:function(){var e=this.previewIframe.contents().find("body");this.resetHighlightTimeout=setTimeout((function(){e.find(".panel-grid .panel-grid-cell .so-panel").removeClass("so-panels-faded so-panels-highlighted")}),100)},scrollToElement:function(e){this.$(".so-preview iframe")[0].contentWindow.liveEditorScrollTo(e)},handleRefreshData:function(e){if(!this.$el.is(":visible"))return this;this.refreshPreview(e)},handleLoadData:function(){if(!this.$el.is(":visible"))return this;this.refreshPreview(this.builder.model.getPanelsData())},refreshPreview:function(e){var t=this.loadTimes.length?_.reduce(this.loadTimes,(function(e,t){return e+t}),0)/this.loadTimes.length:1e3;_.isNull(this.previewIframe)||this.$(".so-preview-overlay").is(":visible")||(this.previewScrollTop=this.previewIframe.contents().scrollTop()),this.$(".so-preview-overlay").show(),this.$(".so-preview-overlay .so-loading-bar").clearQueue().css("width","0%").animate({width:"100%"},parseInt(t)+100),this.postToIframe({live_editor_panels_data:JSON.stringify(e),live_editor_post_ID:this.builder.config.postId},this.previewUrl,this.$(".so-preview")),this.previewIframe.data("load-start",(new Date).getTime())},postToIframe:function(e,t,i){_.isNull(this.previewIframe)||this.previewIframe.remove();var s="siteorigin-panels-live-preview-"+this.previewFrameId;this.previewIframe=l('<iframe src="'+t+'"></iframe>').attr({id:s,name:s}).appendTo(i),this.setupPreviewFrame(this.previewIframe);var o=l('<form id="soPostToPreviewFrame" method="post"></form>').attr({id:s,target:this.previewIframe.attr("id"),action:t}).appendTo("body");return l.each(e,(function(e,t){l('<input type="hidden" />').attr({name:e,value:t}).appendTo(o)})),o.trigger("submit").remove(),this.previewFrameId++,this.previewIframe},setupPreviewFrame:function(e){var t=this;e.data("iframeready",!1).on("iframeready",(function(){var e=l(this),i=e.contents();if(!e.data("iframeready")){e.data("iframeready",!0),void 0!==e.data("load-start")&&(t.loadTimes.unshift((new Date).getTime()-e.data("load-start")),_.isEmpty(t.loadTimes)||(t.loadTimes=t.loadTimes.slice(0,4))),l(".live-editor-mode.so-active").length&&(l(".so-panels-live-editor .so-preview iframe").css("transition","none"),t.mobileToggle()),setTimeout((function(){i.scrollTop(t.previewScrollTop),t.$(".so-preview-overlay").hide(),l(".so-panels-live-editor .so-preview iframe").css("transition","all .2s ease")}),100);var s=i.find("#pl-"+t.builder.config.postId);s.find(".panel-grid .panel-grid-cell .so-panel").filter((function(){return l(this).closest(".panel-layout").is(s)})).each((function(e,i){var s=l(i),o=t.$(".so-live-editor-builder .so-widget").eq(s.data("index"));o.data("live-editor-preview-widget",s),s.css({cursor:"pointer"}).on("mouseenter",(function(){o.parent().addClass("so-hovered"),t.highlightElement(s)})).on("mouseleave",(function(){o.parent().removeClass("so-hovered"),t.resetHighlights()})).on("click",(function(e){e.preventDefault(),o.find(".title h4").trigger("click")}))})),i.find("a").css({"pointer-events":"none"}).on("click",(function(e){e.preventDefault()}))}})).on("load",(function(){var e=l(this);e.data("iframeready")||e.trigger("iframeready")}))},hasPreviewUrl:function(){return""!==this.$("form.live-editor-form").attr("action")},mobileToggle:function(e){var t=l(void 0!==e?e.currentTarget:".live-editor-mode.so-active");this.$(".live-editor-mode").not(t).removeClass("so-active"),t.addClass("so-active"),this.$el.removeClass("live-editor-desktop-mode live-editor-tablet-mode live-editor-mobile-mode").addClass("live-editor-"+t.data("mode")+"-mode").find("iframe").css("width",t.data("width"))}})},{}],29:[function(e,t,i){var s=window.panels,l=jQuery;t.exports=Backbone.View.extend({template:_.template(s.helpers.utils.processTemplate(l("#siteorigin-panels-builder-row").html())),events:{"click .so-row-settings":"editSettingsHandler","click .so-row-duplicate":"duplicateHandler","click .so-row-delete":"confirmedDeleteHandler","click .so-row-color":"rowColorChangeHandler"},builder:null,dialog:null,initialize:function(){var e=this.model.get("cells");this.listenTo(e,"add",this.handleCellAdd),this.listenTo(e,"remove",this.handleCellRemove),this.listenTo(this.model,"reweight_cells",this.resizeRow),this.listenTo(this.model,"destroy",this.onModelDestroy);var t=this;e.each((function(e){t.listenTo(e.get("widgets"),"add",t.resize)})),e.on("add",(function(e){t.listenTo(e.get("widgets"),"add",t.resize)}),this),this.listenTo(this.model,"change:label",this.onLabelChange),this.listenTo(this.model,"change:styles-row ",this.toggleVisibilityFade)},render:function(){var e=this.model.has("color_label")?this.model.get("color_label"):1,t=this.model.has("label")?this.model.get("label"):"";this.setElement(this.template({rowColorLabel:e,rowLabel:t})),this.$el.data("view",this);var i=this;return this.model.get("cells").each((function(e){var t=new s.view.cell({model:e});t.row=i,t.render(),t.$el.appendTo(i.$(".so-cells"))})),this.builder.supports("rowAction")?(this.builder.supports("editRow")||(this.$(".so-row-toolbar .so-dropdown-links-wrapper .so-row-settings").parent().remove(),this.$el.addClass("so-row-no-edit")),this.builder.supports("addRow")||(this.$(".so-row-toolbar .so-dropdown-links-wrapper .so-row-duplicate").parent().remove(),this.$el.addClass("so-row-no-duplicate")),this.builder.supports("deleteRow")||(this.$(".so-row-toolbar .so-dropdown-links-wrapper .so-row-delete").parent().remove(),this.$el.addClass("so-row-no-delete"))):(this.$(".so-row-toolbar .so-dropdown-wrapper").remove(),this.$el.addClass("so-row-no-actions")),this.builder.supports("moveRow")||(this.$(".so-row-toolbar .so-row-move").remove(),this.$el.addClass("so-row-no-move")),this.$(".so-row-toolbar").html().trim().length||this.$(".so-row-toolbar").remove(),this.toggleVisibilityFade(),this.listenTo(this.builder,"widget_sortable_move",this.resizeRow),this.listenTo(this.builder,"builder_resize",this.resizeRow),this.resizeRow(),this},checkIfStyleExists:function(e,t){return void 0!==e[t]&&"on"==e[t]},toggleVisibilityFade:function(){var e=this.model.attributes.style;this.checkIfStyleExists(e,"disable_row")||this.checkIfStyleExists(e,"disable_desktop")||this.checkIfStyleExists(e,"disable_tablet")||this.checkIfStyleExists(e,"disable_mobile")||this.checkIfStyleExists(e,"disable_logged_in")||this.checkIfStyleExists(e,"disable_logged_out")?this.$el.addClass("so-hidden-row"):this.$el.removeClass("so-hidden-row")},visualCreate:function(){this.$el.hide().fadeIn("fast")},resizeRow:function(e){if(this.$el.is(":visible")){this.$(".so-cells .cell-wrapper").css("min-height",0),this.$(".so-cells .resize-handle").css("height",0),this.$(".so-cells").removeClass("so-action-icons");var t,i=0,s=0,o=!1;this.$(".so-cells .cell").each((function(){t=l(this),l(this).css("width",100*t.data("view").model.get("weight")+"%"),(s=t.width())<215?(t.addClass("so-show-icon"),o=!0,s<125?t.addClass("so-small-actions"):t.removeClass("so-small-actions")):t.removeClass("so-show-icon so-small-actions"),i=Math.max(i,t.height())})),this.$(".so-cells .cell-wrapper").css("min-height",Math.max(i,63)+"px"),o&&this.$(".so-cells").addClass("so-action-icons"),this.$(".so-cells .resize-handle").css("height",this.$(".so-cells .cell-wrapper").outerHeight()+"px")}},onModelDestroy:function(){this.remove()},visualDestroyModel:function(){this.builder.addHistoryEntry("row_deleted");var e=this;this.$el.fadeOut("normal",(function(){e.model.destroy(),e.builder.model.refreshPanelsData()}))},onLabelChange:function(e,t){0==this.$(".so-row-label").length?this.$(".so-row-toolbar").prepend('<h3 class="so-row-label">'+t+"</h3>"):this.$(".so-row-label").text(t)},duplicateHandler:function(){this.builder.addHistoryEntry("row_duplicated");var e=this.model.clone(this.builder.model);this.builder.model.get("rows").add(e,{at:this.builder.model.get("rows").indexOf(this.model)+1}),this.builder.model.refreshPanelsData()},copyHandler:function(){s.helpers.clipboard.setModel(this.model)},pasteHandler:function(){var e=s.helpers.clipboard.getModel("row-model");!_.isEmpty(e)&&e instanceof s.model.row&&(this.builder.addHistoryEntry("row_pasted"),e.builder=this.builder.model,this.builder.model.get("rows").add(e,{at:this.builder.model.get("rows").indexOf(this.model)+1}),this.builder.model.refreshPanelsData())},confirmedDeleteHandler:function(e){var t=l(e.target);if(t.hasClass("dashicons")&&(t=t.parent()),t.hasClass("so-confirmed"))this.visualDestroyModel();else{var i=t.html();t.addClass("so-confirmed").html('<span class="dashicons dashicons-yes"></span>'+panelsOptions.loc.dropdown_confirm),setTimeout((function(){t.removeClass("so-confirmed").html(i)}),2500)}},editSettingsHandler:function(){if(this.builder.supports("editRow"))return null===this.dialog&&(this.dialog=new s.dialog.row,this.dialog.setBuilder(this.builder).setRowModel(this.model),this.dialog.rowView=this),this.dialog.openDialog(),this},deleteHandler:function(){return this.model.destroy(),this},rowColorChangeHandler:function(e){this.$(".so-row-color").removeClass("so-row-color-selected");var t=l(e.target),i=t.data("color-label"),s=this.model.has("color_label")?this.model.get("color_label"):1;t.addClass("so-row-color-selected"),this.$el.removeClass("so-row-color-"+s),this.$el.addClass("so-row-color-"+i),this.model.set("color_label",i)},handleCellAdd:function(e){var t=new s.view.cell({model:e});t.row=this,t.render(),t.$el.appendTo(this.$(".so-cells"))},handleCellRemove:function(e){this.$(".so-cells > .cell").each((function(){var t=l(this).data("view");_.isUndefined(t)||t.model.cid===e.cid&&t.remove()}))},buildContextualMenu:function(e,t){for(var i=[],l=1;l<5;l++)i.push({title:l+" "+panelsOptions.loc.contextual.column});this.builder.supports("addRow")&&t.addSection("add-row",{sectionTitle:panelsOptions.loc.contextual.add_row,search:!1},i,function(e){this.builder.addHistoryEntry("row_added");for(var t=Number(e)+1,i=[],l=0;l<t;l++)i.push({weight:100/t});var o=new s.model.row({collection:this.collection}),n=new s.collection.cells(i);n.each((function(e){e.row=o})),o.setCells(n),o.builder=this.builder.model,this.builder.model.get("rows").add(o,{at:this.builder.model.get("rows").indexOf(this.model)+1}),this.builder.model.refreshPanelsData()}.bind(this));var o={};this.builder.supports("editRow")&&(o.edit={title:panelsOptions.loc.contextual.row_edit}),s.helpers.clipboard.canCopyPaste()&&(o.copy={title:panelsOptions.loc.contextual.row_copy},this.builder.supports("addRow")&&s.helpers.clipboard.isModel("row-model")&&(o.paste={title:panelsOptions.loc.contextual.row_paste})),this.builder.supports("addRow")&&(o.duplicate={title:panelsOptions.loc.contextual.row_duplicate}),this.builder.supports("deleteRow")&&(o.delete={title:panelsOptions.loc.contextual.row_delete,confirm:!0}),_.isEmpty(o)||t.addSection("row-actions",{sectionTitle:panelsOptions.loc.contextual.row_actions,search:!1},o,function(e){switch(e){case"edit":this.editSettingsHandler();break;case"copy":this.copyHandler();break;case"paste":this.pasteHandler();break;case"duplicate":this.duplicateHandler();break;case"delete":this.visualDestroyModel()}}.bind(this))}})},{}],30:[function(e,t,i){window.panels;var s=jQuery;t.exports=Backbone.View.extend({stylesLoaded:!1,events:{"keyup .so-image-selector":function(e){13==e.which&&this.$el.find(".select-image").trigger("click")}},initialize:function(){},render:function(e,t,i){if(!_.isUndefined(e)){i=_.extend({builderType:"",dialog:null},i),this.$el.addClass("so-visual-styles so-"+e+"-styles so-panels-loading");var l={builderType:i.builderType};return"widget"===e&&(l.widget=this.model.get("class")),"cell"===e&&(l.index=i.index),s.post(panelsOptions.ajaxurl,{action:"so_panels_style_form",type:e,style:this.model.get("style"),args:JSON.stringify(l),postId:t},null,"html").done(function(e){this.$el.html(e),this.setupFields(),this.stylesLoaded=!0,this.trigger("styles_loaded",!_.isEmpty(e)),_.isNull(i.dialog)||i.dialog.trigger("styles_loaded",!_.isEmpty(e))}.bind(this)).fail(function(e){var t;t=e&&e.responseText?e.responseText:panelsOptions.forms.loadingFailed,this.$el.html(t)}.bind(this)).always(function(){this.$el.removeClass("so-panels-loading")}.bind(this)),this}},attach:function(e){e.append(this.$el)},detach:function(){this.$el.detach()},setupFields:function(){this.$(".style-section-wrapper").each((function(){var e=s(this);e.find(".style-section-head").on("click keypress",(function(t){t.preventDefault(),e.find(".style-section-fields").slideToggle("fast")}))})),_.isUndefined(s.fn.wpColorPicker)||(_.isObject(panelsOptions.wpColorPickerOptions.palettes)&&!s.isArray(panelsOptions.wpColorPickerOptions.palettes)&&(panelsOptions.wpColorPickerOptions.palettes=s.map(panelsOptions.wpColorPickerOptions.palettes,(function(e){return e}))),this.$(".so-wp-color-field").wpColorPicker(panelsOptions.wpColorPickerOptions)),this.$(".style-field-image").each((function(){var e=null,t=s(this);t.find(".so-image-selector").on("click",(function(i){i.preventDefault(),null===e&&(e=wp.media({title:"choose",library:{type:"image"},button:{text:"Done",close:!0}})).on("select",(function(){var i=e.state().get("selection").first().attributes,s=i.url;if(!_.isUndefined(i.sizes))try{s=i.sizes.thumbnail.url}catch(e){s=i.sizes.full.url}t.find(".current-image").css("background-image","url("+s+")"),t.find(".so-image-selector > input").val(i.id),t.find(".remove-image").removeClass("hidden")})),s(this).next().focus(),e.open()})),t.find(".remove-image").on("click",(function(e){e.preventDefault(),t.find(".current-image").css("background-image","none"),t.find(".so-image-selector > input").val(""),t.find(".remove-image").addClass("hidden")}))})),this.$(".style-field-measurement").each((function(){var e=s(this),t=e.find('input[type="text"]'),i=e.find("select"),l=e.find('input[type="hidden"]');t.on("focus",(function(){s(this).trigger("select")}));!function(e){if(""!==e){var o=/(?:([0-9\.,\-]+)(.*))+/,n=l.val().split(" "),r=[];for(var a in n){var d=o.exec(n[a]);_.isNull(d)||_.isUndefined(d[1])||_.isUndefined(d[2])||(r.push(d[1]),i.val(d[2]))}1===t.length?t.val(r.join(" ")):(1===r.length?r=[r[0],r[0],r[0],r[0]]:2===r.length?r=[r[0],r[1],r[0],r[1]]:3===r.length&&(r=[r[0],r[1],r[2],r[1]]),t.each((function(e,t){s(t).val(r[e])})))}}(l.val());var o=function(e){if(1===t.length){var o=t.val().split(" ").filter((function(e){return""!==e})).map((function(e){return e+i.val()})).join(" ");l.val(o)}else{var n=s(e.target),r=[],a=[],d=[];t.each((function(e,t){var i=""!==s(t).val()?parseFloat(s(t).val()):null;r.push(i),null===i?a.push(e):d.push(e)})),3===a.length&&d[0]===t.index(n)&&(t.val(n.val()),r=[n.val(),n.val(),n.val(),n.val()]),JSON.stringify(r)===JSON.stringify([null,null,null,null])?l.val(""):l.val(r.map((function(e){return(null===e?0:e)+i.val()})).join(" "))}};t.on("change",o),i.on("change",o)})),s(document).trigger("setup_style_fields",this)}})},{}],31:[function(e,t,i){var s=window.panels,l=jQuery;t.exports=Backbone.View.extend({template:_.template(s.helpers.utils.processTemplate(l("#siteorigin-panels-builder-widget").html())),cell:null,dialog:null,events:{"click .widget-edit":"editHandler","touchend .widget-edit":"editHandler","click .title h4":"editHandler","touchend .title h4":"editHandler","click .actions .widget-duplicate":"duplicateHandler","click .actions .widget-delete":"deleteHandler","keyup .actions a":function(e){s.helpers.accessibility.triggerClickOnEnter(e)}},initialize:function(){this.listenTo(this.model,"destroy",this.onModelDestroy),this.listenTo(this.model,"change:values",this.onModelChange),this.listenTo(this.model,"change:styles ",this.toggleVisibilityFade),this.listenTo(this.model,"change:label",this.onLabelChange)},render:function(e){if(e=_.extend({loadForm:!1},e),this.setElement(this.template({title:this.model.getWidgetField("title"),description:this.model.getTitle(),widget_class:this.model.attributes.class})),this.$el.data("view",this),this.cell.row.builder.supports("editWidget")&&!this.model.get("read_only")||(this.$(".actions .widget-edit").remove(),this.$el.addClass("so-widget-no-edit")),this.cell.row.builder.supports("addWidget")||(this.$(".actions .widget-duplicate").remove(),this.$el.addClass("so-widget-no-duplicate")),this.cell.row.builder.supports("deleteWidget")||(this.$(".actions .widget-delete").remove(),this.$el.addClass("so-widget-no-delete")),this.cell.row.builder.supports("moveWidget")||this.$el.addClass("so-widget-no-move"),this.$(".actions").html().trim().length||this.$(".actions").remove(),this.model.get("read_only")&&this.$el.addClass("so-widget-read-only"),0===_.size(this.model.get("values"))||e.loadForm){var t=this.getEditDialog();t.once("form_loaded",t.saveWidget,t),t.setupDialog()}return this.toggleVisibilityFade(),this.listenTo(this.cell.row.builder,"after_user_adds_widget",this.afterUserAddsWidgetHandler),this},checkIfStyleExists:function(e,t){return void 0!==e[t]&&"on"==e[t]},toggleVisibilityFade:function(){var e=this.model.attributes.style;this.checkIfStyleExists(e,"disable_widget")||this.checkIfStyleExists(e,"disable_desktop")||this.checkIfStyleExists(e,"disable_tablet")||this.checkIfStyleExists(e,"disable_mobile")||this.checkIfStyleExists(e,"disable_logged_in")||this.checkIfStyleExists(e,"disable_logged_out")?this.$el.addClass("so-hidden-widget"):this.$el.removeClass("so-hidden-widget")},visualCreate:function(){this.$el.hide().fadeIn("fast")},getEditDialog:function(){return null===this.dialog&&(this.dialog=new s.dialog.widget({model:this.model}),this.dialog.setBuilder(this.cell.row.builder),this.dialog.widgetView=this),this.dialog},editHandler:function(){return!this.cell.row.builder.supports("editWidget")||this.model.get("read_only")?this:(this.getEditDialog().openDialog(),this)},duplicateHandler:function(){this.cell.row.builder.addHistoryEntry("widget_duplicated");var e=this.model.clone(this.model.cell);return this.cell.model.get("widgets").add(e,{at:this.model.collection.indexOf(this.model)+1}),this.cell.row.builder.model.refreshPanelsData(),this},copyHandler:function(){s.helpers.clipboard.setModel(this.model)},deleteHandler:function(){return this.visualDestroyModel(),this},onModelChange:function(){this.$(".description").html(this.model.getTitle())},onLabelChange:function(e){this.$(".title > h4").text(e.getWidgetField("title"))},onModelDestroy:function(){this.remove()},visualDestroyModel:function(){return this.cell.row.builder.addHistoryEntry("widget_deleted"),this.$el.fadeOut("fast",function(){this.cell.row.resizeRow(),this.model.destroy(),this.cell.row.builder.model.refreshPanelsData(),this.remove()}.bind(this)),this},buildContextualMenu:function(e,t){this.cell.row.builder.supports("addWidget")&&t.addSection("add-widget-below",{sectionTitle:panelsOptions.loc.contextual.add_widget_below,searchPlaceholder:panelsOptions.loc.contextual.search_widgets,defaultDisplay:panelsOptions.contextual.default_widgets},panelsOptions.widgets,function(e){this.cell.row.builder.trigger("before_user_adds_widget"),this.cell.row.builder.addHistoryEntry("widget_added");var t=new s.model.widget({class:e});t.cell=this.cell.model,this.cell.model.get("widgets").add(t,{at:this.model.collection.indexOf(this.model)+1}),this.cell.row.builder.model.refreshPanelsData(),this.cell.row.builder.trigger("after_user_adds_widget",t)}.bind(this));var i={};this.cell.row.builder.supports("editWidget")&&!this.model.get("read_only")&&(i.edit={title:panelsOptions.loc.contextual.widget_edit}),s.helpers.clipboard.canCopyPaste()&&(i.copy={title:panelsOptions.loc.contextual.widget_copy}),this.cell.row.builder.supports("addWidget")&&(i.duplicate={title:panelsOptions.loc.contextual.widget_duplicate}),this.cell.row.builder.supports("deleteWidget")&&(i.delete={title:panelsOptions.loc.contextual.widget_delete,confirm:!0}),_.isEmpty(i)||t.addSection("widget-actions",{sectionTitle:panelsOptions.loc.contextual.widget_actions,search:!1},i,function(e){switch(e){case"edit":this.editHandler();break;case"copy":this.copyHandler();break;case"duplicate":this.duplicateHandler();break;case"delete":this.visualDestroyModel()}}.bind(this)),this.cell.buildContextualMenu(e,t)},afterUserAddsWidgetHandler:function(e){this.model===e&&panelsOptions.instant_open&&setTimeout(this.editHandler.bind(this),350)}})},{}],32:[function(e,t,i){var s=jQuery,l={addWidget:function(e,t,i){var l=wp.customHtmlWidgets,o=s("<div></div>"),n=t.find(".widget-content:first");n.before(o);var r=new l.CustomHtmlWidgetControl({el:o,syncContainer:n});return r.initializeEditor(),r.editor.codemirror.refresh(),r}};t.exports=l},{}],33:[function(e,t,i){var s=e("./custom-html-widget"),l=e("./media-widget"),o=e("./text-widget"),n={CUSTOM_HTML:"custom_html",MEDIA_AUDIO:"media_audio",MEDIA_GALLERY:"media_gallery",MEDIA_IMAGE:"media_image",MEDIA_VIDEO:"media_video",TEXT:"text",addWidget:function(e,t){var i,n=e.find("> .id_base").val();switch(n){case this.CUSTOM_HTML:i=s;break;case this.MEDIA_AUDIO:case this.MEDIA_GALLERY:case this.MEDIA_IMAGE:case this.MEDIA_VIDEO:i=l;break;case this.TEXT:i=o}i.addWidget(n,e,t)}};t.exports=n},{"./custom-html-widget":32,"./media-widget":34,"./text-widget":35}],34:[function(e,t,i){var s=jQuery,l={addWidget:function(e,t,i){var l=wp.mediaWidgets,o=l.controlConstructors[e];if(o){var n=l.modelConstructors[e]||l.MediaWidgetModel,r=t.find("> .widget-content"),a=s('<div class="media-widget-control"></div>');r.before(a);var d={};r.find(".media-widget-instance-property").each((function(){var e=s(this);d[e.data("property")]=e.val()})),d.widget_id=i;var c=new o({el:a,syncContainer:r,model:new n(d)});return c.render(),c}}};t.exports=l},{}],35:[function(e,t,i){var s=jQuery,l={addWidget:function(e,t,i){var l=wp.textWidgets,o={},n=t.find(".visual");if(n.length>0){if(!n.val())return null;var r=s("<div></div>"),a=t.find(".widget-content:first");a.before(r),o={el:r,syncContainer:a}}else o={el:t};var d=new l.TextWidgetControl(o),c=wp.oldEditor?wp.oldEditor:wp.editor;return c&&c.hasOwnProperty("autop")&&(wp.editor.autop=c.autop,wp.editor.removep=c.removep,wp.editor.initialize=c.initialize),d.initializeEditor(),d}};t.exports=l},{}]},{},[18]);
5
  * @copyright Greg Priday 2013 - 2016 - <https://siteorigin.com/>
6
  * @license GPL 3.0 http://www.gnu.org/licenses/gpl.html
7
  */
8
+ var s={};window.panels=s,window.siteoriginPanels=s,s.helpers={},s.helpers.clipboard=e("./helpers/clipboard"),s.helpers.utils=e("./helpers/utils"),s.helpers.editor=e("./helpers/editor"),s.helpers.serialize=e("./helpers/serialize"),s.helpers.pageScroll=e("./helpers/page-scroll"),s.helpers.accessibility=e("./helpers/accessibility"),s.model={},s.model.widget=e("./model/widget"),s.model.cell=e("./model/cell"),s.model.row=e("./model/row"),s.model.builder=e("./model/builder"),s.model.historyEntry=e("./model/history-entry"),s.collection={},s.collection.widgets=e("./collection/widgets"),s.collection.cells=e("./collection/cells"),s.collection.rows=e("./collection/rows"),s.collection.historyEntries=e("./collection/history-entries"),s.view={},s.view.widget=e("./view/widget"),s.view.cell=e("./view/cell"),s.view.row=e("./view/row"),s.view.builder=e("./view/builder"),s.view.dialog=e("./view/dialog"),s.view.styles=e("./view/styles"),s.view.liveEditor=e("./view/live-editor"),s.dialog={},s.dialog.builder=e("./dialog/builder"),s.dialog.widgets=e("./dialog/widgets"),s.dialog.widget=e("./dialog/widget"),s.dialog.prebuilt=e("./dialog/prebuilt"),s.dialog.row=e("./dialog/row"),s.dialog.history=e("./dialog/history"),s.utils={},s.utils.menu=e("./utils/menu"),jQuery.fn.soPanelsSetupBuilderWidget=e("./jquery/setup-builder-widget"),jQuery((function(e){var t,i,s,l,o=e("#siteorigin-panels-metabox");if(s=e("form#post"),o.length&&s.length)t=o,i=o.find(".siteorigin-panels-data-field"),l={editorType:"tinyMCE",postId:e("#post_ID").val(),editorId:"#content",builderType:o.data("builder-type"),builderSupports:o.data("builder-supports"),loadOnAttach:panelsOptions.loadOnAttach&&1==e("#auto_draft").val(),loadLiveEditor:1==o.data("live-editor"),liveEditorCloseAfter:1==o.data("live-editor-close"),editorPreview:t.data("preview-url")};else if(e(".siteorigin-panels-builder-form").length){var n=e(".siteorigin-panels-builder-form");t=n.find(".siteorigin-panels-builder-container"),i=n.find('input[name="panels_data"]'),s=n,l={editorType:"standalone",postId:n.data("post-id"),editorId:"#post_content",builderType:n.data("type"),builderSupports:n.data("builder-supports"),loadLiveEditor:!1,liveEditorCloseAfter:!1,editorPreview:n.data("preview-url")}}if(!_.isUndefined(t)){var r=window.siteoriginPanels,a=new r.model.builder,d=new r.view.builder({model:a,config:l});e(document).trigger("before_panels_setup",d),d.render().attach({container:t}).setDataField(i).attachToEditor(),s.on("submit",(function(){a.refreshPanelsData()})),t.removeClass("so-panels-loading"),e(document).trigger("panels_setup",d,window.panels),window.soPanelsBuilderView=d}e(document).on("widget-added",(function(t,i){e(i).find(".siteorigin-page-builder-widget").soPanelsSetupBuilderWidget()})),e("body").hasClass("wp-customizer")||e((function(){e(".siteorigin-page-builder-widget").soPanelsSetupBuilderWidget()})),e(window).on("keyup",(function(t){27===t.which&&e(".so-panels-dialog-wrapper, .so-panels-live-editor").filter(":visible").last().find(".so-title-bar .so-close, .live-editor-close").trigger("click")}))})),void 0!==window.wp.autosave&&jQuery("#siteorigin-panels-metabox").length&&jQuery((function(e){var t=void 0!==window.autosaveL10n&&window.autosaveL10n.blog_id;if(("object"==typeof window.sessionStorage||t)&&(stored_obj=window.sessionStorage.getItem("wp-autosave-"+t),stored_obj)){stored_obj=JSON.parse(stored_obj);var i=stored_obj["post_"+jQuery("#post_ID").val()];"object"==typeof i&&jQuery("#content").val(i.content)}}))},{"./collection/cells":1,"./collection/history-entries":2,"./collection/rows":3,"./collection/widgets":4,"./dialog/builder":5,"./dialog/history":6,"./dialog/prebuilt":7,"./dialog/row":8,"./dialog/widget":9,"./dialog/widgets":10,"./helpers/accessibility":11,"./helpers/clipboard":12,"./helpers/editor":13,"./helpers/page-scroll":14,"./helpers/serialize":15,"./helpers/utils":16,"./jquery/setup-builder-widget":17,"./model/builder":19,"./model/cell":20,"./model/history-entry":21,"./model/row":22,"./model/widget":23,"./utils/menu":24,"./view/builder":25,"./view/cell":26,"./view/dialog":27,"./view/live-editor":28,"./view/row":29,"./view/styles":30,"./view/widget":31}],19:[function(e,t,i){t.exports=Backbone.Model.extend({layoutPosition:{BEFORE:"before",AFTER:"after",REPLACE:"replace"},rows:{},defaults:{data:{widgets:[],grids:[],grid_cells:[]}},initialize:function(){this.set("rows",new panels.collection.rows)},addRow:function(e,t,i){i=_.extend({noAnimate:!1},i);var s=new panels.collection.cells(t);e=_.extend({collection:this.get("rows"),cells:s},e);var l=new panels.model.row(e);return l.builder=this,this.get("rows").add(l,i),l},loadPanelsData:function(e,t){try{t===this.layoutPosition.BEFORE?e=this.concatPanelsData(e,this.getPanelsData()):t===this.layoutPosition.AFTER&&(e=this.concatPanelsData(this.getPanelsData(),e)),this.emptyRows(),this.set("data",JSON.parse(JSON.stringify(e)),{silent:!0});var i,s=[];if(_.isUndefined(e.grid_cells))return void this.trigger("load_panels_data");for(var l=0;l<e.grid_cells.length;l++)i=parseInt(e.grid_cells[l].grid),_.isUndefined(s[i])&&(s[i]=[]),s[i].push(e.grid_cells[l]);var o=this;if(_.each(s,(function(t,i){var s={};_.isUndefined(e.grids[i].style)||(s.style=e.grids[i].style),_.isUndefined(e.grids[i].ratio)||(s.ratio=e.grids[i].ratio),_.isUndefined(e.grids[i].ratio_direction)||(s.ratio_direction=e.grids[i].ratio_direction),_.isUndefined(e.grids[i].color_label)||(s.color_label=e.grids[i].color_label),_.isUndefined(e.grids[i].label)||(s.label=e.grids[i].label),o.addRow(s,t,{noAnimate:!0})})),_.isUndefined(e.widgets))return;_.each(e.widgets,(function(e){var t=null;_.isUndefined(e.panels_info)?(t=e.info,delete e.info):(t=e.panels_info,delete e.panels_info);var i=o.get("rows").at(parseInt(t.grid)).get("cells").at(parseInt(t.cell)),s=new panels.model.widget({class:t.class,values:e});_.isUndefined(t.style)||s.set("style",t.style),_.isUndefined(t.read_only)||s.set("read_only",t.read_only),_.isUndefined(t.widget_id)?s.set("widget_id",panels.helpers.utils.generateUUID()):s.set("widget_id",t.widget_id),_.isUndefined(t.label)||s.set("label",t.label),s.cell=i,i.get("widgets").add(s,{noAnimate:!0})})),this.trigger("load_panels_data")}catch(e){console.log("Error loading data: "+e.message)}},concatPanelsData:function(e,t){if(_.isUndefined(t)||_.isUndefined(t.grids)||_.isEmpty(t.grids)||_.isUndefined(t.grid_cells)||_.isEmpty(t.grid_cells))return e;if(_.isUndefined(e)||_.isUndefined(e.grids)||_.isEmpty(e.grids))return t;var i,s=e.grids.length,l=_.isUndefined(e.widgets)?0:e.widgets.length,o={grids:[],grid_cells:[],widgets:[]};for(o.grids=e.grids.concat(t.grids),_.isUndefined(e.grid_cells)||(o.grid_cells=e.grid_cells.slice()),_.isUndefined(e.widgets)||(o.widgets=e.widgets.slice()),i=0;i<t.grid_cells.length;i++){var n=t.grid_cells[i];n.grid=parseInt(n.grid)+s,o.grid_cells.push(n)}if(!_.isUndefined(t.widgets))for(i=0;i<t.widgets.length;i++){var r=t.widgets[i];r.panels_info.grid=parseInt(r.panels_info.grid)+s,r.panels_info.id=parseInt(r.panels_info.id)+l,o.widgets.push(r)}return o},getPanelsData:function(){var e={widgets:[],grids:[],grid_cells:[]},t=0;return this.get("rows").each((function(i,s){i.get("cells").each((function(i,l){i.get("widgets").each((function(i,o){var n={class:i.get("class"),raw:i.get("raw"),grid:s,cell:l,id:t++,widget_id:i.get("widget_id"),style:i.get("style"),label:i.get("label")};_.isEmpty(n.widget_id)&&(n.widget_id=panels.helpers.utils.generateUUID());var r=_.extend(_.clone(i.get("values")),{panels_info:n});e.widgets.push(r)})),e.grid_cells.push({grid:s,index:l,weight:i.get("weight"),style:i.get("style")})})),e.grids.push({cells:i.get("cells").length,style:i.get("style"),ratio:i.get("ratio"),ratio_direction:i.get("ratio_direction"),color_label:i.get("color_label"),label:i.get("label")})})),e},refreshPanelsData:function(e){e=_.extend({silent:!1},e);var t=this.get("data"),i=this.getPanelsData();this.set("data",i,{silent:!0}),e.silent||JSON.stringify(i)===JSON.stringify(t)||(this.trigger("change"),this.trigger("change:data"),this.trigger("refresh_panels_data",i,e))},emptyRows:function(){return _.invoke(this.get("rows").toArray(),"destroy"),this.get("rows").reset(),this},isValidLayoutPosition:function(e){return e===this.layoutPosition.BEFORE||e===this.layoutPosition.AFTER||e===this.layoutPosition.REPLACE},getPanelsDataFromHtml:function(e,t){var i,s=this,l=jQuery('<div id="wrapper">'+e+"</div>");if(l.find(".panel-layout .panel-grid").length){var o={grids:[],grid_cells:[],widgets:[]},n=new RegExp(panelsOptions.siteoriginWidgetRegex,"i"),r=(i=document.createElement("div"),function(e){return e&&"string"==typeof e&&(e=(e=e.replace(/<script[^>]*>([\S\s]*?)<\/script>/gim,"")).replace(/<\/?\w(?:[^"'>]|"[^"]*"|'[^']*')*>/gim,""),i.innerHTML=e,e=i.textContent,i.textContent=""),e}),a=function(e){var t=e.find("div");if(!t.length)return e.html();for(var i=0;i<t.length-1&&t.eq(i).text().trim()==t.eq(i+1).text().trim();i++);var s=t.eq(i).find(".widget-title:header"),l="";return s.length&&(l=s.html(),s.remove()),{title:l,text:t.eq(i).html()}},d=l.find(".panel-layout").eq(0),c=function(e,t){return jQuery(t).closest(".panel-layout").is(d)};return l.find("> .panel-layout > .panel-grid").filter(c).each((function(e,i){var l=jQuery(i),d=l.find(".panel-grid-cell").filter(c);o.grids.push({cells:d.length,style:l.data("style"),ratio:l.data("ratio"),ratio_direction:l.data("ratio-direction"),color_label:l.data("color-label"),label:l.data("label")}),d.each((function(i,l){var d=jQuery(l),h=d.find(".so-panel").filter(c);o.grid_cells.push({grid:e,weight:_.isUndefined(d.data("weight"))?1:parseFloat(d.data("weight")),style:d.data("style")}),h.each((function(l,d){var c=jQuery(d),h=c.find(".panel-widget-style").length?c.find(".panel-widget-style").html():c.html(),u={grid:e,cell:i,style:c.data("style"),raw:!1,label:c.data("label")};h=h.trim();var p=n.exec(h);if(!_.isNull(p)&&""===h.replace(n,"").trim()){try{var g=/class="(.*?)"/.exec(p[3]),f=jQuery(p[5]),w=JSON.parse(r(f.val())).instance;u.class=g[1].replace(/\\\\+/g,"\\"),u.raw=!1,w.panels_info=u,o.widgets.push(w)}catch(e){u.class=t,o.widgets.push(_.extend(a(c),{filter:"1",type:"visual",panels_info:u}))}return!0}return-1!==h.indexOf("panel-layout")&&jQuery("<div>"+h+"</div>").find(".panel-layout .panel-grid").length?(u.class="SiteOrigin_Panels_Widgets_Layout",o.widgets.push({panels_data:s.getPanelsDataFromHtml(h,t),panels_info:u}),!0):(u.class=t,o.widgets.push(_.extend(a(c),{filter:"1",type:"visual",panels_info:u})),!0)}))}))})),l.find(".panel-layout").remove(),l.find("style[data-panels-style-for-post]").remove(),l.html().replace(/^\s+|\s+$/gm,"").length&&(o.grids.push({cells:1,style:{}}),o.grid_cells.push({grid:o.grids.length-1,weight:1}),o.widgets.push({filter:"1",text:l.html().replace(/^\s+|\s+$/gm,""),title:"",type:"visual",panels_info:{class:t,raw:!1,grid:o.grids.length-1,cell:0}})),o}return{grid_cells:[{grid:0,weight:1}],grids:[{cells:1}],widgets:[{filter:"1",text:e,title:"",type:"visual",panels_info:{class:t,raw:!1,grid:0,cell:0}}]}}})},{}],20:[function(e,t,i){t.exports=Backbone.Model.extend({widgets:{},row:null,defaults:{weight:0,style:{}},indexes:null,initialize:function(){this.set("widgets",new panels.collection.widgets),this.on("destroy",this.onDestroy,this)},onDestroy:function(){_.invoke(this.get("widgets").toArray(),"destroy"),this.get("widgets").reset()},clone:function(e,t){_.isUndefined(e)&&(e=this.row),t=_.extend({cloneWidgets:!0},t);var i=new this.constructor(this.attributes);return i.set("collection",e.get("cells"),{silent:!0}),i.row=e,t.cloneWidgets&&this.get("widgets").each((function(e){i.get("widgets").add(e.clone(i,t),{silent:!0})})),i}})},{}],21:[function(e,t,i){t.exports=Backbone.Model.extend({defaults:{text:"",data:"",time:null,count:1}})},{}],22:[function(e,t,i){t.exports=Backbone.Model.extend({builder:null,defaults:{style:{}},indexes:null,initialize:function(){_.isEmpty(this.get("cells"))?this.set("cells",new panels.collection.cells):this.get("cells").each(function(e){e.row=this}.bind(this)),this.on("destroy",this.onDestroy,this)},setCells:function(e){var t=this.get("cells")||new panels.collection.cells,i=[];t.each((function(s,l){var o=e.at(l);if(o)s.set("weight",o.get("weight"));else{for(var n=t.at(e.length-1),r=s.get("widgets").models.slice(),a=0;a<r.length;a++)r[a].moveToCell(n,{silent:!1});i.push(s)}})),_.each(i,(function(e){t.remove(e)})),e.length>t.length&&_.each(e.slice(t.length,e.length),function(e){e.set({collection:t}),e.row=this,t.add(e)}.bind(this)),this.reweightCells()},reweightCells:function(){var e=0,t=this.get("cells");t.each((function(t){e+=t.get("weight")})),t.each((function(t){t.set("weight",t.get("weight")/e)})),this.trigger("reweight_cells")},onDestroy:function(){_.invoke(this.get("cells").toArray(),"destroy"),this.get("cells").reset()},clone:function(e){_.isUndefined(e)&&(e=this.builder);var t=new this.constructor(this.attributes);t.set("collection",e.get("rows"),{silent:!0}),t.builder=e;var i=new panels.collection.cells;return this.get("cells").each((function(e){i.add(e.clone(t),{silent:!0})})),t.set("cells",i),t}})},{}],23:[function(e,t,i){t.exports=Backbone.Model.extend({cell:null,defaults:{class:null,missing:!1,values:{},raw:!1,style:{},read_only:!1,widget_id:""},indexes:null,initialize:function(){var e=this.get("class");!_.isUndefined(panelsOptions.widgets[e])&&panelsOptions.widgets[e].installed||this.set("missing",!0)},getWidgetField:function(e){return _.isUndefined(panelsOptions.widgets[this.get("class")])?"title"===e||"description"===e?panelsOptions.loc.missing_widget[e]:"":this.has("label")&&!_.isEmpty(this.get("label"))?this.get("label"):panelsOptions.widgets[this.get("class")][e]},moveToCell:function(e,t,i){return t=_.extend({silent:!0},t),this.cell=e,this.collection.remove(this,t),e.get("widgets").add(this,_.extend({at:i},t)),this.trigger("move_to_cell",e,i),this},setValues:function(e){var t=!1;JSON.stringify(e)!==JSON.stringify(this.get("values"))&&(t=!0),this.set("values",e,{silent:!0}),t&&(this.trigger("change",this),this.trigger("change:values"))},clone:function(e,t){_.isUndefined(e)&&(e=this.cell);var i=new this.constructor(this.attributes),s=JSON.parse(JSON.stringify(this.get("values"))),l=function(e){return _.each(e,(function(t,i){_.isString(i)&&"_"===i[0]?delete e[i]:_.isObject(e[i])&&l(e[i])})),e};return s=l(s),"SiteOrigin_Panels_Widgets_Layout"===this.get("class")&&(s.builder_id=Math.random().toString(36).substr(2)),i.set("widget_id",""),i.set("values",s,{silent:!0}),i.set("collection",e.get("widgets"),{silent:!0}),i.cell=e,i.isDuplicate=!0,i},isValidTitle:function(e){return!_.isUndefined(e)&&_.isString(e)&&""!==e&&"on"!==e&&"true"!==e&&"false"!==e&&"_"!==e[0]&&!_.isFinite(e)},cleanTitle:function(e){var t=(e=e.replace(/<\/?[^>]+(>|$)/g,"")).split(" ");return(t=t.slice(0,20)).join(" ")},getTitleFromValues:function(e,t,i=!1,s=!0){var l=!1;for(const n in e)if("object"==typeof e[n]){if(s&&(l=t.getTitleFromValues(e[n],t,i)))break}else if("object"==typeof i){for(var o=0;o<i.length;o++)if(n==i[o]){l=t.cleanTitle(e[n]);break}if(l)break}else if("object"!=typeof i&&"_"!==n.charAt(0)&&"so_sidebar_emulator_id"!==n&&"option_name"!==n&&t.isValidTitle(e[n])){l=t.cleanTitle(e[n]);break}return l},getTitle:function(){var e=panelsOptions.widgets[this.get("class")],t=[],i=!1;if(_.isUndefined(e))return this.get("class").replace(/_/g," ");if(_.isUndefined(e.panels_title))t=["title","text"];else{if(!1===e.panels_title)return panelsOptions.widgets[this.get("class")].description;t.push(e.panels_title),i=!0}var s=this.get("values"),l=!1;return(l=this.getTitleFromValues(s,this,t,void 0!==e.panels_title_check_sub_fields&&e.panels_title_check_sub_fields))||i||(l=this.getTitleFromValues(s,this)),l||this.getWidgetField("description")}})},{}],24:[function(e,t,i){var s=window.panels,l=jQuery;t.exports=Backbone.View.extend({wrapperTemplate:_.template(s.helpers.utils.processTemplate(l("#siteorigin-panels-context-menu").html())),sectionTemplate:_.template(s.helpers.utils.processTemplate(l("#siteorigin-panels-context-menu-section").html())),contexts:[],active:!1,events:{"keyup .so-search-wrapper input":"searchKeyUp"},initialize:function(){this.listenContextMenu(),this.render(),this.attach()},listenContextMenu:function(){var e=this;l(window).on("contextmenu",(function(t){return e.active&&!e.isOverEl(e.$el,t)?(e.closeMenu(),e.active=!1,t.preventDefault(),!1):!!e.active||(e.active=!1,e.trigger("activate_context",t,e),void(e.active&&(t.preventDefault(),e.openMenu({left:t.pageX,top:t.pageY}))))}))},render:function(){this.setElement(this.wrapperTemplate())},attach:function(){this.$el.appendTo("body")},openMenu:function(e){this.trigger("open_menu"),l(window).on("keyup",{menu:this},this.keyboardListen),l(window).on("click",{menu:this},this.clickOutsideListen),this.$el.css("max-height",l(window).height()-20),e.left+this.$el.outerWidth()+10>=l(window).width()&&(e.left=l(window).width()-this.$el.outerWidth()-10),e.left<=0&&(e.left=10),e.top+this.$el.outerHeight()-l(window).scrollTop()+10>=l(window).height()&&(e.top=l(window).height()+l(window).scrollTop()-this.$el.outerHeight()-10),e.left<=0&&(e.left=10),this.$el.css({left:e.left+1,top:e.top+1}).show(),this.$(".so-search-wrapper input").trigger("focus")},closeMenu:function(){this.trigger("close_menu"),l(window).off("keyup",this.keyboardListen),l(window).off("click",this.clickOutsideListen),this.active=!1,this.$el.empty().hide()},keyboardListen:function(e){var t=e.data.menu;switch(e.which){case 27:t.closeMenu()}},clickOutsideListen:function(e){var t=e.data.menu;3!==e.which&&t.$el.is(":visible")&&!t.isOverEl(t.$el,e)&&t.closeMenu()},addSection:function(e,t,i,s){var o=this;t=_.extend({display:5,defaultDisplay:!1,search:!0,sectionTitle:"",searchPlaceholder:"",titleKey:"title"},t);var n=l(this.sectionTemplate({settings:t,items:i})).attr("id","panels-menu-section-"+e);this.$el.append(n),n.find(".so-item:not(.so-confirm)").on("click",(function(){var e=l(this);s(e.data("key")),o.closeMenu()})),n.find(".so-item.so-confirm").on("click",(function(){var e=l(this);if(e.hasClass("so-confirming"))return s(e.data("key")),void o.closeMenu();e.data("original-text",e.html()).addClass("so-confirming").html('<span class="dashicons dashicons-yes"></span> '+panelsOptions.loc.dropdown_confirm),setTimeout((function(){e.removeClass("so-confirming"),e.html(e.data("original-text"))}),2500)})),n.data("settings",t).find(".so-search-wrapper input").trigger("keyup"),this.active=!0},hasSection:function(e){return this.$el.find("#panels-menu-section-"+e).length>0},searchKeyUp:function(e){var t=l(e.currentTarget),i=t.closest(".so-section"),s=i.data("settings");if(38===e.which||40===e.which){var o=i.find("ul li:visible"),n=o.filter(".so-active").eq(0);if(n.length){o.removeClass("so-active");var r=o.index(n);38===e.which?n=r-1<0?o.last():o.eq(r-1):40===e.which&&(n=r+1>=o.length?o.first():o.eq(r+1))}else 38===e.which?n=o.last():40===e.which&&(n=o.first());return n.addClass("so-active"),!1}if(13===e.which)return 1===i.find("ul li:visible").length?(i.find("ul li:visible").trigger("click"),!1):(i.find("ul li.so-active:visible").trigger("click"),!1);if(""===t.val())if(s.defaultDisplay){i.find(".so-item").hide();for(var a=0;a<s.defaultDisplay.length;a++)i.find('.so-item[data-key="'+s.defaultDisplay[a]+'"]').show()}else i.find(".so-item").show();else i.find(".so-item").hide().each((function(){var e=l(this);-1!==e.html().toLowerCase().indexOf(t.val().toLowerCase())&&e.show()}));i.find(".so-item:visible:gt("+(s.display-1)+")").hide(),0===i.find(".so-item:visible").length&&""!==t.val()?i.find(".so-no-results").show():i.find(".so-no-results").hide()},isOverEl:function(e,t){var i=[[e.offset().left,e.offset().top],[e.offset().left+e.outerWidth(),e.offset().top+e.outerHeight()]];return t.pageX>=i[0][0]&&t.pageX<=i[1][0]&&t.pageY>=i[0][1]&&t.pageY<=i[1][1]}})},{}],25:[function(e,t,i){var s=window.panels,l=jQuery;t.exports=Backbone.View.extend({config:{},template:_.template(s.helpers.utils.processTemplate(l("#siteorigin-panels-builder").html())),dialogs:{},rowsSortable:null,dataField:!1,currentData:"",contentPreview:"",attachedToEditor:!1,attachedVisible:!1,liveEditor:void 0,menu:!1,activeCell:null,events:{"click .so-tool-button.so-widget-add":"displayAddWidgetDialog","click .so-tool-button.so-row-add":"displayAddRowDialog","click .so-tool-button.so-prebuilt-add":"displayAddPrebuiltDialog","click .so-tool-button.so-history":"displayHistoryDialog","click .so-tool-button.so-live-editor":"displayLiveEditor","keyup .so-tool-button":function(e){s.helpers.accessibility.triggerClickOnEnter(e)}},rows:null,initialize:function(e){var t=this;return this.config=_.extend({loadLiveEditor:!1,liveEditorCloseAfter:!1,builderSupports:{}},e.config),this.config.builderSupports=_.extend({addRow:!0,editRow:!0,deleteRow:!0,moveRow:!0,addWidget:!0,editWidget:!0,deleteWidget:!0,moveWidget:!0,prebuilt:!0,history:!0,liveEditor:!0,revertToEditor:!0},this.config.builderSupports),e.config.loadLiveEditor&&this.on("builder_live_editor_added",(function(){this.displayLiveEditor()})),this.dialogs={widgets:new s.dialog.widgets,row:new s.dialog.row,prebuilt:new s.dialog.prebuilt},$panelsMetabox=l("#siteorigin-panels-metabox"),$panelsMetabox.length&&(this.contentPreview=l.parseHTML($panelsMetabox.data("preview-markup"))),_.each(this.dialogs,(function(e,i,s){s[i].setBuilder(t)})),this.dialogs.row.setRowDialogType("create"),this.listenTo(this.model.get("rows"),"add",this.onAddRow),l(window).on("resize",(function(e){e.target===window&&t.trigger("builder_resize")})),this.listenTo(this.model,"change:data load_panels_data",this.storeModelData),this.listenTo(this.model,"change:data load_panels_data",this.toggleWelcomeDisplay),this.on("builder_attached_to_editor",this.handleContentChange,this),this.on("content_change",this.handleContentChange,this),this.on("display_builder",this.handleDisplayBuilder,this),this.on("hide_builder",this.handleHideBuilder,this),this.on("builder_rendered builder_resize",this.handleBuilderSizing,this),this.on("display_builder",this.wrapEditorExpandAdjust,this),this.menu=new s.utils.menu({}),this.listenTo(this.menu,"activate_context",this.activateContextMenu),this.config.loadOnAttach&&this.on("builder_attached_to_editor",(function(){this.displayAttachedBuilder({confirm:!1})}),this),this},render:function(){return this.setElement(this.template()),this.$el.attr("id","siteorigin-panels-builder-"+this.cid).addClass("so-builder-container"),this.trigger("builder_rendered"),this},attach:function(e){(e=_.extend({container:!1,dialog:!1},e)).dialog?(this.dialog=new s.dialog.builder,this.dialog.builder=this):(this.$el.appendTo(e.container),this.metabox=e.container.closest(".postbox"),this.initSortable(),this.trigger("attached_to_container",e.container)),this.trigger("builder_attached"),this.supports("liveEditor")&&this.addLiveEditor(),this.supports("history")&&this.addHistoryBrowser();var t=this.$(".so-builder-toolbar"),i=this.$(".so-panels-welcome-message"),l=panelsOptions.loc.welcomeMessage,o=[];this.supports("addWidget")?o.push(l.addWidgetButton):t.find(".so-widget-add").hide(),this.supports("addRow")?o.push(l.addRowButton):t.find(".so-row-add").hide(),this.supports("prebuilt")?o.push(l.addPrebuiltButton):t.find(".so-prebuilt-add").hide();var n="";3===o.length?n=l.threeEnabled:2===o.length?n=l.twoEnabled:1===o.length?n=l.oneEnabled:0===o.length&&(n=l.addingDisabled);var r=_.template(s.helpers.utils.processTemplate(n))({items:o})+" "+l.docsMessage;return i.find(".so-message-wrapper").html(r),this},attachToEditor:function(){if("tinyMCE"!==this.config.editorType)return this;this.attachedToEditor=!0;var e=this.metabox,t=this;l("#wp-content-wrap .wp-editor-tabs").find(".wp-switch-editor").on("click",(function(e){e.preventDefault(),l("#wp-content-editor-container").show(),l("#wp-content-wrap").removeClass("panels-active"),l("#content-resize-handle").show(),t.trigger("hide_builder")})).end().append(l('<button type="button" id="content-panels" class="hide-if-no-js wp-switch-editor switch-panels">'+e.find("h2.hndle").html()+"</button>").on("click",(function(e){t.displayAttachedBuilder({confirm:!0})&&e.preventDefault()}))),this.supports("revertToEditor")&&e.find(".so-switch-to-standard").on("click keyup",(function(i){i.preventDefault(),"keyup"==i.type&&13!=i.which||confirm(panelsOptions.loc.confirm_stop_builder)&&(t.addHistoryEntry("back_to_editor"),t.model.loadPanelsData(!1),l("#wp-content-wrap").show(),e.hide(),l(window).trigger("resize"),t.attachedVisible=!1,t.trigger("hide_builder"))})).show(),e.insertAfter("#wp-content-wrap").hide().addClass("attached-to-editor");var i=this.model.get("data");_.isEmpty(i.widgets)&&_.isEmpty(i.grids)&&this.supports("revertToEditor")||this.displayAttachedBuilder({confirm:!1});var s=function(){var e=t.$(".so-builder-toolbar");if(t.$el.hasClass("so-display-narrow"))return e.css({top:0,left:0,width:"100%",position:"absolute"}),void t.$el.css("padding-top",e.outerHeight()+"px");var i=l(window).scrollTop()-t.$el.offset().top;"fixed"===l("#wpadminbar").css("position")&&(i+=l("#wpadminbar").outerHeight());var s=0,o=t.$el.outerHeight()-e.outerHeight()+20;i>s&&i<o?"fixed"!==e.css("position")&&e.css({top:l("#wpadminbar").outerHeight(),left:t.$el.offset().left+"px",width:t.$el.outerWidth()+"px",position:"fixed"}):e.css({top:Math.min(Math.max(i,0),t.$el.outerHeight()-e.outerHeight()+20)+"px",left:0,width:"100%",position:"absolute"}),t.$el.css("padding-top",e.outerHeight()+"px")};return this.on("builder_resize",s,this),l(document).on("scroll",s),s(),this.trigger("builder_attached_to_editor"),this},displayAttachedBuilder:function(e){if((e=_.extend({confirm:!0},e)).confirm){var t="undefined"!=typeof tinyMCE&&tinyMCE.get("content");if(""!==(t&&_.isFunction(t.getContent)?t.getContent():l("textarea#content").val())&&!confirm(panelsOptions.loc.confirm_use_builder))return!1}return l("#wp-content-wrap").hide(),l("#editor-expand-toggle").on("change.editor-expand",(function(){l(this).prop("checked")||l("#wp-content-wrap").hide()})),this.metabox.show().find("> .inside").show(),l(window).trigger("resize"),l(document).trigger("scroll"),this.attachedVisible=!0,this.trigger("display_builder"),!0},initSortable:function(){if(!this.supports("moveRow"))return this;var e=this,t=e.$el.attr("id"),i=l("body").attr("class").match(/branch-([0-9-]+)/)[0].replace(/\D/g,"");return this.rowsSortable=this.$(".so-rows-container:not(.sow-row-color)").sortable({appendTo:i>=59?"parent":"#wpwrap",items:".so-row-container",handle:".so-row-move",connectWith:"#"+t+".so-rows-container,.block-editor .so-rows-container",axis:"y",tolerance:"pointer",scroll:!1,remove:function(t,i){e.model.get("rows").remove(l(i.item).data("view").model,{silent:!0}),e.model.refreshPanelsData()},receive:function(t,i){e.model.get("rows").add(l(i.item).data("view").model,{silent:!0,at:l(i.item).index()}),e.model.refreshPanelsData()},stop:function(t,i){var s=l(i.item),o=s.data("view"),n=e.model.get("rows");n.get(o.model)&&(e.addHistoryEntry("row_moved"),n.remove(o.model,{silent:!0}),n.add(o.model,{silent:!0,at:s.index()}),o.trigger("move",s.index()),e.model.refreshPanelsData())}}),this},refreshSortable:function(){_.isNull(this.rowsSortable)||this.rowsSortable.sortable("refresh")},setDataField:function(e,t){if(t=_.extend({load:!0},t),this.dataField=e,this.dataField.data("builder",this),t.load&&""!==e.val()){var i=this.dataField.val();try{i=JSON.parse(i)}catch(e){console.log("Failed to parse Page Builder layout data from supplied data field."),i={}}this.setData(i)}return this},setData:function(e){this.model.loadPanelsData(e),this.currentData=e,this.toggleWelcomeDisplay()},getData:function(){return this.model.get("data")},storeModelData:function(){var e=JSON.stringify(this.model.get("data"));l(this.dataField).val()!==e&&(l(this.dataField).val(e),l(this.dataField).trigger("change"),this.trigger("content_change"))},onAddRow:function(e,t,i){i=_.extend({noAnimate:!1},i);var l=new s.view.row({model:e});l.builder=this,l.render(),_.isUndefined(i.at)||t.length<=1?l.$el.appendTo(this.$(".so-rows-container")):l.$el.insertAfter(this.$(".so-rows-container .so-row-container").eq(i.at-1)),!1===i.noAnimate&&l.visualCreate(),this.refreshSortable(),l.resizeRow(),this.trigger("row_added")},displayAddWidgetDialog:function(){this.dialogs.widgets.openDialog()},displayAddRowDialog:function(){var e=new s.model.row,t=new s.collection.cells(panelsOptions.default_columns);t.each((function(t){t.row=e})),e.set("cells",t),e.builder=this.model,this.dialogs.row.setRowModel(e),this.dialogs.row.openDialog()},displayAddPrebuiltDialog:function(){this.dialogs.prebuilt.openDialog()},displayHistoryDialog:function(){this.dialogs.history.openDialog()},pasteRowHandler:function(){var e=s.helpers.clipboard.getModel("row-model");!_.isEmpty(e)&&e instanceof s.model.row&&(this.addHistoryEntry("row_pasted"),e.builder=this.model,this.model.get("rows").add(e,{at:this.model.get("rows").indexOf(this.model)+1}),this.model.refreshPanelsData())},getActiveCell:function(e){if(e=_.extend({createCell:!0},e),!this.model.get("rows").length){if(!e.createCell)return null;this.model.addRow({},[{weight:1}],{noAnimate:!0})}var t=this.activeCell;return _.isEmpty(t)||-1===this.model.get("rows").indexOf(t.model.row)?this.model.get("rows").last().get("cells").first():t.model},addLiveEditor:function(){if(_.isEmpty(this.config.editorPreview))return this;if(this.liveEditor=new s.view.liveEditor({builder:this,previewUrl:this.config.editorPreview}),this.liveEditor.hasPreviewUrl()){var e=!1;if(s.helpers.editor.isBlockEditor())if("auto-draft"!=wp.data.select("core/editor").getEditedPostAttribute("status"))e=!0;else{l(".editor-post-save-draft").trigger("click");var t=setInterval(function(){wp.data.select("core/editor").isSavingPost()||wp.data.select("core/editor").isAutosavingPost()||!wp.data.select("core/editor").didPostSaveRequestSucceed()||(clearInterval(t),this.$(".so-builder-toolbar .so-live-editor").show())}.bind(this),250)}else e=!0;e&&this.$(".so-builder-toolbar .so-live-editor").show()}return this.trigger("builder_live_editor_added"),this},displayLiveEditor:function(){_.isUndefined(this.liveEditor)||this.liveEditor.open()},addHistoryBrowser:function(){if(_.isEmpty(this.config.editorPreview))return this;this.dialogs.history=new s.dialog.history,this.dialogs.history.builder=this,this.dialogs.history.entries.builder=this.model,this.dialogs.history.setRevertEntry(this.model),this.$(".so-builder-toolbar .so-history").show()},addHistoryEntry:function(e,t){_.isUndefined(t)&&(t=null),_.isUndefined(this.dialogs.history)||this.dialogs.history.entries.addEntry(e,t)},supports:function(e){return"rowAction"===e?this.supports("addRow")||this.supports("editRow")||this.supports("deleteRow"):"widgetAction"===e?this.supports("addWidget")||this.supports("editWidget")||this.supports("deleteWidget"):!_.isUndefined(this.config.builderSupports[e])&&this.config.builderSupports[e]},handleContentChange:function(){if(panelsOptions.copy_content&&(s.helpers.editor.isBlockEditor()||s.helpers.editor.isClassicEditor(this))){var e=this.model.getPanelsData();_.isEmpty(e.widgets)||l.post(panelsOptions.ajaxurl,{action:"so_panels_builder_content_json",panels_data:JSON.stringify(e),post_id:this.config.postId},function(e){this.contentPreview&&""!==e.post_content&&this.updateEditorContent(e.post_content),""!==e.preview&&(this.contentPreview=e.preview)}.bind(this))}},updateEditorContent:function(e){if("tinyMCE"!==this.config.editorType||"undefined"==typeof tinyMCE||_.isNull(tinyMCE.get("content"))){l(this.config.editorId).val(e).trigger("change").trigger("keyup")}else{var t=tinyMCE.get("content");t.setContent(e),t.fire("change"),t.fire("keyup")}this.triggerSeoChange()},triggerSeoChange:function(){"undefined"==typeof YoastSEO||_.isNull(YoastSEO)||_.isNull(YoastSEO.app.refresh)||YoastSEO.app.refresh(),"undefined"==typeof rankMathEditor||_.isNull(rankMathEditor)||_.isNull(rankMathEditor.refresh)||rankMathEditor.refresh("content")},handleDisplayBuilder:function(){var e="undefined"!=typeof tinyMCE&&tinyMCE.get("content"),t=e&&_.isFunction(e.getContent)?e.getContent():l("textarea#content").val();if((_.isEmpty(this.model.get("data"))||_.isEmpty(this.model.get("data").widgets)&&_.isEmpty(this.model.get("data").grids))&&""!==t){var i=panelsOptions.text_widget;if(_.isEmpty(i))return;this.model.loadPanelsData(this.model.getPanelsDataFromHtml(t,i)),this.model.trigger("change"),this.model.trigger("change:data")}l("#post-status-info").addClass("for-siteorigin-panels")},handleHideBuilder:function(){l("#post-status-info").show().removeClass("for-siteorigin-panels")},wrapEditorExpandAdjust:function(){try{for(var e,t=(l.hasData(window)&&l._data(window)).events.scroll,i=0;i<t.length;i++)if("editor-expand"===t[i].namespace){e=t[i],l(window).off("scroll",e.handler),l(window).on("scroll",function(t){this.attachedVisible||e.handler(t)}.bind(this));break}}catch(e){return}},handleBuilderSizing:function(){var e=this.$el.width();return e?(e<575?this.$el.addClass("so-display-narrow"):this.$el.removeClass("so-display-narrow"),this):this},setDialogParents:function(e,t){_.each(this.dialogs,(function(i,s,l){l[s].setParent(e,t)})),this.on("add_dialog",(function(i){i.setParent(e,t)}),this)},toggleWelcomeDisplay:function(){this.model.get("rows").isEmpty()?this.$(".so-panels-welcome-message").show():this.$(".so-panels-welcome-message").hide()},activateContextMenu:function(e,t){if(l.contains(this.$el.get(0),e.target)){var i=l([]).add(this.$(".so-panels-welcome-message:visible")).add(this.$(".so-rows-container > .so-row-container")).add(this.$(".so-cells > .cell")).add(this.$(".cell-wrapper > .so-widget")).filter((function(i){return t.isOverEl(l(this),e)})),s=i.last().data("view");void 0!==s&&void 0!==s.buildContextualMenu?s.buildContextualMenu(e,t):i.last().hasClass("so-panels-welcome-message")&&this.buildContextualMenu(e,t)}},buildContextualMenu:function(e,t){var i={};this.supports("addRow")&&(i.add_row={title:panelsOptions.loc.contextual.add_row}),s.helpers.clipboard.canCopyPaste()&&s.helpers.clipboard.isModel("row-model")&&this.supports("addRow")&&(i.paste_row={title:panelsOptions.loc.contextual.row_paste}),_.isEmpty(i)||t.addSection("builder-actions",{sectionTitle:panelsOptions.loc.contextual.row_actions,search:!1},i,function(e){switch(e){case"add_row":this.displayAddRowDialog();break;case"paste_row":this.pasteRowHandler()}}.bind(this))}})},{}],26:[function(e,t,i){var s=window.panels,l=jQuery;t.exports=Backbone.View.extend({template:_.template(s.helpers.utils.processTemplate(l("#siteorigin-panels-builder-cell").html())),events:{"click .cell-wrapper":"handleCellClick"},row:null,widgetSortable:null,initialize:function(){this.listenTo(this.model.get("widgets"),"add",this.onAddWidget)},render:function(){var e={weight:this.model.get("weight"),totalWeight:this.row.model.get("cells").totalWeight()};this.setElement(this.template(e)),this.$el.data("view",this);var t=this;return this.model.get("widgets").each((function(e){var i=new s.view.widget({model:e});i.cell=t,i.render(),i.$el.appendTo(t.$(".widgets-container"))})),this.initSortable(),this.initResizable(),this},initSortable:function(){if(!this.row.builder.supports("moveWidget"))return this;var e=this,t=e.row.builder,i=t.$el.attr("id"),s=t.model;return this.widgetSortable=this.$(".widgets-container").sortable({placeholder:"so-widget-sortable-highlight",connectWith:"#"+i+" .so-cells .cell .widgets-container,.block-editor .so-cells .cell .widgets-container",tolerance:"pointer",scroll:!1,over:function(t,i){e.row.builder.trigger("widget_sortable_move")},remove:function(t,i){e.model.get("widgets").remove(l(i.item).data("view").model,{silent:!0}),s.refreshPanelsData()},receive:function(t,i){var o=l(i.item).data("view");o.cell=e;var n=o.model;n.cell=e.model,e.model.get("widgets").add(n,{silent:!0,at:l(i.item).index()}),s.refreshPanelsData()},stop:function(t,i){var o=l(i.item),n=o.data("view"),r=o.closest(".cell").data("view");e.model.get("widgets").get(n.model)&&(e.row.builder.addHistoryEntry("widget_moved"),n.model.moveToCell(r.model,{},o.index()),n.cell=r,s.refreshPanelsData())},helper:function(e,t){var i=t.clone().css({width:t.outerWidth()+"px","z-index":1e4,position:"fixed"}).addClass("widget-being-dragged").appendTo("body");return t.outerWidth()>720&&i.animate({"margin-left":e.pageX-t.offset().left-240,width:480},"fast"),i}}),this},refreshSortable:function(){_.isNull(this.widgetSortable)||this.widgetSortable.sortable("refresh")},initResizable:function(){if(!this.row.builder.supports("editRow"))return this;var e,t=this.$(".resize-handle").css("position","absolute"),i=this.row.$el,s=this;return t.draggable({axis:"x",containment:i,start:function(t,i){if(e=s.$el.prev().data("view"),!_.isUndefined(e)){var o=s.$el.clone().appendTo(i.helper).css({position:"absolute",top:"0",width:s.$el.outerWidth(),left:5,height:s.$el.outerHeight()});o.find(".resize-handle").remove();var n=e.$el.clone().appendTo(i.helper).css({position:"absolute",top:"0",width:e.$el.outerWidth()+"px",right:5,height:e.$el.outerHeight()+"px"});n.find(".resize-handle").remove(),l(this).data({newCellClone:o,prevCellClone:n})}},drag:function(i,o){var n=s.row.$el.width()+10,r=s.model.get("weight")-(o.position.left+t.outerWidth()/2)/n,a=e.model.get("weight")+(o.position.left+t.outerWidth()/2)/n;l(this).data("newCellClone").css("width",n*r+"px").find(".preview-cell-weight").html(Math.round(1e3*r)/10),l(this).data("prevCellClone").css("width",n*a+"px").find(".preview-cell-weight").html(Math.round(1e3*a)/10)},stop:function(i,o){l(this).data("newCellClone").remove(),l(this).data("prevCellClone").remove();var n=s.row.$el.width()+10,r=s.model.get("weight")-(o.position.left+t.outerWidth()/2)/n,a=e.model.get("weight")+(o.position.left+t.outerWidth()/2)/n;r>.02&&a>.02&&(s.row.builder.addHistoryEntry("cell_resized"),s.model.set("weight",r),e.model.set("weight",a),s.row.resizeRow()),o.helper.css("left",-t.outerWidth()/2+"px"),s.row.builder.model.refreshPanelsData()}}),this},onAddWidget:function(e,t,i){i=_.extend({noAnimate:!1},i);var l=new s.view.widget({model:e});l.cell=this,_.isUndefined(e.isDuplicate)&&(e.isDuplicate=!1),l.render({loadForm:e.isDuplicate}),_.isUndefined(i.at)||t.length<=1?l.$el.appendTo(this.$(".widgets-container")):l.$el.insertAfter(this.$(".widgets-container .so-widget").eq(i.at-1)),!1===i.noAnimate&&l.visualCreate(),this.refreshSortable(),this.row.resizeRow(),this.row.builder.trigger("widget_added",l)},handleCellClick:function(e){this.row.builder.$el.find(".so-cells .cell").removeClass("cell-selected"),this.row.builder.activeCell!==this||this.model.get("widgets").length?(this.$el.addClass("cell-selected"),this.row.builder.activeCell=this):this.row.builder.activeCell=null},pasteHandler:function(){var e=s.helpers.clipboard.getModel("widget-model");!_.isEmpty(e)&&e instanceof s.model.widget&&(this.row.builder.addHistoryEntry("widget_pasted"),e.cell=this.model,this.model.get("widgets").add(e),this.row.builder.model.refreshPanelsData())},buildContextualMenu:function(e,t){var i=this;t.hasSection("add-widget-below")||t.addSection("add-widget-cell",{sectionTitle:panelsOptions.loc.contextual.add_widget_cell,searchPlaceholder:panelsOptions.loc.contextual.search_widgets,defaultDisplay:panelsOptions.contextual.default_widgets},panelsOptions.widgets,(function(e){i.row.builder.trigger("before_user_adds_widget"),i.row.builder.addHistoryEntry("widget_added");var t=new s.model.widget({class:e});t.cell=i.model,t.cell.get("widgets").add(t),i.row.builder.model.refreshPanelsData(),i.row.builder.trigger("after_user_adds_widget",t)}));var l={};this.row.builder.supports("addWidget")&&s.helpers.clipboard.isModel("widget-model")&&(l.paste={title:panelsOptions.loc.contextual.cell_paste_widget}),_.isEmpty(l)||t.addSection("cell-actions",{sectionTitle:panelsOptions.loc.contextual.cell_actions,search:!1},l,function(e){switch(e){case"paste":this.pasteHandler()}this.row.builder.model.refreshPanelsData()}.bind(this)),this.row.buildContextualMenu(e,t)}})},{}],27:[function(e,t,i){var s=window.panels,l=jQuery;t.exports=Backbone.View.extend({dialogTemplate:_.template(s.helpers.utils.processTemplate(l("#siteorigin-panels-dialog").html())),dialogTabTemplate:_.template(s.helpers.utils.processTemplate(l("#siteorigin-panels-dialog-tab").html())),tabbed:!1,rendered:!1,builder:!1,className:"so-panels-dialog-wrapper",dialogClass:"",dialogIcon:"",parentDialog:!1,dialogOpen:!1,editableLabel:!1,events:{"click .so-close":"closeDialog","keyup .so-close":function(e){s.helpers.accessibility.triggerClickOnEnter(e)},"click .so-nav.so-previous":"navToPrevious","keyup .so-nav.so-previous":function(e){s.helpers.accessibility.triggerClickOnEnter(e)},"click .so-nav.so-next":"navToNext","keyup .so-nav.so-next":function(e){s.helpers.accessibility.triggerClickOnEnter(e)}},initialize:function(){this.once("open_dialog",this.render),this.once("open_dialog",this.attach),this.once("open_dialog",this.setDialogClass),this.trigger("initialize_dialog",this),_.isUndefined(this.initializeDialog)||this.initializeDialog(),_.bindAll(this,"initSidebars","hasSidebar","onResize","toggleLeftSideBar","toggleRightSideBar")},getNextDialog:function(){return null},getPrevDialog:function(){return null},setDialogClass:function(){""!==this.dialogClass&&this.$(".so-panels-dialog").addClass(this.dialogClass)},setBuilder:function(e){return this.builder=e,e.trigger("add_dialog",this,this.builder),this},attach:function(){return this.$el.appendTo("body"),this},parseDialogContent:function(e,t){t=_.extend({cid:this.cid},t);var i=l(_.template(s.helpers.utils.processTemplate(e))(t)),o={title:i.find(".title").html(),buttons:i.find(".buttons").html(),content:i.find(".content").html()};return i.has(".left-sidebar")&&(o.left_sidebar=i.find(".left-sidebar").html()),i.has(".right-sidebar")&&(o.right_sidebar=i.find(".right-sidebar").html()),o},renderDialog:function(e){if(e=_.extend({editableLabel:this.editableLabel,dialogIcon:this.dialogIcon},e),this.$el.html(this.dialogTemplate(e)).hide(),this.$el.data("view",this),this.$el.addClass("so-panels-dialog-wrapper"),!1!==this.parentDialog){var t=l('<h3 class="so-parent-link"></h3>').html(this.parentDialog.text+'<div class="so-separator"></div>');t.on("click",function(e){e.preventDefault(),this.closeDialog(),this.parentDialog.dialog.openDialog()}.bind(this)),this.$(".so-title-bar .so-title").before(t)}return this.$(".so-title-bar .so-title-editable").length&&this.initEditableLabel(),setTimeout(this.initSidebars,1),this},initSidebars:function(){var e=this.$(".so-show-left-sidebar").hide(),t=this.$(".so-show-right-sidebar").hide(),i=this.hasSidebar("left"),s=this.hasSidebar("right");(i||s)&&(l(window).on("resize",this.onResize),i&&(e.show(),e.on("click",this.toggleLeftSideBar)),s&&(t.show(),t.on("click",this.toggleRightSideBar))),this.onResize()},initTabs:function(){var e=this.$(".so-sidebar-tabs li a");if(0===e.length)return this;var t=this;return e.on("click",(function(e){e.preventDefault();var i=l(this);t.$(".so-sidebar-tabs li").removeClass("tab-active"),t.$(".so-content .so-content-tabs > *").hide(),i.parent().addClass("tab-active");var s=i.attr("href");if(!_.isUndefined(s)&&"#"===s.charAt(0)){var o=s.split("#")[1];t.$(".so-content .so-content-tabs .tab-"+o).show()}t.trigger("tab_click",i)})),this.$(".so-sidebar-tabs li a").first().trigger("click"),this},initToolbar:function(){this.$(".so-toolbar .so-buttons .so-toolbar-button").on("click keyup",function(e){e.preventDefault(),"keyup"==e.type&&13!=e.which||this.trigger("button_click",l(e.currentTarget))}.bind(this)),this.$(".so-toolbar .so-buttons .so-dropdown-button").on("click",function(e){e.preventDefault();var t=l(e.currentTarget).siblings(".so-dropdown-links-wrapper");t.is(".hidden")?t.removeClass("hidden"):t.addClass("hidden")}.bind(this)),l("html").on("click",function(e){this.$(".so-dropdown-links-wrapper").not(".hidden").each((function(t,i){var s=l(i),o=l(e.target);0!==o.length&&(o.is(".so-needs-confirm")&&!o.is(".so-confirmed")||o.is(".so-dropdown-button"))||s.addClass("hidden")}))}.bind(this))},initEditableLabel:function(){var e=this.$(".so-title-bar .so-title-editable");e.on("keypress",(function(t){var i="keypress"===t.type&&13===t.keyCode;if(i){var s=l(":tabbable"),o=s.index(e);s.eq(o+1).trigger("focus"),window.getSelection().removeAllRanges()}return!i})).on("blur",function(){var t=e.text().replace(/^\s+|\s+$/gm,"");t!==e.data("original-value").replace(/^\s+|\s+$/gm,"")&&(e.text(t),this.trigger("edit_label",t))}.bind(this)).on("focus",(function(){e.data("original-value",e.text()),s.helpers.utils.selectElementContents(this)}))},setupDialog:function(){this.openDialog(),this.closeDialog()},refreshDialogNav:function(){this.$(".so-title-bar .so-nav").show().removeClass("so-disabled");var e=this.getNextDialog(),t=this.$(".so-title-bar .so-next"),i=this.getPrevDialog(),s=this.$(".so-title-bar .so-previous");null===e?t.hide():!1===e?(t.addClass("so-disabled"),t.attr("tabindex",-1)):t.attr("tabindex",0),null===i?s.hide():!1===i?(s.addClass("so-disabled"),s.attr("tabindex",-1)):s.attr("tabindex",0)},openDialog:function(e){(e=_.extend({silent:!1},e)).silent||this.trigger("open_dialog"),this.dialogOpen=!0,this.refreshDialogNav(),s.helpers.pageScroll.lock(),this.onResize(),this.$el.show(),e.silent||(this.trigger("open_dialog_complete"),this.builder.trigger("open_dialog",this),l(document).trigger("open_dialog",this))},closeDialog:function(e){(e=_.extend({silent:!1},e)).silent||this.trigger("close_dialog"),this.dialogOpen=!1,this.$el.hide(),s.helpers.pageScroll.unlock(),e.silent||(this.trigger("close_dialog_complete"),this.builder.trigger("close_dialog",this))},navToPrevious:function(){this.closeDialog();var e=this.getPrevDialog();null!==e&&!1!==e&&e.openDialog()},navToNext:function(){this.closeDialog();var e=this.getNextDialog();null!==e&&!1!==e&&e.openDialog()},getFormValues:function(e){_.isUndefined(e)&&(e=".so-content");var t,i=this.$(e),s={};return i.find("[name]").each((function(){var e=l(this);try{var i=/([A-Za-z_]+)\[(.*)\]/.exec(e.attr("name"));if(_.isEmpty(i))return!0;_.isUndefined(i[2])?t=e.attr("name"):(t=i[2].split("][")).unshift(i[1]),t=t.map((function(e){return!isNaN(parseFloat(e))&&isFinite(e)?parseInt(e):e}));var o=s,n=null,r=!!_.isString(e.attr("type"))&&e.attr("type").toLowerCase();if("checkbox"===r)n=e.is(":checked")?""===e.val()||e.val():null;else if("radio"===r){if(!e.is(":checked"))return;n=e.val()}else if("SELECT"===e.prop("tagName")){var a=e.find("option:selected");1===a.length?n=e.find("option:selected").val():a.length>1&&(n=_.map(e.find("option:selected"),(function(e,t){return l(e).val()})))}else n=e.val();if(!_.isUndefined(e.data("panels-filter")))switch(e.data("panels-filter")){case"json_parse":try{n=JSON.parse(n)}catch(e){n=""}}if(e.parents(".acf-repeater").length){if(""==n)return;t.slice(t[2],t.length)}if(null!==n)for(var d=0;d<t.length;d++)d===t.length-1?""===t[d]?o.push(n):o[t[d]]=n:(_.isUndefined(o[t[d]])&&(""===t[d+1]?o[t[d]]=[]:o[t[d]]={}),o=o[t[d]])}catch(t){console.log("Field ["+e.attr("name")+"] could not be processed and was skipped - "+t.message)}})),s},setStatusMessage:function(e,t,i){var s=i?'<span class="dashicons dashicons-warning"></span>'+e:e;this.$(".so-toolbar .so-status").html(s),!_.isUndefined(t)&&t?this.$(".so-toolbar .so-status").addClass("so-panels-loading"):this.$(".so-toolbar .so-status").removeClass("so-panels-loading")},setParent:function(e,t){this.parentDialog={text:e,dialog:t}},onResize:function(){var e=window.matchMedia("(max-width: 980px)");["left","right"].forEach(function(t){var i=this.$(".so-"+t+"-sidebar"),s=this.$(".so-show-"+t+"-sidebar");this.hasSidebar(t)?(s.hide(),e.matches?(s.show(),s.closest(".so-title-bar").addClass("so-has-"+t+"-button"),i.hide(),i.closest(".so-panels-dialog").removeClass("so-panels-dialog-has-"+t+"-sidebar")):(s.hide(),s.closest(".so-title-bar").removeClass("so-has-"+t+"-button"),i.show(),i.closest(".so-panels-dialog").addClass("so-panels-dialog-has-"+t+"-sidebar"))):(i.hide(),s.hide())}.bind(this))},hasSidebar:function(e){return this.$(".so-"+e+"-sidebar").children().length>0},toggleLeftSideBar:function(){this.toggleSidebar("left")},toggleRightSideBar:function(){this.toggleSidebar("right")},toggleSidebar:function(e){var t=this.$(".so-"+e+"-sidebar");t.is(":visible")?t.hide():t.show()}})},{}],28:[function(e,t,i){var s=window.panels,l=jQuery;t.exports=Backbone.View.extend({template:_.template(s.helpers.utils.processTemplate(l("#siteorigin-panels-live-editor").html())),previewScrollTop:0,loadTimes:[],previewFrameId:1,previewUrl:null,previewIframe:null,events:{"click .live-editor-close":"close","click .live-editor-save":"closeAndSave","click .live-editor-collapse":"collapse","click .live-editor-mode":"mobileToggle","keyup .live-editor-mode":function(e){s.helpers.accessibility.triggerClickOnEnter(e)}},initialize:function(e){e=_.extend({builder:!1,previewUrl:!1},e),_.isEmpty(e.previewUrl)&&(e.previewUrl=panelsOptions.ajaxurl+"&action=so_panels_live_editor_preview"),this.builder=e.builder,this.previewUrl=e.previewUrl,this.listenTo(this.builder.model,"refresh_panels_data",this.handleRefreshData),this.listenTo(this.builder.model,"load_panels_data",this.handleLoadData)},render:function(){if(this.setElement(this.template()),this.$el.hide(),l("#submitdiv #save-post").length>0){var e=this.$el.find(".live-editor-save");e.text(e.data("save"))}var t=!1;l(document).on("mousedown",(function(){t=!0})).on("mouseup",(function(){t=!1}));var i=this;return this.$el.on("mouseenter focusin",".so-widget",(function(){var e=l(this).data("live-editor-preview-widget");t||void 0===e||!e.length||i.$(".so-preview-overlay").is(":visible")||(i.highlightElement(e),i.scrollToElement(e))})),this.$el.on("mouseleave focusout",".so-widget",function(){this.resetHighlights()}.bind(this)),this.listenTo(this.builder,"open_dialog",(function(){this.resetHighlights()})),this},attach:function(){this.$el.appendTo("body")},open:function(){if(""===this.$el.html()&&this.render(),0===this.$el.closest("body").length&&this.attach(),s.helpers.pageScroll.lock(),this.$el.is(":visible"))return this;if(this.$el.show(),this.refreshPreview(this.builder.model.getPanelsData()),l(".live-editor-close").trigger("focus"),this.originalContainer=this.builder.$el.parent(),this.builder.$el.appendTo(this.$(".so-live-editor-builder")),this.builder.$(".so-tool-button.so-live-editor").hide(),this.builder.trigger("builder_resize"),"auto-draft"===l("#original_post_status").val()&&!this.autoSaved){var e=this;wp.autosave&&(""===l('#title[name="post_title"]').val()&&l('#title[name="post_title"]').val(panelsOptions.loc.draft).trigger("keydown"),l(document).one("heartbeat-tick.autosave",(function(){e.autoSaved=!0,e.refreshPreview(e.builder.model.getPanelsData())})),wp.autosave.server.triggerSave())}},close:function(e=!0){return this.$el.is(":visible")?e&&this.builder.config.liveEditorCloseAfter?(l("#wp-admin-bar-view a")[0].click(),this):(this.$el.hide(),s.helpers.pageScroll.unlock(),this.builder.$el.appendTo(this.originalContainer),this.builder.$(".so-tool-button.so-live-editor").show(),void this.builder.trigger("builder_resize")):this},closeAndSave:function(){this.close(!1),l(".block-editor-page").length?l(".editor-post-publish-button")[0].click():l('#submitdiv input[type="submit"][name="save"]')[0].click()},collapse:function(){this.$el.toggleClass("so-collapsed")},highlightElement:function(e){_.isUndefined(this.resetHighlightTimeout)||clearTimeout(this.resetHighlightTimeout),this.previewIframe.contents().find("body").find(".panel-grid .panel-grid-cell .so-panel").filter((function(){return 0===l(this).parents(".so-panel").length})).not(e).addClass("so-panels-faded"),e.removeClass("so-panels-faded").addClass("so-panels-highlighted")},resetHighlights:function(){var e=this.previewIframe.contents().find("body");this.resetHighlightTimeout=setTimeout((function(){e.find(".panel-grid .panel-grid-cell .so-panel").removeClass("so-panels-faded so-panels-highlighted")}),100)},scrollToElement:function(e){this.$(".so-preview iframe")[0].contentWindow.liveEditorScrollTo(e)},handleRefreshData:function(e){if(!this.$el.is(":visible"))return this;this.refreshPreview(e)},handleLoadData:function(){if(!this.$el.is(":visible"))return this;this.refreshPreview(this.builder.model.getPanelsData())},refreshPreview:function(e){var t=this.loadTimes.length?_.reduce(this.loadTimes,(function(e,t){return e+t}),0)/this.loadTimes.length:1e3;_.isNull(this.previewIframe)||this.$(".so-preview-overlay").is(":visible")||(this.previewScrollTop=this.previewIframe.contents().scrollTop()),this.$(".so-preview-overlay").show(),this.$(".so-preview-overlay .so-loading-bar").clearQueue().css("width","0%").animate({width:"100%"},parseInt(t)+100),this.postToIframe({live_editor_panels_data:JSON.stringify(e),live_editor_post_ID:this.builder.config.postId},this.previewUrl,this.$(".so-preview")),this.previewIframe.data("load-start",(new Date).getTime())},postToIframe:function(e,t,i){_.isNull(this.previewIframe)||this.previewIframe.remove();var s="siteorigin-panels-live-preview-"+this.previewFrameId;this.previewIframe=l('<iframe src="'+t+'"></iframe>').attr({id:s,name:s}).appendTo(i),this.setupPreviewFrame(this.previewIframe);var o=l('<form id="soPostToPreviewFrame" method="post"></form>').attr({id:s,target:this.previewIframe.attr("id"),action:t}).appendTo("body");return l.each(e,(function(e,t){l('<input type="hidden" />').attr({name:e,value:t}).appendTo(o)})),o.trigger("submit").remove(),this.previewFrameId++,this.previewIframe},setupPreviewFrame:function(e){var t=this;e.data("iframeready",!1).on("iframeready",(function(){var e=l(this),i=e.contents();if(!e.data("iframeready")){e.data("iframeready",!0),void 0!==e.data("load-start")&&(t.loadTimes.unshift((new Date).getTime()-e.data("load-start")),_.isEmpty(t.loadTimes)||(t.loadTimes=t.loadTimes.slice(0,4))),l(".live-editor-mode.so-active").length&&(l(".so-panels-live-editor .so-preview iframe").css("transition","none"),t.mobileToggle()),setTimeout((function(){i.scrollTop(t.previewScrollTop),t.$(".so-preview-overlay").hide(),l(".so-panels-live-editor .so-preview iframe").css("transition","all .2s ease")}),100);var s=i.find("#pl-"+t.builder.config.postId);s.find(".panel-grid .panel-grid-cell .so-panel").filter((function(){return l(this).closest(".panel-layout").is(s)})).each((function(e,i){var s=l(i),o=t.$(".so-live-editor-builder .so-widget").eq(s.data("index"));o.data("live-editor-preview-widget",s),s.css({cursor:"pointer"}).on("mouseenter",(function(){o.parent().addClass("so-hovered"),t.highlightElement(s)})).on("mouseleave",(function(){o.parent().removeClass("so-hovered"),t.resetHighlights()})).on("click",(function(e){e.preventDefault(),o.find(".title h4").trigger("click")}))})),i.find("a").css({"pointer-events":"none"}).on("click",(function(e){e.preventDefault()}))}})).on("load",(function(){var e=l(this);e.data("iframeready")||e.trigger("iframeready")}))},hasPreviewUrl:function(){return""!==this.$("form.live-editor-form").attr("action")},mobileToggle:function(e){var t=l(void 0!==e?e.currentTarget:".live-editor-mode.so-active");this.$(".live-editor-mode").not(t).removeClass("so-active"),t.addClass("so-active"),this.$el.removeClass("live-editor-desktop-mode live-editor-tablet-mode live-editor-mobile-mode").addClass("live-editor-"+t.data("mode")+"-mode").find("iframe").css("width",t.data("width"))}})},{}],29:[function(e,t,i){var s=window.panels,l=jQuery;t.exports=Backbone.View.extend({template:_.template(s.helpers.utils.processTemplate(l("#siteorigin-panels-builder-row").html())),events:{"click .so-row-settings":"editSettingsHandler","click .so-row-duplicate":"duplicateHandler","click .so-row-delete":"confirmedDeleteHandler","click .so-row-color":"rowColorChangeHandler"},builder:null,dialog:null,initialize:function(){var e=this.model.get("cells");this.listenTo(e,"add",this.handleCellAdd),this.listenTo(e,"remove",this.handleCellRemove),this.listenTo(this.model,"reweight_cells",this.resizeRow),this.listenTo(this.model,"destroy",this.onModelDestroy);var t=this;e.each((function(e){t.listenTo(e.get("widgets"),"add",t.resize)})),e.on("add",(function(e){t.listenTo(e.get("widgets"),"add",t.resize)}),this),this.listenTo(this.model,"change:label",this.onLabelChange),this.listenTo(this.model,"change:styles-row ",this.toggleVisibilityFade)},render:function(){var e=this.model.has("color_label")?this.model.get("color_label"):1,t=this.model.has("label")?this.model.get("label"):"";this.setElement(this.template({rowColorLabel:e,rowLabel:t})),this.$el.data("view",this);var i=this;return this.model.get("cells").each((function(e){var t=new s.view.cell({model:e});t.row=i,t.render(),t.$el.appendTo(i.$(".so-cells"))})),this.builder.supports("rowAction")?(this.builder.supports("editRow")||(this.$(".so-row-toolbar .so-dropdown-links-wrapper .so-row-settings").parent().remove(),this.$el.addClass("so-row-no-edit")),this.builder.supports("addRow")||(this.$(".so-row-toolbar .so-dropdown-links-wrapper .so-row-duplicate").parent().remove(),this.$el.addClass("so-row-no-duplicate")),this.builder.supports("deleteRow")||(this.$(".so-row-toolbar .so-dropdown-links-wrapper .so-row-delete").parent().remove(),this.$el.addClass("so-row-no-delete"))):(this.$(".so-row-toolbar .so-dropdown-wrapper").remove(),this.$el.addClass("so-row-no-actions")),this.builder.supports("moveRow")||(this.$(".so-row-toolbar .so-row-move").remove(),this.$el.addClass("so-row-no-move")),this.$(".so-row-toolbar").html().trim().length||this.$(".so-row-toolbar").remove(),this.toggleVisibilityFade(),this.listenTo(this.builder,"widget_sortable_move",this.resizeRow),this.listenTo(this.builder,"builder_resize",this.resizeRow),this.resizeRow(),this},checkIfStyleExists:function(e,t){return void 0!==e[t]&&"on"==e[t]},toggleVisibilityFade:function(){var e=this.model.attributes.style;void 0!==e&&(this.checkIfStyleExists(e,"disable_row")||this.checkIfStyleExists(e,"disable_desktop")||this.checkIfStyleExists(e,"disable_tablet")||this.checkIfStyleExists(e,"disable_mobile")||this.checkIfStyleExists(e,"disable_logged_in")||this.checkIfStyleExists(e,"disable_logged_out")?this.$el.addClass("so-hidden-row"):this.$el.removeClass("so-hidden-row"))},visualCreate:function(){this.$el.hide().fadeIn("fast")},resizeRow:function(e){if(this.$el.is(":visible")){this.$(".so-cells .cell-wrapper").css("min-height",0),this.$(".so-cells .resize-handle").css("height",0),this.$(".so-cells").removeClass("so-action-icons");var t,i=0,s=0,o=!1;this.$(".so-cells .cell").each((function(){t=l(this),l(this).css("width",100*t.data("view").model.get("weight")+"%"),(s=t.width())<215?(t.addClass("so-show-icon"),o=!0,s<125?t.addClass("so-small-actions"):t.removeClass("so-small-actions")):t.removeClass("so-show-icon so-small-actions"),i=Math.max(i,t.height())})),this.$(".so-cells .cell-wrapper").css("min-height",Math.max(i,63)+"px"),o&&this.$(".so-cells").addClass("so-action-icons"),this.$(".so-cells .resize-handle").css("height",this.$(".so-cells .cell-wrapper").outerHeight()+"px")}},onModelDestroy:function(){this.remove()},visualDestroyModel:function(){this.builder.addHistoryEntry("row_deleted");var e=this;this.$el.fadeOut("normal",(function(){e.model.destroy(),e.builder.model.refreshPanelsData()}))},onLabelChange:function(e,t){0==this.$(".so-row-label").length?this.$(".so-row-toolbar").prepend('<h3 class="so-row-label">'+t+"</h3>"):this.$(".so-row-label").text(t)},duplicateHandler:function(){this.builder.addHistoryEntry("row_duplicated");var e=this.model.clone(this.builder.model);this.builder.model.get("rows").add(e,{at:this.builder.model.get("rows").indexOf(this.model)+1}),this.builder.model.refreshPanelsData()},copyHandler:function(){s.helpers.clipboard.setModel(this.model)},pasteHandler:function(){var e=s.helpers.clipboard.getModel("row-model");!_.isEmpty(e)&&e instanceof s.model.row&&(this.builder.addHistoryEntry("row_pasted"),e.builder=this.builder.model,this.builder.model.get("rows").add(e,{at:this.builder.model.get("rows").indexOf(this.model)+1}),this.builder.model.refreshPanelsData())},confirmedDeleteHandler:function(e){var t=l(e.target);if(t.hasClass("dashicons")&&(t=t.parent()),t.hasClass("so-confirmed"))this.visualDestroyModel();else{var i=t.html();t.addClass("so-confirmed").html('<span class="dashicons dashicons-yes"></span>'+panelsOptions.loc.dropdown_confirm),setTimeout((function(){t.removeClass("so-confirmed").html(i)}),2500)}},editSettingsHandler:function(){if(this.builder.supports("editRow"))return null===this.dialog&&(this.dialog=new s.dialog.row,this.dialog.setBuilder(this.builder).setRowModel(this.model),this.dialog.rowView=this),this.dialog.openDialog(),this},deleteHandler:function(){return this.model.destroy(),this},rowColorChangeHandler:function(e){this.$(".so-row-color").removeClass("so-row-color-selected");var t=l(e.target),i=t.data("color-label"),s=this.model.has("color_label")?this.model.get("color_label"):1;t.addClass("so-row-color-selected"),this.$el.removeClass("so-row-color-"+s),this.$el.addClass("so-row-color-"+i),this.model.set("color_label",i)},handleCellAdd:function(e){var t=new s.view.cell({model:e});t.row=this,t.render(),t.$el.appendTo(this.$(".so-cells"))},handleCellRemove:function(e){this.$(".so-cells > .cell").each((function(){var t=l(this).data("view");_.isUndefined(t)||t.model.cid===e.cid&&t.remove()}))},buildContextualMenu:function(e,t){for(var i=[],l=1;l<5;l++)i.push({title:l+" "+panelsOptions.loc.contextual.column});this.builder.supports("addRow")&&t.addSection("add-row",{sectionTitle:panelsOptions.loc.contextual.add_row,search:!1},i,function(e){this.builder.addHistoryEntry("row_added");for(var t=Number(e)+1,i=[],l=0;l<t;l++)i.push({weight:100/t});var o=new s.model.row({collection:this.collection}),n=new s.collection.cells(i);n.each((function(e){e.row=o})),o.setCells(n),o.builder=this.builder.model,this.builder.model.get("rows").add(o,{at:this.builder.model.get("rows").indexOf(this.model)+1}),this.builder.model.refreshPanelsData()}.bind(this));var o={};this.builder.supports("editRow")&&(o.edit={title:panelsOptions.loc.contextual.row_edit}),s.helpers.clipboard.canCopyPaste()&&(o.copy={title:panelsOptions.loc.contextual.row_copy},this.builder.supports("addRow")&&s.helpers.clipboard.isModel("row-model")&&(o.paste={title:panelsOptions.loc.contextual.row_paste})),this.builder.supports("addRow")&&(o.duplicate={title:panelsOptions.loc.contextual.row_duplicate}),this.builder.supports("deleteRow")&&(o.delete={title:panelsOptions.loc.contextual.row_delete,confirm:!0}),_.isEmpty(o)||t.addSection("row-actions",{sectionTitle:panelsOptions.loc.contextual.row_actions,search:!1},o,function(e){switch(e){case"edit":this.editSettingsHandler();break;case"copy":this.copyHandler();break;case"paste":this.pasteHandler();break;case"duplicate":this.duplicateHandler();break;case"delete":this.visualDestroyModel()}}.bind(this))}})},{}],30:[function(e,t,i){window.panels;var s=jQuery;t.exports=Backbone.View.extend({stylesLoaded:!1,events:{"keyup .so-image-selector":function(e){13==e.which&&this.$el.find(".select-image").trigger("click")}},initialize:function(){},render:function(e,t,i){if(!_.isUndefined(e)){i=_.extend({builderType:"",dialog:null},i),this.$el.addClass("so-visual-styles so-"+e+"-styles so-panels-loading");var l={builderType:i.builderType};return"widget"===e&&(l.widget=this.model.get("class")),"cell"===e&&(l.index=i.index),s.post(panelsOptions.ajaxurl,{action:"so_panels_style_form",type:e,style:this.model.get("style"),args:JSON.stringify(l),postId:t},null,"html").done(function(e){this.$el.html(e),this.setupFields(),this.stylesLoaded=!0,this.trigger("styles_loaded",!_.isEmpty(e)),_.isNull(i.dialog)||i.dialog.trigger("styles_loaded",!_.isEmpty(e))}.bind(this)).fail(function(e){var t;t=e&&e.responseText?e.responseText:panelsOptions.forms.loadingFailed,this.$el.html(t)}.bind(this)).always(function(){this.$el.removeClass("so-panels-loading")}.bind(this)),this}},attach:function(e){e.append(this.$el)},detach:function(){this.$el.detach()},setupFields:function(){this.$(".style-section-wrapper").each((function(){var e=s(this);e.find(".style-section-head").on("click keypress",(function(t){t.preventDefault(),e.find(".style-section-fields").slideToggle("fast")}))})),_.isUndefined(s.fn.wpColorPicker)||(_.isObject(panelsOptions.wpColorPickerOptions.palettes)&&!s.isArray(panelsOptions.wpColorPickerOptions.palettes)&&(panelsOptions.wpColorPickerOptions.palettes=s.map(panelsOptions.wpColorPickerOptions.palettes,(function(e){return e}))),this.$(".so-wp-color-field").wpColorPicker(panelsOptions.wpColorPickerOptions)),this.$(".style-field-image").each((function(){var e=null,t=s(this);t.find(".so-image-selector").on("click",(function(i){i.preventDefault(),null===e&&(e=wp.media({title:"choose",library:{type:"image"},button:{text:"Done",close:!0}})).on("select",(function(){var i=e.state().get("selection").first().attributes,s=i.url;if(!_.isUndefined(i.sizes))try{s=i.sizes.thumbnail.url}catch(e){s=i.sizes.full.url}t.find(".current-image").css("background-image","url("+s+")"),t.find(".so-image-selector > input").val(i.id),t.find(".remove-image").removeClass("hidden")})),s(this).next().focus(),e.open()})),t.find(".remove-image").on("click",(function(e){e.preventDefault(),t.find(".current-image").css("background-image","none"),t.find(".so-image-selector > input").val(""),t.find(".remove-image").addClass("hidden")}))})),this.$(".style-field-measurement").each((function(){var e=s(this),t=e.find('input[type="text"]'),i=e.find("select"),l=e.find('input[type="hidden"]');t.on("focus",(function(){s(this).trigger("select")}));!function(e){if(""!==e){var o=/(?:([0-9\.,\-]+)(.*))+/,n=l.val().split(" "),r=[];for(var a in n){var d=o.exec(n[a]);_.isNull(d)||_.isUndefined(d[1])||_.isUndefined(d[2])||(r.push(d[1]),i.val(d[2]))}1===t.length?t.val(r.join(" ")):(1===r.length?r=[r[0],r[0],r[0],r[0]]:2===r.length?r=[r[0],r[1],r[0],r[1]]:3===r.length&&(r=[r[0],r[1],r[2],r[1]]),t.each((function(e,t){s(t).val(r[e])})))}}(l.val());var o=function(e){if(1===t.length){var o=t.val().split(" ").filter((function(e){return""!==e})).map((function(e){return e+i.val()})).join(" ");l.val(o)}else{var n=s(e.target),r=[],a=[],d=[];t.each((function(e,t){var i=""!==s(t).val()?parseFloat(s(t).val()):null;r.push(i),null===i?a.push(e):d.push(e)})),3===a.length&&d[0]===t.index(n)&&(t.val(n.val()),r=[n.val(),n.val(),n.val(),n.val()]),JSON.stringify(r)===JSON.stringify([null,null,null,null])?l.val(""):l.val(r.map((function(e){return(null===e?0:e)+i.val()})).join(" "))}};t.on("change",o),i.on("change",o)})),s(document).trigger("setup_style_fields",this)}})},{}],31:[function(e,t,i){var s=window.panels,l=jQuery;t.exports=Backbone.View.extend({template:_.template(s.helpers.utils.processTemplate(l("#siteorigin-panels-builder-widget").html())),cell:null,dialog:null,events:{"click .widget-edit":"editHandler","touchend .widget-edit":"editHandler","click .title h4":"editHandler","touchend .title h4":"editHandler","click .actions .widget-duplicate":"duplicateHandler","click .actions .widget-delete":"deleteHandler","keyup .actions a":function(e){s.helpers.accessibility.triggerClickOnEnter(e)}},initialize:function(){this.listenTo(this.model,"destroy",this.onModelDestroy),this.listenTo(this.model,"change:values",this.onModelChange),this.listenTo(this.model,"change:styles ",this.toggleVisibilityFade),this.listenTo(this.model,"change:label",this.onLabelChange)},render:function(e){if(e=_.extend({loadForm:!1},e),this.setElement(this.template({title:this.model.getWidgetField("title"),description:this.model.getTitle(),widget_class:this.model.attributes.class})),this.$el.data("view",this),this.cell.row.builder.supports("editWidget")&&!this.model.get("read_only")||(this.$(".actions .widget-edit").remove(),this.$el.addClass("so-widget-no-edit")),this.cell.row.builder.supports("addWidget")||(this.$(".actions .widget-duplicate").remove(),this.$el.addClass("so-widget-no-duplicate")),this.cell.row.builder.supports("deleteWidget")||(this.$(".actions .widget-delete").remove(),this.$el.addClass("so-widget-no-delete")),this.cell.row.builder.supports("moveWidget")||this.$el.addClass("so-widget-no-move"),this.$(".actions").html().trim().length||this.$(".actions").remove(),this.model.get("read_only")&&this.$el.addClass("so-widget-read-only"),0===_.size(this.model.get("values"))||e.loadForm){var t=this.getEditDialog();t.once("form_loaded",t.saveWidget,t),t.setupDialog()}return this.toggleVisibilityFade(),this.listenTo(this.cell.row.builder,"after_user_adds_widget",this.afterUserAddsWidgetHandler),this},checkIfStyleExists:function(e,t){return void 0!==e[t]&&"on"==e[t]},toggleVisibilityFade:function(){var e=this.model.attributes.style;void 0!==e&&(this.checkIfStyleExists(e,"disable_widget")||this.checkIfStyleExists(e,"disable_desktop")||this.checkIfStyleExists(e,"disable_tablet")||this.checkIfStyleExists(e,"disable_mobile")||this.checkIfStyleExists(e,"disable_logged_in")||this.checkIfStyleExists(e,"disable_logged_out")?this.$el.addClass("so-hidden-widget"):this.$el.removeClass("so-hidden-widget"))},visualCreate:function(){this.$el.hide().fadeIn("fast")},getEditDialog:function(){return null===this.dialog&&(this.dialog=new s.dialog.widget({model:this.model}),this.dialog.setBuilder(this.cell.row.builder),this.dialog.widgetView=this),this.dialog},editHandler:function(){return!this.cell.row.builder.supports("editWidget")||this.model.get("read_only")?this:(this.getEditDialog().openDialog(),this)},duplicateHandler:function(){this.cell.row.builder.addHistoryEntry("widget_duplicated");var e=this.model.clone(this.model.cell);return this.cell.model.get("widgets").add(e,{at:this.model.collection.indexOf(this.model)+1}),this.cell.row.builder.model.refreshPanelsData(),this},copyHandler:function(){s.helpers.clipboard.setModel(this.model)},deleteHandler:function(){return this.visualDestroyModel(),this},onModelChange:function(){this.$(".description").html(this.model.getTitle())},onLabelChange:function(e){this.$(".title > h4").text(e.getWidgetField("title"))},onModelDestroy:function(){this.remove()},visualDestroyModel:function(){return this.cell.row.builder.addHistoryEntry("widget_deleted"),this.$el.fadeOut("fast",function(){this.cell.row.resizeRow(),this.model.destroy(),this.cell.row.builder.model.refreshPanelsData(),this.remove()}.bind(this)),this},buildContextualMenu:function(e,t){this.cell.row.builder.supports("addWidget")&&t.addSection("add-widget-below",{sectionTitle:panelsOptions.loc.contextual.add_widget_below,searchPlaceholder:panelsOptions.loc.contextual.search_widgets,defaultDisplay:panelsOptions.contextual.default_widgets},panelsOptions.widgets,function(e){this.cell.row.builder.trigger("before_user_adds_widget"),this.cell.row.builder.addHistoryEntry("widget_added");var t=new s.model.widget({class:e});t.cell=this.cell.model,this.cell.model.get("widgets").add(t,{at:this.model.collection.indexOf(this.model)+1}),this.cell.row.builder.model.refreshPanelsData(),this.cell.row.builder.trigger("after_user_adds_widget",t)}.bind(this));var i={};this.cell.row.builder.supports("editWidget")&&!this.model.get("read_only")&&(i.edit={title:panelsOptions.loc.contextual.widget_edit}),s.helpers.clipboard.canCopyPaste()&&(i.copy={title:panelsOptions.loc.contextual.widget_copy}),this.cell.row.builder.supports("addWidget")&&(i.duplicate={title:panelsOptions.loc.contextual.widget_duplicate}),this.cell.row.builder.supports("deleteWidget")&&(i.delete={title:panelsOptions.loc.contextual.widget_delete,confirm:!0}),_.isEmpty(i)||t.addSection("widget-actions",{sectionTitle:panelsOptions.loc.contextual.widget_actions,search:!1},i,function(e){switch(e){case"edit":this.editHandler();break;case"copy":this.copyHandler();break;case"duplicate":this.duplicateHandler();break;case"delete":this.visualDestroyModel()}}.bind(this)),this.cell.buildContextualMenu(e,t)},afterUserAddsWidgetHandler:function(e){this.model===e&&panelsOptions.instant_open&&setTimeout(this.editHandler.bind(this),350)}})},{}],32:[function(e,t,i){var s=jQuery,l={addWidget:function(e,t,i){var l=wp.customHtmlWidgets,o=s("<div></div>"),n=t.find(".widget-content:first");n.before(o);var r=new l.CustomHtmlWidgetControl({el:o,syncContainer:n});return r.initializeEditor(),r.editor.codemirror.refresh(),r}};t.exports=l},{}],33:[function(e,t,i){var s=e("./custom-html-widget"),l=e("./media-widget"),o=e("./text-widget"),n={CUSTOM_HTML:"custom_html",MEDIA_AUDIO:"media_audio",MEDIA_GALLERY:"media_gallery",MEDIA_IMAGE:"media_image",MEDIA_VIDEO:"media_video",TEXT:"text",addWidget:function(e,t){var i,n=e.find("> .id_base").val();switch(n){case this.CUSTOM_HTML:i=s;break;case this.MEDIA_AUDIO:case this.MEDIA_GALLERY:case this.MEDIA_IMAGE:case this.MEDIA_VIDEO:i=l;break;case this.TEXT:i=o}i.addWidget(n,e,t)}};t.exports=n},{"./custom-html-widget":32,"./media-widget":34,"./text-widget":35}],34:[function(e,t,i){var s=jQuery,l={addWidget:function(e,t,i){var l=wp.mediaWidgets,o=l.controlConstructors[e];if(o){var n=l.modelConstructors[e]||l.MediaWidgetModel,r=t.find("> .widget-content"),a=s('<div class="media-widget-control"></div>');r.before(a);var d={};r.find(".media-widget-instance-property").each((function(){var e=s(this);d[e.data("property")]=e.val()})),d.widget_id=i;var c=new o({el:a,syncContainer:r,model:new n(d)});return c.render(),c}}};t.exports=l},{}],35:[function(e,t,i){var s=jQuery,l={addWidget:function(e,t,i){var l=wp.textWidgets,o={},n=t.find(".visual");if(n.length>0){if(!n.val())return null;var r=s("<div></div>"),a=t.find(".widget-content:first");a.before(r),o={el:r,syncContainer:a}}else o={el:t};var d=new l.TextWidgetControl(o),c=wp.oldEditor?wp.oldEditor:wp.editor;return c&&c.hasOwnProperty("autop")&&(wp.editor.autop=c.autop,wp.editor.removep=c.removep,wp.editor.initialize=c.initialize),d.initializeEditor(),d}};t.exports=l},{}]},{},[18]);
lang/siteorigin-panels.pot CHANGED
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2021 siteorigin-panels
2
  # This file is distributed under the same license as the siteorigin-panels package.
3
  msgid ""
4
  msgstr ""
@@ -36,15 +36,15 @@ msgstr ""
36
  msgid "https://siteorigin.com"
37
  msgstr ""
38
 
39
- #: siteorigin-panels.php:391
40
  msgid "Read More"
41
  msgstr ""
42
 
43
- #: siteorigin-panels.php:566
44
  msgid "Edit Home Page"
45
  msgstr ""
46
 
47
- #: siteorigin-panels.php:586, tpl/js-templates.php:34, tpl/js-templates.php:36
48
  msgid "Live Editor"
49
  msgstr ""
50
 
@@ -113,7 +113,7 @@ msgstr ""
113
  msgid "There was a problem fetching the layout. Please try again later."
114
  msgstr ""
115
 
116
- #: inc/admin-widget-dialog.php:99, widgets/widgets.php:164
117
  msgid "Widgets Bundle"
118
  msgstr ""
119
 
@@ -141,7 +141,7 @@ msgstr ""
141
  msgid "WordPress Widgets"
142
  msgstr ""
143
 
144
- #: inc/admin-widget-dialog.php:185, inc/settings.php:421
145
  msgid "Recommended Widgets"
146
  msgstr ""
147
 
@@ -153,475 +153,475 @@ msgstr ""
153
  msgid "Installing %s"
154
  msgstr ""
155
 
156
- #: inc/admin.php:169
157
  msgid "Settings"
158
  msgstr ""
159
 
160
- #: inc/admin.php:170
161
  msgid "Support"
162
  msgstr ""
163
 
164
- #: inc/admin.php:173, tpl/js-templates.php:44
165
  msgid "Addons"
166
  msgstr ""
167
 
168
- #: inc/admin.php:187, inc/admin.php:628, inc/admin.php:1298, inc/admin.php:1303, inc/settings.php:235, tpl/js-templates.php:212
169
  msgid "Page Builder"
170
  msgstr ""
171
 
172
- #: inc/admin.php:360
173
  msgid "All Widgets"
174
  msgstr ""
175
 
176
- #: inc/admin.php:395
177
  msgid "Missing Widget"
178
  msgstr ""
179
 
180
- #: inc/admin.php:396
181
  msgid "Page Builder doesn't know about this widget."
182
  msgstr ""
183
 
184
- #. translators: Number of seconds since
185
- #: inc/admin.php:400
186
  msgid "%d seconds"
187
  msgstr ""
188
 
189
- #. translators: Number of minutes since
190
- #: inc/admin.php:402
191
  msgid "%d minutes"
192
  msgstr ""
193
 
194
- #. translators: Number of hours since
195
- #: inc/admin.php:404
196
  msgid "%d hours"
197
  msgstr ""
198
 
199
- #. translators: A single second since
200
- #: inc/admin.php:407
201
  msgid "%d second"
202
  msgstr ""
203
 
204
- #. translators: A single minute since
205
- #: inc/admin.php:409
206
  msgid "%d minute"
207
  msgstr ""
208
 
209
- #. translators: A single hour since
210
- #: inc/admin.php:411
211
  msgid "%d hour"
212
  msgstr ""
213
 
214
  #. translators: Time ago - eg. "1 minute before".
215
- #: inc/admin.php:414
216
  msgid "%s before"
217
  msgstr ""
218
 
219
- #: inc/admin.php:415
220
  msgid "Now"
221
  msgstr ""
222
 
223
- #: inc/admin.php:419
224
  msgid "Current"
225
  msgstr ""
226
 
227
- #: inc/admin.php:420
228
  msgid "Original"
229
  msgstr ""
230
 
231
- #: inc/admin.php:421
232
  msgid "Version restored"
233
  msgstr ""
234
 
235
- #: inc/admin.php:422
236
  msgid "Converted to editor"
237
  msgstr ""
238
 
239
- #. translators: Message displayed in the history when a widget is deleted
240
- #: inc/admin.php:426
241
  msgid "Widget deleted"
242
  msgstr ""
243
 
244
- #. translators: Message displayed in the history when a widget is added
245
- #: inc/admin.php:428
246
  msgid "Widget added"
247
  msgstr ""
248
 
249
- #. translators: Message displayed in the history when a widget is edited
250
- #: inc/admin.php:430
251
  msgid "Widget edited"
252
  msgstr ""
253
 
254
- #. translators: Message displayed in the history when a widget is duplicated
255
- #: inc/admin.php:432
256
  msgid "Widget duplicated"
257
  msgstr ""
258
 
259
- #. translators: Message displayed in the history when a widget position is changed
260
- #: inc/admin.php:434
261
  msgid "Widget moved"
262
  msgstr ""
263
 
264
- #. translators: Message displayed in the history when a row is deleted
265
- #: inc/admin.php:438
266
  msgid "Row deleted"
267
  msgstr ""
268
 
269
- #. translators: Message displayed in the history when a row is added
270
- #: inc/admin.php:440
271
  msgid "Row added"
272
  msgstr ""
273
 
274
- #. translators: Message displayed in the history when a row is edited
275
- #: inc/admin.php:442
276
  msgid "Row edited"
277
  msgstr ""
278
 
279
- #. translators: Message displayed in the history when a row position is changed
280
- #: inc/admin.php:444
281
  msgid "Row moved"
282
  msgstr ""
283
 
284
- #. translators: Message displayed in the history when a row is duplicated
285
- #: inc/admin.php:446
286
  msgid "Row duplicated"
287
  msgstr ""
288
 
289
- #. translators: Message displayed in the history when a row is pasted
290
- #: inc/admin.php:448
291
  msgid "Row pasted"
292
  msgstr ""
293
 
294
- #: inc/admin.php:451
295
  msgid "Cell resized"
296
  msgstr ""
297
 
298
- #: inc/admin.php:454
299
  msgid "Prebuilt layout loaded"
300
  msgstr ""
301
 
302
- #: inc/admin.php:458
303
  msgid "Loading prebuilt layout"
304
  msgstr ""
305
 
306
- #: inc/admin.php:459
307
  msgid "Would you like to copy this editor's existing content to Page Builder?"
308
  msgstr ""
309
 
310
- #: inc/admin.php:460
311
  msgid "Would you like to clear your Page Builder content and revert to using the standard visual editor?"
312
  msgstr ""
313
 
314
- #. translators: This is the title for a widget called "Layout Builder"
315
- #: inc/admin.php:462
316
  msgid "Layout Builder Widget"
317
  msgstr ""
318
 
319
  #. translators: A standard confirmation message
320
- #: inc/admin.php:464, tpl/js-templates.php:97, tpl/js-templates.php:437
321
  msgid "Are you sure?"
322
  msgstr ""
323
 
324
  #. translators: When a layout file is ready to be inserted. %s is the filename.
325
- #: inc/admin.php:466
326
  msgid "%s is ready to insert."
327
  msgstr ""
328
 
329
- #: inc/admin.php:470
330
  msgid "Add Widget Below"
331
  msgstr ""
332
 
333
- #: inc/admin.php:471
334
  msgid "Add Widget to Cell"
335
  msgstr ""
336
 
337
- #: inc/admin.php:472, tpl/js-templates.php:239
338
  msgid "Search Widgets"
339
  msgstr ""
340
 
341
- #: inc/admin.php:474, tpl/js-templates.php:17, tpl/js-templates.php:19
342
  msgid "Add Row"
343
  msgstr ""
344
 
345
- #: inc/admin.php:475
346
  msgid "Column"
347
  msgstr ""
348
 
349
- #: inc/admin.php:477
350
  msgid "Cell Actions"
351
  msgstr ""
352
 
353
- #: inc/admin.php:478
354
  msgid "Paste Widget"
355
  msgstr ""
356
 
357
- #: inc/admin.php:480
358
  msgid "Widget Actions"
359
  msgstr ""
360
 
361
- #: inc/admin.php:481
362
  msgid "Edit Widget"
363
  msgstr ""
364
 
365
- #: inc/admin.php:482
366
  msgid "Duplicate Widget"
367
  msgstr ""
368
 
369
- #: inc/admin.php:483
370
  msgid "Delete Widget"
371
  msgstr ""
372
 
373
- #: inc/admin.php:484
374
  msgid "Copy Widget"
375
  msgstr ""
376
 
377
- #: inc/admin.php:485
378
  msgid "Paste Widget Below"
379
  msgstr ""
380
 
381
- #: inc/admin.php:487
382
  msgid "Row Actions"
383
  msgstr ""
384
 
385
- #: inc/admin.php:488, tpl/js-templates.php:95
386
  msgid "Edit Row"
387
  msgstr ""
388
 
389
- #: inc/admin.php:489, tpl/js-templates.php:96
390
  msgid "Duplicate Row"
391
  msgstr ""
392
 
393
- #: inc/admin.php:490, tpl/js-templates.php:97
394
  msgid "Delete Row"
395
  msgstr ""
396
 
397
- #: inc/admin.php:491
398
  msgid "Copy Row"
399
  msgstr ""
400
 
401
- #: inc/admin.php:492
402
  msgid "Paste Row"
403
  msgstr ""
404
 
405
- #: inc/admin.php:494
406
  msgid "Draft"
407
  msgstr ""
408
 
409
- #: inc/admin.php:495
410
  msgid "Untitled"
411
  msgstr ""
412
 
413
- #: inc/admin.php:497
414
  msgid "New Row"
415
  msgstr ""
416
 
417
- #: inc/admin.php:498, inc/admin.php:506, inc/styles.php:247, tpl/js-templates.php:62
418
  msgid "Row"
419
  msgstr ""
420
 
421
- #: inc/admin.php:501
422
  msgid "Hmmm... Adding layout elements is not enabled. Please check if Page Builder has been configured to allow adding elements."
423
  msgstr ""
424
 
425
- #: inc/admin.php:502
426
  msgid "Add a {{%= items[0] %}} to get started."
427
  msgstr ""
428
 
429
- #: inc/admin.php:503
430
  msgid "Add a {{%= items[0] %}} or {{%= items[1] %}} to get started."
431
  msgstr ""
432
 
433
- #: inc/admin.php:504
434
  msgid "Add a {{%= items[0] %}}, {{%= items[1] %}} or {{%= items[2] %}} to get started."
435
  msgstr ""
436
 
437
- #: inc/admin.php:505, inc/styles.php:417, tpl/js-templates.php:61
438
  msgid "Widget"
439
  msgstr ""
440
 
441
- #: inc/admin.php:507, tpl/js-templates.php:63
442
  msgid "Prebuilt Layout"
443
  msgstr ""
444
 
445
- #: inc/admin.php:509
446
  msgid "Read our %s if you need help."
447
  msgstr ""
448
 
449
- #: inc/admin.php:510, tpl/js-templates.php:64
450
  msgid "documentation"
451
  msgstr ""
452
 
453
- #: inc/admin.php:519
454
  msgid "Page Builder layouts"
455
  msgstr ""
456
 
457
- #: inc/admin.php:520
458
  msgid "Error uploading or importing file."
459
  msgstr ""
460
 
461
- #: inc/admin.php:527
462
  msgid "Unknown error. Failed to load the form. Please check your internet connection, contact your web site administrator, or try again later."
463
  msgstr ""
464
 
465
- #. translators: This is the default name given to a user's home page
466
- #: inc/admin.php:711, inc/home.php:26
467
  msgid "Home Page"
468
  msgstr ""
469
 
470
- #: inc/admin.php:812
471
  msgid "Untitled Widget"
472
  msgstr ""
473
 
474
- #: inc/admin.php:992
475
  msgid "You need to install 1{%1$s} to use the widget 2{%2$s}."
476
  msgstr ""
477
 
478
- #: inc/admin.php:998
479
  msgid "Save and reload this page to start using the widget after you've installed it."
480
  msgstr ""
481
 
482
- #: inc/admin.php:1014
483
  msgid "The widget 1{%1$s} is not available. Please try locate and install the missing plugin. Post on the 2{support forums} if you need help."
484
  msgstr ""
485
 
486
- #: inc/admin.php:1201, inc/styles-admin.php:25
487
  msgid "The supplied nonce is invalid."
488
  msgstr ""
489
 
490
- #: inc/admin.php:1202, inc/styles-admin.php:26
491
  msgid "Invalid nonce."
492
  msgstr ""
493
 
494
- #: inc/admin.php:1208
495
  msgid "Please specify the type of widget form to be rendered."
496
  msgstr ""
497
 
498
- #: inc/admin.php:1209
499
  msgid "Missing widget type."
500
  msgstr ""
501
 
502
- #: inc/admin.php:1316
503
  msgid "%s Widget"
504
  msgid_plural "%s Widgets"
505
  msgstr[0] ""
506
  msgstr[1] ""
507
 
508
- #: inc/admin.php:1359
509
  msgid "Get the row, cell, and widget %link%."
510
  msgstr ""
511
 
512
- #: inc/admin.php:1361
513
  msgid "Animations Addon"
514
  msgstr ""
515
 
516
- #: inc/admin.php:1364
517
  msgid "Get the %link%. Build custom post types with reusable Page Builder layouts."
518
  msgstr ""
519
 
520
- #: inc/admin.php:1366
521
  msgid "CPT Builder Addon"
522
  msgstr ""
523
 
524
- #: inc/admin.php:1369
525
  msgid "Get the %link%. Add beautiful and customizable text overlays with animations to your images."
526
  msgstr ""
527
 
528
- #: inc/admin.php:1371
529
  msgid "Image Overlay Addon"
530
  msgstr ""
531
 
532
- #: inc/admin.php:1374
533
  msgid "Get a %link% for the SiteOrigin Image, Masonry, and Slider Widgets."
534
  msgstr ""
535
 
536
- #: inc/admin.php:1376
537
  msgid "Lightbox Addon"
538
  msgstr ""
539
 
540
- #: inc/admin.php:1379
541
  msgid "Link an entire Page Builder row, cell, or widget with the %link%."
542
  msgstr ""
543
 
544
- #: inc/admin.php:1381
545
  msgid "Link Overlay Addon"
546
  msgstr ""
547
 
548
- #: inc/admin.php:1384
549
  msgid "Get the %link%. Create a widget once, use it everywhere. Update it and the changes reflect in all instances of the widget."
550
  msgstr ""
551
 
552
- #: inc/admin.php:1386
553
  msgid "Mirror Widgets Addon"
554
  msgstr ""
555
 
556
- #: inc/admin.php:1389
557
  msgid "Upload multiple image frames at once to Widgets Bundle Slider and Image Grid type widgets with %link%."
558
  msgstr ""
559
 
560
- #: inc/admin.php:1391, inc/admin.php:1396
561
  msgid "SiteOrigin Premium"
562
  msgstr ""
563
 
564
- #: inc/admin.php:1394
565
  msgid "Add parallax background images to your slider type widgets with %link%."
566
  msgstr ""
567
 
568
- #: inc/admin.php:1399
569
  msgid "Hide rows and widgets based for logged-in or logged-out users with the %link%."
570
  msgstr ""
571
 
572
- #: inc/admin.php:1401, inc/admin.php:1406, inc/admin.php:1411
573
  msgid "Toggle Visibility Addon"
574
  msgstr ""
575
 
576
- #: inc/admin.php:1404
577
  msgid "Show or hide rows and widgets between a selected date range with the %link%."
578
  msgstr ""
579
 
580
- #: inc/admin.php:1409
581
  msgid "Hide rows and widgets on specific devices with the %link%."
582
  msgstr ""
583
 
584
- #: inc/admin.php:1414
585
  msgid "Get a %link% with SiteOrigin Premium."
586
  msgstr ""
587
 
588
- #: inc/admin.php:1416
589
  msgid "Tooltip Addon"
590
  msgstr ""
591
 
592
- #: inc/admin.php:1419
593
  msgid "Use Google Fonts in SiteOrigin Widgets with the %link%."
594
  msgstr ""
595
 
596
- #: inc/admin.php:1421
597
  msgid "Webfont Selector Addon"
598
  msgstr ""
599
 
600
- #: inc/admin.php:1424
601
  msgid "Get fast email support for Page Builder with %link%."
602
  msgstr ""
603
 
604
- #: inc/admin.php:1426
605
  msgid "SiteOrigin Preimum"
606
  msgstr ""
607
 
608
- #: inc/admin.php:1431
609
  msgid "Get the %link%. Create custom templates for the Product, Archives, Shop, Cart, and Checkout pages."
610
  msgstr ""
611
 
612
- #: inc/admin.php:1433
613
  msgid "WooCommerce Templates Addon"
614
  msgstr ""
615
 
616
- #: inc/admin.php:1626
617
  msgid "Toggle editor selection menu"
618
  msgstr ""
619
 
620
- #: inc/admin.php:1627, inc/admin.php:1674, inc/settings.php:235, settings/tpl/settings.php:9
621
  msgid "SiteOrigin Page Builder"
622
  msgstr ""
623
 
624
- #: inc/admin.php:1628
625
  msgid "Block Editor"
626
  msgstr ""
627
 
@@ -629,7 +629,7 @@ msgstr ""
629
  msgid "Custom Home Page Builder"
630
  msgstr ""
631
 
632
- #: inc/renderer.php:411
633
  msgid "Prevented SiteOrigin layout from repeated rendering."
634
  msgstr ""
635
 
@@ -637,327 +637,343 @@ msgstr ""
637
  msgid "Page Builder Content"
638
  msgstr ""
639
 
640
- #: inc/settings.php:262
641
  msgid "Page Builder Settings"
642
  msgstr ""
643
 
644
- #: inc/settings.php:278
645
  msgid "General"
646
  msgstr ""
647
 
648
- #: inc/settings.php:284
649
  msgid "Post Types"
650
  msgstr ""
651
 
652
- #: inc/settings.php:286
653
  msgid "The post types on which to use Page Builder."
654
  msgstr ""
655
 
656
- #: inc/settings.php:291
657
  msgid "Use Classic Editor for New Posts"
658
  msgstr ""
659
 
660
- #: inc/settings.php:292
661
  msgid "New posts of the above Post Types will be created using the Classic Editor."
662
  msgstr ""
663
 
664
- #: inc/settings.php:297
665
  msgid "Live Editor Toolbar Link"
666
  msgstr ""
667
 
668
- #: inc/settings.php:298
669
  msgid "Display a Live Editor link in the toolbar when viewing site."
670
  msgstr ""
671
 
672
- #: inc/settings.php:302
673
  msgid "Live Editor Toolbar Link: Close After Editing"
674
  msgstr ""
675
 
676
- #: inc/settings.php:303
677
  msgid "When accessing the Live Editor via the toolbar link, return to the site after saving."
678
  msgstr ""
679
 
680
- #: inc/settings.php:308
681
  msgid "Display Post State"
682
  msgstr ""
683
 
684
- #: inc/settings.php:310
685
  msgid "Display a %sSiteOrigin Page Builder%s post state in the admin lists of posts/pages to indicate Page Builder is active."
686
  msgstr ""
687
 
688
- #: inc/settings.php:318
689
  msgid "Display Widget Count"
690
  msgstr ""
691
 
692
- #: inc/settings.php:319
693
  msgid "Display a widget count in the admin lists of posts/pages where you're using Page Builder."
694
  msgstr ""
695
 
696
- #: inc/settings.php:324
697
  msgid "Parallax Type"
698
  msgstr ""
699
 
700
- #: inc/settings.php:326
701
  msgid "Modern"
702
  msgstr ""
703
 
704
- #: inc/settings.php:327
705
  msgid "Legacy"
706
  msgstr ""
707
 
708
- #: inc/settings.php:329
709
  msgid "Modern is recommended as it can use smaller images and offers better performance."
710
  msgstr ""
711
 
712
- #: inc/settings.php:334
713
  msgid "Disable Parallax On Mobile"
714
  msgstr ""
715
 
716
- #: inc/settings.php:335
717
  msgid "Disable row/widget background parallax when the browser is smaller than the mobile width."
718
  msgstr ""
719
 
720
- #: inc/settings.php:341
721
  msgid "Limit Parallax Motion"
722
  msgstr ""
723
 
724
- #: inc/settings.php:342
725
- msgid "How many pixels of scrolling results in a single pixel of parallax motion. 0 means automatic. Lower values give more noticeable effect."
726
  msgstr ""
727
 
728
- #: inc/settings.php:348
729
  msgid "Parallax Delay"
730
  msgstr ""
731
 
732
- #: inc/settings.php:349
733
  msgid "The delay before the parallax effect finishes after the user stops scrolling."
734
  msgstr ""
735
 
736
- #: inc/settings.php:354
737
  msgid "Parallax Scale"
738
  msgstr ""
739
 
740
- #: inc/settings.php:355
741
  msgid "How much the image is scaled. The higher the scale is set, the more visible the parallax effect will be. Increasing the scale will result in a loss of image quality."
742
  msgstr ""
743
 
744
- #: inc/settings.php:360
745
  msgid "Sidebars Emulator"
746
  msgstr ""
747
 
748
- #: inc/settings.php:361
749
  msgid "Page Builder will create an emulated sidebar, that contains all widgets in the page."
750
  msgstr ""
751
 
752
- #: inc/settings.php:366
753
  msgid "Upgrade Teaser"
754
  msgstr ""
755
 
756
- #: inc/settings.php:368
757
  msgid "Display the %sSiteOrigin Premium%s upgrade teaser in the Page Builder toolbar."
758
  msgstr ""
759
 
760
- #: inc/settings.php:376
761
  msgid "Default to Page Builder Interface"
762
  msgstr ""
763
 
764
- #: inc/settings.php:378
765
  msgid "New Classic Editor posts/pages that you create will start with the Page Builder loaded. The %s\"Use Classic Editor for New Posts\"%s setting must be enabled."
766
  msgstr ""
767
 
768
- #: inc/settings.php:385
769
  msgid "Layout Block Default Mode"
770
  msgstr ""
771
 
772
- #: inc/settings.php:388, tpl/js-templates.php:144
773
  msgid "Edit"
774
  msgstr ""
775
 
776
- #: inc/settings.php:389
777
  msgid "Preview"
778
  msgstr ""
779
 
780
- #: inc/settings.php:391
781
  msgid "Whether to display SiteOrigin Layout Blocks in edit mode or preview mode in the Block Editor."
782
  msgstr ""
783
 
784
- #: inc/settings.php:397
785
  msgid "Widgets"
786
  msgstr ""
787
 
788
- #: inc/settings.php:403
789
  msgid "Widget Title HTML"
790
  msgstr ""
791
 
792
- #: inc/settings.php:404
793
  msgid "The HTML used for widget titles. {{title}} is replaced with the widget title."
794
  msgstr ""
795
 
796
- #: inc/settings.php:409
797
  msgid "Add Widget Class"
798
  msgstr ""
799
 
800
- #: inc/settings.php:410
801
  msgid "Add the widget class to Page Builder widgets. Disable if theme widget styles are negatively impacting widgets in Page Builder."
802
  msgstr ""
803
 
804
- #: inc/settings.php:415
805
  msgid "Legacy Bundled Widgets"
806
  msgstr ""
807
 
808
- #: inc/settings.php:416
809
  msgid "Load legacy widgets from Page Builder 1."
810
  msgstr ""
811
 
812
- #: inc/settings.php:422
813
  msgid "Display recommend widgets in the Page Builder Add Widget dialog."
814
  msgstr ""
815
 
816
- #: inc/settings.php:427
817
  msgid "Instant Open Widgets"
818
  msgstr ""
819
 
820
- #: inc/settings.php:428
821
  msgid "Open a widget form as soon as it's added to a page."
822
  msgstr ""
823
 
824
- #: inc/settings.php:434, inc/styles-admin.php:103
825
  msgid "Layout"
826
  msgstr ""
827
 
828
- #: inc/settings.php:442
829
  msgid "Responsive Layout"
830
  msgstr ""
831
 
832
- #: inc/settings.php:443
833
  msgid "Collapse widgets, rows, and columns on mobile devices."
834
  msgstr ""
835
 
836
- #: inc/settings.php:448
837
  msgid "Use Tablet Layout"
838
  msgstr ""
839
 
840
- #: inc/settings.php:449
841
  msgid "Collapses columns differently on tablet devices."
842
  msgstr ""
843
 
844
- #: inc/settings.php:455
845
  msgid "Detect older browsers"
846
  msgstr ""
847
 
848
- #: inc/settings.php:456
849
  msgid "Never"
850
  msgstr ""
851
 
852
- #: inc/settings.php:457
853
  msgid "Always"
854
  msgstr ""
855
 
856
- #: inc/settings.php:459
857
  msgid "Use Legacy Layout Engine"
858
  msgstr ""
859
 
860
- #: inc/settings.php:460
861
  msgid "For compatibility, the Legacy Layout Engine switches from Flexbox to float when older browsers are detected."
862
  msgstr ""
863
 
864
- #: inc/settings.php:466
865
  msgid "Tablet Width"
866
  msgstr ""
867
 
868
- #: inc/settings.php:467
869
  msgid "Device width, in pixels, to collapse into a tablet view."
870
  msgstr ""
871
 
872
- #: inc/settings.php:473
873
  msgid "Mobile Width"
874
  msgstr ""
875
 
876
- #: inc/settings.php:474
877
  msgid "Device width, in pixels, to collapse into a mobile view."
878
  msgstr ""
879
 
880
- #: inc/settings.php:480
881
  msgid "Row/Widget Bottom Margin"
882
  msgstr ""
883
 
884
- #: inc/settings.php:481
885
  msgid "Default margin below rows and widgets."
886
  msgstr ""
887
 
888
- #: inc/settings.php:487
889
- msgid "Row Mobile Bottom Margin"
890
  msgstr ""
891
 
892
- #: inc/settings.php:488
893
  msgid "The default margin below rows on mobile."
894
  msgstr ""
895
 
896
- #: inc/settings.php:493
897
  msgid "Last Row With Margin"
898
  msgstr ""
899
 
900
- #: inc/settings.php:494
901
  msgid "Allow margin below the last row."
902
  msgstr ""
903
 
904
- #: inc/settings.php:500
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
905
  msgid "Row Gutter"
906
  msgstr ""
907
 
908
- #: inc/settings.php:501
909
  msgid "Default spacing between columns in each row."
910
  msgstr ""
911
 
912
- #: inc/settings.php:507
913
  msgid "Full Width Container"
914
  msgstr ""
915
 
916
- #: inc/settings.php:508
917
  msgid "The container used for the full width layout."
918
  msgstr ""
919
 
920
- #: inc/settings.php:515
921
  msgid "Automatic"
922
  msgstr ""
923
 
924
- #: inc/settings.php:516
925
  msgid "Header"
926
  msgstr ""
927
 
928
- #: inc/settings.php:517
929
  msgid "Footer"
930
  msgstr ""
931
 
932
- #: inc/settings.php:519
933
  msgid "Page Builder Layout CSS Output Location"
934
  msgstr ""
935
 
936
- #: inc/settings.php:520
937
  msgid "This setting is only applicable in the Classic Editor."
938
  msgstr ""
939
 
940
- #: inc/settings.php:526
941
  msgid "Content"
942
  msgstr ""
943
 
944
- #: inc/settings.php:532
945
  msgid "Copy Content"
946
  msgstr ""
947
 
948
- #: inc/settings.php:533
949
  msgid "Copy content from Page Builder to post content."
950
  msgstr ""
951
 
952
- #: inc/settings.php:538
953
  msgid "Copy Styles"
954
  msgstr ""
955
 
956
- #: inc/settings.php:539
957
  msgid "Include styles into your Post Content. This keeps page layouts, even when Page Builder is deactivated."
958
  msgstr ""
959
 
960
- #: inc/settings.php:592, inc/styles-admin.php:301
961
  msgid "Enabled"
962
  msgstr ""
963
 
@@ -1205,7 +1221,7 @@ msgstr ""
1205
  msgid "Collapse Order"
1206
  msgstr ""
1207
 
1208
- #: inc/styles.php:304, widgets/widgets.php:635, widgets/widgets.php:757, inc/widgets/post-loop.php:374
1209
  msgid "Default"
1210
  msgstr ""
1211
 
@@ -1245,10 +1261,6 @@ msgstr ""
1245
  msgid "Space below the row on mobile devices. Default is %spx."
1246
  msgstr ""
1247
 
1248
- #: inc/styles.php:347
1249
- msgid "Mobile Cell Margins"
1250
- msgstr ""
1251
-
1252
  #: inc/styles.php:350
1253
  msgid "Vertical space between cells in a collapsed mobile row. Default is %spx."
1254
  msgstr ""
@@ -1517,223 +1529,215 @@ msgstr ""
1517
  msgid "Add SiteOrigin Layout Block"
1518
  msgstr ""
1519
 
1520
- #: widgets/widgets.php:161
1521
- msgid "This is a legacy widget. "
1522
- msgstr ""
1523
-
1524
  #: widgets/widgets.php:162
1525
- msgid "Ideally you should move to using widgets from the SiteOrigin Widgets Bundle instead. "
1526
- msgstr ""
1527
-
1528
- #: widgets/widgets.php:163
1529
- msgid "It'll be moved to a separate plugin after Page Builder 2.6 is released. "
1530
  msgstr ""
1531
 
1532
- #: widgets/widgets.php:220
1533
  msgid "Style"
1534
  msgstr ""
1535
 
1536
- #: widgets/widgets.php:244
1537
  msgid "%s Style"
1538
  msgstr ""
1539
 
1540
- #: widgets/widgets.php:594, inc/widgets/post-loop.php:332
1541
  msgid "Post Type"
1542
  msgstr ""
1543
 
1544
- #: widgets/widgets.php:601, inc/widgets/post-loop.php:341
1545
  msgid "Posts Per Page"
1546
  msgstr ""
1547
 
1548
- #: widgets/widgets.php:606, inc/widgets/post-loop.php:346
1549
  msgid "Order By"
1550
  msgstr ""
1551
 
1552
- #: widgets/widgets.php:608, widgets/widgets.php:783, inc/widgets/post-content.php:60, inc/widgets/post-loop.php:348
1553
  msgid "None"
1554
  msgstr ""
1555
 
1556
- #: widgets/widgets.php:609, inc/widgets/post-loop.php:349
1557
  msgid "Post ID"
1558
  msgstr ""
1559
 
1560
- #: widgets/widgets.php:610, inc/widgets/post-loop.php:350
1561
  msgid "Author"
1562
  msgstr ""
1563
 
1564
- #: widgets/widgets.php:611, widgets/widgets.php:612, inc/widgets/post-loop.php:351, inc/widgets/post-loop.php:352, widgets/widgets/testimonial/testimonial.php:15
1565
  msgid "Name"
1566
  msgstr ""
1567
 
1568
- #: widgets/widgets.php:613, inc/widgets/post-loop.php:353
1569
  msgid "Date"
1570
  msgstr ""
1571
 
1572
- #: widgets/widgets.php:614, inc/widgets/post-loop.php:354
1573
  msgid "Modified"
1574
  msgstr ""
1575
 
1576
- #: widgets/widgets.php:615, inc/widgets/post-loop.php:355
1577
  msgid "Parent"
1578
  msgstr ""
1579
 
1580
- #: widgets/widgets.php:616, inc/widgets/post-loop.php:356
1581
  msgid "Random"
1582
  msgstr ""
1583
 
1584
- #: widgets/widgets.php:617, inc/widgets/post-loop.php:357
1585
  msgid "Comment Count"
1586
  msgstr ""
1587
 
1588
- #: widgets/widgets.php:618, inc/widgets/post-loop.php:358
1589
  msgid "Menu Order"
1590
  msgstr ""
1591
 
1592
- #: widgets/widgets.php:624, inc/widgets/post-loop.php:364
1593
  msgid "Order"
1594
  msgstr ""
1595
 
1596
- #: widgets/widgets.php:626, inc/widgets/post-loop.php:367
1597
  msgid "Ascending"
1598
  msgstr ""
1599
 
1600
- #: widgets/widgets.php:627, inc/widgets/post-loop.php:366
1601
  msgid "Descending"
1602
  msgstr ""
1603
 
1604
- #: widgets/widgets.php:633, inc/widgets/post-loop.php:372
1605
  msgid "Sticky Posts"
1606
  msgstr ""
1607
 
1608
- #: widgets/widgets.php:636, inc/widgets/post-loop.php:375
1609
  msgid "Ignore Sticky"
1610
  msgstr ""
1611
 
1612
- #: widgets/widgets.php:637, inc/widgets/post-loop.php:376
1613
  msgid "Exclude Sticky"
1614
  msgstr ""
1615
 
1616
- #: widgets/widgets.php:638, inc/widgets/post-loop.php:377
1617
  msgid "Only Sticky"
1618
  msgstr ""
1619
 
1620
- #: widgets/widgets.php:644
1621
  msgid "Additional Arguments"
1622
  msgstr ""
1623
 
1624
- #: widgets/widgets.php:648, inc/widgets/post-loop.php:389
1625
  msgid "Additional query arguments. See 1{query_posts}."
1626
  msgstr ""
1627
 
1628
- #: widgets/widgets.php:705
1629
  msgid "Gallery (PB)"
1630
  msgstr ""
1631
 
1632
- #: widgets/widgets.php:707
1633
  msgid "Displays a gallery."
1634
  msgstr ""
1635
 
1636
- #: widgets/widgets.php:746
1637
  msgid "Gallery Images"
1638
  msgstr ""
1639
 
1640
- #: widgets/widgets.php:747
1641
  msgid "edit gallery"
1642
  msgstr ""
1643
 
1644
- #: widgets/widgets.php:751
1645
  msgid "Comma separated attachment IDs. Defaults to all current page's attachments."
1646
  msgstr ""
1647
 
1648
- #: widgets/widgets.php:755
1649
  msgid "Image Size"
1650
  msgstr ""
1651
 
1652
- #: widgets/widgets.php:758
1653
  msgid "Large"
1654
  msgstr ""
1655
 
1656
- #: widgets/widgets.php:759
1657
  msgid "Medium"
1658
  msgstr ""
1659
 
1660
- #: widgets/widgets.php:760
1661
  msgid "Thumbnail"
1662
  msgstr ""
1663
 
1664
- #: widgets/widgets.php:761
1665
  msgid "Full"
1666
  msgstr ""
1667
 
1668
- #: widgets/widgets.php:769
1669
  msgid "Gallery Type"
1670
  msgstr ""
1671
 
1672
- #: widgets/widgets.php:774
1673
  msgid "Columns"
1674
  msgstr ""
1675
 
1676
- #: widgets/widgets.php:779
1677
  msgid "Link To"
1678
  msgstr ""
1679
 
1680
- #: widgets/widgets.php:781
1681
  msgid "Attachment Page"
1682
  msgstr ""
1683
 
1684
- #: widgets/widgets.php:782
1685
  msgid "File"
1686
  msgstr ""
1687
 
1688
- #: widgets/widgets.php:800
1689
  msgid "Image (PB)"
1690
  msgstr ""
1691
 
1692
- #: widgets/widgets.php:802
1693
  msgid "Displays a simple image."
1694
  msgstr ""
1695
 
1696
- #: widgets/widgets.php:835, widgets/widgets/animated-image/animated-image.php:15
1697
  msgid "Image URL"
1698
  msgstr ""
1699
 
1700
- #: widgets/widgets.php:839, widgets/widgets/button/button.php:19
1701
  msgid "Destination URL"
1702
  msgstr ""
1703
 
1704
- #: widgets/widgets.php:853
1705
  msgid "Embedded Video (PB)"
1706
  msgstr ""
1707
 
1708
- #: widgets/widgets.php:855
1709
  msgid "Embeds a video."
1710
  msgstr ""
1711
 
1712
- #: widgets/widgets.php:893
1713
  msgid "Video"
1714
  msgstr ""
1715
 
1716
- #: widgets/widgets.php:909
1717
  msgid "Self Hosted Video (PB)"
1718
  msgstr ""
1719
 
1720
- #: widgets/widgets.php:911
1721
  msgid "A self hosted video player."
1722
  msgstr ""
1723
 
1724
- #: widgets/widgets.php:953
1725
  msgid "Video URL"
1726
  msgstr ""
1727
 
1728
- #: widgets/widgets.php:957
1729
  msgid "Poster URL"
1730
  msgstr ""
1731
 
1732
- #: widgets/widgets.php:959
1733
  msgid "An image that displays before the video starts playing."
1734
  msgstr ""
1735
 
1736
- #: widgets/widgets.php:964
1737
  msgid "Auto Play Video"
1738
  msgstr ""
1739
 
1
+ # Copyright (C) 2022 siteorigin-panels
2
  # This file is distributed under the same license as the siteorigin-panels package.
3
  msgid ""
4
  msgstr ""
36
  msgid "https://siteorigin.com"
37
  msgstr ""
38
 
39
+ #: siteorigin-panels.php:392
40
  msgid "Read More"
41
  msgstr ""
42
 
43
+ #: siteorigin-panels.php:567
44
  msgid "Edit Home Page"
45
  msgstr ""
46
 
47
+ #: siteorigin-panels.php:587, tpl/js-templates.php:34, tpl/js-templates.php:36
48
  msgid "Live Editor"
49
  msgstr ""
50
 
113
  msgid "There was a problem fetching the layout. Please try again later."
114
  msgstr ""
115
 
116
+ #: inc/admin-widget-dialog.php:99
117
  msgid "Widgets Bundle"
118
  msgstr ""
119
 
141
  msgid "WordPress Widgets"
142
  msgstr ""
143
 
144
+ #: inc/admin-widget-dialog.php:185, inc/settings.php:424
145
  msgid "Recommended Widgets"
146
  msgstr ""
147
 
153
  msgid "Installing %s"
154
  msgstr ""
155
 
156
+ #: inc/admin.php:168
157
  msgid "Settings"
158
  msgstr ""
159
 
160
+ #: inc/admin.php:169
161
  msgid "Support"
162
  msgstr ""
163
 
164
+ #: inc/admin.php:172, tpl/js-templates.php:44
165
  msgid "Addons"
166
  msgstr ""
167
 
168
+ #: inc/admin.php:186, inc/admin.php:627, inc/admin.php:1301, inc/admin.php:1306, inc/settings.php:237, tpl/js-templates.php:212
169
  msgid "Page Builder"
170
  msgstr ""
171
 
172
+ #: inc/admin.php:359
173
  msgid "All Widgets"
174
  msgstr ""
175
 
176
+ #: inc/admin.php:394
177
  msgid "Missing Widget"
178
  msgstr ""
179
 
180
+ #: inc/admin.php:395
181
  msgid "Page Builder doesn't know about this widget."
182
  msgstr ""
183
 
184
+ #. translators: Number of seconds since.
185
+ #: inc/admin.php:399
186
  msgid "%d seconds"
187
  msgstr ""
188
 
189
+ #. translators: Number of minutes since.
190
+ #: inc/admin.php:401
191
  msgid "%d minutes"
192
  msgstr ""
193
 
194
+ #. translators: Number of hours since.
195
+ #: inc/admin.php:403
196
  msgid "%d hours"
197
  msgstr ""
198
 
199
+ #. translators: A single second since.
200
+ #: inc/admin.php:406
201
  msgid "%d second"
202
  msgstr ""
203
 
204
+ #. translators: A single minute since.
205
+ #: inc/admin.php:408
206
  msgid "%d minute"
207
  msgstr ""
208
 
209
+ #. translators: A single hour since.
210
+ #: inc/admin.php:410
211
  msgid "%d hour"
212
  msgstr ""
213
 
214
  #. translators: Time ago - eg. "1 minute before".
215
+ #: inc/admin.php:413
216
  msgid "%s before"
217
  msgstr ""
218
 
219
+ #: inc/admin.php:414
220
  msgid "Now"
221
  msgstr ""
222
 
223
+ #: inc/admin.php:418
224
  msgid "Current"
225
  msgstr ""
226
 
227
+ #: inc/admin.php:419
228
  msgid "Original"
229
  msgstr ""
230
 
231
+ #: inc/admin.php:420
232
  msgid "Version restored"
233
  msgstr ""
234
 
235
+ #: inc/admin.php:421
236
  msgid "Converted to editor"
237
  msgstr ""
238
 
239
+ #. translators: Message displayed in the history when a widget is deleted.
240
+ #: inc/admin.php:425
241
  msgid "Widget deleted"
242
  msgstr ""
243
 
244
+ #. translators: Message displayed in the history when a widget is added.
245
+ #: inc/admin.php:427
246
  msgid "Widget added"
247
  msgstr ""
248
 
249
+ #. translators: Message displayed in the history when a widget is edited.
250
+ #: inc/admin.php:429
251
  msgid "Widget edited"
252
  msgstr ""
253
 
254
+ #. translators: Message displayed in the history when a widget is duplicated.
255
+ #: inc/admin.php:431
256
  msgid "Widget duplicated"
257
  msgstr ""
258
 
259
+ #. translators: Message displayed in the history when a widget position is changed.
260
+ #: inc/admin.php:433
261
  msgid "Widget moved"
262
  msgstr ""
263
 
264
+ #. translators: Message displayed in the history when a row is deleted.
265
+ #: inc/admin.php:437
266
  msgid "Row deleted"
267
  msgstr ""
268
 
269
+ #. translators: Message displayed in the history when a row is added.
270
+ #: inc/admin.php:439
271
  msgid "Row added"
272
  msgstr ""
273
 
274
+ #. translators: Message displayed in the history when a row is edited.
275
+ #: inc/admin.php:441
276
  msgid "Row edited"
277
  msgstr ""
278
 
279
+ #. translators: Message displayed in the history when a row position is changed.
280
+ #: inc/admin.php:443
281
  msgid "Row moved"
282
  msgstr ""
283
 
284
+ #. translators: Message displayed in the history when a row is duplicated.
285
+ #: inc/admin.php:445
286
  msgid "Row duplicated"
287
  msgstr ""
288
 
289
+ #. translators: Message displayed in the history when a row is pasted.
290
+ #: inc/admin.php:447
291
  msgid "Row pasted"
292
  msgstr ""
293
 
294
+ #: inc/admin.php:450
295
  msgid "Cell resized"
296
  msgstr ""
297
 
298
+ #: inc/admin.php:453
299
  msgid "Prebuilt layout loaded"
300
  msgstr ""
301
 
302
+ #: inc/admin.php:457
303
  msgid "Loading prebuilt layout"
304
  msgstr ""
305
 
306
+ #: inc/admin.php:458
307
  msgid "Would you like to copy this editor's existing content to Page Builder?"
308
  msgstr ""
309
 
310
+ #: inc/admin.php:459
311
  msgid "Would you like to clear your Page Builder content and revert to using the standard visual editor?"
312
  msgstr ""
313
 
314
+ #. translators: This is the title for a widget called "Layout Builder".
315
+ #: inc/admin.php:461
316
  msgid "Layout Builder Widget"
317
  msgstr ""
318
 
319
  #. translators: A standard confirmation message
320
+ #: inc/admin.php:463, tpl/js-templates.php:97, tpl/js-templates.php:437
321
  msgid "Are you sure?"
322
  msgstr ""
323
 
324
  #. translators: When a layout file is ready to be inserted. %s is the filename.
325
+ #: inc/admin.php:465
326
  msgid "%s is ready to insert."
327
  msgstr ""
328
 
329
+ #: inc/admin.php:469
330
  msgid "Add Widget Below"
331
  msgstr ""
332
 
333
+ #: inc/admin.php:470
334
  msgid "Add Widget to Cell"
335
  msgstr ""
336
 
337
+ #: inc/admin.php:471, tpl/js-templates.php:239
338
  msgid "Search Widgets"
339
  msgstr ""
340
 
341
+ #: inc/admin.php:473, tpl/js-templates.php:17, tpl/js-templates.php:19
342
  msgid "Add Row"
343
  msgstr ""
344
 
345
+ #: inc/admin.php:474
346
  msgid "Column"
347
  msgstr ""
348
 
349
+ #: inc/admin.php:476
350
  msgid "Cell Actions"
351
  msgstr ""
352
 
353
+ #: inc/admin.php:477
354
  msgid "Paste Widget"
355
  msgstr ""
356
 
357
+ #: inc/admin.php:479
358
  msgid "Widget Actions"
359
  msgstr ""
360
 
361
+ #: inc/admin.php:480
362
  msgid "Edit Widget"
363
  msgstr ""
364
 
365
+ #: inc/admin.php:481
366
  msgid "Duplicate Widget"
367
  msgstr ""
368
 
369
+ #: inc/admin.php:482
370
  msgid "Delete Widget"
371
  msgstr ""
372
 
373
+ #: inc/admin.php:483
374
  msgid "Copy Widget"
375
  msgstr ""
376
 
377
+ #: inc/admin.php:484
378
  msgid "Paste Widget Below"
379
  msgstr ""
380
 
381
+ #: inc/admin.php:486
382
  msgid "Row Actions"
383
  msgstr ""
384
 
385
+ #: inc/admin.php:487, tpl/js-templates.php:95
386
  msgid "Edit Row"
387
  msgstr ""
388
 
389
+ #: inc/admin.php:488, tpl/js-templates.php:96
390
  msgid "Duplicate Row"
391
  msgstr ""
392
 
393
+ #: inc/admin.php:489, tpl/js-templates.php:97
394
  msgid "Delete Row"
395
  msgstr ""
396
 
397
+ #: inc/admin.php:490
398
  msgid "Copy Row"
399
  msgstr ""
400
 
401
+ #: inc/admin.php:491
402
  msgid "Paste Row"
403
  msgstr ""
404
 
405
+ #: inc/admin.php:493
406
  msgid "Draft"
407
  msgstr ""
408
 
409
+ #: inc/admin.php:494
410
  msgid "Untitled"
411
  msgstr ""
412
 
413
+ #: inc/admin.php:496
414
  msgid "New Row"
415
  msgstr ""
416
 
417
+ #: inc/admin.php:497, inc/admin.php:505, inc/styles.php:247, tpl/js-templates.php:62
418
  msgid "Row"
419
  msgstr ""
420
 
421
+ #: inc/admin.php:500
422
  msgid "Hmmm... Adding layout elements is not enabled. Please check if Page Builder has been configured to allow adding elements."
423
  msgstr ""
424
 
425
+ #: inc/admin.php:501
426
  msgid "Add a {{%= items[0] %}} to get started."
427
  msgstr ""
428
 
429
+ #: inc/admin.php:502
430
  msgid "Add a {{%= items[0] %}} or {{%= items[1] %}} to get started."
431
  msgstr ""
432
 
433
+ #: inc/admin.php:503
434
  msgid "Add a {{%= items[0] %}}, {{%= items[1] %}} or {{%= items[2] %}} to get started."
435
  msgstr ""
436
 
437
+ #: inc/admin.php:504, inc/styles.php:417, tpl/js-templates.php:61
438
  msgid "Widget"
439
  msgstr ""
440
 
441
+ #: inc/admin.php:506, tpl/js-templates.php:63
442
  msgid "Prebuilt Layout"
443
  msgstr ""
444
 
445
+ #: inc/admin.php:508
446
  msgid "Read our %s if you need help."
447
  msgstr ""
448
 
449
+ #: inc/admin.php:509, tpl/js-templates.php:64
450
  msgid "documentation"
451
  msgstr ""
452
 
453
+ #: inc/admin.php:518
454
  msgid "Page Builder layouts"
455
  msgstr ""
456
 
457
+ #: inc/admin.php:519
458
  msgid "Error uploading or importing file."
459
  msgstr ""
460
 
461
+ #: inc/admin.php:526
462
  msgid "Unknown error. Failed to load the form. Please check your internet connection, contact your web site administrator, or try again later."
463
  msgstr ""
464
 
465
+ #. translators: This is the default name given to a user's home page.
466
+ #: inc/admin.php:710, inc/home.php:26
467
  msgid "Home Page"
468
  msgstr ""
469
 
470
+ #: inc/admin.php:811
471
  msgid "Untitled Widget"
472
  msgstr ""
473
 
474
+ #: inc/admin.php:995
475
  msgid "You need to install 1{%1$s} to use the widget 2{%2$s}."
476
  msgstr ""
477
 
478
+ #: inc/admin.php:1001
479
  msgid "Save and reload this page to start using the widget after you've installed it."
480
  msgstr ""
481
 
482
+ #: inc/admin.php:1017
483
  msgid "The widget 1{%1$s} is not available. Please try locate and install the missing plugin. Post on the 2{support forums} if you need help."
484
  msgstr ""
485
 
486
+ #: inc/admin.php:1204, inc/styles-admin.php:25
487
  msgid "The supplied nonce is invalid."
488
  msgstr ""
489
 
490
+ #: inc/admin.php:1205, inc/styles-admin.php:26
491
  msgid "Invalid nonce."
492
  msgstr ""
493
 
494
+ #: inc/admin.php:1211
495
  msgid "Please specify the type of widget form to be rendered."
496
  msgstr ""
497
 
498
+ #: inc/admin.php:1212
499
  msgid "Missing widget type."
500
  msgstr ""
501
 
502
+ #: inc/admin.php:1319
503
  msgid "%s Widget"
504
  msgid_plural "%s Widgets"
505
  msgstr[0] ""
506
  msgstr[1] ""
507
 
508
+ #: inc/admin.php:1362
509
  msgid "Get the row, cell, and widget %link%."
510
  msgstr ""
511
 
512
+ #: inc/admin.php:1364
513
  msgid "Animations Addon"
514
  msgstr ""
515
 
516
+ #: inc/admin.php:1367
517
  msgid "Get the %link%. Build custom post types with reusable Page Builder layouts."
518
  msgstr ""
519
 
520
+ #: inc/admin.php:1369
521
  msgid "CPT Builder Addon"
522
  msgstr ""
523
 
524
+ #: inc/admin.php:1372
525
  msgid "Get the %link%. Add beautiful and customizable text overlays with animations to your images."
526
  msgstr ""
527
 
528
+ #: inc/admin.php:1374
529
  msgid "Image Overlay Addon"
530
  msgstr ""
531
 
532
+ #: inc/admin.php:1377
533
  msgid "Get a %link% for the SiteOrigin Image, Masonry, and Slider Widgets."
534
  msgstr ""
535
 
536
+ #: inc/admin.php:1379
537
  msgid "Lightbox Addon"
538
  msgstr ""
539
 
540
+ #: inc/admin.php:1382
541
  msgid "Link an entire Page Builder row, cell, or widget with the %link%."
542
  msgstr ""
543
 
544
+ #: inc/admin.php:1384
545
  msgid "Link Overlay Addon"
546
  msgstr ""
547
 
548
+ #: inc/admin.php:1387
549
  msgid "Get the %link%. Create a widget once, use it everywhere. Update it and the changes reflect in all instances of the widget."
550
  msgstr ""
551
 
552
+ #: inc/admin.php:1389
553
  msgid "Mirror Widgets Addon"
554
  msgstr ""
555
 
556
+ #: inc/admin.php:1392
557
  msgid "Upload multiple image frames at once to Widgets Bundle Slider and Image Grid type widgets with %link%."
558
  msgstr ""
559
 
560
+ #: inc/admin.php:1394, inc/admin.php:1399
561
  msgid "SiteOrigin Premium"
562
  msgstr ""
563
 
564
+ #: inc/admin.php:1397
565
  msgid "Add parallax background images to your slider type widgets with %link%."
566
  msgstr ""
567
 
568
+ #: inc/admin.php:1402
569
  msgid "Hide rows and widgets based for logged-in or logged-out users with the %link%."
570
  msgstr ""
571
 
572
+ #: inc/admin.php:1404, inc/admin.php:1409, inc/admin.php:1414
573
  msgid "Toggle Visibility Addon"
574
  msgstr ""
575
 
576
+ #: inc/admin.php:1407
577
  msgid "Show or hide rows and widgets between a selected date range with the %link%."
578
  msgstr ""
579
 
580
+ #: inc/admin.php:1412
581
  msgid "Hide rows and widgets on specific devices with the %link%."
582
  msgstr ""
583
 
584
+ #: inc/admin.php:1417
585
  msgid "Get a %link% with SiteOrigin Premium."
586
  msgstr ""
587
 
588
+ #: inc/admin.php:1419
589
  msgid "Tooltip Addon"
590
  msgstr ""
591
 
592
+ #: inc/admin.php:1422
593
  msgid "Use Google Fonts in SiteOrigin Widgets with the %link%."
594
  msgstr ""
595
 
596
+ #: inc/admin.php:1424
597
  msgid "Webfont Selector Addon"
598
  msgstr ""
599
 
600
+ #: inc/admin.php:1427
601
  msgid "Get fast email support for Page Builder with %link%."
602
  msgstr ""
603
 
604
+ #: inc/admin.php:1429
605
  msgid "SiteOrigin Preimum"
606
  msgstr ""
607
 
608
+ #: inc/admin.php:1434
609
  msgid "Get the %link%. Create custom templates for the Product, Archives, Shop, Cart, and Checkout pages."
610
  msgstr ""
611
 
612
+ #: inc/admin.php:1436
613
  msgid "WooCommerce Templates Addon"
614
  msgstr ""
615
 
616
+ #: inc/admin.php:1629
617
  msgid "Toggle editor selection menu"
618
  msgstr ""
619
 
620
+ #: inc/admin.php:1630, inc/admin.php:1677, inc/settings.php:237, settings/tpl/settings.php:9
621
  msgid "SiteOrigin Page Builder"
622
  msgstr ""
623
 
624
+ #: inc/admin.php:1631
625
  msgid "Block Editor"
626
  msgstr ""
627
 
629
  msgid "Custom Home Page Builder"
630
  msgstr ""
631
 
632
+ #: inc/renderer.php:432
633
  msgid "Prevented SiteOrigin layout from repeated rendering."
634
  msgstr ""
635
 
637
  msgid "Page Builder Content"
638
  msgstr ""
639
 
640
+ #: inc/settings.php:264
641
  msgid "Page Builder Settings"
642
  msgstr ""
643
 
644
+ #: inc/settings.php:281
645
  msgid "General"
646
  msgstr ""
647
 
648
+ #: inc/settings.php:287
649
  msgid "Post Types"
650
  msgstr ""
651
 
652
+ #: inc/settings.php:289
653
  msgid "The post types on which to use Page Builder."
654
  msgstr ""
655
 
656
+ #: inc/settings.php:294
657
  msgid "Use Classic Editor for New Posts"
658
  msgstr ""
659
 
660
+ #: inc/settings.php:295
661
  msgid "New posts of the above Post Types will be created using the Classic Editor."
662
  msgstr ""
663
 
664
+ #: inc/settings.php:300
665
  msgid "Live Editor Toolbar Link"
666
  msgstr ""
667
 
668
+ #: inc/settings.php:301
669
  msgid "Display a Live Editor link in the toolbar when viewing site."
670
  msgstr ""
671
 
672
+ #: inc/settings.php:305
673
  msgid "Live Editor Toolbar Link: Close After Editing"
674
  msgstr ""
675
 
676
+ #: inc/settings.php:306
677
  msgid "When accessing the Live Editor via the toolbar link, return to the site after saving."
678
  msgstr ""
679
 
680
+ #: inc/settings.php:311
681
  msgid "Display Post State"
682
  msgstr ""
683
 
684
+ #: inc/settings.php:313
685
  msgid "Display a %sSiteOrigin Page Builder%s post state in the admin lists of posts/pages to indicate Page Builder is active."
686
  msgstr ""
687
 
688
+ #: inc/settings.php:321
689
  msgid "Display Widget Count"
690
  msgstr ""
691
 
692
+ #: inc/settings.php:322
693
  msgid "Display a widget count in the admin lists of posts/pages where you're using Page Builder."
694
  msgstr ""
695
 
696
+ #: inc/settings.php:327
697
  msgid "Parallax Type"
698
  msgstr ""
699
 
700
+ #: inc/settings.php:329
701
  msgid "Modern"
702
  msgstr ""
703
 
704
+ #: inc/settings.php:330
705
  msgid "Legacy"
706
  msgstr ""
707
 
708
+ #: inc/settings.php:332
709
  msgid "Modern is recommended as it can use smaller images and offers better performance."
710
  msgstr ""
711
 
712
+ #: inc/settings.php:337
713
  msgid "Disable Parallax On Mobile"
714
  msgstr ""
715
 
716
+ #: inc/settings.php:338
717
  msgid "Disable row/widget background parallax when the browser is smaller than the mobile width."
718
  msgstr ""
719
 
720
+ #: inc/settings.php:344
721
  msgid "Limit Parallax Motion"
722
  msgstr ""
723
 
724
+ #: inc/settings.php:345
725
+ msgid "How many pixels of scrolling results in a single pixel of parallax motion. 0 means automatic. Lower values give a more noticeable effect."
726
  msgstr ""
727
 
728
+ #: inc/settings.php:351
729
  msgid "Parallax Delay"
730
  msgstr ""
731
 
732
+ #: inc/settings.php:352
733
  msgid "The delay before the parallax effect finishes after the user stops scrolling."
734
  msgstr ""
735
 
736
+ #: inc/settings.php:357
737
  msgid "Parallax Scale"
738
  msgstr ""
739
 
740
+ #: inc/settings.php:358
741
  msgid "How much the image is scaled. The higher the scale is set, the more visible the parallax effect will be. Increasing the scale will result in a loss of image quality."
742
  msgstr ""
743
 
744
+ #: inc/settings.php:363
745
  msgid "Sidebars Emulator"
746
  msgstr ""
747
 
748
+ #: inc/settings.php:364
749
  msgid "Page Builder will create an emulated sidebar, that contains all widgets in the page."
750
  msgstr ""
751
 
752
+ #: inc/settings.php:369
753
  msgid "Upgrade Teaser"
754
  msgstr ""
755
 
756
+ #: inc/settings.php:371
757
  msgid "Display the %sSiteOrigin Premium%s upgrade teaser in the Page Builder toolbar."
758
  msgstr ""
759
 
760
+ #: inc/settings.php:379
761
  msgid "Default to Page Builder Interface"
762
  msgstr ""
763
 
764
+ #: inc/settings.php:381
765
  msgid "New Classic Editor posts/pages that you create will start with the Page Builder loaded. The %s\"Use Classic Editor for New Posts\"%s setting must be enabled."
766
  msgstr ""
767
 
768
+ #: inc/settings.php:388
769
  msgid "Layout Block Default Mode"
770
  msgstr ""
771
 
772
+ #: inc/settings.php:391, tpl/js-templates.php:144
773
  msgid "Edit"
774
  msgstr ""
775
 
776
+ #: inc/settings.php:392
777
  msgid "Preview"
778
  msgstr ""
779
 
780
+ #: inc/settings.php:394
781
  msgid "Whether to display SiteOrigin Layout Blocks in edit mode or preview mode in the Block Editor."
782
  msgstr ""
783
 
784
+ #: inc/settings.php:400
785
  msgid "Widgets"
786
  msgstr ""
787
 
788
+ #: inc/settings.php:406
789
  msgid "Widget Title HTML"
790
  msgstr ""
791
 
792
+ #: inc/settings.php:407
793
  msgid "The HTML used for widget titles. {{title}} is replaced with the widget title."
794
  msgstr ""
795
 
796
+ #: inc/settings.php:412
797
  msgid "Add Widget Class"
798
  msgstr ""
799
 
800
+ #: inc/settings.php:413
801
  msgid "Add the widget class to Page Builder widgets. Disable if theme widget styles are negatively impacting widgets in Page Builder."
802
  msgstr ""
803
 
804
+ #: inc/settings.php:418
805
  msgid "Legacy Bundled Widgets"
806
  msgstr ""
807
 
808
+ #: inc/settings.php:419
809
  msgid "Load legacy widgets from Page Builder 1."
810
  msgstr ""
811
 
812
+ #: inc/settings.php:425
813
  msgid "Display recommend widgets in the Page Builder Add Widget dialog."
814
  msgstr ""
815
 
816
+ #: inc/settings.php:430
817
  msgid "Instant Open Widgets"
818
  msgstr ""
819
 
820
+ #: inc/settings.php:431
821
  msgid "Open a widget form as soon as it's added to a page."
822
  msgstr ""
823
 
824
+ #: inc/settings.php:437, inc/styles-admin.php:103
825
  msgid "Layout"
826
  msgstr ""
827
 
828
+ #: inc/settings.php:443
829
  msgid "Responsive Layout"
830
  msgstr ""
831
 
832
+ #: inc/settings.php:444
833
  msgid "Collapse widgets, rows, and columns on mobile devices."
834
  msgstr ""
835
 
836
+ #: inc/settings.php:449
837
  msgid "Use Tablet Layout"
838
  msgstr ""
839
 
840
+ #: inc/settings.php:450
841
  msgid "Collapses columns differently on tablet devices."
842
  msgstr ""
843
 
844
+ #: inc/settings.php:456
845
  msgid "Detect older browsers"
846
  msgstr ""
847
 
848
+ #: inc/settings.php:457
849
  msgid "Never"
850
  msgstr ""
851
 
852
+ #: inc/settings.php:458
853
  msgid "Always"
854
  msgstr ""
855
 
856
+ #: inc/settings.php:460
857
  msgid "Use Legacy Layout Engine"
858
  msgstr ""
859
 
860
+ #: inc/settings.php:461
861
  msgid "For compatibility, the Legacy Layout Engine switches from Flexbox to float when older browsers are detected."
862
  msgstr ""
863
 
864
+ #: inc/settings.php:467
865
  msgid "Tablet Width"
866
  msgstr ""
867
 
868
+ #: inc/settings.php:468
869
  msgid "Device width, in pixels, to collapse into a tablet view."
870
  msgstr ""
871
 
872
+ #: inc/settings.php:474
873
  msgid "Mobile Width"
874
  msgstr ""
875
 
876
+ #: inc/settings.php:475
877
  msgid "Device width, in pixels, to collapse into a mobile view."
878
  msgstr ""
879
 
880
+ #: inc/settings.php:481
881
  msgid "Row/Widget Bottom Margin"
882
  msgstr ""
883
 
884
+ #: inc/settings.php:482
885
  msgid "Default margin below rows and widgets."
886
  msgstr ""
887
 
888
+ #: inc/settings.php:488
889
+ msgid "Mobile Row Bottom Margin"
890
  msgstr ""
891
 
892
+ #: inc/settings.php:489
893
  msgid "The default margin below rows on mobile."
894
  msgstr ""
895
 
896
+ #: inc/settings.php:494
897
  msgid "Last Row With Margin"
898
  msgstr ""
899
 
900
+ #: inc/settings.php:495
901
  msgid "Allow margin below the last row."
902
  msgstr ""
903
 
904
+ #: inc/settings.php:501, inc/styles.php:347
905
+ msgid "Mobile Cell Bottom Margin"
906
+ msgstr ""
907
+
908
+ #: inc/settings.php:502
909
+ msgid "The default vertical space between cells in a collapsed mobile row."
910
+ msgstr ""
911
+
912
+ #: inc/settings.php:508
913
+ msgid "Mobile Widget Bottom Margin"
914
+ msgstr ""
915
+
916
+ #: inc/settings.php:509
917
+ msgid "The default widget bottom margin on mobile."
918
+ msgstr ""
919
+
920
+ #: inc/settings.php:515
921
  msgid "Row Gutter"
922
  msgstr ""
923
 
924
+ #: inc/settings.php:516
925
  msgid "Default spacing between columns in each row."
926
  msgstr ""
927
 
928
+ #: inc/settings.php:522
929
  msgid "Full Width Container"
930
  msgstr ""
931
 
932
+ #: inc/settings.php:523
933
  msgid "The container used for the full width layout."
934
  msgstr ""
935
 
936
+ #: inc/settings.php:530
937
  msgid "Automatic"
938
  msgstr ""
939
 
940
+ #: inc/settings.php:531
941
  msgid "Header"
942
  msgstr ""
943
 
944
+ #: inc/settings.php:532
945
  msgid "Footer"
946
  msgstr ""
947
 
948
+ #: inc/settings.php:534
949
  msgid "Page Builder Layout CSS Output Location"
950
  msgstr ""
951
 
952
+ #: inc/settings.php:535
953
  msgid "This setting is only applicable in the Classic Editor."
954
  msgstr ""
955
 
956
+ #: inc/settings.php:541
957
  msgid "Content"
958
  msgstr ""
959
 
960
+ #: inc/settings.php:547
961
  msgid "Copy Content"
962
  msgstr ""
963
 
964
+ #: inc/settings.php:548
965
  msgid "Copy content from Page Builder to post content."
966
  msgstr ""
967
 
968
+ #: inc/settings.php:553
969
  msgid "Copy Styles"
970
  msgstr ""
971
 
972
+ #: inc/settings.php:554
973
  msgid "Include styles into your Post Content. This keeps page layouts, even when Page Builder is deactivated."
974
  msgstr ""
975
 
976
+ #: inc/settings.php:607, inc/styles-admin.php:301
977
  msgid "Enabled"
978
  msgstr ""
979
 
1221
  msgid "Collapse Order"
1222
  msgstr ""
1223
 
1224
+ #: inc/styles.php:304, widgets/widgets.php:636, widgets/widgets.php:758, inc/widgets/post-loop.php:374
1225
  msgid "Default"
1226
  msgstr ""
1227
 
1261
  msgid "Space below the row on mobile devices. Default is %spx."
1262
  msgstr ""
1263
 
 
 
 
 
1264
  #: inc/styles.php:350
1265
  msgid "Vertical space between cells in a collapsed mobile row. Default is %spx."
1266
  msgstr ""
1529
  msgid "Add SiteOrigin Layout Block"
1530
  msgstr ""
1531
 
 
 
 
 
1532
  #: widgets/widgets.php:162
1533
+ msgid "This is a legacy Page Builder widget. Please move to use widgets from the %sSiteOrigin Widgets Bundle%s plugin when able."
 
 
 
 
1534
  msgstr ""
1535
 
1536
+ #: widgets/widgets.php:221
1537
  msgid "Style"
1538
  msgstr ""
1539
 
1540
+ #: widgets/widgets.php:245
1541
  msgid "%s Style"
1542
  msgstr ""
1543
 
1544
+ #: widgets/widgets.php:595, inc/widgets/post-loop.php:332
1545
  msgid "Post Type"
1546
  msgstr ""
1547
 
1548
+ #: widgets/widgets.php:602, inc/widgets/post-loop.php:341
1549
  msgid "Posts Per Page"
1550
  msgstr ""
1551
 
1552
+ #: widgets/widgets.php:607, inc/widgets/post-loop.php:346
1553
  msgid "Order By"
1554
  msgstr ""
1555
 
1556
+ #: widgets/widgets.php:609, widgets/widgets.php:784, inc/widgets/post-content.php:60, inc/widgets/post-loop.php:348
1557
  msgid "None"
1558
  msgstr ""
1559
 
1560
+ #: widgets/widgets.php:610, inc/widgets/post-loop.php:349
1561
  msgid "Post ID"
1562
  msgstr ""
1563
 
1564
+ #: widgets/widgets.php:611, inc/widgets/post-loop.php:350
1565
  msgid "Author"
1566
  msgstr ""
1567
 
1568
+ #: widgets/widgets.php:612, widgets/widgets.php:613, inc/widgets/post-loop.php:351, inc/widgets/post-loop.php:352, widgets/widgets/testimonial/testimonial.php:15
1569
  msgid "Name"
1570
  msgstr ""
1571
 
1572
+ #: widgets/widgets.php:614, inc/widgets/post-loop.php:353
1573
  msgid "Date"
1574
  msgstr ""
1575
 
1576
+ #: widgets/widgets.php:615, inc/widgets/post-loop.php:354
1577
  msgid "Modified"
1578
  msgstr ""
1579
 
1580
+ #: widgets/widgets.php:616, inc/widgets/post-loop.php:355
1581
  msgid "Parent"
1582
  msgstr ""
1583
 
1584
+ #: widgets/widgets.php:617, inc/widgets/post-loop.php:356
1585
  msgid "Random"
1586
  msgstr ""
1587
 
1588
+ #: widgets/widgets.php:618, inc/widgets/post-loop.php:357
1589
  msgid "Comment Count"
1590
  msgstr ""
1591
 
1592
+ #: widgets/widgets.php:619, inc/widgets/post-loop.php:358
1593
  msgid "Menu Order"
1594
  msgstr ""
1595
 
1596
+ #: widgets/widgets.php:625, inc/widgets/post-loop.php:364
1597
  msgid "Order"
1598
  msgstr ""
1599
 
1600
+ #: widgets/widgets.php:627, inc/widgets/post-loop.php:367
1601
  msgid "Ascending"
1602
  msgstr ""
1603
 
1604
+ #: widgets/widgets.php:628, inc/widgets/post-loop.php:366
1605
  msgid "Descending"
1606
  msgstr ""
1607
 
1608
+ #: widgets/widgets.php:634, inc/widgets/post-loop.php:372
1609
  msgid "Sticky Posts"
1610
  msgstr ""
1611
 
1612
+ #: widgets/widgets.php:637, inc/widgets/post-loop.php:375
1613
  msgid "Ignore Sticky"
1614
  msgstr ""
1615
 
1616
+ #: widgets/widgets.php:638, inc/widgets/post-loop.php:376
1617
  msgid "Exclude Sticky"
1618
  msgstr ""
1619
 
1620
+ #: widgets/widgets.php:639, inc/widgets/post-loop.php:377
1621
  msgid "Only Sticky"
1622
  msgstr ""
1623
 
1624
+ #: widgets/widgets.php:645
1625
  msgid "Additional Arguments"
1626
  msgstr ""
1627
 
1628
+ #: widgets/widgets.php:649, inc/widgets/post-loop.php:389
1629
  msgid "Additional query arguments. See 1{query_posts}."
1630
  msgstr ""
1631
 
1632
+ #: widgets/widgets.php:706
1633
  msgid "Gallery (PB)"
1634
  msgstr ""
1635
 
1636
+ #: widgets/widgets.php:708
1637
  msgid "Displays a gallery."
1638
  msgstr ""
1639
 
1640
+ #: widgets/widgets.php:747
1641
  msgid "Gallery Images"
1642
  msgstr ""
1643
 
1644
+ #: widgets/widgets.php:748
1645
  msgid "edit gallery"
1646
  msgstr ""
1647
 
1648
+ #: widgets/widgets.php:752
1649
  msgid "Comma separated attachment IDs. Defaults to all current page's attachments."
1650
  msgstr ""
1651
 
1652
+ #: widgets/widgets.php:756
1653
  msgid "Image Size"
1654
  msgstr ""
1655
 
1656
+ #: widgets/widgets.php:759
1657
  msgid "Large"
1658
  msgstr ""
1659
 
1660
+ #: widgets/widgets.php:760
1661
  msgid "Medium"
1662
  msgstr ""
1663
 
1664
+ #: widgets/widgets.php:761
1665
  msgid "Thumbnail"
1666
  msgstr ""
1667
 
1668
+ #: widgets/widgets.php:762
1669
  msgid "Full"
1670
  msgstr ""
1671
 
1672
+ #: widgets/widgets.php:770
1673
  msgid "Gallery Type"
1674
  msgstr ""
1675
 
1676
+ #: widgets/widgets.php:775
1677
  msgid "Columns"
1678
  msgstr ""
1679
 
1680
+ #: widgets/widgets.php:780
1681
  msgid "Link To"
1682
  msgstr ""
1683
 
1684
+ #: widgets/widgets.php:782
1685
  msgid "Attachment Page"
1686
  msgstr ""
1687
 
1688
+ #: widgets/widgets.php:783
1689
  msgid "File"
1690
  msgstr ""
1691
 
1692
+ #: widgets/widgets.php:801
1693
  msgid "Image (PB)"
1694
  msgstr ""
1695
 
1696
+ #: widgets/widgets.php:803
1697
  msgid "Displays a simple image."
1698
  msgstr ""
1699
 
1700
+ #: widgets/widgets.php:836, widgets/widgets/animated-image/animated-image.php:15
1701
  msgid "Image URL"
1702
  msgstr ""
1703
 
1704
+ #: widgets/widgets.php:840, widgets/widgets/button/button.php:19
1705
  msgid "Destination URL"
1706
  msgstr ""
1707
 
1708
+ #: widgets/widgets.php:854
1709
  msgid "Embedded Video (PB)"
1710
  msgstr ""
1711
 
1712
+ #: widgets/widgets.php:856
1713
  msgid "Embeds a video."
1714
  msgstr ""
1715
 
1716
+ #: widgets/widgets.php:894
1717
  msgid "Video"
1718
  msgstr ""
1719
 
1720
+ #: widgets/widgets.php:910
1721
  msgid "Self Hosted Video (PB)"
1722
  msgstr ""
1723
 
1724
+ #: widgets/widgets.php:912
1725
  msgid "A self hosted video player."
1726
  msgstr ""
1727
 
1728
+ #: widgets/widgets.php:954
1729
  msgid "Video URL"
1730
  msgstr ""
1731
 
1732
+ #: widgets/widgets.php:958
1733
  msgid "Poster URL"
1734
  msgstr ""
1735
 
1736
+ #: widgets/widgets.php:960
1737
  msgid "An image that displays before the video starts playing."
1738
  msgstr ""
1739
 
1740
+ #: widgets/widgets.php:965
1741
  msgid "Auto Play Video"
1742
  msgstr ""
1743
 
readme.txt CHANGED
@@ -3,8 +3,8 @@ Tags: page builder, responsive, parallax, widgets, blocks, gallery, layout, grid
3
  Requires at least: 4.7
4
  Tested up to: 5.8
5
  Requires PHP: 5.6.20
6
- Stable tag: 2.15.3
7
- Build time: 2021-12-01T21:10:54+02:00
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl.html
10
  Donate link: https://siteorigin.com/downloads/premium/
@@ -107,6 +107,16 @@ SiteOrigin Premium includes access to our professional email support service, pe
107
 
108
  == Changelog ==
109
 
 
 
 
 
 
 
 
 
 
 
110
  = 2.15.3 - 01 December 2021 =
111
  * Rows/Cells: Prevented possible data mismatch.
112
 
3
  Requires at least: 4.7
4
  Tested up to: 5.8
5
  Requires PHP: 5.6.20
6
+ Stable tag: 2.16.0
7
+ Build time: 2022-01-04T21:12:21+02:00
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl.html
10
  Donate link: https://siteorigin.com/downloads/premium/
107
 
108
  == Changelog ==
109
 
110
+ = 2.16.0 - 04 January 2022 =
111
+ * Added a new global `Mobile Widget Bottom Margin` setting.
112
+ * Added a new global `Mobile Cell Bottom Margin` setting.
113
+ * Legacy Widgets: Updated for PHP 8 compatibility.
114
+ * WordPress 5.9 Compatibility: Resolved row ordering issue.
115
+ * jQuery: Resolved jQuery Migrate notice. Updated `ready` function.
116
+ * Full-Width Containers Using CSS: Theme container no longer removed on pages without full-width rows.
117
+ * Developer: Resolved JavaScript error when all style fields removed.
118
+ * Developer: Added `panels_title_check_sub_fields` to allow for sub-field detection.
119
+
120
  = 2.15.3 - 01 December 2021 =
121
  * Rows/Cells: Prevented possible data mismatch.
122
 
siteorigin-panels.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Page Builder by SiteOrigin
4
  Plugin URI: https://siteorigin.com/page-builder/
5
  Description: A drag and drop, responsive page builder that simplifies building your website.
6
- Version: 2.15.3
7
  Author: SiteOrigin
8
  Author URI: https://siteorigin.com
9
  License: GPL3
@@ -11,7 +11,7 @@ License URI: http://www.gnu.org/licenses/gpl.html
11
  Donate link: http://siteorigin.com/page-builder/#donate
12
  */
13
 
14
- define( 'SITEORIGIN_PANELS_VERSION', '2.15.3' );
15
  if ( ! defined( 'SITEORIGIN_PANELS_JS_SUFFIX' ) ) {
16
  define( 'SITEORIGIN_PANELS_JS_SUFFIX', '.min' );
17
  }
@@ -299,6 +299,7 @@ class SiteOrigin_Panels {
299
  $container = array(
300
  'selector' => apply_filters( 'siteorigin_panels_theme_container_selector', '' ),
301
  'width' => apply_filters( 'siteorigin_panels_theme_container_width', '' ),
 
302
  );
303
  $container['css_override'] = ! empty( $container['selector'] ) && ! empty( $container['width'] );
304
 
3
  Plugin Name: Page Builder by SiteOrigin
4
  Plugin URI: https://siteorigin.com/page-builder/
5
  Description: A drag and drop, responsive page builder that simplifies building your website.
6
+ Version: 2.16.0
7
  Author: SiteOrigin
8
  Author URI: https://siteorigin.com
9
  License: GPL3
11
  Donate link: http://siteorigin.com/page-builder/#donate
12
  */
13
 
14
+ define( 'SITEORIGIN_PANELS_VERSION', '2.16.0' );
15
  if ( ! defined( 'SITEORIGIN_PANELS_JS_SUFFIX' ) ) {
16
  define( 'SITEORIGIN_PANELS_JS_SUFFIX', '.min' );
17
  }
299
  $container = array(
300
  'selector' => apply_filters( 'siteorigin_panels_theme_container_selector', '' ),
301
  'width' => apply_filters( 'siteorigin_panels_theme_container_width', '' ),
302
+ 'full_width' => false,
303
  );
304
  $container['css_override'] = ! empty( $container['selector'] ) && ! empty( $container['width'] );
305
 
widgets/lib/lessc.inc.php CHANGED
@@ -654,7 +654,7 @@ class lessc {
654
  if ($suffix !== null &&
655
  $subProp[0] == "assign" &&
656
  is_string($subProp[1]) &&
657
- $subProp[1]{0} != $this->vPrefix)
658
  {
659
  $subProp[2] = array(
660
  'list', ' ',
@@ -1621,7 +1621,7 @@ class lessc {
1621
  $this->pushEnv();
1622
  $parser = new lessc_parser($this, __METHOD__);
1623
  foreach ($args as $name => $strValue) {
1624
- if ($name{0} != '@') $name = '@'.$name;
1625
  $parser->count = 0;
1626
  $parser->buffer = (string)$strValue;
1627
  if (!$parser->propertyValue($value)) {
@@ -1646,6 +1646,9 @@ class lessc {
1646
  public function compile($string, $name = null) {
1647
  $locale = setlocale(LC_NUMERIC, 0);
1648
  setlocale(LC_NUMERIC, "C");
 
 
 
1649
 
1650
  $this->parser = $this->makeParser($name);
1651
  $root = $this->parser->parse($string);
@@ -2278,7 +2281,7 @@ class lessc_parser {
2278
  $hidden = true;
2279
  if (!isset($block->args)) {
2280
  foreach ($block->tags as $tag) {
2281
- if (!is_string($tag) || $tag{0} != $this->lessc->mPrefix) {
2282
  $hidden = false;
2283
  break;
2284
  }
@@ -2332,7 +2335,7 @@ class lessc_parser {
2332
  protected function fixTags($tags) {
2333
  // move @ tags out of variable namespace
2334
  foreach ($tags as &$tag) {
2335
- if ($tag{0} == $this->lessc->vPrefix)
2336
  $tag[0] = $this->lessc->mPrefix;
2337
  }
2338
  return $tags;
@@ -3060,9 +3063,13 @@ class lessc_parser {
3060
 
3061
  // consume an end of statement delimiter
3062
  protected function end() {
 
3063
  if ($this->literal(';')) {
3064
  return true;
3065
- } elseif ($this->count == strlen($this->buffer) || $this->buffer{$this->count} == '}') {
 
 
 
3066
  // if there is end of file or a closing block next then we don't need a ;
3067
  return true;
3068
  }
654
  if ($suffix !== null &&
655
  $subProp[0] == "assign" &&
656
  is_string($subProp[1]) &&
657
+ $subProp[1][0] != $this->vPrefix)
658
  {
659
  $subProp[2] = array(
660
  'list', ' ',
1621
  $this->pushEnv();
1622
  $parser = new lessc_parser($this, __METHOD__);
1623
  foreach ($args as $name => $strValue) {
1624
+ if ($name[0] != '@') $name = '@'.$name;
1625
  $parser->count = 0;
1626
  $parser->buffer = (string)$strValue;
1627
  if (!$parser->propertyValue($value)) {
1646
  public function compile($string, $name = null) {
1647
  $locale = setlocale(LC_NUMERIC, 0);
1648
  setlocale(LC_NUMERIC, "C");
1649
+
1650
+ // Account for import increasing the buffer length.
1651
+ $this->count = strlen( $this->buffer );
1652
 
1653
  $this->parser = $this->makeParser($name);
1654
  $root = $this->parser->parse($string);
2281
  $hidden = true;
2282
  if (!isset($block->args)) {
2283
  foreach ($block->tags as $tag) {
2284
+ if (!is_string($tag) || $tag[0] != $this->lessc->mPrefix) {
2285
  $hidden = false;
2286
  break;
2287
  }
2335
  protected function fixTags($tags) {
2336
  // move @ tags out of variable namespace
2337
  foreach ($tags as &$tag) {
2338
+ if ($tag[0] == $this->lessc->vPrefix)
2339
  $tag[0] = $this->lessc->mPrefix;
2340
  }
2341
  return $tags;
3063
 
3064
  // consume an end of statement delimiter
3065
  protected function end() {
3066
+ $adjustedEndCount = strlen( $this->buffer );
3067
  if ($this->literal(';')) {
3068
  return true;
3069
+ } elseif (
3070
+ $this->count == strlen( $this->buffer ) ||
3071
+ substr( $this->buffer, $adjustedEndCount, 1 ) == '}'
3072
+ ) {
3073
  // if there is end of file or a closing block next then we don't need a ;
3074
  return true;
3075
  }
widgets/widgets.php CHANGED
@@ -158,10 +158,11 @@ abstract class SiteOrigin_Panels_Widget extends WP_Widget{
158
  <div style="margin-bottom: 20px;">
159
  <strong>
160
  <?php
161
- _e( 'This is a legacy widget. ', 'siteorigin-panels' );
162
- _e( 'Ideally you should move to using widgets from the SiteOrigin Widgets Bundle instead. ', 'siteorigin-panels' );
163
- _e( "It'll be moved to a separate plugin after Page Builder 2.6 is released. ", 'siteorigin-panels' );
164
- echo '<a href="https://siteorigin.com/widgets-bundle/" target="_blank" rel="noopener noreferrer">' . __( 'Widgets Bundle', 'siteorigin-panels' ) . '</a>';
 
165
  ?>
166
  </strong>
167
  </div>
158
  <div style="margin-bottom: 20px;">
159
  <strong>
160
  <?php
161
+ printf(
162
+ __( 'This is a legacy Page Builder widget. Please move to use widgets from the %sSiteOrigin Widgets Bundle%s plugin when able.', 'siteorigin-panels' ),
163
+ '<a href="https://wordpress.org/plugins/so-widgets-bundle" target="_blank" rel="noopener noreferrer">',
164
+ '</a>'
165
+ );
166
  ?>
167
  </strong>
168
  </div>