This file contains 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 | |
function cwws_deactivate() { | |
// to undo - Holy crap! | |
global $wp_rewrite; | |
// Remove the 'json' endpoint. | |
$old_ends = $wp_rewrite->endpoints; | |
$wp_rewrite->endpoints = array(); | |
foreach ( $old_ends as $_end ) { | |
list( $_places, $_name ) = $_end; |
This file contains 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 | |
function pjw_login_adminbar( $wp_admin_bar) { | |
if ( !is_user_logged_in() ) | |
$wp_admin_bar->add_menu( array( 'title' => __( 'Log In' ), 'href' => wp_login_url() ) ); | |
} | |
add_action( 'admin_bar_menu', 'pjw_login_adminbar' ); | |
add_filter( 'show_admin_bar', '__return_true' , 1000 ); |