Make WordPress Core

Ticket #12293: 12293.diff

File 12293.diff, 2.1 KB (added by ryan, 14 years ago)
  • wp-login.php

     
    368368        setcookie(TEST_COOKIE, 'WP Cookie check', 0, SITECOOKIEPATH, COOKIE_DOMAIN);
    369369
    370370// allow plugins to override the default actions, and to add extra actions if they want
    371 do_action('login_form_' . $action);
     371do_action( 'login_form' );
     372do_action( 'login_form_' . $action );
    372373
    373374$http_post = ('POST' == $_SERVER['REQUEST_METHOD']);
    374375switch ($action) {
  • wp-includes/default-filters.php

     
    215215// Login actions
    216216add_action( 'login_head',          'wp_print_head_scripts',         9     );
    217217add_action( 'login_footer',        'wp_print_footer_scripts'              );
     218add_action( 'login_form',          'send_frame_options_header',     10, 0 );
    218219
    219220// Feed Generator Tags
    220221foreach ( array( 'rss2_head', 'commentsrss2_head', 'rss_head', 'rdf_header', 'atom_head', 'comments_atom_head', 'opml_head', 'app_head' ) as $action ) {
     
    248249add_action( 'wp_scheduled_delete',        'wp_scheduled_delete'            );
    249250add_action( 'before_wp_tiny_mce',         'wp_print_editor_js'             );
    250251add_action( 'after_wp_tiny_mce',          'wp_preload_dialogs',      10, 1 );
     252add_action( 'admin_init',                 'send_frame_options_header', 10, 0 );
    251253
    252254// Navigation menu actions
    253255add_action( 'delete_post',                '_wp_delete_post_menu_item'      );
  • wp-includes/functions.php

     
    45344534        return false;
    45354535}
    45364536
     4537/**
     4538 * Send a HTTP header to limit rendering of pages to same origin iframes.
     4539 *
     4540 * @link https://developer.mozilla.org/en/the_x-frame-options_response_header
     4541 *
     4542 * @since 3.2.0
     4543 * @return none
     4544 */
     4545function send_frame_options_header() {
     4546        @header( 'X-Frame-Options: SAMEORIGIN' );
     4547}
     4548
    45374549?>