HEX
Server: LiteSpeed
System: Linux melbournecleaninggroup 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User: www-data (33)
PHP: 7.3.33-1+focal
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,
Upload Files
File: /var/www/html/wp-content/plugins/brizy-pro/content/placeholders/excerpt.php
<?php

class BrizyPro_Content_Placeholders_Excerpt extends Brizy_Content_Placeholders_Simple {

	/**
	 * Brizy_Editor_Content_GenericPlaceHolder constructor.
	 *
	 * @param string $label
	 * @param string $placeholder
	 */
	public function __construct( $label, $placeholder ) {
		parent::__construct( $label, $placeholder, function ( Brizy_Content_Context $context ) {
			return $this->get_the_excerpt( $context->getWpPost() );
		} );
	}

	/**
	 * It rewrites the function from wodpress core get_the_excerpt that applies the hook get_the_excerpt.
	 * The hook get_the_excerpt has a handle wp_trim_excerpt that applies the hook the_content.
	 * Applying the hook the_content will run an infinite loop because of some function like
	 * Brizy_Admin_Templates->filterPageContent() which are also hanging at this hook.
	 *
	 * @param WP_Post $post
	 *
	 * @return false|mixed|string
	 */
	public function get_the_excerpt( $post ) {

		if ( post_password_required( $post ) ) {
			return __( 'There is no excerpt because this is a protected post.', 'brizy-pro' );
		}

		return Brizy_Shortcode_PostField::wp_trim_excerpt( $post->post_excerpt, $post );
	}
}