How to run JS, PHP and etc. inside WP post?

Natively WordPress posts are subset of HTML (even more like semi-HTML – paragraph tags can be implied and added on output, but not stored). As result it really really doesn’t like to store or process active code in post’s content. This applies both to internal logic in PHP and front-end logic of post editor (it … Read more

Why does WordPress remove my variables in the URL?

For one, you can’t call template files directly as you’re doing… If you want the page somepage, you should call it directly, with the query string arguments added after a trailing slash. Look into the function add_query_arg() – its a much more bulletproof way of tacking GET variables onto the end of WordPress urls. For … Read more

Shortcode content filter?

you can use regex to find your the src and use that to append your “files/myimagescript?” to it: function append_myimagescript($attr, $content){ $pattern = ‘/src=”https://wordpress.stackexchange.com/questions/11618/([^”]*)”/i’; $replacement=”files/myimagescript?${1}”; return preg_replace($pattern, $replacement, $content); }

WordPress to end support for PHP 4?

Yes, version 3.1 is the last version to support PHP 4. For WordPress 3.2, due in the first half of 2011, we will be raising the minimum required PHP version to 5.2. Why 5.2? Because that’s what the vast majority of WordPress users are using, and it offers substantial improvements over earlier PHP 5 releases. … Read more

How to call function that create table in database (plugin functionality)

The first issue as AutoBLogged pointed out is that you’ve incorrectly referenced _FILE_ and not __FILE__ in the first activation hook. There’s a possible secondary problem, and i say possible because i’ve never had to use the activation or deactivation hooks extensively myself, and that’s with calling register_activation_hook twice, once toward the top of the … Read more