Changeset 25481
- Timestamp:
- 09/18/2013 06:21:46 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/ms.php
r24875 r25481 62 62 63 63 $blog = get_blog_details( $blog_id ); 64 64 /** 65 * Fires before a blog is deleted. 66 * 67 * @since MU 68 * 69 * @param int $blog_id The blog ID. 70 * @param bool $drop True if blog's table should be dropped. Default is false. 71 */ 65 72 do_action( 'delete_blog', $blog_id, $drop ); 66 73 … … 81 88 82 89 if ( $drop ) { 83 $drop_tables = apply_filters( 'wpmu_drop_tables', $wpdb->tables( 'blog' ), $blog_id ); 90 $tables = $wpdb->tables( 'blog' ); 91 /** 92 * Filter the tables to drop when the blog is deleted. 93 * 94 * @since MU 95 * 96 * @param array $tables The blog tables to be dropped. 97 * @param int $blog_id The ID of the blog to drop tables for. 98 */ 99 $drop_tables = apply_filters( 'wpmu_drop_tables', $tables, $blog_id ); 84 100 85 101 foreach ( (array) $drop_tables as $table ) { … … 90 106 91 107 $uploads = wp_upload_dir(); 108 /** 109 * Filter the upload base directory to delete when the blog is deleted. 110 * 111 * @since MU 112 * 113 * @param string $uploads['basedir'] Uploads path without subdirectory. @see wp_upload_dir() 114 * @param int $blog_id The blog ID. 115 */ 92 116 $dir = apply_filters( 'wpmu_delete_blog_upload_dir', $uploads['basedir'], $blog_id ); 93 117 $dir = rtrim( $dir, DIRECTORY_SEPARATOR ); … … 138 162 if ( !$user->exists() ) 139 163 return false; 140 164 /** 165 * Fires when a user is deleted from the network. 166 * 167 * @since MU 168 * 169 * @param int $id User ID of the user about to be deleted from the network. 170 */ 141 171 do_action( 'wpmu_delete_user', $id ); 142 172 … … 173 203 clean_user_cache( $user ); 174 204 175 // allow for commit transaction 205 /** 206 * Fires after the user is deleted from the network. 207 * 208 * @since 2.8.0 209 * 210 * @param int $id User ID of the user about to be deleted from the network. 211 */ 176 212 do_action( 'deleted_user', $id ); 177 213 … … 191 227 update_option( 'adminhash', $new_admin_email ); 192 228 193 $ content = apply_filters( 'new_admin_email_content', __( "Dear user,229 $email_text = __( 'Dear user, 194 230 195 231 You recently requested to have the administration email address on … … 205 241 Regards, 206 242 All at ###SITENAME### 207 ###SITEURL### "), $new_admin_email ); 243 ###SITEURL###' ); 244 245 /** 246 * Filter the email text sent when the site admin email is changed. 247 * 248 * The following strings have a special meaning and will get replaced dynamically: 249 * ###ADMIN_URL### The link to click on to confirm the email change. Required otherwise this functunalty is will break. 250 * ###EMAIL### The new email. 251 * ###SITENAME### The name of the site. 252 * ###SITEURL### The URL to the site. 253 * 254 * @since MU 255 * 256 * @param string $email_text Text in the email. 257 * @param string $new_admin_email New admin email that the current administration email was changed to. 258 */ 259 $content = apply_filters( 'new_admin_email_content', $email_text, $new_admin_email ); 208 260 209 261 $content = str_replace( '###ADMIN_URL###', esc_url( admin_url( 'options.php?adminhash='.$hash ) ), $content ); … … 244 296 ); 245 297 update_option( $current_user->ID . '_new_email', $new_user_email ); 246 247 $ content = apply_filters( 'new_user_email_content', __( "Dear user,298 299 $email_text = __( 'Dear user, 248 300 249 301 You recently requested to have the email address on your account changed. … … 258 310 Regards, 259 311 All at ###SITENAME### 260 ###SITEURL###" ), $new_user_email ); 312 ###SITEURL###' ); 313 314 /** 315 * Filter the email text sent when a user changes emails. 316 * 317 * The following strings have a special meaning and will get replaced dynamically: 318 * ###ADMIN_URL### The link to click on to confirm the email change. Required otherwise this functunalty is will break. 319 * ###EMAIL### The new email. 320 * ###SITENAME### The name of the site. 321 * ###SITEURL### The URL to the site. 322 * 323 * @since MU 324 * 325 * @param string $email_text Text in the email. 326 * @param string $new_user_email New user email that the current user has changed to. 327 */ 328 $content = apply_filters( 'new_user_email_content', $email_text, $new_user_email ); 261 329 262 330 $content = str_replace( '###ADMIN_URL###', esc_url( admin_url( 'profile.php?newuseremail='.$hash ) ), $content ); … … 378 446 379 447 if ( $pref == 'spam' ) { 380 if ( $value == 1 ) 448 if ( $value == 1 ) { 449 /** 450 * Fires when the user is marked as a SPAM user. 451 * 452 * @since 3.0.0 453 * 454 * @param int $id User ID of the user marked as SPAM. 455 */ 381 456 do_action( 'make_spam_user', $id ); 382 else 457 } else { 458 /** 459 * Fires when the user is marked as a HAM user. Opposite of SPAM. 460 * 461 * @since 3.0.0 462 * 463 * @param int $id User ID of the user marked as HAM. 464 */ 383 465 do_action( 'make_ham_user', $id ); 466 } 384 467 } 385 468 … … 412 495 'sv' => 'Swedish', 'ty' => 'Tahitian', 'ta' => 'Tamil', 'tt' => 'Tatar', 'te' => 'Telugu', 'tg' => 'Tajik', 'tl' => 'Tagalog', 'th' => 'Thai', 'bo' => 'Tibetan', 'ti' => 'Tigrinya', 'to' => 'Tonga (Tonga Islands)', 'tn' => 'Tswana', 'ts' => 'Tsonga', 'tk' => 'Turkmen', 'tr' => 'Turkish', 'tw' => 'Twi', 'ug' => 'Uighur; Uyghur', 'uk' => 'Ukrainian', 'ur' => 'Urdu', 'uz' => 'Uzbek', 413 496 've' => 'Venda', 'vi' => 'Vietnamese', 'vo' => 'Volapük', 'cy' => 'Welsh','wa' => 'Walloon','wo' => 'Wolof', 'xh' => 'Xhosa', 'yi' => 'Yiddish', 'yo' => 'Yoruba', 'za' => 'Zhuang; Chuang', 'zu' => 'Zulu' ); 497 498 /** 499 * Filter the language codes. 500 * 501 * @since MU 502 * 503 * @param array $lang_codes Key/value pair of language codes where key is the short version. 504 * @param string $code A two-letter designation of the language. 505 */ 414 506 $lang_codes = apply_filters( 'lang_codes', $lang_codes, $code ); 415 507 return strtr( $code, $lang_codes ); … … 499 591 // Order by name 500 592 uksort( $output, 'strnatcasecmp' ); 501 593 /** 594 * Filter the languages available in the dropdown. 595 * 596 * @since MU 597 * 598 * @param array $output HTML output of the dropdown. 599 * @param array $lang_files Available language files. 600 * @param string $current The current language code. 601 */ 502 602 $output = apply_filters( 'mu_dropdown_languages', $output, $lang_files, $current ); 503 603 echo implode( "\n\t", $output ); … … 576 676 <tr> 577 677 <th scope="row" colspan="2" class="th-full"> 578 <a href="<?php echo apply_filters( 'wp_signup_location', network_site_url( 'wp-signup.php' ) ); ?>"><?php _e( 'Create a New Site' ); ?></a> 678 <?php 679 $signup_url = network_site_url( 'wp-signup.php' ); 680 /** 681 * Filter the site signup URL. 682 * 683 * @since MU 684 * 685 * @param string $signup_url The site signup URL. 686 */ 687 ?> 688 <a href="<?php echo apply_filters( 'wp_signup_location', $signup_url ); ?>"><?php _e( 'Create a New Site' ); ?></a> 579 689 </th> 580 690 </tr> … … 596 706 if ( isset($super_admins) ) 597 707 return false; 598 708 709 /** 710 * Fires before the user is granted Super Admin privileges. 711 * 712 * @since 3.0.0 713 * 714 * @param int $user_id User ID of the user is granted Super Admin privileges. 715 */ 599 716 do_action( 'grant_super_admin', $user_id ); 600 717 … … 606 723 $super_admins[] = $user->user_login; 607 724 update_site_option( 'site_admins' , $super_admins ); 725 726 /** 727 * Fires after the user is granted Super Admin privileges. 728 * 729 * @since 3.0.0 730 * 731 * @param int $user_id User ID of the user is granted Super Admin privileges. 732 */ 608 733 do_action( 'granted_super_admin', $user_id ); 609 734 return true; … … 624 749 if ( isset($super_admins) ) 625 750 return false; 626 751 /** 752 * Fires before the user's Super Admin privileges are revoked. 753 * 754 * @since 3.0.0 755 * 756 * @param int $user_id User ID of the user Super Admin privileges are being revoked from. 757 */ 627 758 do_action( 'revoke_super_admin', $user_id ); 628 759 … … 635 766 unset( $super_admins[$key] ); 636 767 update_site_option( 'site_admins', $super_admins ); 768 769 /** 770 * Fires after the user's Super Admin privileges are revoked. 771 * 772 * @since 3.0.0 773 * 774 * @param int $user_id User ID of the user Super Admin privileges were revoked from. 775 */ 637 776 do_action( 'revoked_super_admin', $user_id ); 638 777 return true; … … 648 787 * 649 788 * @since 3.1.0 650 * @param integer $site_id The network/site idto check.789 * @param integer $site_id The network/site ID to check. 651 790 */ 652 791 function can_edit_network( $site_id ) { … … 657 796 else 658 797 $result = false; 659 798 /** 799 * Filter whether this network can be edited from this page. 800 * 801 * @since 3.1.0 802 * 803 * @param bool $result Whether the network can be edited from this page. 804 * @param int $site_id The network/site ID to check. 805 */ 660 806 return apply_filters( 'can_edit_network', $result, $site_id ); 661 807 }
Note: See TracChangeset
for help on using the changeset viewer.