Changeset 2030130
- Timestamp:
- 02/13/2019 08:39:15 PM (6 years ago)
- Location:
- elasticpress/trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
elasticpress/trunk/classes/class-ep-api.php
r2027395 r2030130 864 864 865 865 foreach ( $post_meta as $meta_key => $meta_values ) { 866 // Skip if no meta key. 867 if ( ! $meta_key ) { 868 continue; 869 } 870 866 871 if ( ! is_array( $meta_values ) ) { 867 872 $meta_values = array( $meta_values ); … … 1535 1540 */ 1536 1541 // Check first if there's sticky posts and show them only in the front page 1542 1537 1543 $sticky_posts = get_option( 'sticky_posts' ); 1544 $sticky_posts = ( is_array( $sticky_posts ) && empty( $sticky_posts ) ) ? false : $sticky_posts; 1545 1538 1546 if( false !== $sticky_posts 1539 1547 && is_home() 1540 1548 && in_array( $args['ignore_sticky_posts'], array( 'false', 0 ) ) ) { 1541 //let's eliminate sort so it does not mess with function_score results 1542 $formatted_args['sort'] = array(); 1549 1550 $new_sort = array( 1551 array( 1552 '_score' => array( 1553 'order' => 'desc', 1554 ), 1555 ) 1556 ); 1557 1558 $formatted_args['sort'] = array_merge( $new_sort, $formatted_args['sort'] ); 1559 1543 1560 $formatted_args_query = $formatted_args['query']; 1544 1561 $formatted_args['query'] = array(); … … 1550 1567 'terms' => array( '_id' => $sticky_posts ) 1551 1568 ), 1552 'weight' => 2 1569 'weight' => 20 1553 1570 ) 1554 1571 ); -
elasticpress/trunk/classes/class-ep-config.php
r2027395 r2030130 368 368 369 369 /** 370 * Sanitize bulk settings. 371 * 372 * @param $bulk_settings 373 * @return int 374 */ 375 function ep_sanitize_bulk_settings( $bulk_settings = 350 ) { 376 $bulk_settings = absint( $bulk_settings ); 377 return ( 0 === $bulk_settings ) ? 350 : $bulk_settings; 378 } 379 380 /** 370 381 * Prepare credentials if they are set for future use. 371 382 */ -
elasticpress/trunk/classes/class-ep-dashboard.php
r2027395 r2030130 920 920 register_setting( 'elasticpress', 'ep_prefix', 'sanitize_text_field' ); 921 921 register_setting( 'elasticpress', 'ep_credentials', 'ep_sanitize_credentials' ); 922 register_setting( 'elasticpress', 'ep_bulk_setting', array( 'type' => 'integer', 'sanitize_callback' => ' absint' ) );922 register_setting( 'elasticpress', 'ep_bulk_setting', array( 'type' => 'integer', 'sanitize_callback' => 'ep_sanitize_bulk_settings' ) ); 923 923 } 924 924 } -
elasticpress/trunk/elasticpress.php
r2027395 r2030130 4 4 * Plugin Name: ElasticPress 5 5 * Description: A fast and flexible search and query engine for WordPress. 6 * Version: 2.8. 06 * Version: 2.8.1 7 7 * Author: Taylor Lovett, Matt Gross, Aaron Holbrook, 10up 8 8 * Author URI: http://10up.com … … 23 23 define( 'EP_URL', plugin_dir_url( __FILE__ ) ); 24 24 define( 'EP_PATH', plugin_dir_path( __FILE__ ) ); 25 define( 'EP_VERSION', '2.8. 0' );25 define( 'EP_VERSION', '2.8.1' ); 26 26 27 27 /** -
elasticpress/trunk/readme.txt
r2027395 r2030130 40 40 41 41 == Changelog == 42 43 = 2.8.1 = 44 45 * Bugfix for homepage out of chronological order. 46 * Bugfix for missing meta key. (Props [turtlepod](https://github.com/turtlepod)) 47 * Bugfix for bulk indexing default value on settings page. 42 48 43 49 = 2.8.0 =
Note: See TracChangeset
for help on using the changeset viewer.