Created
November 3, 2013 15:25
-
-
Save shazdeh/7291432 to your computer and use it in GitHub Desktop.
Disabling the post edit links from frontpage
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if( ! is_admin() ) { | |
add_filter( 'get_edit_post_link', '__return_null' ); | |
} | |
function restore_admin_bar_edit_link() { | |
remove_filter( 'get_edit_post_link', '__return_null' ); | |
} | |
add_action( 'wp_footer', 'restore_admin_bar_edit_link' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment