Changeset 3178951
- Timestamp:
- 10/30/2024 04:08:41 PM (14 months ago)
- Location:
- quicksnap/trunk
- Files:
-
- 8 edited
-
Admin/MetaBox.php (modified) (1 diff)
-
Admin/Template/Metabox/general-settings.php (modified) (6 diffs)
-
App/Shortcode.php (modified) (2 diffs)
-
assets/admin/css/quicksnap-admin.css (modified) (1 diff)
-
assets/app/css/quicksnap-app.css (modified) (1 diff)
-
assets/app/js/quicksnap-app.js (modified) (4 diffs)
-
quicksnap.php (modified) (1 diff)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
quicksnap/trunk/Admin/MetaBox.php
r3150237 r3178951 115 115 $quicksnap_data['thumbnail_position'] = isset( $_POST['_wtdqs_quicksnap_otp']['thumbnail_position'] ) ? sanitize_text_field( wp_unslash($_POST['_wtdqs_quicksnap_otp']['thumbnail_position']) ) : ''; 116 116 $quicksnap_data['is_excerpt'] = isset( $_POST['_wtdqs_quicksnap_otp']['is_excerpt'] ) ? 1 : 0; 117 $quicksnap_data['search_bar_width'] = isset( $_POST['_wtdqs_quicksnap_otp']['search_bar_width'] ) ? sanitize_text_field( wp_unslash($_POST['_wtdqs_quicksnap_otp']['search_bar_width']) ) : ''; 117 118 $quicksnap_data['custom_css'] = isset( $_POST['_wtdqs_quicksnap_otp']['custom_css'] ) ? wp_kses_post( wp_unslash($_POST['_wtdqs_quicksnap_otp']['custom_css']) ) : ''; 118 119 -
quicksnap/trunk/Admin/Template/Metabox/general-settings.php
r3150237 r3178951 14 14 $thumbnail_position = isset( $args['thumbnail_position'] ) ? $args['thumbnail_position'] : ''; 15 15 $is_excerpt = isset( $args['is_excerpt'] ) ? $args['is_excerpt'] : ''; 16 $search_bar_width = isset( $args['search_bar_width'] ) ? $args['search_bar_width'] : ''; 16 17 ?> 17 18 <!-- Get template args --> … … 24 25 <div class="wtdqs-metabox-field wtdqs-width-50"> 25 26 <div class="wtdqs-metabox-field-wrap"> 26 <label for="_wtdqs_quicksnap_otp[post_type]"><?php echo esc_html( __( 'Select Post Type', 'quicksnap' ) ); ?></label>27 <span><?php echo esc_html( __( 'Select Post Type', 'quicksnap' ) ); ?></span>27 <label for="_wtdqs_quicksnap_otp[post_type]"><?php echo esc_html( __( 'Select post type', 'quicksnap' ) ); ?></label> 28 <span><?php echo esc_html( __( 'Select post type', 'quicksnap' ) ); ?></span> 28 29 <select name="_wtdqs_quicksnap_otp[post_type]" id="_wtdqs_quicksnap_otp[post_type]"> 29 30 <?php … … 40 41 <div class="wtdqs-metabox-field wtdqs-width-50"> 41 42 <div class="wtdqs-metabox-field-wrap"> 42 <label for="_wtdqs_quicksnap_otp[maximum_items_display]"><?php echo esc_html( __( 'Maximum Items Search Result', 'quicksnap' ) ); ?></label>43 <span><?php echo esc_html( __( 'Type Maximum Items To Dysplay', 'quicksnap' ) ); ?></span>43 <label for="_wtdqs_quicksnap_otp[maximum_items_display]"><?php echo esc_html( __( 'Maximum items search result', 'quicksnap' ) ); ?></label> 44 <span><?php echo esc_html( __( 'Type maximum items to dysplay', 'quicksnap' ) ); ?></span> 44 45 <input type="number" id="_wtdqs_quicksnap_otp[maximum_items_display]" value="<?php echo esc_html( $maximum_items_display ); ?>" name="_wtdqs_quicksnap_otp[maximum_items_display]"> 45 46 </div> … … 49 50 <div class="wtdqs-metabox-field wtdqs-width-50"> 50 51 <div class="wtdqs-metabox-field-wrap"> 51 <label for="_wtdqs_quicksnap_otp[is_thumbnail]"><?php echo esc_html( __( 'Show Thumbnail', 'quicksnap' ) ); ?></label>52 <span><?php echo esc_html( __( 'Enable Thumbnail', 'quicksnap' ) ); ?></span>52 <label for="_wtdqs_quicksnap_otp[is_thumbnail]"><?php echo esc_html( __( 'Show thumbnail', 'quicksnap' ) ); ?></label> 53 <span><?php echo esc_html( __( 'Enable thumbnail', 'quicksnap' ) ); ?></span> 53 54 <input type="checkbox" <?php echo $is_thumbnail == 1 ? 'checked' : ''; ?> id="_wtdqs_quicksnap_otp[is_thumbnail]" name="_wtdqs_quicksnap_otp[is_thumbnail]" > 54 55 </div> … … 57 58 <div class="wtdqs-metabox-field wtdqs-width-50"> 58 59 <div class="wtdqs-metabox-field-wrap"> 59 <label for="_wtdqs_quicksnap_otp[thumbnail_position]"><?php echo esc_html( __( 'Thumbnail Position', 'quicksnap' ) ); ?></label>60 <span><?php echo esc_html( __( 'Select Thumbnail Position', 'quicksnap' ) ); ?></span>60 <label for="_wtdqs_quicksnap_otp[thumbnail_position]"><?php echo esc_html( __( 'Thumbnail position', 'quicksnap' ) ); ?></label> 61 <span><?php echo esc_html( __( 'Select thumbnail position', 'quicksnap' ) ); ?></span> 61 62 <select name="_wtdqs_quicksnap_otp[thumbnail_position]" id="_wtdqs_quicksnap_otp[thumbnail_position]"> 62 63 <option <?php echo '0' === $thumbnail_position ? 'selected' : ''; ?> value="0"><?php echo esc_html( __( 'Select Option', 'quicksnap' ) ); ?></option> … … 71 72 <div class="wtdqs-metabox-field wtdqs-width-50"> 72 73 <div class="wtdqs-metabox-field-wrap"> 73 <label for="_wtdqs_quicksnap_otp[is_excerpt]"><?php echo esc_html( __( 'Show Excerpt', 'quicksnap' ) ); ?></label>74 <span><?php echo esc_html( __( 'Enable Excerpt', 'quicksnap' ) ); ?></span>74 <label for="_wtdqs_quicksnap_otp[is_excerpt]"><?php echo esc_html( __( 'Show excerpt', 'quicksnap' ) ); ?></label> 75 <span><?php echo esc_html( __( 'Enable excerpt', 'quicksnap' ) ); ?></span> 75 76 <input type="checkbox" <?php echo $is_excerpt == 1 ? 'checked' : ''; ?> id="_wtdqs_quicksnap_otp[is_excerpt]" name="_wtdqs_quicksnap_otp[is_excerpt]"> 76 </div> 77 77 </div> 78 </div> 79 <div class="wtdqs-metabox-field wtdqs-width-50"> 80 <div class="wtdqs-metabox-field-wrap"> 81 <label for="_wtdqs_quicksnap_otp[search_bar_width]"><?php echo esc_html( __( 'Search bar width', 'quicksnap' ) ); ?></label> 82 <span><?php echo esc_html( __( 'Set search bar width, using "px, %, em, or auto" values.', 'quicksnap' ) ); ?></span> 83 <input type="text" id="_wtdqs_quicksnap_otp[search_bar_width]" value="<?php echo esc_html( $search_bar_width ); ?>" placeholder="<?php echo esc_attr('Defult: 400px') ?>" name="_wtdqs_quicksnap_otp[search_bar_width]"> 84 </div> 78 85 </div> 79 86 -
quicksnap/trunk/App/Shortcode.php
r3150237 r3178951 192 192 193 193 $custom_css = isset( $meta['custom_css'] ) ? $meta['custom_css'] : ''; 194 $search_bar_width = isset( $meta['search_bar_width'] ) ? esc_html($meta['search_bar_width']) : '400px'; 194 195 195 196 … … 200 201 <?php echo wp_kses_post($custom_css); ?> 201 202 </style> 202 <div id="wtdqs-quicksnap-<?php echo esc_attr( $this->post_id ); ?>" data-id="<?php echo esc_attr( $this->post_id ); ?>" class="wtdqs-quicksnap <?php echo esc_attr( $class ); ?>" >203 <div class=" search_box">204 203 <div style="width: <?php echo esc_attr($search_bar_width); ?>" id="wtdqs-quicksnap-<?php echo esc_attr( $this->post_id ); ?>" data-id="<?php echo esc_attr( $this->post_id ); ?>" class="wtdqs-quicksnap <?php echo esc_attr( $class ); ?>" > 204 <div class="wtdqs-search_box"> 205 <span><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-search"><circle cx="11" cy="11" r="8"/><path d="m21 21-4.3-4.3"/></svg></span> 205 206 <input class="wtdqs-search-field" type="text" id="wtdqs-search-field-<?php echo esc_attr( $this->post_id ); ?>" name="wtdqs-search-field" placeholder="Search"> 206 207 -
quicksnap/trunk/assets/admin/css/quicksnap-admin.css
r3150237 r3178951 113 113 min-width: 70%; 114 114 border: 1px solid #ddd; 115 padding: 4px ;115 padding: 4px 8px; 116 116 } 117 117 -
quicksnap/trunk/assets/app/css/quicksnap-app.css
r3146494 r3178951 1 .wtdqs-quicksnap { 2 position: relative; 3 box-shadow: 0 2px 5px 1px rgba(64, 60, 67, .16); 4 border-radius: 25px; 5 background-color: #fff; 6 max-width: 100%; 7 min-width: 400px; 8 9 } 10 .wtdqs-quicksnap.show-result{ 11 border-radius: 25px 25px 0px 0px ; 12 } 1 13 2 .wtdqs-quicksnap { 3 position: relative; 4 min-width: 400px; 5 } 6 .wtdqs-search-result .wtdqs-quicksnap-loading { 7 padding: 16px; 8 9 text-align: center; 10 } 11 .wtdqs-search-result .wtdqs-quicksnap-no-result { 12 padding: 16px; 14 .wtdqs-quicksnap:hover, 15 .wtdqs-quicksnap:focus, 16 .wtdqs-quicksnap:active { 17 box-shadow: 0 2px 8px 1px rgba(64, 60, 67, .24); 13 18 } 14 .wtdqs-search-result .wtdqs-quicksnap-loading svg { 15 height: 70px; 16 width: 70px; 17 } 19 20 21 .wtdqs-search_box { 22 position: relative; 23 } 24 25 .wtdqs-search_box span { 26 position: absolute; 27 right: 10px; 28 top: 10px; 29 width: 40px; 30 text-align: center; 31 display: inline-block; 32 } 33 34 .wtdqs-search_box span svg { 35 height: 20px; 36 width: 20px; 37 } 38 39 .wtdqs-search_box input { 40 width: 100%; 41 padding-right: 50px; 42 height: 40px; 43 border-radius: 25px; 44 border: none !important; 45 padding-left: 20px; 46 box-sizing: border-box; 47 } 48 49 .wtdqs-search_box input:hover, 50 .wtdqs-search_box input:active, 51 .wtdqs-search_box input:focus { 52 outline: none; 53 } 54 55 56 57 .wtdqs-search-result .wtdqs-quicksnap-loading { 58 padding: 16px; 59 60 text-align: center; 61 } 62 63 .wtdqs-search-result .wtdqs-quicksnap-no-result { 64 padding: 16px; 65 } 66 67 .wtdqs-search-result .wtdqs-quicksnap-loading svg { 68 height: 70px; 69 width: 70px; 70 } 71 18 72 .wtdqs-search-result { 19 width: 100%; 20 position: absolute; 21 left: 0; 22 top: 100%; 23 background-color: #fff !important; 24 padding: 8px 0 !important; 25 visibility: hidden; 26 opacity: 0; 27 z-index: 1; 28 } 29 .wtdqs-search-result.active { 30 visibility: visible; 31 opacity: 1; 32 } 33 .wtdqs-search-result ul li a { 34 display: flex; 35 gap: 16px; 36 padding: 8px; 37 transition: 0.4s; 38 } 39 .wtdqs-search-result ul li a .thumbnail { 40 min-width: 50px !important; 41 height: 50px !important; 42 } 43 .wtdqs-search-result ul li a .content h3 { 44 font-size: 18px; 45 padding: 0 !important; 46 margin: 0 !important; 47 } 48 49 .wtdqs-search-result ul li a .content p { 50 padding: 0 !important; 51 margin: 0 !important; 52 } 53 .wtdqs-search-result ul li a .thumbnail img { 54 height: 100% !important; 55 width: 100% !important; 56 } 57 .wtdqs-search-result ul li a:hover { 58 background-color: #f2f2f2; 59 } 73 width: 100%; 74 position: absolute; 75 left: 0; 76 top: 100%; 77 background-color: #fff !important; 78 padding: 12px !important; 79 visibility: hidden; 80 opacity: 0; 81 z-index: 1; 82 display: none; 83 box-shadow: 0 2px 5px 1px rgba(64, 60, 67, .16); 84 border-radius: 0px 0px 25px 25px; 85 box-sizing: border-box; 86 } 60 87 61 /* Top Bottom left right*/ 62 .wtdqs-quicksnap.wtdqs-thumbnail-top ul li a, .wtdqs-quicksnap.wtdqs-thumbnail-bottom ul li a, .wtdqs-quicksnap.wtdqs-thumbnail-right ul li a { 63 width: 100%; 64 flex-wrap: wrap; 65 } 66 .wtdqs-quicksnap.wtdqs-thumbnail-right ul li a { 67 flex-wrap: nowrap; 68 } 69 .wtdqs-quicksnap.wtdqs-thumbnail-top ul li a .thumbnail, .wtdqs-quicksnap.wtdqs-thumbnail-bottom ul li a .thumbnail { 70 width: 100%; 71 height: 65px !important; 72 } 73 .wtdqs-quicksnap.wtdqs-thumbnail-top ul li a .thumbnail img, .wtdqs-quicksnap.wtdqs-thumbnail-bottom ul li a .thumbnail img { 74 width: 65px !important; 75 } 76 .wtdqs-quicksnap.wtdqs-thumbnail-bottom ul li a .thumbnail, .wtdqs-quicksnap.wtdqs-thumbnail-right ul li a .thumbnail { 77 order: 2; 78 } 79 .wtdqs-quicksnap.wtdqs-thumbnail-bottom ul li a .content, .wtdqs-quicksnap.wtdqs-thumbnail-right ul li a .content { 80 order: 1; 81 } 82 .wtdqs-quicksnap.wtdqs-thumbnail-right ul li a .content { 83 flex-wrap: column; 84 } 88 .wtdqs-search-result.active { 89 visibility: visible; 90 opacity: 1; 91 display: block; 92 } 93 94 .wtdqs-search-result ul { 95 margin: 0; 96 padding: 0; 97 list-style: none; 98 } 99 100 .wtdqs-search-result ul li a { 101 display: flex; 102 gap: 16px; 103 padding: 8px; 104 transition: 0.4s; 105 border-radius: 12px; 106 align-items: center; 107 } 108 109 .wtdqs-search-result ul li a .thumbnail { 110 min-width: 50px !important; 111 height: 50px !important; 112 } 113 114 .wtdqs-search-result ul li a .content h3 { 115 font-size: 18px; 116 padding: 0 !important; 117 margin: 0 !important; 118 } 119 120 .wtdqs-search-result ul li a .content p { 121 padding: 0 !important; 122 margin: 0 !important; 123 } 124 125 .wtdqs-search-result ul li a .thumbnail img { 126 height: 100% !important; 127 width: 100% !important; 128 } 129 130 .wtdqs-search-result ul li a:hover { 131 background-color: #f2f2f2; 132 } 133 134 /* Top Bottom left right*/ 135 .wtdqs-quicksnap.wtdqs-thumbnail-top ul li a, 136 .wtdqs-quicksnap.wtdqs-thumbnail-bottom ul li a, 137 .wtdqs-quicksnap.wtdqs-thumbnail-right ul li a { 138 width: 100%; 139 flex-wrap: wrap; 140 } 141 142 .wtdqs-quicksnap.wtdqs-thumbnail-right ul li a { 143 flex-wrap: nowrap; 144 } 145 146 .wtdqs-quicksnap.wtdqs-thumbnail-top ul li a .thumbnail, 147 .wtdqs-quicksnap.wtdqs-thumbnail-bottom ul li a .thumbnail { 148 width: 100%; 149 height: 65px !important; 150 } 151 152 .wtdqs-quicksnap.wtdqs-thumbnail-top ul li a .thumbnail img, 153 .wtdqs-quicksnap.wtdqs-thumbnail-bottom ul li a .thumbnail img { 154 width: 65px !important; 155 } 156 157 .wtdqs-quicksnap.wtdqs-thumbnail-bottom ul li a .thumbnail, 158 .wtdqs-quicksnap.wtdqs-thumbnail-right ul li a .thumbnail { 159 order: 2; 160 } 161 162 .wtdqs-quicksnap.wtdqs-thumbnail-bottom ul li a .content, 163 .wtdqs-quicksnap.wtdqs-thumbnail-right ul li a .content { 164 order: 1; 165 } 166 167 .wtdqs-quicksnap.wtdqs-thumbnail-right ul li a .content { 168 flex-wrap: column; 169 } -
quicksnap/trunk/assets/app/js/quicksnap-app.js
r3146494 r3178951 16 16 // svg preloader 17 17 preloader = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200"><circle fill="none" stroke-opacity="1" stroke="#000000" stroke-width=".5" cx="100" cy="100" r="0"><animate attributeName="r" calcMode="spline" dur="2" values="1;80" keyTimes="0;1" keySplines="0 .2 .5 1" repeatCount="indefinite"></animate><animate attributeName="stroke-width" calcMode="spline" dur="2" values="0;25" keyTimes="0;1" keySplines="0 .2 .5 1" repeatCount="indefinite"></animate><animate attributeName="stroke-opacity" calcMode="spline" dur="2" values="1;0" keyTimes="0;1" keySplines="0 .2 .5 1" repeatCount="indefinite"></animate></circle></svg>'; 18 18 19 19 // if search value string is 3 or more 20 20 if(searchValue.length >= 3) { … … 22 22 // add class to show active 23 23 thisParent.find('.wtdqs-search-result').addClass('active'); 24 thisParent.addClass('show-result'); 24 25 thisParent.find('.wtdqs-search-result').html('<div class="wtdqs-quicksnap-loading">'+preloader+'</div>'); 25 26 // ajax call … … 41 42 thisParent.find('.wtdqs-search-result').html(''); 42 43 thisParent.find('.wtdqs-search-result').html(response); 44 43 45 } 44 46 }); … … 46 48 // remove class to hide active 47 49 thisParent.find('.wtdqs-search-result').removeClass('active'); 50 thisParent.removeClass('show-result'); 48 51 } 49 52 -
quicksnap/trunk/quicksnap.php
r3154027 r3178951 6 6 * Plugin URI: https://github.com/mdrejon/quicksnap 7 7 * Description: Quicksnap is a plugin that allows you to search for posts and pages in the WordPress admin area. 8 * Version: 1.0. 68 * Version: 1.0.7 9 9 * Author: Sydur Rahman 10 10 * Author URI: https://github.com/mdrejon/ -
quicksnap/trunk/readme.txt
r3154027 r3178951 3 3 Tags: Ajax search, WooCommerce product search, Custom post type search integration, WordPress shortcode search solution, Customizable WordPress search 4 4 Requires at least: 4.9 5 Tested up to: 6. 65 Tested up to: 6.7 6 6 Requires PHP: 7.4 7 Stable tag: 1.0. 67 Stable tag: 1.0.7 8 8 License: GPL-2.0+ 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.txt … … 95 95 96 96 - Improved : resolved vulnerable issue 97 98 99 = 1.0.7 - 18/09/2024 = 100 101 - New Feature : Search bar width option Added 102 - Improved : Search style updated
Note: See TracChangeset
for help on using the changeset viewer.