0 ) { foreach ( self::$errors as $error ) { echo '
' . esc_html( $error ) . '
' . esc_html( $message ) . '
Thank you for downloading Ajax Live Search; One of the best searching plugins out there. Please feel free to email us if you wanna chat or have any feature request. We also have an extensive documentation in case you encounter any problems when using this plugin.
Due to lack of enough human resources, we currently don't offer email/ticket support to our users of the lite version of this plugin. However, you can upgrade to the pro version and get access to one on one support together with the following extra features;
| Title | Reindex | Remove from index |
|---|---|---|
| post_title; ?> | Reindex | Remove From Index |
| Query | Searches | Results | Last Search |
|---|---|---|---|
| $single->query | "; echo "$single->searches | "; echo "$single->hits | "; echo "$time |
' . $tooltip_html . '
'; } elseif ( $tooltip_html ) { $tooltip_html = als_help_tip( $tooltip_html ); } return array( 'description' => $description, 'tooltip_html' => $tooltip_html ); } /** * Save admin fields. * * * @param array $options * @return bool */ public static function save_fields( $options ) { if ( empty( $_POST ) ) { return false; } // Options to update will be stored here and saved later $update_options = array(); // Loop options and get values to save foreach ( $options as $option ) { if ( ! isset( $option['id'] ) || ! isset( $option['type'] ) ) { continue; } // Get posted value if ( strstr( $option['id'], '[' ) ) { parse_str( $option['id'], $option_name_array ); $option_name = current( array_keys( $option_name_array ) ); $setting_name = key( $option_name_array[ $option_name ] ); $raw_value = isset( $_POST[ $option_name ][ $setting_name ] ) ? wp_unslash( $_POST[ $option_name ][ $setting_name ] ) : null; } else { $option_name = $option['id']; $setting_name = ''; $raw_value = isset( $_POST[ $option['id'] ] ) ? wp_unslash( $_POST[ $option['id'] ] ) : null; } // Format the value based on option type switch ( $option['type'] ) { case 'checkbox' : $value = is_null( $raw_value ) ? 'no' : 'yes'; break; case 'textarea' : $value = wp_kses_post( trim( $raw_value ) ); break; case 'multiselect' : case 'multi_select_countries' : $value = array_filter( array_map( 'als_clean', (array) $raw_value ) ); break; case 'image_width' : $value = array(); if ( isset( $raw_value['width'] ) ) { $value['width'] = als_clean( $raw_value['width'] ); $value['height'] = als_clean( $raw_value['height'] ); $value['crop'] = isset( $raw_value['crop'] ) ? 1 : 0; } else { $value['width'] = $option['default']['width']; $value['height'] = $option['default']['height']; $value['crop'] = $option['default']['crop']; } break; default : $value = als_clean( $raw_value ); break; } /** * Sanitize the value of an option. */ $value = apply_filters( 'als_admin_settings_sanitize_option', $value, $option, $raw_value ); /** * Sanitize the value of an option by option name. */ $value = apply_filters( "als_admin_settings_sanitize_option_$option_name", $value, $option, $raw_value ); if ( is_null( $value ) ) { continue; } // Check if option is an array and handle that differently to single values. if ( $option_name && $setting_name ) { if ( ! isset( $update_options[ $option_name ] ) ) { $update_options[ $option_name ] = get_option( $option_name, array() ); } if ( ! is_array( $update_options[ $option_name ] ) ) { $update_options[ $option_name ] = array(); } $update_options[ $option_name ][ $setting_name ] = $value; } else { $update_options[ $option_name ] = $value; } } // Save all options in our array foreach ( $update_options as $name => $value ) { update_option( $name, $value ); } return true; } /** * Indexing stuff */ public static function show_index_details(){ if(isset($_POST['als_index_more'])) { $index = als_index_new(); self::add_message( __( 'Posts added to index.', 'als-lite' ) ); } $indexed = get_option('als_indexed_posts', 0); $total = als_total_indexable(); self::add_message( als_indexed_count() . __( ' Posts indexed; Out of a total of ', 'als-lite' ) . $total ); } }