HEX
Server: Apache/2.4.63 (Unix)
System: Linux TOMS-220NAS 4.4.302+ #86009 SMP Wed Nov 26 18:19:17 CST 2025 x86_64
User: flavio87 (1026)
PHP: 8.3.27
Disabled: NONE
Upload Files
File: /volume1/web/Marchisa-Toman/wp-content/plugins/meta-box/src/FeaturedPlugins.php
<?php
namespace MetaBox;

class FeaturedPlugins {
	public function __construct() {
		add_filter( 'plugins_api_result', [ $this, 'process' ], 10, 2 );
	}

	public function process( $result, $action ) {
		global $tab;
		if ( ! in_array( $tab, [ 'featured', 'recommended' ], true ) ) {
			return $result;
		}

		if ( is_wp_error( $result ) || $action !== 'query_plugins' ) {
			return $result;
		}

		foreach ( $result->plugins as $index => $plugin ) {
			if ( $plugin['slug'] === 'secure-custom-fields' ) {
				unset( $result->plugins[ $index ] );
			}
		}

		return $result;
	}
}