Changeset 2480680
- Timestamp:
- 02/24/2021 01:08:40 PM (5 years ago)
- Location:
- query-wrangler
- Files:
-
- 2 added
- 20 edited
- 1 copied
-
tags/1.5.49 (copied) (copied from query-wrangler/trunk)
-
tags/1.5.49/.editorconfig (added)
-
tags/1.5.49/README.txt (modified) (5 diffs)
-
tags/1.5.49/admin/css/query-wrangler.css (modified) (1 diff)
-
tags/1.5.49/admin/editors/views/views.js (modified) (1 diff)
-
tags/1.5.49/admin/templates/preview-json.php (modified) (1 diff)
-
tags/1.5.49/includes/basics/footer.php (modified) (1 diff)
-
tags/1.5.49/includes/basics/header.php (modified) (1 diff)
-
tags/1.5.49/includes/class-qw-query.php (modified) (1 diff)
-
tags/1.5.49/includes/overrides/categories.php (modified) (1 diff)
-
tags/1.5.49/includes/query.php (modified) (1 diff)
-
tags/1.5.49/query-wrangler.php (modified) (2 diffs)
-
trunk/.editorconfig (added)
-
trunk/README.txt (modified) (5 diffs)
-
trunk/admin/css/query-wrangler.css (modified) (1 diff)
-
trunk/admin/editors/views/views.js (modified) (1 diff)
-
trunk/admin/templates/preview-json.php (modified) (1 diff)
-
trunk/includes/basics/footer.php (modified) (1 diff)
-
trunk/includes/basics/header.php (modified) (1 diff)
-
trunk/includes/class-qw-query.php (modified) (1 diff)
-
trunk/includes/overrides/categories.php (modified) (1 diff)
-
trunk/includes/query.php (modified) (1 diff)
-
trunk/query-wrangler.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
query-wrangler/tags/1.5.49/README.txt
r2302781 r2480680 4 4 Tags: query, pages, widget, admin, widgets, administration, manage, views, loop 5 5 Requires at least: 4 6 Tested up to: 5. 4.16 Tested up to: 5.6.2 7 7 Stable tag: trunk 8 8 … … 75 75 == Changelog == 76 76 77 = 1.5.49 = 78 79 * Feature: Setting to hide header or footer when no results are found. 80 77 81 = 1.5.48 = 78 82 … … 271 275 * Fix: Unserialize bug - http://wordpress.org/support/topic/bug-that-wipes-all-settings-of-query-after-excluding-fields-from-display?replies=2 272 276 * Fix: 3.7 problem - according to - http://wordpress.org/support/topic/update-has-broken-site#post-4868397 273 * Fix: Row style settings form bug 277 * Fix: Row style settings form bug 274 278 * More complete default query according to WP_Query defaults 275 279 * Feature: PHP WP_Query in preview 276 280 277 281 = 1.5rc12 = 278 282 279 283 * New page routing with hook parse_request 280 284 281 285 = 1.5rc11 = 282 286 283 287 * Chasing WP 3.7 related bugs 284 288 … … 286 290 287 291 * UI fixes and improvements. 288 292 289 293 = 1.5rc9 = 290 294 … … 294 298 295 299 * Fix: Fixing sortable jquery ui issue. QW UI working w/ WP 3.5 296 300 297 301 = 1.5rc7 = 298 302 299 303 * Fix: No longer relying on external jquery sources, working to fix views ui 300 304 301 305 = 1.5rc6 = 302 306 303 307 * Fix: WP update broke jquery and jquery ui. now relying on external sources 304 308 305 309 = 1.5rc5 = 306 310 -
query-wrangler/tags/1.5.49/admin/css/query-wrangler.css
r1254091 r2480680 219 219 } 220 220 221 . ui-dialog .ui-dialog-titlebar-close span {221 .qw-dialog .ui-dialog-titlebar-close span { 222 222 margin: -8px 0 0 -8px; 223 } 224 225 .qw-dialog .ui-dialog-buttonset .ui-widget { 226 display: inline-block; 227 text-decoration: none; 228 font-size: 13px; 229 line-height: 1.5; 230 min-height: 30px; 231 margin: 0 0 0 6px; 232 padding: 0 6px; 233 cursor: pointer; 234 border-width: 1px; 235 border-style: solid; 236 -webkit-appearance: none; 237 border-radius: 3px; 238 white-space: nowrap; 239 box-sizing: border-box; 240 background: #f1f1f1; 241 border-color: #016087; 242 color: #016087; 243 } 244 .qw-dialog .ui-dialog-buttonset .ui-widget:first-of-type { 245 background: #0071a1; 246 border-color: #0071a1; 247 color: #fff; 223 248 } 224 249 -
query-wrangler/tags/1.5.49/admin/editors/views/views.js
r1254091 r2480680 214 214 title: dialog_title, 215 215 resizable: false, 216 closeText: "", 217 classes: { 218 "ui-dialog": "qw-dialog", 219 }, 216 220 217 221 open: function () { -
query-wrangler/tags/1.5.49/admin/templates/preview-json.php
r1254091 r2480680 8 8 $options = qw_generate_query_options( $query_id, $options, TRUE ); 9 9 10 do_action_ref_array( 'qw_pre_preview', array( &$options ) );11 12 10 // get formatted query arguments 13 11 $args = qw_generate_query_args( $options ); 12 13 // pre_query hook 14 $args = apply_filters( 'qw_pre_query', $args, $options ); 15 14 16 // set the new query 15 17 $wp_query = new WP_Query( $args ); 18 19 // pre_render hook 20 $options = apply_filters( 'qw_pre_render', $options, $wp_query ); 16 21 17 22 // get the themed content -
query-wrangler/tags/1.5.49/includes/basics/footer.php
r1254091 r2480680 21 21 function qw_basic_footer_form( $basic, $display ) { 22 22 $footer = isset( $display['footer'] ) ? $display['footer'] : ""; 23 $settings = !empty( $display['footer_settings'] ) ? $display['footer_settings'] : []; 23 24 ?> 24 25 <p class="description"><?php print $basic['description']; ?></p> 25 26 <textarea name="<?php print $basic['form_prefix']; ?>[footer]" 26 27 class="qw-field-textarea qw-js-title"><?php print qw_textarea( $footer ); ?></textarea> 28 <p> 29 <label for="hide-footer-empty"> 30 <input 31 type="checkbox" 32 id="hide-footer-empty" 33 name="<?php print $basic['form_prefix'] ?>[footer_settings][hide_if_empty]" 34 value="1" 35 <?php checked( !empty($settings['hide_if_empty'] ) ) ?> 36 > 37 <?php _e('Hide footer when query has no results') ?> 38 </label> 39 </p> 27 40 <?php 28 41 } 42 43 /* 44 * Hide the footer if the query result is empty. 45 */ 46 add_filter( 'qw_pre_render', function( $options, $wp_query ) { 47 if ( !empty( $options['display']['footer_settings']['hide_if_empty'] ) && !count($wp_query->posts) ) { 48 $options['meta']['footer'] = ''; 49 } 50 51 return $options; 52 }, 0, 2 ); -
query-wrangler/tags/1.5.49/includes/basics/header.php
r1254091 r2480680 20 20 function qw_basic_header_form( $basic, $display ) { 21 21 $header = isset( $display['header'] ) ? $display['header'] : ""; 22 $settings = !empty( $display['header_settings'] ) ? $display['header_settings'] : []; 22 23 ?> 23 24 <p class="description"><?php print $basic['description']; ?></p> 24 25 <textarea name="<?php print $basic['form_prefix']; ?>[header]" 25 26 class="qw-field-textarea qw-js-title"><?php print qw_textarea( $header ); ?></textarea> 27 <p> 28 <label for="hide-header-empty"> 29 <input 30 type="checkbox" 31 id="hide-header-empty" 32 name="<?php print $basic['form_prefix'] ?>[header_settings][hide_if_empty]" 33 value="1" 34 <?php checked( !empty($settings['hide_if_empty'] ) ) ?> 35 > 36 <?php _e('Hide header when query has no results') ?> 37 </label> 38 </p> 26 39 <?php 27 40 } 41 42 /* 43 * Hide the header if the query result is empty. 44 */ 45 add_filter( 'qw_pre_render', function( $options, $wp_query ) { 46 if ( !empty( $options['display']['header_settings']['hide_if_empty'] ) && !count($wp_query->posts) ) { 47 $options['meta']['header'] = ''; 48 } 49 50 return $options; 51 }, 0, 2 ); -
query-wrangler/tags/1.5.49/includes/class-qw-query.php
r1329785 r2480680 145 145 function theme_query() { 146 146 // pre_render hook 147 $this->options = apply_filters( 'qw_pre_render', $this->options, $this-> args);147 $this->options = apply_filters( 'qw_pre_render', $this->options, $this->wp_query ); 148 148 149 149 // get the themed content -
query-wrangler/tags/1.5.49/includes/overrides/categories.php
r1329785 r2480680 108 108 function qw_override_categories_get_query( $wp_query ) { 109 109 if ( $wp_query->is_category() && $wp_query->is_archive() ) { 110 $term = $wp_query->get_queried_object(); 111 $query_id = qw_get_query_by_override_term( $term->term_id ); 110 $term = $wp_query->get_queried_object(); 111 if ($term instanceof \WP_Term) { 112 $query_id = qw_get_query_by_override_term($term->term_id); 112 113 113 if ( $query_id && $qw_query = qw_get_query( $query_id )) {114 if ($query_id && $qw_query = qw_get_query($query_id)) { 114 115 115 // add the appropriate filter to the query116 $qw_query->add_handler_item('filter',117 'categories',118 array(119 'cat_operator' => 'cat',120 'cats' => array( $term->term_id => $term->name),121 ))122 // override the post title123 ->override_options(array(124 'display' => array(125 'title' => single_term_title( '', FALSE),126 )127 ));116 // add the appropriate filter to the query 117 $qw_query->add_handler_item('filter', 118 'categories', 119 array( 120 'cat_operator' => 'cat', 121 'cats' => array($term->term_id => $term->name), 122 )) 123 // override the post title 124 ->override_options(array( 125 'display' => array( 126 'title' => single_term_title('', false), 127 ) 128 )); 128 129 129 return $qw_query; 130 } 131 } 130 return $qw_query; 131 } 132 } 133 } 132 134 133 135 return FALSE; -
query-wrangler/tags/1.5.49/includes/query.php
r2302777 r2480680 26 26 27 27 // pre_render hook 28 $options = apply_filters( 'qw_pre_render', $options );28 $options = apply_filters( 'qw_pre_render', $options, $qw_query ); 29 29 30 30 // get the themed content -
query-wrangler/tags/1.5.49/query-wrangler.php
r2302781 r2480680 10 10 Author: Jonathan Daggerhart 11 11 Author URI: http://daggerhart.com 12 Version: 1.5.4 812 Version: 1.5.49 13 13 14 14 ****************************************************************** … … 31 31 32 32 // some useful definitions 33 define( 'QW_VERSION', 1.54 8);33 define( 'QW_VERSION', 1.549 ); 34 34 define( 'QW_PLUGIN_DIR', dirname( __FILE__ ) ); 35 35 define( 'QW_PLUGIN_URL', plugins_url( '', __FILE__ ) ); -
query-wrangler/trunk/README.txt
r2302781 r2480680 4 4 Tags: query, pages, widget, admin, widgets, administration, manage, views, loop 5 5 Requires at least: 4 6 Tested up to: 5. 4.16 Tested up to: 5.6.2 7 7 Stable tag: trunk 8 8 … … 75 75 == Changelog == 76 76 77 = 1.5.49 = 78 79 * Feature: Setting to hide header or footer when no results are found. 80 77 81 = 1.5.48 = 78 82 … … 271 275 * Fix: Unserialize bug - http://wordpress.org/support/topic/bug-that-wipes-all-settings-of-query-after-excluding-fields-from-display?replies=2 272 276 * Fix: 3.7 problem - according to - http://wordpress.org/support/topic/update-has-broken-site#post-4868397 273 * Fix: Row style settings form bug 277 * Fix: Row style settings form bug 274 278 * More complete default query according to WP_Query defaults 275 279 * Feature: PHP WP_Query in preview 276 280 277 281 = 1.5rc12 = 278 282 279 283 * New page routing with hook parse_request 280 284 281 285 = 1.5rc11 = 282 286 283 287 * Chasing WP 3.7 related bugs 284 288 … … 286 290 287 291 * UI fixes and improvements. 288 292 289 293 = 1.5rc9 = 290 294 … … 294 298 295 299 * Fix: Fixing sortable jquery ui issue. QW UI working w/ WP 3.5 296 300 297 301 = 1.5rc7 = 298 302 299 303 * Fix: No longer relying on external jquery sources, working to fix views ui 300 304 301 305 = 1.5rc6 = 302 306 303 307 * Fix: WP update broke jquery and jquery ui. now relying on external sources 304 308 305 309 = 1.5rc5 = 306 310 -
query-wrangler/trunk/admin/css/query-wrangler.css
r1254091 r2480680 219 219 } 220 220 221 . ui-dialog .ui-dialog-titlebar-close span {221 .qw-dialog .ui-dialog-titlebar-close span { 222 222 margin: -8px 0 0 -8px; 223 } 224 225 .qw-dialog .ui-dialog-buttonset .ui-widget { 226 display: inline-block; 227 text-decoration: none; 228 font-size: 13px; 229 line-height: 1.5; 230 min-height: 30px; 231 margin: 0 0 0 6px; 232 padding: 0 6px; 233 cursor: pointer; 234 border-width: 1px; 235 border-style: solid; 236 -webkit-appearance: none; 237 border-radius: 3px; 238 white-space: nowrap; 239 box-sizing: border-box; 240 background: #f1f1f1; 241 border-color: #016087; 242 color: #016087; 243 } 244 .qw-dialog .ui-dialog-buttonset .ui-widget:first-of-type { 245 background: #0071a1; 246 border-color: #0071a1; 247 color: #fff; 223 248 } 224 249 -
query-wrangler/trunk/admin/editors/views/views.js
r1254091 r2480680 214 214 title: dialog_title, 215 215 resizable: false, 216 closeText: "", 217 classes: { 218 "ui-dialog": "qw-dialog", 219 }, 216 220 217 221 open: function () { -
query-wrangler/trunk/admin/templates/preview-json.php
r1254091 r2480680 8 8 $options = qw_generate_query_options( $query_id, $options, TRUE ); 9 9 10 do_action_ref_array( 'qw_pre_preview', array( &$options ) );11 12 10 // get formatted query arguments 13 11 $args = qw_generate_query_args( $options ); 12 13 // pre_query hook 14 $args = apply_filters( 'qw_pre_query', $args, $options ); 15 14 16 // set the new query 15 17 $wp_query = new WP_Query( $args ); 18 19 // pre_render hook 20 $options = apply_filters( 'qw_pre_render', $options, $wp_query ); 16 21 17 22 // get the themed content -
query-wrangler/trunk/includes/basics/footer.php
r1254091 r2480680 21 21 function qw_basic_footer_form( $basic, $display ) { 22 22 $footer = isset( $display['footer'] ) ? $display['footer'] : ""; 23 $settings = !empty( $display['footer_settings'] ) ? $display['footer_settings'] : []; 23 24 ?> 24 25 <p class="description"><?php print $basic['description']; ?></p> 25 26 <textarea name="<?php print $basic['form_prefix']; ?>[footer]" 26 27 class="qw-field-textarea qw-js-title"><?php print qw_textarea( $footer ); ?></textarea> 28 <p> 29 <label for="hide-footer-empty"> 30 <input 31 type="checkbox" 32 id="hide-footer-empty" 33 name="<?php print $basic['form_prefix'] ?>[footer_settings][hide_if_empty]" 34 value="1" 35 <?php checked( !empty($settings['hide_if_empty'] ) ) ?> 36 > 37 <?php _e('Hide footer when query has no results') ?> 38 </label> 39 </p> 27 40 <?php 28 41 } 42 43 /* 44 * Hide the footer if the query result is empty. 45 */ 46 add_filter( 'qw_pre_render', function( $options, $wp_query ) { 47 if ( !empty( $options['display']['footer_settings']['hide_if_empty'] ) && !count($wp_query->posts) ) { 48 $options['meta']['footer'] = ''; 49 } 50 51 return $options; 52 }, 0, 2 ); -
query-wrangler/trunk/includes/basics/header.php
r1254091 r2480680 20 20 function qw_basic_header_form( $basic, $display ) { 21 21 $header = isset( $display['header'] ) ? $display['header'] : ""; 22 $settings = !empty( $display['header_settings'] ) ? $display['header_settings'] : []; 22 23 ?> 23 24 <p class="description"><?php print $basic['description']; ?></p> 24 25 <textarea name="<?php print $basic['form_prefix']; ?>[header]" 25 26 class="qw-field-textarea qw-js-title"><?php print qw_textarea( $header ); ?></textarea> 27 <p> 28 <label for="hide-header-empty"> 29 <input 30 type="checkbox" 31 id="hide-header-empty" 32 name="<?php print $basic['form_prefix'] ?>[header_settings][hide_if_empty]" 33 value="1" 34 <?php checked( !empty($settings['hide_if_empty'] ) ) ?> 35 > 36 <?php _e('Hide header when query has no results') ?> 37 </label> 38 </p> 26 39 <?php 27 40 } 41 42 /* 43 * Hide the header if the query result is empty. 44 */ 45 add_filter( 'qw_pre_render', function( $options, $wp_query ) { 46 if ( !empty( $options['display']['header_settings']['hide_if_empty'] ) && !count($wp_query->posts) ) { 47 $options['meta']['header'] = ''; 48 } 49 50 return $options; 51 }, 0, 2 ); -
query-wrangler/trunk/includes/class-qw-query.php
r1329785 r2480680 145 145 function theme_query() { 146 146 // pre_render hook 147 $this->options = apply_filters( 'qw_pre_render', $this->options, $this-> args);147 $this->options = apply_filters( 'qw_pre_render', $this->options, $this->wp_query ); 148 148 149 149 // get the themed content -
query-wrangler/trunk/includes/overrides/categories.php
r1329785 r2480680 108 108 function qw_override_categories_get_query( $wp_query ) { 109 109 if ( $wp_query->is_category() && $wp_query->is_archive() ) { 110 $term = $wp_query->get_queried_object(); 111 $query_id = qw_get_query_by_override_term( $term->term_id ); 110 $term = $wp_query->get_queried_object(); 111 if ($term instanceof \WP_Term) { 112 $query_id = qw_get_query_by_override_term($term->term_id); 112 113 113 if ( $query_id && $qw_query = qw_get_query( $query_id )) {114 if ($query_id && $qw_query = qw_get_query($query_id)) { 114 115 115 // add the appropriate filter to the query116 $qw_query->add_handler_item('filter',117 'categories',118 array(119 'cat_operator' => 'cat',120 'cats' => array( $term->term_id => $term->name),121 ))122 // override the post title123 ->override_options(array(124 'display' => array(125 'title' => single_term_title( '', FALSE),126 )127 ));116 // add the appropriate filter to the query 117 $qw_query->add_handler_item('filter', 118 'categories', 119 array( 120 'cat_operator' => 'cat', 121 'cats' => array($term->term_id => $term->name), 122 )) 123 // override the post title 124 ->override_options(array( 125 'display' => array( 126 'title' => single_term_title('', false), 127 ) 128 )); 128 129 129 return $qw_query; 130 } 131 } 130 return $qw_query; 131 } 132 } 133 } 132 134 133 135 return FALSE; -
query-wrangler/trunk/includes/query.php
r2302777 r2480680 26 26 27 27 // pre_render hook 28 $options = apply_filters( 'qw_pre_render', $options );28 $options = apply_filters( 'qw_pre_render', $options, $qw_query ); 29 29 30 30 // get the themed content -
query-wrangler/trunk/query-wrangler.php
r2302781 r2480680 10 10 Author: Jonathan Daggerhart 11 11 Author URI: http://daggerhart.com 12 Version: 1.5.4 812 Version: 1.5.49 13 13 14 14 ****************************************************************** … … 31 31 32 32 // some useful definitions 33 define( 'QW_VERSION', 1.54 8);33 define( 'QW_VERSION', 1.549 ); 34 34 define( 'QW_PLUGIN_DIR', dirname( __FILE__ ) ); 35 35 define( 'QW_PLUGIN_URL', plugins_url( '', __FILE__ ) );
Note: See TracChangeset
for help on using the changeset viewer.