How do I display user name, role and site name using HTML tags inside a dashboard notification?

You can use the bloginfo( ‘name’ ) function to display the site name. Information about the current logged in user can be retrieved using the get_currentuserinfo() function. Here is the fixed code: function my_network_notice(){ global $pagenow, $currentuser; get_currentuserinfo(); if ( $pagenow == ‘index.php’) : ?> <div id=”secondaryBox”> <div id=”author”> <img src=”https://wordpress.stackexchange.com/questions/77448/<?php echo get_stylesheet_directory_uri(); ?>/img/btn-articles-admin.png” width=”40px” … Read more

Allow editors to post iframes [duplicate]

try the iframe shortcode plugin http://wordpress.org/extend/plugins/iframe/ Embed iframe using shortcode [iframe src=”http://player.vimeo.com/video/819138″ width=”100%” height=”480″] ps: you can also use the default oembed shortcode: it supports YouTube, Vimeo, DailyMotion, Flickr, Twitter, … and more. Example: Screenshot: See more here: http://codex.wordpress.org/Embeds

Is it possible to incorporate username in a login redirect?

$user->data should have what you want. // snip elseif ( in_array( ‘map_user’, $user->roles ) ) return home_url( “/mapping/{$user->data->user_login}/” ); // end snip Add if (!is_wp_error($user)) wp_die(var_dump($user)); to the top of your function to see what you have to work with. Caution: This will break things. (It throws a notice as well) It is for debugging … Read more

Roles for Custom Post Types

I’m sure you could specify some capabilities while registering the Post Type itself. Although, here is a more robust version that can be used widely across the administration dashboard. /** * Hide dashboard administrator menus from disallowed user roles. * * @author Michael Ecklund * @author_url https://www.michaelbrentecklund.com/ * * @return void */ function mbe_hide_menus() { … Read more

How to let user select role upon registration in Facebook-AWD?

The plugin offers an entry point for this manipulation: $userdata = apply_filters(‘AWD_facebook_register_userdata’, $userdata); So, now it’s a matter of you filling up the fictional function in this example: add_filter( ‘AWD_facebook_register_userdata’, ‘user_role_wpse_87863’, 10, 1 ); function user_role_wpse_87863 ( $userdata ) { $userdata[‘role’] = your_way_of_getting_the_role(); return $userdata; } Related: About Hooks and Filters Actions and filters are … Read more

Adding Custom Capabilites

I just happened to provide a short example of setting up a custom role capability (exaplanation and code). In your case, however, you want to add the capability to particular users – not roles. The following code may be a starting point for what you want to do: >>> Setting it up // The IDs … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)