{"id":1166,"date":"2017-11-24T02:56:05","date_gmt":"2017-11-24T02:56:05","guid":{"rendered":"\/blog\/?p=1166"},"modified":"2017-11-24T02:56:05","modified_gmt":"2017-11-24T02:56:05","slug":"substitute-any-string-in-wordpress","status":"publish","type":"post","link":"\/blog\/index.php\/substitute-any-string-in-wordpress\/","title":{"rendered":"substitute any string in wordpress"},"content":{"rendered":"<p>add_filter(&#8216;gettext&#8217;, &#8216;trans1&#8217;);<br \/>\nadd_filter(&#8216;ngettext&#8217;, &#8216;trans1&#8217;);<br \/>\nfunction trans1($translated) {<br \/>\n   $translated = str_ireplace(&#8216;carrito&#8217;, &#8216;cursos&#8217;, $translated);<br \/>\n   return $translated;<br \/>\n}<\/p>\n<p>add_filter(&#8216;gettext&#8217;, &#8216;trans2&#8217;);<br \/>\nadd_filter(&#8216;ngettext&#8217;, &#8216;trans2&#8217;);<br \/>\nfunction trans2($translated) {<br \/>\n            $translated = str_ireplace(&#8216;el Carro de la compra&#8217;, &#8216;la lista de cursos&#8217;, $translated);<br \/>\n            return $translated;<br \/>\n        }<\/p>\n<p>add_filter(&#8216;gettext&#8217;, &#8216;trans3&#8217;);<br \/>\nadd_filter(&#8216;ngettext&#8217;, &#8216;trans3&#8217;);<br \/>\nfunction trans3($translated) {<br \/>\n            $translated = str_ireplace(&#8216;del cursos&#8217;, &#8216;de cursos&#8217;, $translated);<br \/>\n            return $translated;<br \/>\n        }<\/p>\n","protected":false},"excerpt":{"rendered":"<p>add_filter(&#8216;gettext&#8217;, &#8216;trans1&#8217;); add_filter(&#8216;ngettext&#8217;, &#8216;trans1&#8217;); function trans1($translated) { $translated = str_ireplace(&#8216;carrito&#8217;, &#8216;cursos&#8217;, $translated); return $translated; } add_filter(&#8216;gettext&#8217;, &#8216;trans2&#8217;); add_filter(&#8216;ngettext&#8217;, &#8216;trans2&#8217;); function trans2($translated) { $translated = str_ireplace(&#8216;el Carro de la compra&#8217;, &#8216;la lista de cursos&#8217;, $translated); return $translated; } add_filter(&#8216;gettext&#8217;, &#8216;trans3&#8217;); add_filter(&#8216;ngettext&#8217;, &#8216;trans3&#8217;); function trans3($translated) { $translated = str_ireplace(&#8216;del cursos&#8217;, &#8216;de cursos&#8217;, $translated); return $translated; }<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1166","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"\/blog\/index.php\/wp-json\/wp\/v2\/posts\/1166","targetHints":{"allow":["GET"]}}],"collection":[{"href":"\/blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"\/blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"\/blog\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"\/blog\/index.php\/wp-json\/wp\/v2\/comments?post=1166"}],"version-history":[{"count":1,"href":"\/blog\/index.php\/wp-json\/wp\/v2\/posts\/1166\/revisions"}],"predecessor-version":[{"id":1167,"href":"\/blog\/index.php\/wp-json\/wp\/v2\/posts\/1166\/revisions\/1167"}],"wp:attachment":[{"href":"\/blog\/index.php\/wp-json\/wp\/v2\/media?parent=1166"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"\/blog\/index.php\/wp-json\/wp\/v2\/categories?post=1166"},{"taxonomy":"post_tag","embeddable":true,"href":"\/blog\/index.php\/wp-json\/wp\/v2\/tags?post=1166"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}