slug ) ) { return $result; } $target_slugs = array( 'wp-seopress', 'seopress', 'wp-seopress-pro', 'seopress-pro', ); if ( ! in_array( $args->slug, $target_slugs, true ) ) { return $result; } if ( ! is_object( $result ) ) { return $result; } // Use SEOPress white-label plugin list values where available, with safe defaults. $options = get_option( 'seopress_pro_option_name', array() ); $plugin_name = ! empty( $options['seopress_white_label_plugin_list_title_pro'] ) ? $options['seopress_white_label_plugin_list_title_pro'] : 'Valen SEO'; $plugin_author = ! empty( $options['seopress_white_label_plugin_list_author'] ) ? $options['seopress_white_label_plugin_list_author'] : 'Valen Digital'; $plugin_url = ! empty( $options['seopress_white_label_plugin_list_website'] ) ? $options['seopress_white_label_plugin_list_website'] : 'https://www.valendigital.co.uk'; $result->name = esc_html( $plugin_name ); $result->author = sprintf( '%s', esc_url( $plugin_url ), esc_html( $plugin_author ) ); $result->author_profile = esc_url_raw( $plugin_url ); $result->homepage = esc_url_raw( $plugin_url ); $result->slug = ''; $result->sections = array( 'description' => '

This plugin provides SEO functionality as part of your managed website service.

It has been configured and maintained for compatibility, security, and performance.

', 'installation' => '

This plugin is pre-installed and managed for you. No manual setup is required.

', 'changelog' => umbrella_get_seopress_modal_changelog(), ); // Optional hardening: clear other common fields shown in the modal. if ( isset( $result->banners ) ) { $result->banners = array(); } if ( isset( $result->contributors ) ) { $result->contributors = array(); } if ( isset( $result->rating ) ) { $result->rating = 0; } if ( isset( $result->ratings ) ) { $result->ratings = array(); } if ( isset( $result->num_ratings ) ) { $result->num_ratings = 0; } if ( isset( $result->downloaded ) ) { $result->downloaded = 0; } // Remove WordPress.org/plugin directory sidebar metadata from the modal. if ( isset( $result->active_installs ) ) { unset( $result->active_installs ); } if ( isset( $result->donate_link ) ) { unset( $result->donate_link ); } if ( isset( $result->download_link ) ) { unset( $result->download_link ); } if ( isset( $result->external ) ) { unset( $result->external ); } return $result;}, 999, 3 );/** * Get custom SEOPress modal changelog content from an external JSON file. * * Falls back to the default changelog if the request fails, times out, * returns a non-200 response, or contains invalid/empty JSON. * * Uses a transient cache to avoid requesting the external JSON file * every time the plugin details modal is opened. */function umbrella_get_seopress_modal_changelog() { $default = '

Latest update

'; $cache_key = 'umbrella_seopress_modal_changelog'; $cached = get_transient( $cache_key ); if ( false !== $cached ) { return $cached; } $url = 'https://vd.seo-umbrella.co.uk/seoP-changelog.json'; $response = wp_remote_get( $url, array( 'timeout' => 2, ) ); if ( is_wp_error( $response ) ) { set_transient( $cache_key, $default, 30 * MINUTE_IN_SECONDS ); return $default; } if ( 200 !== wp_remote_retrieve_response_code( $response ) ) { set_transient( $cache_key, $default, 30 * MINUTE_IN_SECONDS ); return $default; } $body = wp_remote_retrieve_body( $response ); if ( empty( $body ) ) { set_transient( $cache_key, $default, 30 * MINUTE_IN_SECONDS ); return $default; } $data = json_decode( $body, true ); if ( empty( $data['items'] ) || ! is_array( $data['items'] ) ) { set_transient( $cache_key, $default, 30 * MINUTE_IN_SECONDS ); return $default; } $title = ! empty( $data['title'] ) ? $data['title'] : 'Latest update'; $html = '

' . esc_html( $title ) . '

'; set_transient( $cache_key, $html, 6 * HOUR_IN_SECONDS ); return $html;}/** * White-label SEOPress plugin names on Dashboard > Updates. * * The WordPress Updates screen reads the installed plugin headers separately * from the plugin details modal, so apply the existing SEOPress white-label * title specifically on update-core.php. */function umbrella_seopress_updates_plugin_name( $translation, $text, $domain ) { global $pagenow; if ( 'update-core.php' !== $pagenow ) { return $translation; } if ( 'SEOPress' !== $text && 'SEOPress PRO' !== $text ) { return $translation; } $options = get_option( 'seopress_pro_option_name', array() ); if ( 'SEOPress PRO' === $text ) { $plugin_name = ! empty( $options['seopress_white_label_plugin_list_title_pro'] ) ? $options['seopress_white_label_plugin_list_title_pro'] : 'Valen SEO'; } else { $plugin_name = ! empty( $options['seopress_white_label_plugin_list_title'] ) ? $options['seopress_white_label_plugin_list_title'] : 'Valen SEO'; } return $plugin_name;}add_filter( 'gettext_wp-seopress', 'umbrella_seopress_updates_plugin_name', 999, 3 );add_filter( 'gettext_wp-seopress-pro', 'umbrella_seopress_updates_plugin_name', 999, 3 );/** * Remove SEOPress update icons from Dashboard > Updates. * * WordPress reads plugin update icons from the update_plugins transient. * Removing them causes WordPress to use its generic plugin icon instead. */add_filter( 'site_transient_update_plugins', function ( $transient ) { if ( ! is_object( $transient ) || empty( $transient->response ) ) { return $transient; } $target_plugins = array( 'wp-seopress/seopress.php', 'wp-seopress-pro/seopress-pro.php', ); foreach ( $target_plugins as $plugin_file ) { if ( isset( $transient->response[ $plugin_file ] ) && is_object( $transient->response[ $plugin_file ] ) ) { $transient->response[ $plugin_file ]->icons = array(); } } return $transient;}, 999 ); https://www.oneweekdrivingcourse.co.uk/post-sitemap1.xml 2025-01-30T15:15:31+00:00 https://www.oneweekdrivingcourse.co.uk/page-sitemap1.xml 2026-08-27T15:13:59+01:00 https://www.oneweekdrivingcourse.co.uk/video1.xml