$plugin ) { $slug = explode( '/', $slug ); $plugins[ $slug[0] ] = $plugin; } $themes = wp_get_themes(); $logs = get_option( 'jqmh_logs', array() ); ?>

Logs

.+?)\/.+?: (?P.+)/', $log['notice'], $plugin ); preg_match( '/\/themes\/(?P.+?)\/.+?: (?P.+)/', $log['notice'], $theme ); preg_match( '/\/wp-(admin|includes)\/.+?: (?P.+)/', $log['notice'], $core ); $notice = $log['notice']; $source = __( 'Undetermined', 'enable-jquery-migrate-helper' ); $file = __( 'Inline code, unknown file location', 'enable-jquery-migrate-helper' ); if ( ! empty( $plugin ) ) { preg_match( '/(?Phttps?:\/\/.+?):/', $log['notice'], $file ); $file = $file['path']; $plugin_link = '#'; if ( isset( $plugins[ $plugin['slug'] ] ) ) { $plugin_link = ( isset( $plugins[ $plugin['slug'] ]['PluginURI'] ) ? $plugins[ $plugin['slug'] ]['PluginURI'] : $plugins[ $plugin['slug'] ]['AuthorURI'] ); } $notice = $plugin['notice']; $source = sprintf( // translators: 1: Linked name of the plugin throwing notices. __( 'Plugin: %s', 'enable-jquery-migrate-helper' ), sprintf( '%s', esc_url( $plugin_link ), esc_html( ( isset( $plugins[ $plugin['slug'] ] ) ? $plugins[ $plugin['slug'] ]['Name'] : $plugin['slug'] ) ) ) ); } elseif ( ! empty( $theme ) ) { preg_match( '/(?Phttps?:\/\/.+?):/', $log['notice'], $file ); $file = $file['path']; $theme_link = '#'; if ( isset( $themes[ $theme['slug'] ] ) ) { $theme_link = $themes[ $theme['slug'] ]->get( 'ThemeURI' ); } $notice = $theme['notice']; $source = sprintf( // translators: 1: Linked name of the theme throwing notices. __( 'Theme: %s', 'enable-jquery-migrate-helper' ), sprintf( '%s', esc_url( $theme_link ), esc_html( ( isset( $themes[ $theme['slug'] ] ) ? $themes[ $theme['slug'] ]->get( 'Name' ) : $theme['slug'] ) ) ) ); } elseif ( ! empty( $core ) ) { preg_match( '/(?Phttps?:\/\/.+?):/', $log['notice'], $file ); $file = $file['path']; $notice = $core['notice']; $source = __( 'WordPress core', 'enable-jquery-migrate-helper' ); } ?>