wordpress shortcode url decode non Latin character

It makes sense to look at the PHP function rawurldecode, which decodes URL-encoded strings. https://www.php.net/manual/en/function.rawurldecode.php For example, echo rawurldecode(get_permalink($post->ID)); will show the decoded post URL. But this isn’t really needed in hyperlink code. Sorry I didn’t just write a comment, I don’t have enough points for that option.

conditional shortcodes

Thank you, @Howdy_McGee! current_filter() is exactly what I’ve been looking for. Here is what I did: function french_example( $atts , $content = null ) { $currentFilter = current_filter(); if ($currentFilter == the_content) { return ‘<span class=”ex” xml:lang=”fr” lang=”fr”>’ . do_shortcode($content) . ‘</span>’; } elseif ($currentFilter == the_title) { return ‘<span class=”ex” xml:lang=”fr” lang=”fr”>’ . do_shortcode($content) … Read more

Developing an IP lookup function using an API

You’d have to use add_rewrite_rule so you can capture your desired url match and pass it on query_vars Something like; add_action(‘init’, function() { add_rewrite_rule(‘ip/(.+)/?$’,’index.php?ip_search=$matches[1]’,’top’); }); add_filter( ‘query_vars’, function( $vars ) { $vars[] = ‘ip_search’; return $vars; }); dont forget to flush the rewrite rule once you added your own rule, change the permalink settings back … Read more

How to handle Ajax Calls, when using same shortcodes (with different parameters, e.g. ‘post-type’)?

The problem is that your JS needs to know the post type for each shortcode, but rather than looking at the shortcodes output, it looks at the main global kne_ajax_object, and since there is only one kne_ajax_object, there can only be one post type. Additionally, your javascript code only runs one time, and only makes … Read more

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