Make WordPress Core

Ticket #37855: 37855.patch

File 37855.patch, 3.9 KB (added by ramiy, 9 years ago)

Add $priority parameter to wp_head actions

  • wp-includes/default-filters.php

     
    217217
    218218// REST API filters.
    219219add_action( 'xmlrpc_rsd_apis',            'rest_output_rsd' );
    220 add_action( 'wp_head',                    'rest_output_link_wp_head', 10, 0 );
     220add_action( 'wp_head',                    'rest_output_link_wp_head', 6, 0 );
    221221add_action( 'template_redirect',          'rest_output_link_header', 11, 0 );
    222222add_action( 'auth_cookie_malformed',      'rest_cookie_collect_status' );
    223223add_action( 'auth_cookie_expired',        'rest_cookie_collect_status' );
     
    230230add_action( 'wp_head',             '_wp_render_title_tag',            1     );
    231231add_action( 'wp_head',             'wp_enqueue_scripts',              1     );
    232232add_action( 'wp_head',             'wp_resource_hints',               2     );
    233 add_action( 'wp_head',             'feed_links',                      2     );
    234 add_action( 'wp_head',             'feed_links_extra',                3     );
    235 add_action( 'wp_head',             'rsd_link'                               );
    236 add_action( 'wp_head',             'wlwmanifest_link'                       );
    237 add_action( 'wp_head',             'adjacent_posts_rel_link_wp_head', 10, 0 );
     233add_action( 'wp_head',             'feed_links',                      5     );
     234add_action( 'wp_head',             'feed_links_extra',                5     );
     235add_action( 'wp_head',             'rsd_link',                        2     );
     236add_action( 'wp_head',             'wlwmanifest_link',                2     );
     237add_action( 'wp_head',             'adjacent_posts_rel_link_wp_head', 4, 0 );
    238238add_action( 'wp_head',             'locale_stylesheet'                      );
    239239add_action( 'publish_future_post', 'check_and_publish_future_post',   10, 1 );
    240240add_action( 'wp_head',             'noindex',                          1    );
     
    241241add_action( 'wp_head',             'print_emoji_detection_script',     7    );
    242242add_action( 'wp_head',             'wp_print_styles',                  8    );
    243243add_action( 'wp_head',             'wp_print_head_scripts',            9    );
    244 add_action( 'wp_head',             'wp_generator'                           );
    245 add_action( 'wp_head',             'rel_canonical'                          );
    246 add_action( 'wp_head',             'wp_shortlink_wp_head',            10, 0 );
    247 add_action( 'wp_head',             'wp_site_icon',                    99    );
     244add_action( 'wp_head',             'wp_generator',                     1    );
     245add_action( 'wp_head',             'rel_canonical',                    3    );
     246add_action( 'wp_head',             'wp_shortlink_wp_head',             3, 0 );
     247add_action( 'wp_head',             'wp_site_icon',                     4    );
    248248add_action( 'wp_footer',           'wp_print_footer_scripts',         20    );
    249249add_action( 'template_redirect',   'wp_shortlink_header',             11, 0 );
    250250add_action( 'wp_print_footer_scripts', '_wp_footer_scripts'                 );
     
    253253add_action( 'wp_print_styles',     'print_emoji_styles'                     );
    254254
    255255if ( isset( $_GET['replytocom'] ) )
    256     add_action( 'wp_head', 'wp_no_robots' );
     256    add_action( 'wp_head', 'wp_no_robots', 1 );
    257257
    258258// Login actions
    259259add_filter( 'login_head',          'wp_resource_hints',             8     );
     
    460460add_action( 'rest_api_init',          'wp_oembed_register_route'              );
    461461add_filter( 'rest_pre_serve_request', '_oembed_rest_pre_serve_request', 10, 4 );
    462462
    463 add_action( 'wp_head',                'wp_oembed_add_discovery_links'         );
     463add_action( 'wp_head',                'wp_oembed_add_discovery_links',   6    );
    464464add_action( 'wp_head',                'wp_oembed_add_host_js'                 );
    465465
    466466add_action( 'embed_head',             'enqueue_embed_scripts',           1    );