Making WordPress.org


Ignore:
Timestamp:
11/18/2022 01:48:31 AM (3 years ago)
Author:
dd32
Message:

Openverse: Prepare for a migration to a standalone Openverse domain.

Props dhruvkb, zackkrida, sarayourfriend, olgabulat.
Closes https://github.com/WordPress/wordpress.org/pull/98.
Fixes #6578.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-openverse/index.php

    r11217 r12252  
    1515namespace WordPressdotorg\Openverse\Theme;
    1616
     17/*
     18    If the theme mod `ov_is_redirect_enabled` is set to `true`, redirect to the
     19    standalone site and exit immediately. If not, print what would have been the
     20    redirect URL to the HTML as a comment.
     21 */
     22
     23$is_redirect_enabled = get_theme_mod( 'ov_is_redirect_enabled' );
     24$target_url = get_target_url();
     25
     26if ( $is_redirect_enabled ) {
     27    wp_redirect( $target_url );
     28    exit;
     29} else {
     30    echo "<!-- " . $target_url . " -->";
     31}
     32
    1733get_header();
    1834?>
Note: See TracChangeset for help on using the changeset viewer.