Making WordPress.org

Changeset 12042


Ignore:
Timestamp:
09/02/2022 05:01:33 AM (3 years ago)
Author:
dd32
Message:

WordPress.TV: Make wordpress.tv/upload redirect to the submit page.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.tv/public_html/wp-content/themes/wptv2/functions.php

    r11973 r12042  
    4040        add_filter( 'document_title_parts', array( $this, 'document_title_parts' ) );
    4141
    42         add_filter( 'template_redirect', array( $this, 'redirects' ) );
     42        add_filter( 'template_redirect', array( $this, 'redirects' ), 1 );
    4343
    4444        register_nav_menus( array(
     
    145145            $url = str_replace( '/social-learning', '/learn-wordpress-online-workshops', $_SERVER['REQUEST_URI'] );
    146146            wp_safe_redirect( $url, 301 );
     147            die();
     148        }
     149
     150        // Redirect /upload to submit-video
     151        if ( 'upload' === trim( $_SERVER['REQUEST_URI'], '/' ) ) {
     152            wp_safe_redirect( '/submit-video/', 301 );
    147153            die();
    148154        }
Note: See TracChangeset for help on using the changeset viewer.