这里会显示出您选择的修订版和当前版本之间的差别。
wordpress:remove-admin-bar-links [2018/01/19 08:41] admin 创建 |
wordpress:remove-admin-bar-links [2018/01/19 08:41] (当前版本) admin |
||
---|---|---|---|
行 5: | 行 5: | ||
Here are some IDs for the default links WP 3.1 adds, found in /wp-includes/admin-bar.php: | Here are some IDs for the default links WP 3.1 adds, found in /wp-includes/admin-bar.php: | ||
- | <code? | + | <code> |
my-account / my-account-with-avatar : the first link, to your account. Note that the ID here changes depending on if you have Avatars enabled or not. | my-account / my-account-with-avatar : the first link, to your account. Note that the ID here changes depending on if you have Avatars enabled or not. | ||
行 24: | 行 24: | ||
Code Example: | Code Example: | ||
+ | |||
+ | <code php> | ||
<?php | <?php | ||
行 43: | 行 45: | ||
add_action( 'wp_before_admin_bar_render', 'mytheme_admin_bar_render' ); | add_action( 'wp_before_admin_bar_render', 'mytheme_admin_bar_render' ); | ||
?> | ?> | ||
+ | </code> | ||