Changeset 2927416
- Timestamp:
- 06/17/2023 09:16:13 PM (21 months ago)
- Location:
- fcp-posts-by-search-query/trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
fcp-posts-by-search-query/trunk/README.md
r2908720 r2927416 11 11 * Implement with the \[fcppbk\] shortcode 12 12 * It minifies the css before printing 13 * Polylang friendly 13 14 14 15 ## Demo -
fcp-posts-by-search-query/trunk/inc/meta-boxes.php
r2907638 r2927416 132 132 'description' => 'The search query', 133 133 'type' => 'string', 134 'required' => true, 134 135 'validate_callback' => function($param) { 135 136 return trim( $param ) ? true : false; 136 137 }, 137 'sanitize_ settings' => function($param,$request, $key) {138 'sanitize_callback' => function($param, \WP_REST_Request $request, $key) { 138 139 return sanitize_text_field( urldecode( $param ) ); // return htmlspecialchars( wp_unslash( urldecode( $param ) ) ); 139 140 }, … … 199 200 $search = new \WP_Query( [ 200 201 //'post_type' => get_types_to_search_among(), // commented to keep on accident save. filter still works in shortcode 202 'post_type' => 'any', 201 203 //'post_status' => 'publish', // same 202 204 'post__in' => $ids, 203 205 'orderby' => 'post__in', 206 'lang' => 'all', // ++ add the option to limit languages if needed 204 207 ] ); 205 208 if ( $search->have_posts() ) { -
fcp-posts-by-search-query/trunk/inc/shortcode.php
r2907638 r2927416 6 6 defined( 'ABSPATH' ) || exit; 7 7 8 add_shortcode( FCPPBK_SLUG, function() { 8 add_shortcode( FCPPBK_SLUG, function() { // ++!! what if it is outside the loop!! 9 9 10 10 if ( is_admin() ) { return; } … … 45 45 } 46 46 47 // wp_reset_query(); // ++ investigate when to apply 47 48 48 49 $metas = array_map( function( $value ) { // get the meta values … … 65 66 'posts_per_page' => $limit, 66 67 'post__not_in' => [ $current_id ], // exclude self 68 'lang' => 'all', 67 69 ]; 68 70 -
fcp-posts-by-search-query/trunk/posts-by-query.php
r2908719 r2927416 3 3 Plugin Name: FCP Posts by Search Query 4 4 Description: Implement a list of relevant posts to particular pages with a search query or exact list of posts. Easy pick and add. 5 Version: 1.0. 15 Version: 1.0.2 6 6 Requires at least: 5.8 7 7 Tested up to: 6.2 8 Requires PHP: 7.48 Requires PHP: 8.0 9 9 Author: Firmcatalyst, Vadim Volkov, Aude Jamier 10 10 Author URI: https://firmcatalyst.com -
fcp-posts-by-search-query/trunk/readme.txt
r2908720 r2927416 4 4 Requires at least: 5.8 5 5 Tested up to: 6.2 6 Requires PHP: 7.47 Stable tag: 1.0 6 Requires PHP: 8.0 7 Stable tag: 1.0.2 8 8 Author: Firmcatalyst, Vadim Volkov, Aude Jamier 9 9 Author URI: https://firmcatalyst.com … … 25 25 * Implement with the \[fcppbk\] shortcode 26 26 * It minifies the css before printing 27 * Polylang friendly 27 28 28 29 = Demo =
Note: See TracChangeset
for help on using the changeset viewer.