wp-lookbook-css' )->src ?? '', 'wpbingo' ) !== false ) { wp_dequeue_style( 'bwp-lookbook-css' ); } } /** * Dequeues third-party scripts from the other plugins or themes that crashes our menu pages. * * @version 4.3.2 * * @return void */ public function dequeueThirdPartyAssetsEarly() { // Disables scripts for plugins StmMotorsExtends and StmPostType. if ( class_exists( 'STM_Metaboxes' ) ) { remove_action( 'admin_enqueue_scripts', [ 'STM_Metaboxes', 'wpcfto_scripts' ] ); } // Disables scripts for LearnPress plugin. if ( function_exists( 'learn_press_admin_assets' ) ) { remove_action( 'admin_enqueue_scripts', [ learn_press_admin_assets(), 'load_scripts' ] ); } } /** * Removes the duplicate meta description tag from the Hello Elementor theme. * * @since 4.4.3 * * @link https://developers.elementor.com/docs/hello-elementor-theme/hello_elementor_add_description_meta_tag/ * * @return void */ public function removeHelloElementorDescriptionTag() { remove_action( 'wp_head', 'hello_elementor_add_description_meta_tag' ); } /** * Prevent WP-Optimize from deleting our tables. * * @since 4.4.5 * * @param array $tables List of tables. * @return array Filtered tables. */ public function wpOptimizeAioseoTables( $tables ) { foreach ( $tables as &$table ) { if ( is_object( $table ) && property_exists( $table, 'Name' ) && false !== stripos( $table->Name, 'aioseo_' ) ) { $table->is_using = true; $table->can_be_removed = false; } } return $tables; } }