1<?php
2/**
3 * Multisite: Deprecated admin functions from past versions and WordPress MU
4 *
5 * These functions should not be used and will be removed in a later version.
6 * It is suggested to use for the alternatives instead when available.
7 *
8 * @package WordPress
9 * @subpackage Deprecated
10 * @since 3.0.0
11 */
12
13/**
14 * Outputs the WPMU menu.
15 *
16 * @deprecated 3.0.0
17 */
18function wpmu_menu() {
19 _deprecated_function( __FUNCTION__, '3.0.0' );
20 // Deprecated. See #11763.
21}
22
23/**
24 * Determines if the available space defined by the admin has been exceeded by the user.
25 *
26 * @deprecated 3.0.0 Use is_upload_space_available()
27 * @see is_upload_space_available()
28 */
29function wpmu_checkAvailableSpace() {
30 _deprecated_function( __FUNCTION__, '3.0.0', 'is_upload_space_available()' );
31
32 if ( ! is_upload_space_available() ) {
33 wp_die( sprintf(
34 /* translators: %s: Allowed space allocation. */
35 __( 'Sorry, you have used your space allocation of %s. Please delete some files to upload more files.' ),
36 size_format( get_space_allowed() * MB_IN_BYTES )
37 ) );
38 }
39}
40
41/**
42 * WPMU options.
43 *
44 * @deprecated 3.0.0
45 */
46function mu_options( $options ) {
47 _deprecated_function( __FUNCTION__, '3.0.0' );
48 return $options;
49}
50
51/**
52 * Deprecated functionality for activating a network-only plugin.
53 *
54 * @deprecated 3.0.0 Use activate_plugin()
55 * @see activate_plugin()
56 */
57function activate_sitewide_plugin() {
58 _deprecated_function( __FUNCTION__, '3.0.0', 'activate_plugin()' );
59 return false;
60}
61
62/**
63 * Deprecated functionality for deactivating a network-only plugin.
64 *
65 * @deprecated 3.0.0 Use deactivate_plugin()
66 * @see deactivate_plugin()
67 */
68function deactivate_sitewide_plugin( $plugin = false ) {
69 _deprecated_function( __FUNCTION__, '3.0.0', 'deactivate_plugin()' );
70}
71
72/**
73 * Deprecated functionality for determining if the current plugin is network-only.
74 *
75 * @deprecated 3.0.0 Use is_network_only_plugin()
76 * @see is_network_only_plugin()
77 */
78function is_wpmu_sitewide_plugin( $file ) {
79 _deprecated_function( __FUNCTION__, '3.0.0', 'is_network_only_plugin()' );
80 return is_network_only_plugin( $file );
81}
82
83/**
84 * Deprecated functionality for getting themes network-enabled themes.
85 *
86 * @deprecated 3.4.0 Use WP_Theme::get_allowed_on_network()
87 * @see WP_Theme::get_allowed_on_network()
88 */
89function get_site_allowed_themes() {
90 _deprecated_function( __FUNCTION__, '3.4.0', 'WP_Theme::get_allowed_on_network()' );
91 return array_map( 'intval', WP_Theme::get_allowed_on_network() );
92}
93
94/**
95 * Deprecated functionality for getting themes allowed on a specific site.
96 *
97 * @deprecated 3.4.0 Use WP_Theme::get_allowed_on_site()
98 * @see WP_Theme::get_allowed_on_site()
99 */
100function wpmu_get_blog_allowedthemes( $blog_id = 0 ) {
101 _deprecated_function( __FUNCTION__, '3.4.0', 'WP_Theme::get_allowed_on_site()' );
102 return array_map( 'intval', WP_Theme::get_allowed_on_site( $blog_id ) );
103}
104
105/**
106 * Deprecated functionality for determining whether a file is deprecated.
107 *
108 * @deprecated 3.5.0
109 */
110function ms_deprecated_blogs_file() {}
111
112if ( ! function_exists( 'install_global_terms' ) ) :
113 /**
114 * Install global terms.
115 *
116 * @since 3.0.0
117 * @since 6.1.0 This function no longer does anything.
118 * @deprecated 6.1.0
119 */
120 function install_global_terms() {
121 _deprecated_function( __FUNCTION__, '6.1.0' );
122 }
123endif;
124
125/**
126 * Synchronizes category and post tag slugs when global terms are enabled.
127 *
128 * @since 3.0.0
129 * @since 6.1.0 This function no longer does anything.
130 * @deprecated 6.1.0
131 *
132 * @param WP_Term|array $term The term.
133 * @param string $taxonomy The taxonomy for `$term`.
134 * @return WP_Term|array Always returns `$term`.
135 */
136function sync_category_tag_slugs( $term, $taxonomy ) {
137 _deprecated_function( __FUNCTION__, '6.1.0' );
138
139 return $term;
140}
141