Plugin Directory

Changeset 2030130


Ignore:
Timestamp:
02/13/2019 08:39:15 PM (6 years ago)
Author:
collinsinternet
Message:

Version 2.8.1

Location:
elasticpress/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • elasticpress/trunk/classes/class-ep-api.php

    r2027395 r2030130  
    864864
    865865        foreach ( $post_meta as $meta_key => $meta_values ) {
     866            // Skip if no meta key.
     867            if ( ! $meta_key ) {
     868                continue;
     869            }
     870
    866871            if ( ! is_array( $meta_values ) ) {
    867872                $meta_values = array( $meta_values );
     
    15351540         */
    15361541        // Check first if there's sticky posts and show them only in the front page
     1542
    15371543        $sticky_posts = get_option( 'sticky_posts' );
     1544        $sticky_posts = ( is_array( $sticky_posts ) && empty( $sticky_posts ) ) ? false : $sticky_posts;
     1545
    15381546        if( false !== $sticky_posts
    15391547            && is_home()
    15401548            && 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
    15431560            $formatted_args_query = $formatted_args['query'];
    15441561            $formatted_args['query'] = array();
     
    15501567                        'terms' => array( '_id' => $sticky_posts )
    15511568                    ),
    1552                     'weight' => 2
     1569                    'weight' => 20
    15531570                )
    15541571            );
  • elasticpress/trunk/classes/class-ep-config.php

    r2027395 r2030130  
    368368
    369369/**
     370 * Sanitize bulk settings.
     371 *
     372 * @param $bulk_settings
     373 * @return int
     374 */
     375function ep_sanitize_bulk_settings( $bulk_settings = 350 ) {
     376    $bulk_settings = absint( $bulk_settings );
     377    return ( 0 === $bulk_settings ) ? 350 : $bulk_settings;
     378}
     379
     380/**
    370381 * Prepare credentials if they are set for future use.
    371382 */
  • elasticpress/trunk/classes/class-ep-dashboard.php

    r2027395 r2030130  
    920920            register_setting( 'elasticpress', 'ep_prefix', 'sanitize_text_field' );
    921921            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' ) );
    923923        }
    924924    }
  • elasticpress/trunk/elasticpress.php

    r2027395 r2030130  
    44 * Plugin Name: ElasticPress
    55 * Description: A fast and flexible search and query engine for WordPress.
    6  * Version:     2.8.0
     6 * Version:     2.8.1
    77 * Author:      Taylor Lovett, Matt Gross, Aaron Holbrook, 10up
    88 * Author URI:  http://10up.com
     
    2323define( 'EP_URL', plugin_dir_url( __FILE__ ) );
    2424define( 'EP_PATH', plugin_dir_path( __FILE__ ) );
    25 define( 'EP_VERSION', '2.8.0' );
     25define( 'EP_VERSION', '2.8.1' );
    2626
    2727/**
  • elasticpress/trunk/readme.txt

    r2027395 r2030130  
    4040
    4141== 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.
    4248
    4349= 2.8.0 =
Note: See TracChangeset for help on using the changeset viewer.