Echo User Role WordPress PHP


$user = new WP_User( $user->ID ); if ( !empty( $user->roles ) && is_array( $user->roles ) ) { foreach ( $user->roles as $role ) echo ucfirst($role); } Sharing is Caring

Best Survival Video Games of All Time


Survival Games are becoming more and more popular.  However, they have been around for quite a while. Here’s some our all time favorites. We tried to post multiple reviews of…

Use WordPress Media Uploader in your Custom Plugin


This will make is Basicly what I did was adding this to my plugin: function test_admin_scripts() { wp_enqueue_script(‘media-upload’); wp_enqueue_script(‘thickbox’); wp_enqueue_script(‘jquery’); } function test_admin_styles() { wp_enqueue_style(‘thickbox’); } add_action(‘admin_print_scripts’, ‘test_admin_scripts’); add_action(‘admin_print_styles’, ‘test_admin_styles’);…

Make Div Appear and Reappear with javascript


Make a div with the same id as the select input and you should be good to go. $(window).load(function(){ $(document).ready(function () { $(‘.group’).hide(); $(‘#div1′).fadeIn(‘slow’); $(‘#div1′).change(function () { $(‘.group’).hide(); $(‘#’+$(this).val()).fadeIn(‘slow’); })…

Get Youtube Thumbnails with PHP or Html


Each YouTube video has 4 generated images. They are predictably formatted as follows:<insert-youtube-video-id-here>/0.jpg<insert-youtube-video-id-here>/1.jpg<insert-youtube-video-id-here>/2.jpg<insert-youtube-video-id-here>/3.jpg The first one in the list is a full size image and others…

SSH into your Amazon instance without a KeyPair


1.  SSH into your instance. 2.  Edit /etc/ssh/sshd_config and set PasswordAuthentication to yes. One way to do this is to enter the command nano /etc/ssh/sshd_config, then scroll down toPasswordAuthentication.  Change the no to yes.  Then press Ctrl+X, and press the Y…