Plugin Directory

Changeset 3291611


Ignore:
Timestamp:
05/12/2025 07:38:10 AM (11 months ago)
Author:
wowholic
Message:

Make pretty search url translatable

Location:
wowholic-core/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • wowholic-core/trunk/includes/actions/general.php

    r3231152 r3291611  
    124124 * Pretty Search URL
    125125 */
     126add_action( 'init', function () {
     127    add_rewrite_rule(
     128        '^search/(.+)/?$',
     129        'index.php?s=$matches[1]',
     130        'top'
     131    );
     132    add_rewrite_rule(
     133        '^suche/(.+)/?$',
     134        'index.php?s=$matches[1]',
     135        'top'
     136    );
     137} );
     138
    126139if ( carbon_get_theme_option( 'wowcore_encrypt_pretty_search_url' ) ) {
    127140    add_action( 'template_redirect', function () {
    128141        if ( is_search() && ! empty( $_GET['s'] ) ) {
    129             wp_redirect( home_url( "/search/" ) . urlencode( get_query_var( 's' ) ) );
     142            wp_redirect( home_url( __( '/search/' ) ) . urlencode( get_query_var( 's' ) ) );
    130143            exit();
    131144        }
  • wowholic-core/trunk/readme.txt

    r3291403 r3291611  
    77Requires at least: 5.6
    88Tested up to: 6.8.1
    9 Stable tag: 1.1.1
     9Stable tag: 1.1.2
    1010Requires PHP: 7.0
    1111
     
    7878== Changelog ==
    7979
     80= 1.1.2 =
     81Release Date: May 12th, 2025
     82
     83* Make pretty search url translatable
     84
    8085= 1.1.1 =
    8186Release Date: May 9th, 2025
  • wowholic-core/trunk/wowholic-core.php

    r3291403 r3291611  
    44 * Plugin URI: https://github.com/Wowholic/CORE
    55 * Description: Utility functions and options for common tasks in WordPress.
    6  * Version: 1.1.1
     6 * Version: 1.1.2
    77 * Author: Wowholic
    88 * Author URI: https://wowholic.com
Note: See TracChangeset for help on using the changeset viewer.