✘✘ GRAYBYTE WORDPRESS FILE MANAGER ✘✘

​🇳​​🇦​​🇲​​🇪♯➤ webm004.cluster127.gra.hosting.ovh.net ​🇻​♯➤ 6.18.42-ovh-vps-grsec-zfs+ #1 SMP 🇾​♯➤ 2026

𝗛𝗢𝗠𝗘 𝗜𝗗 ♯➤ 54.36.91.62 ♯➤ 𝗔𝗗𝗠𝗜𝗡 𝗜𝗗 216.73.216.42
𝗢𝗣𝗧𝗜𝗢𝗡𝗦 ♯ CRL ♯➤ 𝗢𝗞 ┃ WGT ♯➤ 𝗢𝗞 ┃ SDO ♯➤ 𝗢𝗙𝗙 ┃ PKEX ♯➤ 𝗢𝗙𝗙
𝗗𝗘𝗔𝗖𝗧𝗜𝗩𝗔𝗧𝗘𝗗 ♯➤ _dyuweyrj4,_dyuweyrj4r,dl

𝗛𝗢𝗠𝗘
𝗖𝗨𝗥𝗥𝗘𝗡𝗧 𝗙𝗜𝗟𝗘 : /home/docteuh/www/plugins/wordpress-seo/src//crawl-cleanup-permalinks.php
<?php

namespace Yoast\WP\SEO\Initializers;

use Yoast\WP\SEO\Conditionals\Front_End_Conditional;
use Yoast\WP\SEO\Helpers\Crawl_Cleanup_Helper;
use Yoast\WP\SEO\Helpers\Options_Helper;
use Yoast\WP\SEO\Helpers\Redirect_Helper;
use Yoast\WP\SEO\Helpers\Url_Helper;

/**
 * Class Crawl_Cleanup_Permalinks.
 */
class Crawl_Cleanup_Permalinks implements Initializer_Interface {

	/**
	 * The options helper.
	 *
	 * @var Options_Helper
	 */
	private $options_helper;

	/**
	 * The URL helper.
	 *
	 * @var Url_Helper
	 */
	private $url_helper;

	/**
	 * The Redirect_Helper.
	 *
	 * @var Redirect_Helper
	 */
	private $redirect_helper;

	/**
	 * The Crawl_Cleanup_Helper.
	 *
	 * @var Crawl_Cleanup_Helper
	 */
	private $crawl_cleanup_helper;

	/**
	 * Crawl Cleanup Basic integration constructor.
	 *
	 * @param Options_Helper       $options_helper       The option helper.
	 * @param Url_Helper           $url_helper           The URL helper.
	 * @param Redirect_Helper      $redirect_helper      The Redirect Helper.
	 * @param Crawl_Cleanup_Helper $crawl_cleanup_helper The Crawl_Cleanup_Helper.
	 */
	public function __construct(
		Options_Helper $options_helper,
		Url_Helper $url_helper,
		Redirect_Helper $redirect_helper,
		Crawl_Cleanup_Helper $crawl_cleanup_helper
	) {
		$this->options_helper       = $options_helper;
		$this->url_helper           = $url_helper;
		$this->redirect_helper      = $redirect_helper;
		$this->crawl_cleanup_helper = $crawl_cleanup_helper;
	}

	/**
	 * Initializes the integration.
	 *
	 * @return void
	 */
	public function initialize() {
		// We need to hook after 10 because otherwise our options helper isn't available yet.
		\add_action( 'plugins_loaded', [ $this, 'register_hooks' ], 15 );
	}

	/**
	 * Hooks our required hooks.
	 *
	 * This is the place to register hooks and filters.
	 *
	 * @return void
	 */
	public function register_hooks() {
		if ( $this->options_helper->get( 'clean_campaign_tracking_urls' ) && ! empty( \get_option( 'permalink_structure' ) ) ) {
			\add_action( 'template_redirect', [ $this, 'utm_redirect' ], 0 );
		}
		if ( $this->options_helper->get( 'clean_permalinks' ) && ! empty( \get_option( 'permalink_structure' ) ) ) {
			\add_action( 'template_redirect', [ $this, 'clean_permalinks' ], 1 );
		}
	}

	/**
	 * Returns the conditionals based in which this loadable should be active.
	 *
	 * @return array The array of conditionals.
	 */
	public static function get_conditionals() {
		return [ Front_End_Conditional::class ];
	}

