Limit access to posts/pages by user roles
Although I haven’t used this personally you are probably looking at a plugin like this Seems to provide all the functionality you have requested above.
Although I haven’t used this personally you are probably looking at a plugin like this Seems to provide all the functionality you have requested above.
Nice Question! But I’ll leave for the asker and for the reader the task of finding the plugin options name. This can be used for any plugin/theme that relies in a single/serialized value in the wp_options table. If it’s not a single value, it’s another task… In this example, I’m using WP-Pagenavi option_name. Action hook … Read more
Give it a try like so: File: oowp/bootstrap.php <?php /* Plugin name: OOWP */ require_once( ‘autoload.php’ ); use oowp\objects\Custom_Objects; new Custom_Objects;
The earliest safe hook to get post information is the template_redirect hook. All the hooks in question runs before WordPress has setup postdata, so any post info are still unavailable at that point. The globals like $wp_query and $post will still contain no data, that is why your efforts returns nothing. EDIT Extra info as … Read more
This plugin does exactly what you need – Pie Register From WordPress.org Plugin Directory: Email Validation Hate fake emails? Make sure your users are not registering with invalid email accounts by forcing them to click a validation link that’s sent out with their registration email. This sets there username to a random generated string (something … Read more
You can use the user_register action to hook into the register proces and then create the user directory with wp_mkdir_p. function create_user_dir($user_id) { $user_info = get_userdata( $user_id ); $upload_dir = wp_upload_dir(); $user_dir = $upload_dir[‘basedir’] . ‘/user_dirs/’ . $user_info->user_login; wp_mkdir_p($user_dir); } add_action( ‘user_register’, ‘create_user_dir’); This example makes a directory in uploads/user_dirs. http://codex.wordpress.org/Plugin_API/Action_Reference/user_register http://codex.wordpress.org/Function_Reference/wp_mkdir_p
I haven’t used it yet, but you can accomplish this with Jetpack, which is made (at least partially) by the founders of WordPress. The advantage is that it uses the WordPress.com servers to handle the outgoing mail. This is a big plus because shared servers have throttling limits that only allow you to send a … Read more
Found the solution to make a product attribute, a variation. Lets say we have: wp_set_object_terms( $post_id, ‘XL’, ‘pa_size’ ); Above is a custom attribute (a size attribute). In order to make it a variation you need to do this: $thedata = Array(‘pa_size’=>Array( ‘name’=>’pa_size’, ‘value’=>”, ‘is_visible’ => ‘1’, ‘is_variation’ => ‘1’, ‘is_taxonomy’ => ‘1’ )); update_post_meta( … Read more
The following works for me for product archive pages (these include both the main shop page as well as archive pages for product categories, for example). It will show the current cart contents in a thickbox. I chose to show this for this example just because that’s the data that one gets back through Ajax … Read more
If the plugin headers are correct, then the only option that comes to my mind is that the owner and permissions of the plugin file or its directory (if it is in one) are incorrect and WordPress cannot read the plugin file. Other than simply being logically important, if you check the source you can … Read more