{"id":318,"date":"2013-05-04T17:09:07","date_gmt":"2013-05-04T17:09:07","guid":{"rendered":"http:\/\/musilda.cz\/?p=318"},"modified":"2013-05-04T17:09:07","modified_gmt":"2013-05-04T17:09:07","slug":"jak-odstranit-polozky-z-admin-baru-ve-wordpressu","status":"publish","type":"post","link":"https:\/\/affinite.io\/cs\/jak-odstranit-polozky-z-admin-baru-ve-wordpressu\/","title":{"rendered":"Jak odstranit polo\u017eky z admin baru ve WordPressu"},"content":{"rendered":"\n

Pokud si chcete upravit admin bar dle sv\u00e9 pot\u0159eby a pot\u0159ebujete odstranit polo\u017eky, kter\u00e9 v admin baru jsou defaultn\u011b, pom\u016f\u017ee v\u00e1m n\u00e1sleduj\u00edc\u00ed snippet, kter\u00fd vyu\u017e\u00edv\u00e1 hooku wp_before_admin_bar_render. Do functions.php vlo\u017ete n\u00e1sleduj\u00edc\u00ed funkci, kter\u00e1 odstran\u00ed wp logo a updates link:<\/p>\n\n\n\n\n\n\n\n

function remove_admin_bar_links() {\n\tglobal $wp_admin_bar;\n\t$wp_admin_bar->remove_menu('wp-logo');\n\t$wp_admin_bar->remove_menu('updates');\n}\nadd_action( 'wp_before_admin_bar_render', 'remove_admin_bar_links' );\n<\/pre>\n\n\n\n

Dal\u0161\u00ed hodnoty, kter\u00e9 m\u016f\u017eete vyu\u017e\u00edt jsou:<\/p>\n\n\n\n