A function that returns true when the Author is a certain role is_author(admin)?
author_can() seems to fit. Example: if( author_can( get_the_ID(), ‘administrator’ ) )
author_can() seems to fit. Example: if( author_can( get_the_ID(), ‘administrator’ ) )
You are basically looking for a form plugin. IIRC Gravity Forms (WordPress Plugin) has the feature of creating multiple-steps forms.
This is tutorial on extending user information I have stored in bookmarks: Adding and using custom user profile fields. Take a look and see if it fits your needs. PS I am not following developments in user functionality closely so there might have been changes/improvements since tutorial was published.
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
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
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); }
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
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
Try: register_activation_hook ( __FILE__, array( new MemorialCandles(), ‘dbInstall’ ) ); Or define dbInstall as ´static´ and use that to set the table name instead the constructor, which I think is the best approach.
You need to hook edit_user_profile to add your custom inputs. Then, you need to hook the profile_update action and use the function add_user_meta to add the metadata