	/**
	 * Redirect utm variables away.
	 *
	 * @return void
	 */
	public function utm_redirect() {
		// Prevents WP CLI from throwing an error.
		// phpcs:ignore WordPress.Security.ValidatedSanitizedInput
		if ( ! isset( $_SERVER['REQUEST_URI'] ) || \strpos( $_SERVER['REQUEST_URI'], '?' ) === false ) {
			return;
		}

		// phpcs:ignore WordPress.Security.ValidatedSanitizedInput
		if ( ! \stripos( $_SERVER['REQUEST_URI'], 'utm_' ) ) {
			return;
		}

		// phpcs:ignore WordPress.Security.ValidatedSanitizedInput
		$parsed = \wp_parse_url( $_SERVER['REQUEST_URI'] );

		$query      = \explode( '&', $parsed['query'] );
		$utms       = [];
		$other_args = [];

		foreach ( $query as $query_arg ) {
			if ( \stripos( $query_arg, 'utm_' ) === 0 ) {
				$utms[] = $query_arg;
				continue;
			}
			$other_args[] = $query_arg;
		}

		if ( empty( $utms ) ) {
			return;
		}

		$other_args_str = '';
		if ( \count( $other_args ) > 0 ) {
			$other_args_str = '?' . \implode( '&', $other_args );
		}

		$new_path = $parsed['path'] . $other_args_str . '#' . \implode( '&', $utms );

		$message = \sprintf(
			/* translators: %1$s: Yoast SEO */
			\__( '%1$s: redirect utm variables to #', 'wordpress-seo' ),
			'Yoast SEO',
		);

		$this->redirect_helper->do_safe_redirect( \trailingslashit( $this->url_helper->recreate_current_url( false ) ) . \ltrim( $new_path, '/' ), 301, $message );
	}

	/**
	 * Removes unneeded query variables from the URL.
	 *
	 * @return void
	 */
	public function clean_permalinks() {

		if ( $this->crawl_cleanup_helper->should_avoid_redirect() ) {
			return;
		}

		$current_url    = $this->url_helper->recreate_current_url();
		$allowed_params = $this->crawl_cleanup_helper->allowed_params( $current_url );

		// If we had only allowed params, let's just bail out, no further processing needed.
		if ( empty( $allowed_params['query'] ) ) {
			return;
		}

		$url_type = $this->crawl_cleanup_helper->get_url_type();

		switch ( $url_type ) {
			case 'singular_url':
				$proper_url = $this->crawl_cleanup_helper->singular_url();
				break;
			case 'front_page_url':
				$proper_url = $this->crawl_cleanup_helper->front_page_url();
				break;
			case 'page_for_posts_url':
				$proper_url = $this->crawl_cleanup_helper->page_for_posts_url();
				break;
			case 'taxonomy_url':
				$proper_url = $this->crawl_cleanup_helper->taxonomy_url();
				break;
			case 'search_url':
				$proper_url = $this->crawl_cleanup_helper->search_url();
				break;
			case 'page_not_found_url':
				$proper_url = $this->crawl_cleanup_helper->page_not_found_url( $current_url );
				break;
			default:
				$proper_url = '';
		}

		if ( $this->crawl_cleanup_helper->is_query_var_page( $proper_url ) ) {
			$proper_url = $this->crawl_cleanup_helper->query_var_page_url( $proper_url );
		}

		$proper_url = \add_query_arg( $allowed_params['allowed_query'], $proper_url );

		if ( empty( $proper_url ) || $current_url === $proper_url ) {
			return;
		}

		$this->crawl_cleanup_helper->do_clean_redirect( $proper_url );
	}
}


Current_dir [ 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ] Document_root [ 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ]


