Linux puskom-ProLiant-DL385-Gen10 5.4.0-150-generic #167~18.04.1-Ubuntu SMP Wed May 24 00:51:42 UTC 2023 x86_64
/
home
/
puskom
/
mastur
/
hummingbird-performance
/
core
/
integration
/
//home/puskom/mastur/hummingbird-performance/core/integration/class-wph.php
<?php /** * Compatibility with WP Hide & Security Enhancer. * * @since 1.9.4 * @package Hummingbird\Core\Integration */ namespace Hummingbird\Core\Integration; if ( ! defined( 'ABSPATH' ) ) { exit; } /** * Class WPH */ class WPH { /** * WP_Hummingbird_WPH_Integration constructor. * * @since 1.9.4 */ public function __construct() { add_action( 'init', array( $this, 'enable_integration' ) ); } /** * Enable integration. * * @since 1.9.4 */ public function enable_integration() { // If WP Hide & Security Enhancer is not enabled - return. if ( ! defined( 'WPH_PATH' ) || ! defined( 'WPH_CORE_VERSION' ) ) { return; } // Page caching is not enabled. if ( ! apply_filters( 'wp_hummingbird_is_active_module_page_cache', false ) ) { return; } add_filter( 'wphb_cache_content', array( $this, 'replace_links' ) ); } /** * Replace links when URLs are replaced in WP Hide & Security Enhancer. * * @since 1.9.4 * * @param string $content Page buffer. * * @return string */ public function replace_links( $content ) { global $wph; return $wph->ob_start_callback( $content ); } }