I'm trying to remove or hide the update nags for non-admin users. As an admin, I see:    The popular answer I've seen to handle this says to use:  function hide_update_nag() {     if ( !current_user_can('update_core') ) {         remove_action( 'admin_notices', 'update_nag', 3 );     } } add_action( 'admin_head', 'hide_update_nag', 1 );   This works fine for removing the first message (WordPress 4.5.3 is available! Please update now) but leaves the second one visible to non-admins:    Both messages are wrapped in a &lt;div class="update-nag"&gt;, so  is to modify the above chunk of code to use CSS to hide the nag with:  echo '&lt;style&gt;.update-nag {display: none}&lt;/style&gt;';   But this feels kludgy to me. Is there a way to hook into an action or filter and remove ALL the update nag messages for non-admin users? No third-party plugin recommendations please.
124098
I have 2 administrators in my wordpress, but I only want that one of them see the "Update Notification". I've inserted this code on my funtions.php file  and change name of one of my adminastrator login name the code - if ($user_login !== "miguel") - but it didnt' work?   Any help? Thanks
38694
I've run across the following snippet in themes from time to time:  if ( ! defined('ABSPATH')) exit('restricted access');   It's at the beginning of some (all?) PHP files in a theme and it's supposed to prevent direct access of the file by nefarious sources.  I see that this isn't included in Twenty Ten or Eleven and I've never seen it recommended in official WordPress documentation. It seems like a good idea to me, but I also don't know enough about security to judge it and can't find much with Google.  Is this something I should have in my custom themes? If so, should it be in all PHP files or just some?
34393
Related:    Today, we had . This sort of sparked me into coming up with a new feature-request (Can't find a dupe, surprised).  Basically, we should have more control over what does and does not appear in the multicollider. This includes:   Muting comments and/or answers on a specific post. Muting comments from a specific user Ignoring all comments not addressed to you in a post of yours (I don't think this is that good, though--many times comments address both the OP and the other guy). Ignoring certain chat rooms The ability to make answers/comments on posts written by others to ping your multicollider.   Note that "Mute" could mean that it shows up in the inbox, but doesn't trigger the colorful glowing circle on the multicollider.    With the new "notifications" thing, there may be some scope in making certain notifications opt-in or opt-out (not all of these exist, but many would be useful in the notifications tab):   Notification of rejected edit Notification of  posts Notification of change to favorites Notification of certain badges Notification of edits Notification of edits to posts you have upvoted Notification of edits to posts you have downvoted (yes, should be separate)  - Notification of edits to posts you have closevoted
66534
With WordPress 3.9 coming soon it's bringing along TinyMCE 4.0. I'm running my plugins and functions through some testing and found that one of my functions seems broken / not working with the new TinyMCE function myformatTinyMCE( $in ) {     $in['theme_advanced_buttons1'] = 'bold';     $in['theme_advanced_buttons2'] = 'formatselect';     $in['wordpress_adv_hidden'] = false;     return $in;  } add_filter( 'tiny_mce_before_init', 'myformatTinyMCE' );  The above function used to limit the buttons in the tinyMCE to specific buttons, I've simplified it a bit to make it easier for testing. If I print out $in it shows the correct values in the correct spots, but when I actually load up a page it just defaults to the normal buttons. I've also tried to use the example in the  which also didn't seem to have any effect. I'm using the  Plugin and I do have  installed but disabled. With the new TinyMCE how can I continue using / customizing, and are there any 'Gotchas' that have changed from the previous TinyMCE Version? EDIT Looks like $in['wordpress_adv_hidden'] = false; is not longer being used - No idea how to unhide the Kitchen Sink.
14080
Is it possible to rename the wp-admin folder?  I know I could just rename it, but unless it's supported by the code lots of things would break.  If I use a custom folder name, it will make it slightly more secure, security by obscurity and all that.
11903
I'm currently working on a WordPress site and whenever in the admin I go the Appearance > Menus page I get the following error:     ErrorException: Runtime Notice: Declaration of Walker_Nav_Menu_Edit::start_lvl() should be compatible with that of Walker_Nav_Menu::start_lvl() in wp-admin/includes/nav-menu.php line 203   It seems like some sort of PHP compatibility issue. I'm running PHP 5.3.10 on my local dev machine.  What would be the best way to remedy this problem?
27862
I awoke this morning to a spam flag on a site I moderate, and noticed this when I went to read the post.    Notice answered&lt;/a&gt;, which I imagine isn't meant to have the &lt;/a&gt; there.  I also confirmed that this displays asked&lt;/a&gt; for other types of flags (namely, closed without comment).   I looked around for a duplicate of this but can't seem to find it, so maybe it's a recent change?
45305
According to Google Webmaster guideline "Hidden text" is not acceptable. Which means I do have a dov containing some good amount of title or paragraph with link or images if I make it display:none in my CSS, it is against Google crawl policy (thats how it seems).  My question is if I use it within media queries how Google will react? I mean   @media handheld, only screen and (max-width: 767px) {     body {     }     .mobile-friendly{ display:none;} }   for fluid website development we often have to hide certain contents to make the site mobile friendly. Rather than making css for each browser we now code css within same file and define browser behaviour using media queries.  So is google take any action against it?  --Additional Piont/Question Thanks @John Conde; You are right. Google still is not taking much action against Hidden text. But still pro SEO suggest not to use it. In Example using logo within tag on wordpress and text-indenting them to -9999px ... there are more of the tricks involved.  As I am trying to play safe; this is annoying me a lot.    You see they clearly mention CSS display properties. They didn't explain about these media query exception! As I am trying to be over sure and as Google didn't mentioned anything about it I'm still confused on this question. Any Advice?    Thanks for the edits by editors. I'm new here sorry for any inconvenience.  Why you may require to hide few contents? The blog I'm desiring is responsive. I want to let my visitors know about it's mobile friendly design. I have placed few mobile icons for better user experience and usability assurance. But I want them visible only on desktop browser not on mobile. Because if they are already browsing from mobile they don't needed to be notify. Infact I can rather tell them this site can be used as web apps while they are on mobile.
92703
I love admin-ajax.php. But I hate having to localize in order to point frontend scripts to it, and I wish there was an equivalent, easy-to-find file for themes. (It also just bothers me to see frontend requests go through "/wp-admin/". No practical reason, just looks ugly IMO.)  So I've simply copied admin-ajax.php to the root dir at "/ajax.php", adjusted the include paths and removed the WP_ADMIN constant definition. Seems to work like gangbusters (I can now just direct all my frontend AJAX requests to /ajax.php! And I can still use the normal wp_ajax hooks in my plugins!).  But is this safe? What might go wrong? Since this isn't built into core, I assume there's a good reason as to why not. But looking through the code, I can't see any immediate problems.   You're smart--tell me if this approach is crazy. Or if there's a simpler method that I'm overlooking.
109983
I have a website for which we are trying to be discreet about the fact that we are using WordPress. What steps can we take to make it less obvious? EDIT- Important security note: Please understand that doing this perfectly is impossible as per Mark's , so don't rely on this as a security measure.
55857
Sorry if it's been asked. I've already found several solutions that aren't working. Not sure what I'm doing wrong.   I don't want to disable all javascript, only Javascript alert boxes. The ones that pop up and force you to click OK or X to close them.  I've found user scripts that claim to do this (example:  ). I've put chrome on the dev channel, start chrome with the --enable-user-scripts switch, the script shows up as installed.  But I still get the alert boxes.  An example alert box that isn't getting disabled is at  - put in any garbage word into the word validator on the right sidebar. You get a popup telling you it's not a word.
11131
It came up in chat that a spammer's account needed destroyed; their posts had been deleted but their name (which was offensive) still showed up on the front page as updates to posts and their user account hadn't been deleted.   Someone in chat wanted this fixed but there "wasn't anything to flag" so they complained in chat rather than flagging, which would have directly notified moderators. For future reference how should I tell users to handle a situation like this? Just flag a related post with the "Other" flag reason and explain the situation? What if there's no "related" post?
102310
I am working in Wordpress, and I would like to make certain elements disappear once a user logs in. How can I do this?  I have social icons on my page that I positioned to the center of my menu bar at the top of my website.  those icons are generated by a plugin  that is what i want to disappear
80402
In what order add_action hooks execute? i.e. init wp_head wp_footer after_theme_setup  etc... ??? ??? ???     EDIT: I've also posted my solution.
46669
I have two simple functions that load stuff using  and , something like these:  function admin_custom_css() { wp_enqueue_style( 'stylesheet_name', 'stylesheet.css') };   function admin_custom_js  { wp_enqueue_script( 'javascript_file', 'script.js') };   ... and a few admin pages, created with  and   function my_menu() {    add_menu_page('Page 1', 'bar', 'something', 'else', 'foo');    add_submenu_page( 'theme_menu', 'Subpage 1', 'Subpage', 'something', 'else', 'foo');  } add_action('admin_menu', 'my_menu');    How do I load my two functions only on these pages?  Right now I'm using:  add_action('admin_init', 'admin_custom_css' );  add_action('admin_init', 'admin_custom_js' );     But it loads my files on every admin page, which is not nice at all.  Can I do this via one simple line in functions.php or have to enqueue them within my pages separately (I prefer the first option strongly, since I'd have to edit a lot of admin-page-creating-functions).  Thanks!
35167
I'm making a WordPress plugin. What are typical things I should include in the uninstall feature?  For example, should I delete any tables I created in the install function?  Do I clean up my option entries?  Anything else?
31383
I would know how to remove or hide in Ubuntu 12.04 the  (available, away, busy, invisible and offline) from Messaging Menu as I am not using any instant messenger. I do not want to remove the entire menu, just that section.  Thank you very much and best regards!!