Changeset 32611 for trunk/src/wp-includes/ms-blogs.php
- Timestamp:
- 05/26/2015 09:50:13 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/ms-blogs.php
r31348 r32611 13 13 * 14 14 * @since MU 15 * 16 * @global wpdb $wpdb 15 17 */ 16 18 function wpmu_update_blogs_date() { … … 67 69 * @since MU 68 70 * 71 * @global wpdb $wpdb 72 * 69 73 * @param string $slug 70 74 * @return int A blog id … … 98 102 * @since MU 99 103 * 100 * @param int|string|array $fields A blog ID, a blog slug, or an array of fields to query against. Optional. If not specified the current blog ID is used. 101 * @param bool $get_all Whether to retrieve all details or only the details in the blogs table. Default is true. 104 * @global wpdb $wpdb 105 * 106 * @param int|string|array $fields Optional. A blog ID, a blog slug, or an array of fields to query against. 107 * If not specified the current blog ID is used. 108 * @param bool $get_all Whether to retrieve all details or only the details in the blogs table. 109 * Default is true. 102 110 * @return object|false Blog details on success. False on failure. 103 111 */ … … 273 281 * @since MU 274 282 * 275 * @param int $blog_id Blog ID 283 * @global wpdb $wpdb 284 * 285 * @param int $blog_id Blog ID 276 286 * @param array $details Array of details keyed by blogs table field names. 277 287 * @return bool True if update succeeds, false otherwise. … … 445 455 * @since MU 446 456 * 447 * @param int $idA blog ID. Can be null to refer to the current blog.448 * @param string $option Name of option to retrieve. Expected to not be SQL-escaped.449 * @param mixed $default Optional. Default value to return if the option does not exist.457 * @param int $id A blog ID. Can be null to refer to the current blog. 458 * @param string $option Name of option to retrieve. Expected to not be SQL-escaped. 459 * @param mixed $default Optional. Default value to return if the option does not exist. 450 460 * @return mixed Value set for the option. 451 461 */ … … 490 500 * @since MU 491 501 * 492 * @param int $idA blog ID. Can be null to refer to the current blog.502 * @param int $id A blog ID. Can be null to refer to the current blog. 493 503 * @param string $option Name of option to add. Expected to not be SQL-escaped. 494 * @param mixed $valueOptional. Option value, can be anything. Expected to not be SQL-escaped.504 * @param mixed $value Optional. Option value, can be anything. Expected to not be SQL-escaped. 495 505 * @return bool False if option was not added and true if option was added. 496 506 */ … … 516 526 * @since MU 517 527 * 518 * @param int $idA blog ID. Can be null to refer to the current blog.528 * @param int $id A blog ID. Can be null to refer to the current blog. 519 529 * @param string $option Name of option to remove. Expected to not be SQL-escaped. 520 530 * @return bool True, if option is successfully deleted. False on failure. … … 541 551 * @since MU 542 552 * 543 * @param int $idThe blog id553 * @param int $id The blog id 544 554 * @param string $option The option key 545 * @param mixed $valueThe option value555 * @param mixed $value The option value 546 556 * @return bool True on success, false on failure. 547 557 */ … … 577 587 * @since MU 578 588 * 579 * @param int $new_blog The id of the blog you want to switch to. Default: current blog 589 * @global wpdb $wpdb 590 * @global int $blog_id 591 * @global array $_wp_switched_stack 592 * @global bool $switched 593 * @global string $table_prefix 594 * @global WP_Object_Cache $wp_object_cache 595 * 596 * @param int $new_blog The id of the blog you want to switch to. Default: current blog 580 597 * @param bool $deprecated Deprecated argument 581 * @return boolAlways returns True.598 * @return true Always returns True. 582 599 */ 583 600 function switch_to_blog( $new_blog, $deprecated = null ) { 584 global $wpdb , $wp_roles;601 global $wpdb; 585 602 586 603 if ( empty( $new_blog ) ) … … 636 653 637 654 if ( did_action( 'init' ) ) { 638 $wp_roles->reinit();655 wp_roles()->reinit(); 639 656 $current_user = wp_get_current_user(); 640 657 $current_user->for_blog( $new_blog ); … … 654 671 * @since MU 655 672 * 673 * @global wpdb $wpdb 674 * @global array $_wp_switched_stack 675 * @global int $blog_id 676 * @global bool $switched 677 * @global string $table_prefix 678 * @global WP_Object_Cache $wp_object_cache 679 * 656 680 * @return bool True on success, false if we're already on the current blog 657 681 */ 658 682 function restore_current_blog() { 659 global $wpdb , $wp_roles;683 global $wpdb; 660 684 661 685 if ( empty( $GLOBALS['_wp_switched_stack'] ) ) … … 700 724 701 725 if ( did_action( 'init' ) ) { 702 $wp_roles->reinit();726 wp_roles()->reinit(); 703 727 $current_user = wp_get_current_user(); 704 728 $current_user->for_blog( $blog ); … … 719 743 * @since 3.5.0 720 744 * 745 * @global array $_wp_switched_stack 746 * 721 747 * @return bool True if switched, false otherwise. 722 748 */ … … 742 768 * @since MU 743 769 * 744 * @param int $idThe blog id770 * @param int $id The blog id 745 771 * @param string $archived The new status 746 772 * @return string $archived … … 756 782 * @since MU 757 783 * 758 * @param int $blog_id BLog ID 759 * @param string $pref A field name 760 * @param string $value Value for $pref 761 * @return string $value 784 * @global wpdb $wpdb 785 * 786 * @param int $blog_id BLog ID 787 * @param string $pref A field name 788 * @param string $value Value for $pref 789 * @param null $deprecated 790 * @return string|false $value 762 791 */ 763 792 function update_blog_status( $blog_id, $pref, $value, $deprecated = null ) { … … 829 858 * @since MU 830 859 * 831 * @param int $id The blog id 860 * @global wpdb $wpdb 861 * 862 * @param int $id The blog id 832 863 * @param string $pref A field name 833 * @return bool $value864 * @return bool|string|null $value 834 865 */ 835 866 function get_blog_status( $id, $pref ) { … … 848 879 * @since MU 849 880 * 881 * @global wpdb $wpdb 882 * 850 883 * @param mixed $deprecated Not used 851 * @param int $startThe offset852 * @param int $quantityThe maximum number of blogs to retrieve. Default is 40.884 * @param int $start The offset 885 * @param int $quantity The maximum number of blogs to retrieve. Default is 40. 853 886 * @return array The list of blogs 854 887 */ … … 869 902 * @param string $new_status The new post status 870 903 * @param string $old_status The old post status 871 * @param object $post Post object904 * @param object $post Post object 872 905 */ 873 906 function _update_blog_date_on_post_publish( $new_status, $old_status, $post ) {
Note: See TracChangeset
for help on using the changeset viewer.