Make WordPress Core


Ignore:
Timestamp:
03/03/2010 07:04:25 AM (15 years ago)
Author:
nacin
Message:

Switch the multisite constant EDIT_ANY_USER to a filter. Also ensure we're back compat with POST_BY_EMAIL. see #12381

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/ms-default-filters.php

    r13416 r13568  
    11<?php
     2/**
     3 * Sets up the default filters and actions for Multisite.
     4 *
     5 * If you need to remove a default hook, this file will give you the priority
     6 * for which to use to remove the hook.
     7 *
     8 * Not all of the Multisite default hooks are found in ms-default-filters.php
     9 *
     10 * @package WordPress
     11 * @subpackage Multisite
     12 * @see default-filters.php
     13 */
     14
    215// Users
    3 add_filter ( 'wpmu_validate_user_signup', 'signup_nonce_check' );
    4 add_action ( 'init', 'maybe_add_existing_user_to_blog' );
    5 add_action ( 'wpmu_new_user', 'newuser_notify_siteadmin' );
    6 add_action ( 'wpmu_activate_user', 'add_new_user_to_blog', 10, 3 );
    7 add_action ( 'sanitize_user', 'strtolower' );
     16add_filter( 'wpmu_validate_user_signup', 'signup_nonce_check' );
     17add_action( 'init', 'maybe_add_existing_user_to_blog' );
     18add_action( 'wpmu_new_user', 'newuser_notify_siteadmin' );
     19add_action( 'wpmu_activate_user', 'add_new_user_to_blog', 10, 3 );
     20add_action( 'sanitize_user', 'strtolower' );
    821
    922// Blogs
    10 add_filter ( 'wpmu_validate_blog_signup', 'signup_nonce_check' );
    11 add_action ( 'wpmu_new_blog', 'wpmu_log_new_registrations', 10, 2 );
    12 add_action ( 'wpmu_new_blog', 'newblog_notify_siteadmin', 10, 2 );
     23add_filter( 'wpmu_validate_blog_signup', 'signup_nonce_check' );
     24add_action( 'wpmu_new_blog', 'wpmu_log_new_registrations', 10, 2 );
     25add_action( 'wpmu_new_blog', 'newblog_notify_siteadmin', 10, 2 );
    1326
    1427// Register Nonce
    15 add_action ( 'signup_hidden_fields', 'signup_nonce_fields' );
     28add_action( 'signup_hidden_fields', 'signup_nonce_fields' );
    1629
    1730// Template
    18 add_action ( 'template_redirect', 'maybe_redirect_404' );
    19 add_filter ( 'allowed_redirect_hosts', 'redirect_this_site' );
     31add_action( 'template_redirect', 'maybe_redirect_404' );
     32add_filter( 'allowed_redirect_hosts', 'redirect_this_site' );
    2033
    2134// Administration
    22 add_filter ( 'term_id_filter', 'global_terms', 10, 2 );
    23 add_action ( 'publish_post', 'update_posts_count' );
    24 add_action ( 'delete_post', 'wpmu_update_blogs_date' );
    25 add_action ( 'private_to_published', 'wpmu_update_blogs_date' );
    26 add_action ( 'publish_phone', 'wpmu_update_blogs_date' );
    27 add_action ( 'publish_post', 'wpmu_update_blogs_date' );
     35add_filter( 'term_id_filter', 'global_terms', 10, 2 );
     36add_action( 'publish_post', 'update_posts_count' );
     37add_action( 'delete_post', 'wpmu_update_blogs_date' );
     38add_action( 'private_to_published', 'wpmu_update_blogs_date' );
     39add_action( 'publish_phone', 'wpmu_update_blogs_date' );
     40add_action( 'publish_post', 'wpmu_update_blogs_date' );
    2841
    2942// Files
    30 add_filter ( 'wp_upload_bits', 'upload_is_file_too_big' );
    31 add_filter ( 'import_upload_size_limit', 'fix_import_form_size' );
    32 add_filter ( 'upload_mimes', 'check_upload_mimes' );
     43add_filter( 'wp_upload_bits', 'upload_is_file_too_big' );
     44add_filter( 'import_upload_size_limit', 'fix_import_form_size' );
     45add_filter( 'upload_mimes', 'check_upload_mimes' );
     46add_action( 'admin_notices', 'ms_deprecated_blogs_file' );
    3347
    3448// Mail
    35 add_filter ( 'wp_mail_from', 'wordpressmu_wp_mail_from' );
    36 
    37 
     49add_filter( 'wp_mail_from', 'wordpressmu_wp_mail_from' );
    3850add_action( 'phpmailer_init', 'fix_phpmailer_messageid' );
    3951
    4052// Disable somethings by default for multisite
    4153add_filter( 'enable_update_services_configuration', '__return_false' );
    42 add_filter( 'enable_post_by_email_configuration', '__return_false' );
     54if ( ! defined('POST_BY_EMAIL') || ! POST_BY_EMAIL ) // back compat constant.
     55    add_filter( 'enable_post_by_email_configuration', '__return_false' );
     56if ( ! defined('EDIT_ANY_USER') || ! EDIT_ANY_USER ) // back compat constant.
     57    add_filter( 'enable_edit_any_user_configuration', '__return_false' );
    4358?>
Note: See TracChangeset for help on using the changeset viewer.