Aqua Page Builder - Version 1.1.2

Version Description

Download this release

Release Info

Developer syamilmj
Plugin Icon wp plugin Aqua Page Builder
Version 1.1.2
Comparing to
See all releases

Code changes from version 1.1.1 to 1.1.2

aq-page-builder.php CHANGED
@@ -4,7 +4,7 @@
4
  Plugin Name: Aqua Page Builder
5
  Plugin URI: http://aquagraphite.com/page-builder
6
  Description: Easily create custom page templates with intuitive drag-and-drop interface. Requires PHP5 and WP3.5
7
- Version: 1.1.1
8
  Author: Syamil MJ
9
  Author URI: http://aquagraphite.com
10
 
@@ -33,7 +33,7 @@ Author URI: http://aquagraphite.com
33
  */
34
 
35
  //definitions
36
- if(!defined('AQPB_VERSION')) define( 'AQPB_VERSION', '1.1.1' );
37
  if(!defined('AQPB_PATH')) define( 'AQPB_PATH', plugin_dir_path(__FILE__) );
38
  if(!defined('AQPB_DIR')) define( 'AQPB_DIR', plugin_dir_url(__FILE__) );
39
 
@@ -65,9 +65,10 @@ aq_register_block('AQ_Tabs_Block');
65
 
66
  //fire up page builder
67
  $aqpb_config = aq_page_builder_config();
68
- $aq_page_builder =& new AQ_Page_Builder($aqpb_config);
69
  if(!is_network_admin()) $aq_page_builder->init();
70
 
 
71
  /** @legacy
72
  //set up & fire up plugin updater
73
  $aqpb_updater_config = array(
4
  Plugin Name: Aqua Page Builder
5
  Plugin URI: http://aquagraphite.com/page-builder
6
  Description: Easily create custom page templates with intuitive drag-and-drop interface. Requires PHP5 and WP3.5
7
+ Version: 1.1.2
8
  Author: Syamil MJ
9
  Author URI: http://aquagraphite.com
10
 
33
  */
34
 
35
  //definitions
36
+ if(!defined('AQPB_VERSION')) define( 'AQPB_VERSION', '1.1.2' );
37
  if(!defined('AQPB_PATH')) define( 'AQPB_PATH', plugin_dir_path(__FILE__) );
38
  if(!defined('AQPB_DIR')) define( 'AQPB_DIR', plugin_dir_url(__FILE__) );
39
 
65
 
66
  //fire up page builder
67
  $aqpb_config = aq_page_builder_config();
68
+ $aq_page_builder = new AQ_Page_Builder($aqpb_config);
69
  if(!is_network_admin()) $aq_page_builder->init();
70
 
71
+
72
  /** @legacy
73
  //set up & fire up plugin updater
74
  $aqpb_updater_config = array(
assets/css/aqpb-view.css CHANGED
@@ -95,7 +95,7 @@ foreach($columns as $column) {
95
  echo '</pre>';
96
 
97
  **/
98
- .aq-block-aq_column_block { margin-bottom: 0px; }
99
  .aq-template-wrapper .aq_span1 .aq_span1 { width:100%; }
100
  .aq-template-wrapper .aq_span2 .aq_span1 { width:47.5%; }
101
  .aq-template-wrapper .aq_span2 .aq_span2 { width:100%; }
95
  echo '</pre>';
96
 
97
  **/
98
+ .aq-block-aq_column_block, .block-container { margin-bottom: 0px; }
99
  .aq-template-wrapper .aq_span1 .aq_span1 { width:100%; }
100
  .aq-template-wrapper .aq_span2 .aq_span1 { width:47.5%; }
101
  .aq-template-wrapper .aq_span2 .aq_span2 { width:100%; }
assets/css/aqpb.css CHANGED
@@ -9,8 +9,11 @@ DO NOT EDIT THIS
9
  **/
10
 
11
  /*generic*/
 
12
  .cf:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0;}
 
13
  .cf{display:block;}
 
14
  * html .cf{height:1%;}
15
  a:hover, a:active, a:focus { color: #d54e21; }
16
  /*builder page*/
9
  **/
10
 
11
  /*generic*/
12
+ .clearfix:after,
13
  .cf:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0;}
14
+ .clearfix,
15
  .cf{display:block;}
16
+ * html .clearfix,
17
  * html .cf{height:1%;}
18
  a:hover, a:active, a:focus { color: #d54e21; }
19
  /*builder page*/
assets/css/aqpb_blocks.css CHANGED
@@ -95,14 +95,14 @@ DO NOT EDIT THIS
95
  }
