Changeset 3419752
- Timestamp:
- 12/15/2025 07:08:31 AM (3 months ago)
- Location:
- autocomplete-search
- Files:
-
- 44 added
- 5 edited
-
tags/1.2.0 (added)
-
tags/1.2.0/LICENSE.txt (added)
-
tags/1.2.0/README.txt (added)
-
tags/1.2.0/admin (added)
-
tags/1.2.0/admin/class-autocomplete-search-admin.php (added)
-
tags/1.2.0/admin/css (added)
-
tags/1.2.0/admin/css/autocomplete-search-admin.css (added)
-
tags/1.2.0/admin/includes (added)
-
tags/1.2.0/admin/includes/settings.php (added)
-
tags/1.2.0/admin/index.php (added)
-
tags/1.2.0/admin/js (added)
-
tags/1.2.0/admin/js/autocomplete-search-admin.js (added)
-
tags/1.2.0/admin/partials (added)
-
tags/1.2.0/admin/partials/autocomplete-search-admin-display.php (added)
-
tags/1.2.0/autocomplete-search.php (added)
-
tags/1.2.0/includes (added)
-
tags/1.2.0/includes/actions.php (added)
-
tags/1.2.0/includes/class-autocomplete-search-activator.php (added)
-
tags/1.2.0/includes/class-autocomplete-search-deactivator.php (added)
-
tags/1.2.0/includes/class-autocomplete-search-i18n.php (added)
-
tags/1.2.0/includes/class-autocomplete-search-loader.php (added)
-
tags/1.2.0/includes/class-autocomplete-search.php (added)
-
tags/1.2.0/includes/index.php (added)
-
tags/1.2.0/includes/shortcodes.php (added)
-
tags/1.2.0/index.php (added)
-
tags/1.2.0/languages (added)
-
tags/1.2.0/languages/autocomplete-search.pot (added)
-
tags/1.2.0/public (added)
-
tags/1.2.0/public/class-autocomplete-search-public.php (added)
-
tags/1.2.0/public/css (added)
-
tags/1.2.0/public/css/autocomplete-search-public.css (added)
-
tags/1.2.0/public/images (added)
-
tags/1.2.0/public/images/Screenshot-1.png (added)
-
tags/1.2.0/public/images/Screenshot-2.png (added)
-
tags/1.2.0/public/images/Screenshot-3.png (added)
-
tags/1.2.0/public/images/loading.svg (added)
-
tags/1.2.0/public/images/placeholder.jpg (added)
-
tags/1.2.0/public/images/search.svg (added)
-
tags/1.2.0/public/index.php (added)
-
tags/1.2.0/public/js (added)
-
tags/1.2.0/public/js/autocomplete-search-public.js (added)
-
tags/1.2.0/public/partials (added)
-
tags/1.2.0/public/partials/autocomplete-search-public-display.php (added)
-
tags/1.2.0/uninstall.php (added)
-
trunk/README.txt (modified) (3 diffs)
-
trunk/admin/includes/settings.php (modified) (2 diffs)
-
trunk/autocomplete-search.php (modified) (2 diffs)
-
trunk/includes/shortcodes.php (modified) (1 diff)
-
trunk/public/class-autocomplete-search-public.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
autocomplete-search/trunk/README.txt
r3344494 r3419752 4 4 Donate link: https://www.paypal.com/aartichauhan13 5 5 Requires at least: 5.0 6 Tested up to: 6. 8.26 Tested up to: 6.9 7 7 Requires PHP: 7.2 8 Stable tag: 1. 1.08 Stable tag: 1.2.0 9 9 Author: Aarti Chauhan 10 10 License: GPLv2 or later … … 48 48 4. Add the Search Box 49 49 Use the [atcl_autocomplete_search] shortcode to display the search box on any post, page, or widget area. 50 51 You can also pass a custom CSS class to style the search box differently in your theme: 52 53 [atcl_autocomplete_search class="header-search"] 54 55 This allows full control over the appearance using your theme’s CSS. 56 50 57 51 58 == Frequently Asked Questions == … … 103 110 * Updated settings page UI for better usability. 104 111 * Minor bug fixes and code optimizations. 112 113 114 = 1.2.0 = 115 * Added theme-level control for search box styling via filters and CSS classes. 116 * Added filter to customize the search input placeholder text. 117 * Added support for custom wrapper and input field CSS classes. 118 * Added shortcode attribute to allow custom CSS classes per search instance. 119 * Minor code refactoring and performance optimizations. 120 121 122 == Developers == 123 124 The plugin provides filters to allow theme and plugin developers to customize output: 125 126 * `atcl_autocomplete_search_placeholder` – Filter the search input placeholder text. 127 * `atcl_autocomplete_search_wrapper_class` – Filter the wrapper CSS classes. 128 * `atcl_autocomplete_search_input_class` – Filter the input field CSS classes. 129 130 Shortcode attributes: 131 * `class` – Add a custom CSS class to the search wrapper. 132 133 Example: 134 [atcl_autocomplete_search class="header-search"] -
autocomplete-search/trunk/admin/includes/settings.php
r3203104 r3419752 96 96 } 97 97 98 $post_types = get_post_types( array( 'exclude_from_search' => false ), 'objects' ); 98 $post_types = get_post_types( 99 array( 100 'public' => true, 101 'show_ui' => true, 102 ), 103 'objects' 104 ); 99 105 100 106 ?> … … 115 121 </tr> 116 122 <?php 117 foreach($post_types as $key => $type) { if( $key == "attachment" ) continue;?> 123 foreach($post_types as $key => $type) { if( $key == "attachment" ) continue; 124 125 126 ?> 118 127 <tr> 119 128 <td> -
autocomplete-search/trunk/autocomplete-search.php
r3344488 r3419752 3 3 * Plugin Name: Autocomplete Search 4 4 * Description: Easily add an autocomplete search feature to your WordPress site. Search across posts, pages, and WooCommerce products with a fast, AJAX-powered search box. [atcl_autocomplete_search] 5 * Version: 1. 1.05 * Version: 1.2.0 6 6 * Requires PHP: 7.2 7 7 * Author: Aarti Chauhan 8 * Author URI: https://profiles.wordpress.org/aarti1318/8 * Author URI: https://profiles.wordpress.org/aarti1318/ 9 9 * Contributors: aarti1318 10 10 * License: GPL-2.0+ … … 23 23 * Rename this for your plugin and update it as you release new versions. 24 24 */ 25 define('ATCL_AUTOCOMPLETE_SEARCH_VERSION', '1. 1.0');25 define('ATCL_AUTOCOMPLETE_SEARCH_VERSION', '1.2.0'); 26 26 define('ATCL_IMAGES_URL', plugins_url('/autocomplete-search/public/images/', dirname(__FILE__))); 27 27 /** -
autocomplete-search/trunk/includes/shortcodes.php
r3344488 r3419752 51 51 } 52 52 /** 53 * atcl_autocomplete_callback the function to denfinr the [ wp_autocomplete] shortcode.53 * atcl_autocomplete_callback the function to denfinr the [atcl_autocomplete_search] shortcode. 54 54 * 55 * @since 1. 0.055 * @since 1.2.0 56 56 * @param string $atts The attributes for the shortcode. 57 57 * @param string $content The content of the shortcode. 58 58 */ 59 public function atcl_autocomplete_callback( $atts, $content = '' ) 60 { 59 public function atcl_autocomplete_callback( $atts, $content = '' ) { 60 61 // Allow shortcode attributes 62 $atts = shortcode_atts( 63 array( 64 'class' => '', // custom class from shortcode 65 ), 66 $atts, 67 'autocomplete_search' 68 ); 69 70 // Placeholder text (theme / plugin can override) 71 $placeholder = apply_filters( 72 'atcl_autocomplete_search_placeholder', 73 __( 'I’m searching for…', 'autocomplete-search' ) 74 ); 75 76 // Wrapper class filter 77 $wrapper_class = apply_filters( 78 'atcl_autocomplete_search_wrapper_class', 79 'site-search ajax-search' 80 ); 81 82 // Input field class filter 83 $input_class = apply_filters( 84 'atcl_autocomplete_search_input_class', 85 'search-field' 86 ); 87 61 88 ob_start(); 62 89 ?> 63 <div class=" site-search ajax-search">90 <div class="<?php echo esc_attr( $wrapper_class . ' ' . $atts['class'] ); ?>"> 64 91 <div class="widget widget_search"> 65 92 <div class="ajax-search-result d-none"></div> 93 66 94 <form role="search" method="get" class="wp-search" action=""> 67 <label class="screen-reader-text" for="wp-search-field-1"><?php esc_html_e( 'Search for:', 'autocomplete-search' ); ?></label> 68 <input type="search" id="wp-search-field-1" class="search-field" placeholder="<?php echo esc_attr__( 'I’m searching for…', 'autocomplete-search' ); ?>" autocomplete="off" value="" name="s"> 69 <?php wp_nonce_field('form_action', 'submit_form'); ?> 70 <button type="submit" value="<?php echo esc_attr__( 'Search', 'autocomplete-search' ); ?>"> <?php echo esc_html__( 'Search', 'autocomplete-search' ); ?></button> 95 <label class="screen-reader-text" for="wp-search-field-1"> 96 <?php esc_html_e( 'Search for:', 'autocomplete-search' ); ?> 97 </label> 98 99 <input 100 type="search" 101 id="wp-search-field-1" 102 class="<?php echo esc_attr( $input_class ); ?>" 103 placeholder="<?php echo esc_attr( $placeholder ); ?>" 104 autocomplete="off" 105 value="" 106 name="s" 107 > 108 109 <?php wp_nonce_field( 'form_action', 'submit_form' ); ?> 110 111 <button type="submit"> 112 <?php echo esc_html__( 'Search', 'autocomplete-search' ); ?> 113 </button> 114 71 115 <input type="hidden" name="post_type" value="product"> 116 </form> 117 </div> 118 </div> 119 <?php 72 120 73 </form> 74 </div> 75 </div> 76 <?php 77 $content .= ob_get_clean(); 121 return $content . ob_get_clean(); 122 } 78 123 79 return $content;80 }81 124 } -
autocomplete-search/trunk/public/class-autocomplete-search-public.php
r3344488 r3419752 96 96 * class. 97 97 */ 98 $lang = ''; 98 99 if ( function_exists( 'pll_current_language' ) ) { 99 100 $lang = pll_current_language();
Note: See TracChangeset
for help on using the changeset viewer.