How ‘secure’ are loops?
This loop looks pretty sure to me. You aren’t exposing any raw SQL anywhere, so injection attacks shouldn’t happen.
This loop looks pretty sure to me. You aren’t exposing any raw SQL anywhere, so injection attacks shouldn’t happen.
You could either find the hook that is outputting all those extra fields and use remove_action on it. Or you can just create your own hook: do_action( ‘my_theme_show_user_profile’, $profile_user );
Should I rather go with Drupal or is this possible in WordPress? It is possible with WordPress. But also with Drupal. Or with Ruby on Rails. Or with Zend. Or with … whatever programing language you can imagine. I have no idea where to start. I want to create a widget. WordPress has a dedicated … Read more
You’re outside the loop, so you should supply a user ID: get_the_author_meta( ‘twitter’, $user->id )
thanks @toscho A quick tweak on toscho’s Remove Bio Box code add_action( ‘personal_options’, array ( ‘T5_Hide_Profile_Bio_Box’, ‘start’ ) ); /** * Captures the part with the biobox in an output buffer and removes it. * * @author Thomas Scholz, <[email protected]> * */ class T5_Hide_Profile_Bio_Box { /** * Called on ‘personal_options’. * * @return void */ … Read more
You can try to catch the 404 template and redirect it to the author template which will usee the same template for all users even if they are subscribers (or any other which have zero posts) something like this: function no_404_for_all_users($template) { global $wp_query; if( !is_author() && get_query_var(‘author’) && (0 == $wp_query->posts->post) ) { return … Read more
On an “author” page you can get a lot of the information you need with get_queried_object and additional information with get_user_meta. What you want (sounds like) should be in that second chunk of information.That is… $author = $wp_query->get_queried_object(); $ameta = get_user_meta($author->ID); var_dump($author,$ameta); // debugging if(!empty($ameta[‘facebook’])) { var_dump($ameta[‘yim’]); // debugging } // and so one for … Read more
You can check who the current user is and whether they have the same ID as the user that is being viewed. global $current_user wp_get_current_user(); if(the_author_meta(‘ID’) === $current_user->ID) : // Add your code here… endif; See these Codex pages for more information – wp_get_current_user() the_author_meta()
First you need permission to make changes in db of www.wordpress.domain.com. So for this you have to add the ip of wwww.wordpress.domain.com to www.doamin.com so that they allow to make changes. After that just make a function which allow you to connect to that server and make changes. The query for this is $pwd = … Read more
That is the correct approach. The problem was in the function mytab_screen() I wasn’t using ‘array’ for the 2nd parameter in the add_action for the template call. Nothing fancy, just sloppiness.