96
 
97
  /* Columns */
98
- #blocks-to-edit .block-aq_column_block {
99
  padding: 4px;
100
  background: #FCFCFC;
101
  margin: 8px -5px -5px 15px;
102
  border: 1px dotted #E3E3E3;
103
  max-width: 734px;
104
  }
105
- #blocks-to-edit .block-aq_column_block ul.blocks {
106
  min-height: 50px;
107
  padding: 0;
108
  margin: 0 0 0 -20px;
95
  }
96
 
97
  /* Columns */
98
+ #blocks-to-edit .block-container {
99
  padding: 4px;
100
  background: #FCFCFC;
101
  margin: 8px -5px -5px 15px;
102
  border: 1px dotted #E3E3E3;
103
  max-width: 734px;
104
  }
105
+ #blocks-to-edit .block-container ul.blocks {
106
  min-height: 50px;
107
  padding: 0;
108
  margin: 0 0 0 -20px;
assets/js/aqpb.js CHANGED
@@ -91,7 +91,7 @@ jQuery(document).ready(function($){
91
 
92
  //set widths when the parent resized
93
  $('#' + blockID).bind( "resizestop", function(event, ui) {
94
- if($('#' + blockID).hasClass('block-aq_column_block')) {
95
  var $blockColumn = $('#' + blockID),
96
  new_maxWidth = parseInt($blockColumn.css('width'));
97
  child_maxWidth = new Array();
@@ -122,7 +122,7 @@ jQuery(document).ready(function($){
122
  $(el).find('.parent').last().val(parent_order);
123
  } else {
124
  $(el).find('.parent').last().val(0);
125
- if($(el).hasClass('block-aq_column_block')) {
126
  block_order = $(el).find('.order').last().val();
127
  $(el).find('li.block').each(function(index,elem) {
128
  $(elem).find('.parent').val(block_order);
@@ -142,8 +142,8 @@ jQuery(document).ready(function($){
142
  }
143
 
144
  function columns_sortable() {
145
- //$('ul#blocks-to-edit, .block-aq_column_block ul.blocks').sortable('disable');
146
- $('#page-builder .column-blocks').sortable({
147
  placeholder: 'placeholder',
148
  connectWith: '#blocks-to-edit, .column-blocks',
149
  items: 'li.block'
@@ -274,7 +274,7 @@ jQuery(document).ready(function($){
274
  ui.item.attr("id", block_archive.replace("__i__", block_number));
275
 
276
  //if column, remove handle bar
277
- if(ui.item.hasClass('block-aq_column_block')) {
278
  ui.item.find('.block-bar').remove();
279
  ui.item.find('.block-settings').removeClass('block-settings').addClass('block-settings-column');
280
  }
@@ -298,8 +298,9 @@ jQuery(document).ready(function($){
298
  }
299
 
300
  //if moving column inside column, cancel it
301
- if(ui.item.hasClass('block-aq_column_block')) {
302
- if(ui.item.parent().hasClass('column-blocks')) {
 
303
  $(this).sortable('cancel');
304
  return false;
305
  }
91
 
92
  //set widths when the parent resized
93
  $('#' + blockID).bind( "resizestop", function(event, ui) {
94
+ if($('#' + blockID).hasClass('block-container')) {
95
  var $blockColumn = $('#' + blockID),
96
  new_maxWidth = parseInt($blockColumn.css('width'));
97
  child_maxWidth = new Array();
122
  $(el).find('.parent').last().val(parent_order);
123
  } else {
124
  $(el).find('.parent').last().val(0);
125
+ if($(el).hasClass('block-container')) {
126
  block_order = $(el).find('.order').last().val();
127
  $(el).find('li.block').each(function(index,elem) {
128
  $(elem).find('.parent').val(block_order);
142
  }
143
 
144
  function columns_sortable() {
145
+ //$('ul#blocks-to-edit, .block-container ul.blocks').sortable('disable');
146
+ $('#page-builder .column-blocks, .block-container').sortable({
147
  placeholder: 'placeholder',
148
  connectWith: '#blocks-to-edit, .column-blocks',
149
  items: 'li.block'
274
  ui.item.attr("id", block_archive.replace("__i__", block_number));
275
 
276
  //if column, remove handle bar
277
+ if(ui.item.hasClass('block-container')) {
278
  ui.item.find('.block-bar').remove();
279
  ui.item.find('.block-settings').removeClass('block-settings').addClass('block-settings-column');
280
  }
298
  }
299
 
300
  //if moving column inside column, cancel it
301
+ if(ui.item.hasClass('block-container')) {
302
+ $parent = ui.item.parent()
303
+ if( $parent.hasClass('block-container') || $parent.hasClass("column-blocks") ) {
304
  $(this).sortable('cancel');
305
  return false;
306
  }
blocks/aq-column-block.php CHANGED
@@ -15,6 +15,29 @@ class AQ_Column_Block extends AQ_Block {
15
 
16
  }
17
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
18
  function form($instance) {
19
  echo '<p class="empty-column">',
20
  __('Drag block items into this column box', 'framework'),
@@ -28,14 +51,14 @@ class AQ_Column_Block extends AQ_Block {
28
  //insert the dynamic block_id & block_saving_id into the array
29
  $this->block_id = 'aq_block_' . $instance['number'];
30
  $instance['block_saving_id'] = 'aq_blocks[aq_block_'. $instance['number'] .']';
31
-
32
  extract($instance);
33
 
34
  $col_order = $order;
35
 
36
  //column block header
37
  if(isset($template_id)) {
38
- echo '<li id="template-block-'.$number.'" class="block block-aq_column_block '.$size.'">',
39
  '<div class="block-settings-column cf" id="block-settings-'.$number.'">',
40
  '<p class="empty-column">',
41
  __('Drag block items into this column box', 'framework'),
15
 
16
  }
17
 
18
+
19
+
20
+ //form header
21
+ function before_form($instance) {
22
+ extract($instance);
23
+
24
+ $title = $title ? '<span class="in-block-title"> : '.$title.'</span>' : '';
25
+ $resizable = $resizable ? '' : 'not-resizable';
26
+
27
+ echo '<li id="template-block-'.$number.'" class="block block-container block-'.$id_base.' '. $size .' '.$resizable.'">',
28
+ '<dl class="block-bar">',
29
+ '<dt class="block-handle">',
30
+ '<div class="block-title">',
31
+ $name , $title,
32
+ '</div>',
33
+ '<span class="block-controls">',
34
+ '<a class="block-edit" id="edit-'.$number.'" title="Edit Block" href="#block-settings-'.$number.'">Edit Block</a>',
35
+ '</span>',
36
+ '</dt>',
37
+ '</dl>',
38
+ '<div class="block-settings cf" id="block-settings-'.$number.'">';
39
+ }
40
+
41
  function form($instance) {
42
  echo '<p class="empty-column">',
43
  __('Drag block items into this column box', 'framework'),
51
  //insert the dynamic block_id & block_saving_id into the array
52
  $this->block_id = 'aq_block_' . $instance['number'];
53
  $instance['block_saving_id'] = 'aq_blocks[aq_block_'. $instance['number'] .']';
54
+
55
  extract($instance);
56
 
57
  $col_order = $order;
58
 
59
  //column block header
60
  if(isset($template_id)) {
61
+ echo '<li id="template-block-'.$number.'" class="block block-container block-aq_column_block '.$size.'">',
62
  '<div class="block-settings-column cf" id="block-settings-'.$number.'">',
63
  '<p class="empty-column">',
64
  __('Drag block items into this column box', 'framework'),
blocks/aq-tabs-block.php CHANGED
@@ -179,7 +179,7 @@ if(!class_exists('AQ_Tabs_Block')) {
179
 
180
  /* AJAX add tab */
181
  function add_tab() {
182
- $nonce = $_POST['security'];
183
  if (! wp_verify_nonce($nonce, 'aqpb-settings-page-nonce') ) die('-1');
184
 
185
  $count = isset($_POST['count']) ? absint($_POST['count']) : false;
179
 
180
  /* AJAX add tab */
181
  function add_tab() {
182
+ $nonce = $_POST['security'];
183
  if (! wp_verify_nonce($nonce, 'aqpb-settings-page-nonce') ) die('-1');
184
 
185
  $count = isset($_POST['count']) ? absint($_POST['count']) : false;
blocks/aq-text-block.php CHANGED
@@ -17,6 +17,7 @@ class AQ_Text_Block extends AQ_Block {
17
 
18
  $defaults = array(
19
  'text' => '',
 
20
  );
21
  $instance = wp_parse_args($instance, $defaults);
22
  extract($instance);
@@ -34,16 +35,29 @@ class AQ_Text_Block extends AQ_Block {
34
  Content
35
  <?php echo aq_field_textarea('text', $block_id, $text, $size = 'full') ?>
36
  </label>
37
- </p>
 
 
 
 
38
 
39
  <?php
40
  }
41
 
42
  function block($instance) {
43
  extract($instance);
 
 
44
 
45
  if($title) echo '<h4 class="aq-block-title">'.strip_tags($title).'</h4>';
46
- echo wpautop(do_shortcode(htmlspecialchars_decode($text)));
 
 
 
 
 
 
 
47
  }
48
 
49
- }
17
 
18
  $defaults = array(
19
  'text' => '',
20
+ 'wp_autop' => 0
21
  );
22
  $instance = wp_parse_args($instance, $defaults);
23
  extract($instance);
35
  Content
36
  <?php echo aq_field_textarea('text', $block_id, $text, $size = 'full') ?>
37
  </label>
38
+ <label for="<?php echo $this->get_field_id('wp_autop') ?>">
39
+ <?php echo aq_field_checkbox('wp_autop', $block_id, $wp_autop) ?>
40
+ Do not create the paragraphs automatically. <code>"wpautop"</code> disable.
41
+ </label>
42
+ </p>
43
 
44
  <?php
45
  }
46
 
47
  function block($instance) {
48
  extract($instance);
49
+
50
+ $wp_autop = ( isset($wp_autop) ) ? $wp_autop : 0;
51
 
52
  if($title) echo '<h4 class="aq-block-title">'.strip_tags($title).'</h4>';
53
+ if($wp_autop == 1){
54
+ echo do_shortcode(htmlspecialchars_decode($text));
55
+ }
56
+ else
57
+ {
58
+ echo wpautop(do_shortcode(htmlspecialchars_decode($text)));
59
+ }
60
+
61
  }
62
 
63
+ }
blocks/aq-upload-block.php CHANGED
@@ -1,6 +1,9 @@
1
  <?php
2
- /* Media Uploader Block */
3
- if(!class_exists('AQ_Upload_Block') {
 
 
 
4
  class AQ_Upload_Block {
5
 
6
  function __construct() {
1
  <?php
2
+ /* Media Uploader Block
3
+ *
4
+ * Please see media block in cuvette
5
+ */
6
+ if(!class_exists('AQ_Upload_Block')) {
7
  class AQ_Upload_Block {
8
 
9
  function __construct() {
classes/class-aq-block.php CHANGED
@@ -18,11 +18,6 @@ if(!class_exists('AQ_Block')) {
18
  var $block_options;
19
  var $instance;
20
 
21
- /* PHP4 constructor */
22
- function AQ_Block($id_base = false, $block_options = array()) {
23
- AQ_Block::__construct($id_base, $block_options);
24
- }
25
-
26
  /* PHP5 constructor */
27
  function __construct($id_base = false, $block_options = array()) {
28
  $this->id_base = isset($id_base) ? strtolower($id_base) : strtolower(get_class($this));
@@ -142,7 +137,7 @@ if(!class_exists('AQ_Block')) {
142
  '</span>',
143
  '</dt>',
144
  '</dl>',
145
- '<div class="block-settings cf" id="block-settings-'.$number.'">';
146
  }
147
 
148
  //form footer
@@ -151,7 +146,7 @@ if(!class_exists('AQ_Block')) {
151
 
152
  $block_saving_id = 'aq_blocks[aq_block_'.$number.']';
153
 
154
- echo '<div class="block-control-actions cf"><a href="#" class="delete">Delete</a> | <a href="#" class="close">Close</a></div>';
155
  echo '<input type="hidden" class="id_base" name="'.$this->get_field_name('id_base').'" value="'.$id_base.'" />';
156
  echo '<input type="hidden" class="name" name="'.$this->get_field_name('name').'" value="'.$name.'" />';
157
  echo '<input type="hidden" class="order" name="'.$this->get_field_name('order').'" value="'.$order.'" />';
@@ -167,7 +162,7 @@ if(!class_exists('AQ_Block')) {
167
  extract($instance);
168
  $column_class = $first ? 'aq-first' : '';
169
 
170
- echo '<div id="aq-block-'.$template_id.'-'.$number.'" class="aq-block aq-block-'.$id_base.' aq_'.$size.' '.$column_class.' cf">';
171
  }
172
 
173
  /* block footer */
18
  var $block_options;
19
  var $instance;
20
 
 
 
 
 
 
21
  /* PHP5 constructor */
22
  function __construct($id_base = false, $block_options = array()) {
23
  $this->id_base = isset($id_base) ? strtolower($id_base) : strtolower(get_class($this));
137
  '</span>',
138
  '</dt>',
139
  '</dl>',
140
+ '<div class="block-settings clearfix" id="block-settings-'.$number.'">';
141
  }
142
 
143
  //form footer
146
 
147
  $block_saving_id = 'aq_blocks[aq_block_'.$number.']';
148
 
149
+ echo '<div class="block-control-actions clearfix"><a href="#" class="delete">Delete</a> | <a href="#" class="close">Close</a></div>';
150
  echo '<input type="hidden" class="id_base" name="'.$this->get_field_name('id_base').'" value="'.$id_base.'" />';
151
  echo '<input type="hidden" class="name" name="'.$this->get_field_name('name').'" value="'.$name.'" />';
152
  echo '<input type="hidden" class="order" name="'.$this->get_field_name('order').'" value="'.$order.'" />';
162
  extract($instance);
163
  $column_class = $first ? 'aq-first' : '';
164
 
165
+ echo '<div id="aq-block-'.$template_id.'-'.$number.'" class="aq-block aq-block-'.$id_base.' aq_'.$size.' '.$column_class.' clearfix">';
166
  }
167
 
168
  /* block footer */
classes/class-aq-page-builder.php CHANGED
@@ -457,8 +457,8 @@ if(!class_exists('AQ_Page_Builder')) {
457
  if($post_type == 'template') {
458
  get_header();
459
  ?>
460
- <div id="main" class="cf">
461
- <div id="content" class="cf">
462
  <?php $this->display_template(get_the_ID()); ?>
463
  <?php if($this->args['debug'] == true) print_r(aq_get_blocks(get_the_ID())) //for debugging ?>
464
  </div>
457
  if($post_type == 'template') {
458
  get_header();
459
  ?>
460
+ <div id="main" class="clearfix">
461
+ <div id="content" class="clearfix">
462
  <?php $this->display_template(get_the_ID()); ?>
463
  <?php if($this->args['debug'] == true) print_r(aq_get_blocks(get_the_ID())) //for debugging ?>
464
  </div>
readme.txt CHANGED
@@ -6,7 +6,7 @@ Tags: page builder, aquagraphite, syamil mj
6
  Requires at least: 3.3
7
  Tested up to: 3.6
8
 
9
- Stable Tag: 1.1.1
10
  License: GNU Version 2 or Any Later Version
11
 
12
 
@@ -27,8 +27,8 @@ Features of the plugin include:
27
  * Highly extensible
28
  * Developer friendly with dozens of actions and filters
29
 
30
- **See our list of [Supported Themes](http://aquagraphite.com/api/documentation/aqua-page-builder#supported-themes)**
31
- **Follow this plugin on [GitHub](https://github.com/sy4mil/Aqua-Page-Builder)**
32
 
33
  More information at [Aquagraphite.com](http://aquagraphite.com/2012/10/aqua-page-builder/).
34
 
@@ -49,11 +49,19 @@ Please see our [Wiki](https://github.com/sy4mil/Aqua-Page-Builder/wiki) section
49
 
50
  == Screenshots ==
51
 
52
- 1. Building panel
53
- 2. Template shortcode inserter
 
54
 
55
  == Changelog ==
56
 
 
 
 
 
 
 
 
57
  = 1.1.1: June 8, 2013 =
58
 
59
  * FIX - Fixed issue with some blocks not exporting
6
  Requires at least: 3.3
7
  Tested up to: 3.6
8
 
9
+ Stable Tag: 1.1.2
10
  License: GNU Version 2 or Any Later Version
11
 
12
 
27
  * Highly extensible
28
  * Developer friendly with dozens of actions and filters
29
 
30
+ **Looking for themes that support this plugin? [Themeforest themes](http://themeforest.net/browse/tags/default/aqua%20page%20builder?ref=SyamilMJ)**
31
+ **Developer? Follow this plugin on [GitHub](https://github.com/sy4mil/Aqua-Page-Builder)**
32
 
33
  More information at [Aquagraphite.com](http://aquagraphite.com/2012/10/aqua-page-builder/).
34
 
49
 
50
  == Screenshots ==
51
 
52
+ 1. Screenshot 1
53
+ 2. Screenshot 2
54
+ 3. Screenshot 3
55
 
56
  == Changelog ==
57
 
58
+ = 1.1.2: August 5, 2013 =
59
+
60
+ * DEL - Removed unused legacy files
61
+ * DEL - Removed PHP4 constructor in AQ_Block class
62
+ * FIX - Changed .cf in favor of .clearfix css class
63
+ * FIX - Bug fixes for WP 3.6 final
64
+
65
  = 1.1.1: June 8, 2013 =
66
 
67
  * FIX - Fixed issue with some blocks not exporting