' . \esc_html__( 'Documentation', 'embed-privacy' ) . '', ] ); } /** * Enqueue admin assets. * * @param string $hook The current hook */ public static function enqueue_assets( $hook ) { // we need it just on the post page if ( ( $hook !== 'post.php' && $hook !== 'post-new.php' ) || \get_current_screen()->id !== 'epi_embed' ) { return; } $suffix = \defined( 'WP_DEBUG' ) && \WP_DEBUG || \defined( 'SCRIPT_DEBUG' ) && \SCRIPT_DEBUG ? '' : '.min'; $script_path = \EPI_EMBED_PRIVACY_BASE . 'assets/js/admin/image-upload' . $suffix . '.js'; $script_url = \EPI_EMBED_PRIVACY_URL . 'assets/js/admin/image-upload' . $suffix . '.js'; \wp_enqueue_script( 'embed-privacy-admin-image-upload', $script_url, [ 'jquery' ], \filemtime( $script_path ), true ); $style_path = \EPI_EMBED_PRIVACY_BASE . 'assets/style/embed-privacy-admin' . $suffix . '.css'; $style_url = \EPI_EMBED_PRIVACY_URL . 'assets/style/embed-privacy-admin' . $suffix . '.css'; \wp_enqueue_style( 'embed-privacy-admin-style', $style_url, [], \filemtime( $style_path ) ); } }