since 3.10.9 * * @param array $excluded_files Array of excluded patterns. * * @return array */ public function exclude_js( $excluded_files ): array { if ( ! $this->options->get( 'minify_concatenate_js', false ) ) { return $excluded_files; } $excluded_files[] = '/wp-includes/js/dist/hooks(.min)?.js'; return $excluded_files; } /** * Remove rocket metabox option from post. * * @param array $cpts Custom post type. * @return array */ public function remove_rocket_option( array $cpts ): array { if ( isset( $cpts['elementor_library'] ) ) { unset( $cpts['elementor_library'] ); } return $cpts; } /** * Remove cache or purge option from elementor template post. * * @param boolean $should_skip Should skip rocket option to admin bar. * @param mixed $post Post object. * @return boolean */ public function skip_admin_bar_option( bool $should_skip, $post ): bool { if ( null === $post ) { return $should_skip; } if ( 'elementor_library' === $post->post_type ) { return true; } return $should_skip; } }