The add_action(‘register_form’) isn’t effecting my registration form
Since WordPress 3.0.0, the action to call is “signup_extra_fields” instead of “register_form”, so you should use: add_action( ‘signup_extra_fields’, ‘extended_register_form’ );
Since WordPress 3.0.0, the action to call is “signup_extra_fields” instead of “register_form”, so you should use: add_action( ‘signup_extra_fields’, ‘extended_register_form’ );
The subset of data you are seeing is the publicly available author data. ie. if a user has published content on the site, their name, gravatar and description is deemed public data and available to un-authenticated requests. If you’re seeing this user data you can assume the access_token is invalid.
locate_template() only look for a specific template in themes, not in plugins, so your function wil never work. This also goes for get_template_part() which is in essence just a wrapper function for locate_template(). You will need to use funtions like file_exists() to check whether or not the required template exists and then use something like … Read more
Yes The overhead of a plugin sitting in your plugin folder is negligible, and would have an impact on the plugins page. The main area of optimisation here is the % of free space on your filesystem. Active plugins on the other hand can run queries, make remote requests, do expensive parsing, filesystem operations, and … Read more
It’s a lot simpler than that: <select name=”swcs_postpage_id[]” id=”swcs_postpage_id” multiple> See those brackets? Boom.
Check these links below. This is where the permissions are being set for your pretty link plugin admin menu: pretty-link/prli-main.php -> line 16 – it’s set to administrator you want edit_posts pretty-link/prli-main.php -> line 160 – it’s set to $current_user->user_level >= 8 you want $current_user->user_level >= 7 What are your options? OPTION 1 – Change … Read more
I think what you’ll want to do is iterate over the $_GLOBALS[‘menu’] array. This should give you a list of all the items in the admin menu so you know what the hooks are that need to be removed. There are more details and good information in this answer: https://wordpress.stackexchange.com/a/136064/9080 The appropriate hook/slug can be … Read more
Note that did_action only takes one input argument: the name of the action hook. The scope of your if sentence is also unclear. I don’t think you want to use did_action at all here, it doesn’t give you the number of emails. You can try the following instead: if ( $unread = do_shortcode( ‘[input-unread]’ ) … Read more
Well, you can do this with much less code: echo apply_filters( ‘the_content’, get_post_field(‘post_content’, $post_id) ); You can also use get_post_field function to get other fields like post_title, and so on.
This should work – using wp_upload_dir to get the path, then checking to see if it exists – and creating it if it doesn’t. $upload_dir = wp_upload_dir(); if (!is_dir($upload_dir[‘path’])) { // directory doesn’t exist mkdir($structure, 0744, true); // the mode to use here may vary based on your hosting environment }