[ Back ]
𝗡𝗔𝗠𝗘
𝗦𝗜𝗭𝗘
𝗟𝗔𝗦𝗧 𝗧𝗢𝗨𝗖𝗛
𝗨𝗦𝗘𝗥
𝗦𝗧𝗔𝗧𝗨𝗦
𝗙𝗨𝗡𝗖𝗧𝗜𝗢𝗡𝗦
..
--
11 Sep 2026 8.22 PM
docteuh / users
0755
abilities
--
4 Sep 2026 12.46 AM
docteuh / users
0755
actions
--
4 Sep 2026 12.45 AM
docteuh / users
0755
ai
--
4 Sep 2026 3.25 AM
docteuh / users
0755
ai-consent
--
4 Sep 2026 12.46 AM
docteuh / users
0755
ai-free-sparks
--
31 Aug 2026 5.40 AM
docteuh / users
0755
ai-http-request
--
3 Sep 2026 11.53 PM
docteuh / users
0755
alerts
--
4 Sep 2026 1.53 AM
docteuh / users
0755
analytics
--
4 Sep 2026 1.53 AM
docteuh / users
0755
builders
--
3 Sep 2026 11.43 PM
docteuh / users
0755
commands
--
4 Sep 2026 3.18 AM
docteuh / users
0755
conditionals
--
4 Sep 2026 2.39 AM
docteuh / users
0755
config
--
4 Sep 2026 1.54 AM
docteuh / users
0755
content-type-visibility
--
30 Aug 2026 11.37 PM
docteuh / users
0755
context
--
31 Aug 2026 1.47 PM
docteuh / users
0755
dashboard
--
4 Sep 2026 1.52 AM
docteuh / users
0755
deprecated
--
4 Sep 2026 2.28 AM
docteuh / users
0755
elementor
--
4 Sep 2026 1.53 AM
docteuh / users
0755
expiring-store
--
4 Sep 2026 2.27 AM
docteuh / users
0755
generated
--
4 Sep 2026 1.54 AM
docteuh / users
0755
generators
--
4 Sep 2026 2.59 AM
docteuh / users
0755
images
--
4 Sep 2026 2.25 AM
docteuh / users
0755
initializers
--
4 Sep 2026 2.25 AM
docteuh / users
0755
integrations
--
4 Sep 2026 1.58 AM
docteuh / users
0755
llms-txt
--
28 Aug 2026 8.30 PM
docteuh / users
0755
memoizers
--
4 Sep 2026 1.51 AM
docteuh / users
0755
models
--
4 Sep 2026 12.45 AM
docteuh / users
0755
myyoast-client
--
28 Aug 2026 11.32 AM
docteuh / users
0755
plans
--
4 Sep 2026 12.43 AM
docteuh / users
0755
presenters
--
4 Sep 2026 2.25 AM
docteuh / users
0755
promotions
--
4 Sep 2026 12.47 AM
docteuh / users
0755
repositories
--
3 Sep 2026 11.03 PM
docteuh / users
0755
routes
--
4 Sep 2026 2.25 AM
docteuh / users
0755
schema
--
4 Sep 2026 12.44 AM
docteuh / users
0755
schema-aggregator
--
30 Aug 2026 2.29 PM
docteuh / users
0755
surfaces
--
4 Sep 2026 12.44 AM
docteuh / users
0755
tracking
--
4 Sep 2026 1.52 AM
docteuh / users
0755
user-meta
--
4 Sep 2026 1.53 AM
docteuh / users
0755
values
--
4 Sep 2026 1.52 AM
docteuh / users
0755
wordpress
--
4 Sep 2026 2.25 AM
docteuh / users
0755
abstract-presenter.php
0.368 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
class-admin.php
12.73 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
class-capability-manager-vip.php
1.906 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
class-capability-utils.php
2.342 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
classes-surface.php
0.795 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
code-generator-20260830134557.php
0.64 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
code-generator.php
0.64 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
crawl-cleanup-permalinks.php
5.395 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
feature-flag-conditional-20260828011717.php
0.89 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
feature-flag-conditional.php
0.89 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
functions-20260827155733.php
0.681 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
functions.php
0.681 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
howto.php
5.86 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
icon-redirect-manager-20260827050340-20260827184106.svg
1.299 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
icon-redirect-manager-20260827050340.svg
1.299 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
icon-redirect-manager-20260827052159-20260827184108.svg
1.299 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
icon-redirect-manager-20260827052159.svg
1.299 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
icon-redirect-manager-20260827052201-20260827184019.svg
1.299 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
icon-redirect-manager-20260827052201.svg
1.299 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
icon-redirect-manager-20260827052203.svg
1.299 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
icon-redirect-manager-20260827052204.svg
1.299 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
icon-redirect-manager-20260827052405.svg
1.299 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
icon-redirect-manager-20260829050506-20260830004210-20260830004247-20260830005923-20260830051301.svg
1.299 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
icon-redirect-manager.svg
1.299 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
index.php
0.037 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
indexable-author-archive-presentation.php
4.21 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
loadable-interface.php
0.279 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
loader.php
6.886 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
main-20260827124941.php
1.824 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
main.php
1.824 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
meta-author-presenter.php
1.345 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
non-multisite-conditional.php
0.363 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
open-graph-conditional.php
0.711 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
primary-term.php
0.652 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
schema-helpers-surface.php
2.85 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
semrush-client-20260827182002.php
2.617 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
settings-integration.php
36.304 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
string-helper.php
1.189 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
uninstall-integration.php
0.982 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
webpack.config.js
0.623 KB
18 Jun 2026 6.25 PM
docteuh / users
0644
woocommerce-conditional.php
0.402 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
wp-seo-main.php
17.215 KB
23 Jun 2026 6.20 PM
docteuh / users
0644
wpml-config.xml
2.081 KB
23 Jun 2026 6.20 PM
docteuh / users
0644
wrapper.php
1.439 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
xmlrpc.php
1.223 KB
23 Jun 2026 6.19 PM
docteuh / users
0644

✘✘ GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME ✘✘
Static GIF Static GIF