Translating form labels shortcode output

If anyone is looking for a solution, here is a way (probably not the better one) to achieve it: add_filter(‘widget_text’, ‘filtering_form_labels’); function filtering_form_labels($html) { if ( ICL_LANGUAGE_CODE==’en’ ) {/*ICL_LANGUAGE_CODE used in WPML to know the active language*/ $esp = array(‘Nombre’, ‘Apellidos’, ‘Suscribirse’); /*Array with words to be replaced*/ $eng = array(‘First Name’, ‘Last Name’, ‘Subscribe’); … Read more

Hack nav menu to add gettext() to menu items?

Retrieved menu items pass through wp_get_nav_menu_items filter, as well as few others in wp_get_nav_menu_items() and around. — EDIT – This is what I used: function translate_menu( $items, $menu, $args ) { foreach ( $items as $key => $item ) { $items[$key]->title = _($items[$key]->title); } return $items; }

Enqueue Stylesheets After Theme’s “rtl.css”

Stylesheet Printing Order WordPress does not load themes’ alternative rtl.css files using wp_register_style() or wp_enqueue_style(). As such, the stylesheet does not get added to WordPress’s style queue, and cannot be specified as a dependency when registering or enqueueing additional stylesheets. Instead, this stylesheet’s <link> element is added via the locale_stylesheet() function, which is attached to … Read more

tinymce modal and I18n strings methods

While I can’t see any major fault in doing the way I proposed initially especially in relation to translation and localization, what I realised while researching this issue was that I was asking an ajax question. Basically what’s the most efficient method to initialize the I18n components of wordpress. Short of making a custom ajax … Read more

WordPress translation

OMFG that is the most stupid code I saw in core for some time. Don’t follow the comments there, if you want to use a different flavor of open sans just write a plugin that deregister the style and add the one you want to be used instead function replace_open_sans() { wp_deregister_style(‘open-sans’); wp_register_style(‘open-sans’, ‘http://fonts.googleapis.com/css?family=Open+Sans:300’); wp_enqueue_style(‘open-sans’); … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)