Making WordPress.org

Changeset 6572


Ignore:
Timestamp:
02/08/2018 11:28:24 PM (8 years ago)
Author:
iandunn
Message:

WordCamp Misc: Move small, miscellaneous functions into wcorg-misc.php.

Location:
sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins
Files:
2 deleted
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/wcorg-misc.php

    r6069 r6572  
    277277    return $options;
    278278});
     279
     280/*
     281 * Disable admin pointers
     282 */
     283function wcorg_disable_admin_pointers() {
     284    remove_action( 'admin_enqueue_scripts', array( 'WP_Internal_Pointers', 'enqueue_scripts' ) );
     285}
     286add_action( 'admin_init', 'wcorg_disable_admin_pointers' );
     287
     288// Prevent password resets, since they need to be done on w.org
     289add_filter( 'allow_password_reset', '__return_false' );
     290add_filter( 'show_password_fields', '__return_false' );
     291
     292/**
     293 * Redirect users to WordPress.org to reset their passwords.
     294 *
     295 * Otherwise, there's nothing to indicate where they can reset it.
     296 */
     297function wcorg_reset_passwords_at_wporg() {
     298    wp_redirect( 'https://wordpress.org/support/bb-login.php' );
     299    die();
     300}
     301add_action( 'login_form_lostpassword', 'wcorg_reset_passwords_at_wporg' );
Note: See TracChangeset for help on using the changeset viewer.