• Resolved gquick128

    (@gquick128)


    Hello,
    this post juste for submit a little bug information on translation capability in optimizer free theme.
    If you want to translate (with a local .po/.mo file) “Search …” and “Search” button you can’t !

    Solution : in lib\functions\core.php :
    Ligne 129
    replace esc_attr( 'Search …', 'optimizer' ) by esc_attr__( 'Search …', 'optimizer' )
    Ligne 130
    replace esc_attr( 'Search', 'optimizer' ) by esc_attr( 'Search', 'optimizer' )

    You could do it in optimizer source or with a children theme in your functions.php
    like this :

    function MY_optimizer_search_form( $form ) {
        $form = '<form role="search" method="get" id="searchform" action="' . esc_url(home_url( '/' )) . '" >
        <div>
        <input placeholder="' . esc_attr__( 'Search &hellip;', 'optimizer' ) . '" type="text" value="' . get_search_query() . '" name="s" id="s" />
        <input type="submit" id="searchsubmit" value="'. esc_attr__( 'Search', 'optimizer' ) .'" />
        </div>
        </form>';
    
        return $form;
    }
    add_filter( 'get_search_form', 'MY_optimizer_search_form', 15 );
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘[Auto Resolved] Bug for Translate capability in Search box’ is closed to new replies.