@@ -7,15 +7,15 @@ discard block |
||
7 | 7 | * @since 3.1.0 |
8 | 8 | */ |
9 | 9 | |
10 | -define( 'WP_NETWORK_ADMIN', true ); |
|
10 | +define('WP_NETWORK_ADMIN', true); |
|
11 | 11 | |
12 | 12 | /** Load WordPress Administration Bootstrap */ |
13 | -require_once( dirname( dirname( __FILE__ ) ) . '/admin.php' ); |
|
13 | +require_once(dirname(dirname(__FILE__)).'/admin.php'); |
|
14 | 14 | |
15 | -if ( ! is_multisite() ) |
|
16 | - wp_die( __( 'Multisite support is not enabled.' ) ); |
|
15 | +if ( ! is_multisite()) |
|
16 | + wp_die(__('Multisite support is not enabled.')); |
|
17 | 17 | |
18 | -$redirect_network_admin_request = 0 !== strcasecmp( $current_blog->domain, $current_site->domain ) || 0 !== strcasecmp( $current_blog->path, $current_site->path ); |
|
18 | +$redirect_network_admin_request = 0 !== strcasecmp($current_blog->domain, $current_site->domain) || 0 !== strcasecmp($current_blog->path, $current_site->path); |
|
19 | 19 | |
20 | 20 | /** |
21 | 21 | * Filter whether to redirect the request to the Network Admin. |
@@ -24,9 +24,9 @@ discard block |
||
24 | 24 | * |
25 | 25 | * @param bool $redirect_network_admin_request Whether the request should be redirected. |
26 | 26 | */ |
27 | -$redirect_network_admin_request = apply_filters( 'redirect_network_admin_request', $redirect_network_admin_request ); |
|
28 | -if ( $redirect_network_admin_request ) { |
|
29 | - wp_redirect( network_admin_url() ); |
|
27 | +$redirect_network_admin_request = apply_filters('redirect_network_admin_request', $redirect_network_admin_request); |
|
28 | +if ($redirect_network_admin_request) { |
|
29 | + wp_redirect(network_admin_url()); |
|
30 | 30 | exit; |
31 | 31 | } |
32 | -unset( $redirect_network_admin_request ); |
|
32 | +unset($redirect_network_admin_request); |
@@ -10,7 +10,8 @@ |
||
10 | 10 | /** Load WordPress Administration Bootstrap */ |
11 | 11 | require_once( dirname( __FILE__ ) . '/admin.php' ); |
12 | 12 | |
13 | -if ( ! is_multisite() ) |
|
13 | +if ( ! is_multisite() ) { |
|
14 | 14 | wp_die( __( 'Multisite support is not enabled.' ) ); |
15 | +} |
|
15 | 16 | |
16 | 17 | require( ABSPATH . 'wp-admin/about.php' ); |
@@ -7,13 +7,13 @@ |
||
7 | 7 | * @since 3.1.0 |
8 | 8 | */ |
9 | 9 | |
10 | -if ( isset( $_GET['tab'] ) && ( 'plugin-information' == $_GET['tab'] ) ) |
|
11 | - define( 'IFRAME_REQUEST', true ); |
|
10 | +if (isset($_GET['tab']) && ('plugin-information' == $_GET['tab'])) |
|
11 | + define('IFRAME_REQUEST', true); |
|
12 | 12 | |
13 | 13 | /** Load WordPress Administration Bootstrap */ |
14 | -require_once( dirname( __FILE__ ) . '/admin.php' ); |
|
14 | +require_once(dirname(__FILE__).'/admin.php'); |
|
15 | 15 | |
16 | -if ( ! is_multisite() ) |
|
17 | - wp_die( __( 'Multisite support is not enabled.' ) ); |
|
16 | +if ( ! is_multisite()) |
|
17 | + wp_die(__('Multisite support is not enabled.')); |
|
18 | 18 | |
19 | -require( ABSPATH . 'wp-admin/plugin-install.php' ); |
|
19 | +require(ABSPATH.'wp-admin/plugin-install.php'); |
@@ -7,13 +7,15 @@ |
||
7 | 7 | * @since 3.1.0 |
8 | 8 | */ |
9 | 9 | |
10 | -if ( isset( $_GET['tab'] ) && ( 'plugin-information' == $_GET['tab'] ) ) |
|
10 | +if ( isset( $_GET['tab'] ) && ( 'plugin-information' == $_GET['tab'] ) ) { |
|
11 | 11 | define( 'IFRAME_REQUEST', true ); |
12 | +} |
|
12 | 13 | |
13 | 14 | /** Load WordPress Administration Bootstrap */ |
14 | 15 | require_once( dirname( __FILE__ ) . '/admin.php' ); |
15 | 16 | |
16 | -if ( ! is_multisite() ) |
|
17 | +if ( ! is_multisite() ) { |
|
17 | 18 | wp_die( __( 'Multisite support is not enabled.' ) ); |
19 | +} |
|
18 | 20 | |
19 | 21 | require( ABSPATH . 'wp-admin/plugin-install.php' ); |
@@ -8,9 +8,9 @@ |
||
8 | 8 | */ |
9 | 9 | |
10 | 10 | /** Load WordPress Administration Bootstrap */ |
11 | -require_once( dirname( __FILE__ ) . '/admin.php' ); |
|
11 | +require_once(dirname(__FILE__).'/admin.php'); |
|
12 | 12 | |
13 | -if ( ! is_multisite() ) |
|
14 | - wp_die( __( 'Multisite support is not enabled.' ) ); |
|
13 | +if ( ! is_multisite()) |
|
14 | + wp_die(__('Multisite support is not enabled.')); |
|
15 | 15 | |
16 | -require( ABSPATH . 'wp-admin/profile.php' ); |
|
16 | +require(ABSPATH.'wp-admin/profile.php'); |
@@ -10,7 +10,8 @@ |
||
10 | 10 | /** Load WordPress Administration Bootstrap */ |
11 | 11 | require_once( dirname( __FILE__ ) . '/admin.php' ); |
12 | 12 | |
13 | -if ( ! is_multisite() ) |
|
13 | +if ( ! is_multisite() ) { |
|
14 | 14 | wp_die( __( 'Multisite support is not enabled.' ) ); |
15 | +} |
|
15 | 16 | |
16 | 17 | require( ABSPATH . 'wp-admin/about.php' ); |
@@ -8,9 +8,9 @@ |
||
8 | 8 | */ |
9 | 9 | |
10 | 10 | /** Load WordPress Administration Bootstrap */ |
11 | -require_once( dirname( __FILE__ ) . '/admin.php' ); |
|
11 | +require_once(dirname(__FILE__).'/admin.php'); |
|
12 | 12 | |
13 | -if ( ! is_multisite() ) |
|
14 | - wp_die( __( 'Multisite support is not enabled.' ) ); |
|
13 | +if ( ! is_multisite()) |
|
14 | + wp_die(__('Multisite support is not enabled.')); |
|
15 | 15 | |
16 | -require( ABSPATH . 'wp-admin/update-core.php' ); |
|
16 | +require(ABSPATH.'wp-admin/update-core.php'); |
@@ -10,7 +10,8 @@ |
||
10 | 10 | /** Load WordPress Administration Bootstrap */ |
11 | 11 | require_once( dirname( __FILE__ ) . '/admin.php' ); |
12 | 12 | |
13 | -if ( ! is_multisite() ) |
|
13 | +if ( ! is_multisite() ) { |
|
14 | 14 | wp_die( __( 'Multisite support is not enabled.' ) ); |
15 | +} |
|
15 | 16 | |
16 | 17 | require( ABSPATH . 'wp-admin/about.php' ); |
@@ -8,9 +8,9 @@ |
||
8 | 8 | */ |
9 | 9 | |
10 | 10 | /** Load WordPress Administration Bootstrap */ |
11 | -require_once( dirname( __FILE__ ) . '/admin.php' ); |
|
11 | +require_once(dirname(__FILE__).'/admin.php'); |
|
12 | 12 | |
13 | -if ( ! is_multisite() ) |
|
14 | - wp_die( __( 'Multisite support is not enabled.' ) ); |
|
13 | +if ( ! is_multisite()) |
|
14 | + wp_die(__('Multisite support is not enabled.')); |
|
15 | 15 | |
16 | -require( ABSPATH . 'wp-admin/plugins.php' ); |
|
16 | +require(ABSPATH.'wp-admin/plugins.php'); |
@@ -1,11 +1,11 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Network Plugins administration panel. |
|
4 | - * |
|
5 | - * @package WordPress |
|
6 | - * @subpackage Multisite |
|
7 | - * @since 3.1.0 |
|
8 | - */ |
|
3 | + * Network Plugins administration panel. |
|
4 | + * |
|
5 | + * @package WordPress |
|
6 | + * @subpackage Multisite |
|
7 | + * @since 3.1.0 |
|
8 | + */ |
|
9 | 9 | |
10 | 10 | /** Load WordPress Administration Bootstrap */ |
11 | 11 | require_once( dirname( __FILE__ ) . '/admin.php' ); |
@@ -10,7 +10,8 @@ |
||
10 | 10 | /** Load WordPress Administration Bootstrap */ |
11 | 11 | require_once( dirname( __FILE__ ) . '/admin.php' ); |
12 | 12 | |
13 | -if ( ! is_multisite() ) |
|
13 | +if ( ! is_multisite() ) { |
|
14 | 14 | wp_die( __( 'Multisite support is not enabled.' ) ); |
15 | +} |
|
15 | 16 | |
16 | 17 | require( ABSPATH . 'wp-admin/about.php' ); |
@@ -8,9 +8,9 @@ |
||
8 | 8 | */ |
9 | 9 | |
10 | 10 | /** Load WordPress Administration Bootstrap */ |
11 | -require_once( dirname( __FILE__ ) . '/admin.php' ); |
|
11 | +require_once(dirname(__FILE__).'/admin.php'); |
|
12 | 12 | |
13 | -if ( ! is_multisite() ) |
|
14 | - wp_die( __( 'Multisite support is not enabled.' ) ); |
|
13 | +if ( ! is_multisite()) |
|
14 | + wp_die(__('Multisite support is not enabled.')); |
|
15 | 15 | |
16 | -require( ABSPATH . 'wp-admin/freedoms.php' ); |
|
16 | +require(ABSPATH.'wp-admin/freedoms.php'); |
@@ -10,7 +10,8 @@ |
||
10 | 10 | /** Load WordPress Administration Bootstrap */ |
11 | 11 | require_once( dirname( __FILE__ ) . '/admin.php' ); |
12 | 12 | |
13 | -if ( ! is_multisite() ) |
|
13 | +if ( ! is_multisite() ) { |
|
14 | 14 | wp_die( __( 'Multisite support is not enabled.' ) ); |
15 | +} |
|
15 | 16 | |
16 | 17 | require( ABSPATH . 'wp-admin/about.php' ); |
@@ -8,9 +8,9 @@ |
||
8 | 8 | */ |
9 | 9 | |
10 | 10 | /** Load WordPress Administration Bootstrap */ |
11 | -require_once( dirname( __FILE__ ) . '/admin.php' ); |
|
11 | +require_once(dirname(__FILE__).'/admin.php'); |
|
12 | 12 | |
13 | -if ( ! is_multisite() ) |
|
14 | - wp_die( __( 'Multisite support is not enabled.' ) ); |
|
13 | +if ( ! is_multisite()) |
|
14 | + wp_die(__('Multisite support is not enabled.')); |
|
15 | 15 | |
16 | -require( ABSPATH . 'wp-admin/about.php' ); |
|
16 | +require(ABSPATH.'wp-admin/about.php'); |
@@ -10,7 +10,8 @@ |
||
10 | 10 | /** Load WordPress Administration Bootstrap */ |
11 | 11 | require_once( dirname( __FILE__ ) . '/admin.php' ); |
12 | 12 | |
13 | -if ( ! is_multisite() ) |
|
13 | +if ( ! is_multisite() ) { |
|
14 | 14 | wp_die( __( 'Multisite support is not enabled.' ) ); |
15 | +} |
|
15 | 16 | |
16 | 17 | require( ABSPATH . 'wp-admin/about.php' ); |
@@ -1,11 +1,11 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Network About administration panel. |
|
4 | - * |
|
5 | - * @package WordPress |
|
6 | - * @subpackage Multisite |
|
7 | - * @since 3.4.0 |
|
8 | - */ |
|
3 | + * Network About administration panel. |
|
4 | + * |
|
5 | + * @package WordPress |
|
6 | + * @subpackage Multisite |
|
7 | + * @since 3.4.0 |
|
8 | + */ |
|
9 | 9 | |
10 | 10 | /** Load WordPress Administration Bootstrap */ |
11 | 11 | require_once( dirname( __FILE__ ) . '/admin.php' ); |
@@ -402,7 +402,7 @@ discard block |
||
402 | 402 | if ( current_user_can($tax->cap->edit_terms) ) { |
403 | 403 | if ( 'category' == $taxonomy ) { |
404 | 404 | /** |
405 | - * Fires before the Add Category form. |
|
405 | + * Fires before the Add Category form. |
|
406 | 406 | * |
407 | 407 | * @since 2.1.0 |
408 | 408 | * @deprecated 3.0.0 Use {$taxonomy}_pre_add_form instead. |
@@ -449,12 +449,12 @@ discard block |
||
449 | 449 | <form id="addtag" method="post" action="edit-tags.php" class="validate" |
450 | 450 | <?php |
451 | 451 | /** |
452 | - * Fires at the beginning of the Add Tag form. |
|
453 | - * |
|
454 | - * The dynamic portion of the hook name, `$taxonomy`, refers to the taxonomy slug. |
|
455 | - * |
|
456 | - * @since 3.7.0 |
|
457 | - */ |
|
452 | + * Fires at the beginning of the Add Tag form. |
|
453 | + * |
|
454 | + * The dynamic portion of the hook name, `$taxonomy`, refers to the taxonomy slug. |
|
455 | + * |
|
456 | + * @since 3.7.0 |
|
457 | + */ |
|
458 | 458 | do_action( "{$taxonomy}_term_new_form_tag" ); |
459 | 459 | ?>> |
460 | 460 | <input type="hidden" name="action" value="add-tag" /> |
@@ -64,137 +64,137 @@ |
||
64 | 64 | |
65 | 65 | switch ( $wp_list_table->current_action() ) { |
66 | 66 | |
67 | -case 'add-tag': |
|
67 | + case 'add-tag': |
|
68 | 68 | |
69 | - check_admin_referer( 'add-tag', '_wpnonce_add-tag' ); |
|
69 | + check_admin_referer( 'add-tag', '_wpnonce_add-tag' ); |
|
70 | 70 | |
71 | - if ( ! current_user_can( $tax->cap->edit_terms ) ) { |
|
72 | - wp_die( |
|
73 | - '<h1>' . __( 'Cheatin’ uh?' ) . '</h1>' . |
|
74 | - '<p>' . __( 'You are not allowed to add this item.' ) . '</p>', |
|
75 | - 403 |
|
76 | - ); |
|
77 | - } |
|
71 | + if ( ! current_user_can( $tax->cap->edit_terms ) ) { |
|
72 | + wp_die( |
|
73 | + '<h1>' . __( 'Cheatin’ uh?' ) . '</h1>' . |
|
74 | + '<p>' . __( 'You are not allowed to add this item.' ) . '</p>', |
|
75 | + 403 |
|
76 | + ); |
|
77 | + } |
|
78 | 78 | |
79 | - $ret = wp_insert_term( $_POST['tag-name'], $taxonomy, $_POST ); |
|
80 | - $location = 'edit-tags.php?taxonomy=' . $taxonomy; |
|
81 | - if ( 'post' != $post_type ) |
|
82 | - $location .= '&post_type=' . $post_type; |
|
79 | + $ret = wp_insert_term( $_POST['tag-name'], $taxonomy, $_POST ); |
|
80 | + $location = 'edit-tags.php?taxonomy=' . $taxonomy; |
|
81 | + if ( 'post' != $post_type ) |
|
82 | + $location .= '&post_type=' . $post_type; |
|
83 | 83 | |
84 | - if ( $referer && false !== strpos( $referer, 'edit-tags.php' ) ) { |
|
85 | - $location = $referer; |
|
86 | - } |
|
84 | + if ( $referer && false !== strpos( $referer, 'edit-tags.php' ) ) { |
|
85 | + $location = $referer; |
|
86 | + } |
|
87 | 87 | |
88 | - if ( $ret && !is_wp_error( $ret ) ) |
|
89 | - $location = add_query_arg( 'message', 1, $location ); |
|
90 | - else |
|
91 | - $location = add_query_arg( array( 'error' => true, 'message' => 4 ), $location ); |
|
88 | + if ( $ret && !is_wp_error( $ret ) ) |
|
89 | + $location = add_query_arg( 'message', 1, $location ); |
|
90 | + else |
|
91 | + $location = add_query_arg( array( 'error' => true, 'message' => 4 ), $location ); |
|
92 | 92 | |
93 | - break; |
|
93 | + break; |
|
94 | 94 | |
95 | -case 'delete': |
|
96 | - $location = 'edit-tags.php?taxonomy=' . $taxonomy; |
|
97 | - if ( 'post' != $post_type ) |
|
98 | - $location .= '&post_type=' . $post_type; |
|
95 | + case 'delete': |
|
96 | + $location = 'edit-tags.php?taxonomy=' . $taxonomy; |
|
97 | + if ( 'post' != $post_type ) |
|
98 | + $location .= '&post_type=' . $post_type; |
|
99 | 99 | |
100 | - if ( $referer && false !== strpos( $referer, 'edit-tags.php' ) ) { |
|
101 | - $location = $referer; |
|
102 | - } |
|
100 | + if ( $referer && false !== strpos( $referer, 'edit-tags.php' ) ) { |
|
101 | + $location = $referer; |
|
102 | + } |
|
103 | 103 | |
104 | - if ( ! isset( $_REQUEST['tag_ID'] ) ) { |
|
105 | - break; |
|
106 | - } |
|
104 | + if ( ! isset( $_REQUEST['tag_ID'] ) ) { |
|
105 | + break; |
|
106 | + } |
|
107 | 107 | |
108 | - $tag_ID = (int) $_REQUEST['tag_ID']; |
|
109 | - check_admin_referer( 'delete-tag_' . $tag_ID ); |
|
108 | + $tag_ID = (int) $_REQUEST['tag_ID']; |
|
109 | + check_admin_referer( 'delete-tag_' . $tag_ID ); |
|
110 | 110 | |
111 | - if ( ! current_user_can( $tax->cap->delete_terms ) ) { |
|
112 | - wp_die( |
|
113 | - '<h1>' . __( 'Cheatin’ uh?' ) . '</h1>' . |
|
114 | - '<p>' . __( 'You are not allowed to delete this item.' ) . '</p>', |
|
115 | - 403 |
|
116 | - ); |
|
117 | - } |
|
111 | + if ( ! current_user_can( $tax->cap->delete_terms ) ) { |
|
112 | + wp_die( |
|
113 | + '<h1>' . __( 'Cheatin’ uh?' ) . '</h1>' . |
|
114 | + '<p>' . __( 'You are not allowed to delete this item.' ) . '</p>', |
|
115 | + 403 |
|
116 | + ); |
|
117 | + } |
|
118 | 118 | |
119 | - wp_delete_term( $tag_ID, $taxonomy ); |
|
119 | + wp_delete_term( $tag_ID, $taxonomy ); |
|
120 | 120 | |
121 | - $location = add_query_arg( 'message', 2, $location ); |
|
121 | + $location = add_query_arg( 'message', 2, $location ); |
|
122 | 122 | |
123 | - break; |
|
123 | + break; |
|
124 | 124 | |
125 | -case 'bulk-delete': |
|
126 | - check_admin_referer( 'bulk-tags' ); |
|
125 | + case 'bulk-delete': |
|
126 | + check_admin_referer( 'bulk-tags' ); |
|
127 | 127 | |
128 | - if ( ! current_user_can( $tax->cap->delete_terms ) ) { |
|
129 | - wp_die( |
|
130 | - '<h1>' . __( 'Cheatin’ uh?' ) . '</h1>' . |
|
131 | - '<p>' . __( 'You are not allowed to delete these items.' ) . '</p>', |
|
132 | - 403 |
|
133 | - ); |
|
134 | - } |
|
128 | + if ( ! current_user_can( $tax->cap->delete_terms ) ) { |
|
129 | + wp_die( |
|
130 | + '<h1>' . __( 'Cheatin’ uh?' ) . '</h1>' . |
|
131 | + '<p>' . __( 'You are not allowed to delete these items.' ) . '</p>', |
|
132 | + 403 |
|
133 | + ); |
|
134 | + } |
|
135 | 135 | |
136 | - $tags = (array) $_REQUEST['delete_tags']; |
|
137 | - foreach ( $tags as $tag_ID ) { |
|
138 | - wp_delete_term( $tag_ID, $taxonomy ); |
|
139 | - } |
|
140 | - |
|
141 | - $location = 'edit-tags.php?taxonomy=' . $taxonomy; |
|
142 | - if ( 'post' != $post_type ) |
|
143 | - $location .= '&post_type=' . $post_type; |
|
144 | - if ( $referer && false !== strpos( $referer, 'edit-tags.php' ) ) { |
|
145 | - $location = $referer; |
|
146 | - } |
|
136 | + $tags = (array) $_REQUEST['delete_tags']; |
|
137 | + foreach ( $tags as $tag_ID ) { |
|
138 | + wp_delete_term( $tag_ID, $taxonomy ); |
|
139 | + } |
|
147 | 140 | |
148 | - $location = add_query_arg( 'message', 6, $location ); |
|
141 | + $location = 'edit-tags.php?taxonomy=' . $taxonomy; |
|
142 | + if ( 'post' != $post_type ) |
|
143 | + $location .= '&post_type=' . $post_type; |
|
144 | + if ( $referer && false !== strpos( $referer, 'edit-tags.php' ) ) { |
|
145 | + $location = $referer; |
|
146 | + } |
|
149 | 147 | |
150 | - break; |
|
148 | + $location = add_query_arg( 'message', 6, $location ); |
|
151 | 149 | |
152 | -case 'edit': |
|
153 | - if ( ! isset( $_REQUEST['tag_ID'] ) ) { |
|
154 | 150 | break; |
155 | - } |
|
156 | 151 | |
157 | - $term_id = (int) $_REQUEST['tag_ID']; |
|
158 | - $term = get_term( $term_id ); |
|
152 | + case 'edit': |
|
153 | + if ( ! isset( $_REQUEST['tag_ID'] ) ) { |
|
154 | + break; |
|
155 | + } |
|
159 | 156 | |
160 | - if ( ! $term instanceof WP_Term ) { |
|
161 | - wp_die( __( 'You attempted to edit an item that doesn’t exist. Perhaps it was deleted?' ) ); |
|
162 | - } |
|
157 | + $term_id = (int) $_REQUEST['tag_ID']; |
|
158 | + $term = get_term( $term_id ); |
|
163 | 159 | |
164 | - wp_redirect( esc_url_raw( get_edit_term_link( $term_id, $taxonomy, $post_type ) ) ); |
|
165 | - exit; |
|
160 | + if ( ! $term instanceof WP_Term ) { |
|
161 | + wp_die( __( 'You attempted to edit an item that doesn’t exist. Perhaps it was deleted?' ) ); |
|
162 | + } |
|
166 | 163 | |
167 | -case 'editedtag': |
|
168 | - $tag_ID = (int) $_POST['tag_ID']; |
|
169 | - check_admin_referer( 'update-tag_' . $tag_ID ); |
|
164 | + wp_redirect( esc_url_raw( get_edit_term_link( $term_id, $taxonomy, $post_type ) ) ); |
|
165 | + exit; |
|
170 | 166 | |
171 | - if ( ! current_user_can( $tax->cap->edit_terms ) ) { |
|
172 | - wp_die( |
|
173 | - '<h1>' . __( 'Cheatin’ uh?' ) . '</h1>' . |
|
174 | - '<p>' . __( 'You are not allowed to edit this item.' ) . '</p>', |
|
175 | - 403 |
|
176 | - ); |
|
177 | - } |
|
167 | + case 'editedtag': |
|
168 | + $tag_ID = (int) $_POST['tag_ID']; |
|
169 | + check_admin_referer( 'update-tag_' . $tag_ID ); |
|
178 | 170 | |
179 | - $tag = get_term( $tag_ID, $taxonomy ); |
|
180 | - if ( ! $tag ) |
|
181 | - wp_die( __( 'You attempted to edit an item that doesn’t exist. Perhaps it was deleted?' ) ); |
|
171 | + if ( ! current_user_can( $tax->cap->edit_terms ) ) { |
|
172 | + wp_die( |
|
173 | + '<h1>' . __( 'Cheatin’ uh?' ) . '</h1>' . |
|
174 | + '<p>' . __( 'You are not allowed to edit this item.' ) . '</p>', |
|
175 | + 403 |
|
176 | + ); |
|
177 | + } |
|
182 | 178 | |
183 | - $ret = wp_update_term( $tag_ID, $taxonomy, $_POST ); |
|
179 | + $tag = get_term( $tag_ID, $taxonomy ); |
|
180 | + if ( ! $tag ) |
|
181 | + wp_die( __( 'You attempted to edit an item that doesn’t exist. Perhaps it was deleted?' ) ); |
|
184 | 182 | |
185 | - $location = 'edit-tags.php?taxonomy=' . $taxonomy; |
|
186 | - if ( 'post' != $post_type ) |
|
187 | - $location .= '&post_type=' . $post_type; |
|
183 | + $ret = wp_update_term( $tag_ID, $taxonomy, $_POST ); |
|
188 | 184 | |
189 | - if ( $referer && false !== strpos( $referer, 'edit-tags.php' ) ) { |
|
190 | - $location = $referer; |
|
191 | - } |
|
185 | + $location = 'edit-tags.php?taxonomy=' . $taxonomy; |
|
186 | + if ( 'post' != $post_type ) |
|
187 | + $location .= '&post_type=' . $post_type; |
|
192 | 188 | |
193 | - if ( $ret && !is_wp_error( $ret ) ) |
|
194 | - $location = add_query_arg( 'message', 3, $location ); |
|
195 | - else |
|
196 | - $location = add_query_arg( array( 'error' => true, 'message' => 5 ), $location ); |
|
197 | - break; |
|
189 | + if ( $referer && false !== strpos( $referer, 'edit-tags.php' ) ) { |
|
190 | + $location = $referer; |
|
191 | + } |
|
192 | + |
|
193 | + if ( $ret && !is_wp_error( $ret ) ) |
|
194 | + $location = add_query_arg( 'message', 3, $location ); |
|
195 | + else |
|
196 | + $location = add_query_arg( array( 'error' => true, 'message' => 5 ), $location ); |
|
197 | + break; |
|
198 | 198 | } |
199 | 199 | |
200 | 200 | if ( ! $location && ! empty( $_REQUEST['_wp_http_referer'] ) ) { |
@@ -7,24 +7,24 @@ discard block |
||
7 | 7 | */ |
8 | 8 | |
9 | 9 | /** WordPress Administration Bootstrap */ |
10 | -require_once( dirname( __FILE__ ) . '/admin.php' ); |
|
10 | +require_once(dirname(__FILE__).'/admin.php'); |
|
11 | 11 | |
12 | -if ( ! $taxnow ) |
|
13 | - wp_die( __( 'Invalid taxonomy' ) ); |
|
12 | +if ( ! $taxnow) |
|
13 | + wp_die(__('Invalid taxonomy')); |
|
14 | 14 | |
15 | -$tax = get_taxonomy( $taxnow ); |
|
15 | +$tax = get_taxonomy($taxnow); |
|
16 | 16 | |
17 | -if ( ! $tax ) |
|
18 | - wp_die( __( 'Invalid taxonomy' ) ); |
|
17 | +if ( ! $tax) |
|
18 | + wp_die(__('Invalid taxonomy')); |
|
19 | 19 | |
20 | -if ( ! in_array( $tax->name, get_taxonomies( array( 'show_ui' => true ) ) ) ) { |
|
21 | - wp_die( __( 'You are not allowed to manage these items.' ) ); |
|
20 | +if ( ! in_array($tax->name, get_taxonomies(array('show_ui' => true)))) { |
|
21 | + wp_die(__('You are not allowed to manage these items.')); |
|
22 | 22 | } |
23 | 23 | |
24 | -if ( ! current_user_can( $tax->cap->manage_terms ) ) { |
|
24 | +if ( ! current_user_can($tax->cap->manage_terms)) { |
|
25 | 25 | wp_die( |
26 | - '<h1>' . __( 'Cheatin’ uh?' ) . '</h1>' . |
|
27 | - '<p>' . __( 'You are not allowed to manage these items.' ) . '</p>', |
|
26 | + '<h1>'.__('Cheatin’ uh?').'</h1>'. |
|
27 | + '<p>'.__('You are not allowed to manage these items.').'</p>', |
|
28 | 28 | 403 |
29 | 29 | ); |
30 | 30 | } |
@@ -41,10 +41,10 @@ discard block |
||
41 | 41 | |
42 | 42 | $title = $tax->labels->name; |
43 | 43 | |
44 | -if ( 'post' != $post_type ) { |
|
45 | - $parent_file = ( 'attachment' == $post_type ) ? 'upload.php' : "edit.php?post_type=$post_type"; |
|
44 | +if ('post' != $post_type) { |
|
45 | + $parent_file = ('attachment' == $post_type) ? 'upload.php' : "edit.php?post_type=$post_type"; |
|
46 | 46 | $submenu_file = "edit-tags.php?taxonomy=$taxonomy&post_type=$post_type"; |
47 | -} elseif ( 'link_category' == $tax->name ) { |
|
47 | +} elseif ('link_category' == $tax->name) { |
|
48 | 48 | $parent_file = 'link-manager.php'; |
49 | 49 | $submenu_file = 'edit-tags.php?taxonomy=link_category'; |
50 | 50 | } else { |
@@ -52,272 +52,272 @@ discard block |
||
52 | 52 | $submenu_file = "edit-tags.php?taxonomy=$taxonomy"; |
53 | 53 | } |
54 | 54 | |
55 | -add_screen_option( 'per_page', array( 'default' => 20, 'option' => 'edit_' . $tax->name . '_per_page' ) ); |
|
55 | +add_screen_option('per_page', array('default' => 20, 'option' => 'edit_'.$tax->name.'_per_page')); |
|
56 | 56 | |
57 | -get_current_screen()->set_screen_reader_content( array( |
|
57 | +get_current_screen()->set_screen_reader_content(array( |
|
58 | 58 | 'heading_pagination' => $tax->labels->items_list_navigation, |
59 | 59 | 'heading_list' => $tax->labels->items_list, |
60 | -) ); |
|
60 | +)); |
|
61 | 61 | |
62 | 62 | $location = false; |
63 | 63 | $referer = wp_get_referer(); |
64 | 64 | |
65 | -switch ( $wp_list_table->current_action() ) { |
|
65 | +switch ($wp_list_table->current_action()) { |
|
66 | 66 | |
67 | 67 | case 'add-tag': |
68 | 68 | |
69 | - check_admin_referer( 'add-tag', '_wpnonce_add-tag' ); |
|
69 | + check_admin_referer('add-tag', '_wpnonce_add-tag'); |
|
70 | 70 | |
71 | - if ( ! current_user_can( $tax->cap->edit_terms ) ) { |
|
71 | + if ( ! current_user_can($tax->cap->edit_terms)) { |
|
72 | 72 | wp_die( |
73 | - '<h1>' . __( 'Cheatin’ uh?' ) . '</h1>' . |
|
74 | - '<p>' . __( 'You are not allowed to add this item.' ) . '</p>', |
|
73 | + '<h1>'.__('Cheatin’ uh?').'</h1>'. |
|
74 | + '<p>'.__('You are not allowed to add this item.').'</p>', |
|
75 | 75 | 403 |
76 | 76 | ); |
77 | 77 | } |
78 | 78 | |
79 | - $ret = wp_insert_term( $_POST['tag-name'], $taxonomy, $_POST ); |
|
80 | - $location = 'edit-tags.php?taxonomy=' . $taxonomy; |
|
81 | - if ( 'post' != $post_type ) |
|
82 | - $location .= '&post_type=' . $post_type; |
|
79 | + $ret = wp_insert_term($_POST['tag-name'], $taxonomy, $_POST); |
|
80 | + $location = 'edit-tags.php?taxonomy='.$taxonomy; |
|
81 | + if ('post' != $post_type) |
|
82 | + $location .= '&post_type='.$post_type; |
|
83 | 83 | |
84 | - if ( $referer && false !== strpos( $referer, 'edit-tags.php' ) ) { |
|
84 | + if ($referer && false !== strpos($referer, 'edit-tags.php')) { |
|
85 | 85 | $location = $referer; |
86 | 86 | } |
87 | 87 | |
88 | - if ( $ret && !is_wp_error( $ret ) ) |
|
89 | - $location = add_query_arg( 'message', 1, $location ); |
|
88 | + if ($ret && ! is_wp_error($ret)) |
|
89 | + $location = add_query_arg('message', 1, $location); |
|
90 | 90 | else |
91 | - $location = add_query_arg( array( 'error' => true, 'message' => 4 ), $location ); |
|
91 | + $location = add_query_arg(array('error' => true, 'message' => 4), $location); |
|
92 | 92 | |
93 | 93 | break; |
94 | 94 | |
95 | 95 | case 'delete': |
96 | - $location = 'edit-tags.php?taxonomy=' . $taxonomy; |
|
97 | - if ( 'post' != $post_type ) |
|
98 | - $location .= '&post_type=' . $post_type; |
|
96 | + $location = 'edit-tags.php?taxonomy='.$taxonomy; |
|
97 | + if ('post' != $post_type) |
|
98 | + $location .= '&post_type='.$post_type; |
|
99 | 99 | |
100 | - if ( $referer && false !== strpos( $referer, 'edit-tags.php' ) ) { |
|
100 | + if ($referer && false !== strpos($referer, 'edit-tags.php')) { |
|
101 | 101 | $location = $referer; |
102 | 102 | } |
103 | 103 | |
104 | - if ( ! isset( $_REQUEST['tag_ID'] ) ) { |
|
104 | + if ( ! isset($_REQUEST['tag_ID'])) { |
|
105 | 105 | break; |
106 | 106 | } |
107 | 107 | |
108 | 108 | $tag_ID = (int) $_REQUEST['tag_ID']; |
109 | - check_admin_referer( 'delete-tag_' . $tag_ID ); |
|
109 | + check_admin_referer('delete-tag_'.$tag_ID); |
|
110 | 110 | |
111 | - if ( ! current_user_can( $tax->cap->delete_terms ) ) { |
|
111 | + if ( ! current_user_can($tax->cap->delete_terms)) { |
|
112 | 112 | wp_die( |
113 | - '<h1>' . __( 'Cheatin’ uh?' ) . '</h1>' . |
|
114 | - '<p>' . __( 'You are not allowed to delete this item.' ) . '</p>', |
|
113 | + '<h1>'.__('Cheatin’ uh?').'</h1>'. |
|
114 | + '<p>'.__('You are not allowed to delete this item.').'</p>', |
|
115 | 115 | 403 |
116 | 116 | ); |
117 | 117 | } |
118 | 118 | |
119 | - wp_delete_term( $tag_ID, $taxonomy ); |
|
119 | + wp_delete_term($tag_ID, $taxonomy); |
|
120 | 120 | |
121 | - $location = add_query_arg( 'message', 2, $location ); |
|
121 | + $location = add_query_arg('message', 2, $location); |
|
122 | 122 | |
123 | 123 | break; |
124 | 124 | |
125 | 125 | case 'bulk-delete': |
126 | - check_admin_referer( 'bulk-tags' ); |
|
126 | + check_admin_referer('bulk-tags'); |
|
127 | 127 | |
128 | - if ( ! current_user_can( $tax->cap->delete_terms ) ) { |
|
128 | + if ( ! current_user_can($tax->cap->delete_terms)) { |
|
129 | 129 | wp_die( |
130 | - '<h1>' . __( 'Cheatin’ uh?' ) . '</h1>' . |
|
131 | - '<p>' . __( 'You are not allowed to delete these items.' ) . '</p>', |
|
130 | + '<h1>'.__('Cheatin’ uh?').'</h1>'. |
|
131 | + '<p>'.__('You are not allowed to delete these items.').'</p>', |
|
132 | 132 | 403 |
133 | 133 | ); |
134 | 134 | } |
135 | 135 | |
136 | 136 | $tags = (array) $_REQUEST['delete_tags']; |
137 | - foreach ( $tags as $tag_ID ) { |
|
138 | - wp_delete_term( $tag_ID, $taxonomy ); |
|
137 | + foreach ($tags as $tag_ID) { |
|
138 | + wp_delete_term($tag_ID, $taxonomy); |
|
139 | 139 | } |
140 | 140 | |
141 | - $location = 'edit-tags.php?taxonomy=' . $taxonomy; |
|
142 | - if ( 'post' != $post_type ) |
|
143 | - $location .= '&post_type=' . $post_type; |
|
144 | - if ( $referer && false !== strpos( $referer, 'edit-tags.php' ) ) { |
|
141 | + $location = 'edit-tags.php?taxonomy='.$taxonomy; |
|
142 | + if ('post' != $post_type) |
|
143 | + $location .= '&post_type='.$post_type; |
|
144 | + if ($referer && false !== strpos($referer, 'edit-tags.php')) { |
|
145 | 145 | $location = $referer; |
146 | 146 | } |
147 | 147 | |
148 | - $location = add_query_arg( 'message', 6, $location ); |
|
148 | + $location = add_query_arg('message', 6, $location); |
|
149 | 149 | |
150 | 150 | break; |
151 | 151 | |
152 | 152 | case 'edit': |
153 | - if ( ! isset( $_REQUEST['tag_ID'] ) ) { |
|
153 | + if ( ! isset($_REQUEST['tag_ID'])) { |
|
154 | 154 | break; |
155 | 155 | } |
156 | 156 | |
157 | 157 | $term_id = (int) $_REQUEST['tag_ID']; |
158 | - $term = get_term( $term_id ); |
|
158 | + $term = get_term($term_id); |
|
159 | 159 | |
160 | - if ( ! $term instanceof WP_Term ) { |
|
161 | - wp_die( __( 'You attempted to edit an item that doesn’t exist. Perhaps it was deleted?' ) ); |
|
160 | + if ( ! $term instanceof WP_Term) { |
|
161 | + wp_die(__('You attempted to edit an item that doesn’t exist. Perhaps it was deleted?')); |
|
162 | 162 | } |
163 | 163 | |
164 | - wp_redirect( esc_url_raw( get_edit_term_link( $term_id, $taxonomy, $post_type ) ) ); |
|
164 | + wp_redirect(esc_url_raw(get_edit_term_link($term_id, $taxonomy, $post_type))); |
|
165 | 165 | exit; |
166 | 166 | |
167 | 167 | case 'editedtag': |
168 | 168 | $tag_ID = (int) $_POST['tag_ID']; |
169 | - check_admin_referer( 'update-tag_' . $tag_ID ); |
|
169 | + check_admin_referer('update-tag_'.$tag_ID); |
|
170 | 170 | |
171 | - if ( ! current_user_can( $tax->cap->edit_terms ) ) { |
|
171 | + if ( ! current_user_can($tax->cap->edit_terms)) { |
|
172 | 172 | wp_die( |
173 | - '<h1>' . __( 'Cheatin’ uh?' ) . '</h1>' . |
|
174 | - '<p>' . __( 'You are not allowed to edit this item.' ) . '</p>', |
|
173 | + '<h1>'.__('Cheatin’ uh?').'</h1>'. |
|
174 | + '<p>'.__('You are not allowed to edit this item.').'</p>', |
|
175 | 175 | 403 |
176 | 176 | ); |
177 | 177 | } |
178 | 178 | |
179 | - $tag = get_term( $tag_ID, $taxonomy ); |
|
180 | - if ( ! $tag ) |
|
181 | - wp_die( __( 'You attempted to edit an item that doesn’t exist. Perhaps it was deleted?' ) ); |
|
179 | + $tag = get_term($tag_ID, $taxonomy); |
|
180 | + if ( ! $tag) |
|
181 | + wp_die(__('You attempted to edit an item that doesn’t exist. Perhaps it was deleted?')); |
|
182 | 182 | |
183 | - $ret = wp_update_term( $tag_ID, $taxonomy, $_POST ); |
|
183 | + $ret = wp_update_term($tag_ID, $taxonomy, $_POST); |
|
184 | 184 | |
185 | - $location = 'edit-tags.php?taxonomy=' . $taxonomy; |
|
186 | - if ( 'post' != $post_type ) |
|
187 | - $location .= '&post_type=' . $post_type; |
|
185 | + $location = 'edit-tags.php?taxonomy='.$taxonomy; |
|
186 | + if ('post' != $post_type) |
|
187 | + $location .= '&post_type='.$post_type; |
|
188 | 188 | |
189 | - if ( $referer && false !== strpos( $referer, 'edit-tags.php' ) ) { |
|
189 | + if ($referer && false !== strpos($referer, 'edit-tags.php')) { |
|
190 | 190 | $location = $referer; |
191 | 191 | } |
192 | 192 | |
193 | - if ( $ret && !is_wp_error( $ret ) ) |
|
194 | - $location = add_query_arg( 'message', 3, $location ); |
|
193 | + if ($ret && ! is_wp_error($ret)) |
|
194 | + $location = add_query_arg('message', 3, $location); |
|
195 | 195 | else |
196 | - $location = add_query_arg( array( 'error' => true, 'message' => 5 ), $location ); |
|
196 | + $location = add_query_arg(array('error' => true, 'message' => 5), $location); |
|
197 | 197 | break; |
198 | 198 | } |
199 | 199 | |
200 | -if ( ! $location && ! empty( $_REQUEST['_wp_http_referer'] ) ) { |
|
201 | - $location = remove_query_arg( array('_wp_http_referer', '_wpnonce'), wp_unslash($_SERVER['REQUEST_URI']) ); |
|
200 | +if ( ! $location && ! empty($_REQUEST['_wp_http_referer'])) { |
|
201 | + $location = remove_query_arg(array('_wp_http_referer', '_wpnonce'), wp_unslash($_SERVER['REQUEST_URI'])); |
|
202 | 202 | } |
203 | 203 | |
204 | -if ( $location ) { |
|
205 | - if ( ! empty( $_REQUEST['paged'] ) ) { |
|
206 | - $location = add_query_arg( 'paged', (int) $_REQUEST['paged'], $location ); |
|
204 | +if ($location) { |
|
205 | + if ( ! empty($_REQUEST['paged'])) { |
|
206 | + $location = add_query_arg('paged', (int) $_REQUEST['paged'], $location); |
|
207 | 207 | } |
208 | - wp_redirect( $location ); |
|
208 | + wp_redirect($location); |
|
209 | 209 | exit; |
210 | 210 | } |
211 | 211 | |
212 | 212 | $wp_list_table->prepare_items(); |
213 | -$total_pages = $wp_list_table->get_pagination_arg( 'total_pages' ); |
|
213 | +$total_pages = $wp_list_table->get_pagination_arg('total_pages'); |
|
214 | 214 | |
215 | -if ( $pagenum > $total_pages && $total_pages > 0 ) { |
|
216 | - wp_redirect( add_query_arg( 'paged', $total_pages ) ); |
|
215 | +if ($pagenum > $total_pages && $total_pages > 0) { |
|
216 | + wp_redirect(add_query_arg('paged', $total_pages)); |
|
217 | 217 | exit; |
218 | 218 | } |
219 | 219 | |
220 | 220 | wp_enqueue_script('admin-tags'); |
221 | -if ( current_user_can($tax->cap->edit_terms) ) |
|
221 | +if (current_user_can($tax->cap->edit_terms)) |
|
222 | 222 | wp_enqueue_script('inline-edit-tax'); |
223 | 223 | |
224 | -if ( 'category' == $taxonomy || 'link_category' == $taxonomy || 'post_tag' == $taxonomy ) { |
|
225 | - $help =''; |
|
226 | - if ( 'category' == $taxonomy ) |
|
227 | - $help = '<p>' . sprintf(__( 'You can use categories to define sections of your site and group related posts. The default category is “Uncategorized” until you change it in your <a href="%s">writing settings</a>.' ) , 'options-writing.php' ) . '</p>'; |
|
228 | - elseif ( 'link_category' == $taxonomy ) |
|
229 | - $help = '<p>' . __( 'You can create groups of links by using Link Categories. Link Category names must be unique and Link Categories are separate from the categories you use for posts.' ) . '</p>'; |
|
224 | +if ('category' == $taxonomy || 'link_category' == $taxonomy || 'post_tag' == $taxonomy) { |
|
225 | + $help = ''; |
|
226 | + if ('category' == $taxonomy) |
|
227 | + $help = '<p>'.sprintf(__('You can use categories to define sections of your site and group related posts. The default category is “Uncategorized” until you change it in your <a href="%s">writing settings</a>.'), 'options-writing.php').'</p>'; |
|
228 | + elseif ('link_category' == $taxonomy) |
|
229 | + $help = '<p>'.__('You can create groups of links by using Link Categories. Link Category names must be unique and Link Categories are separate from the categories you use for posts.').'</p>'; |
|
230 | 230 | else |
231 | - $help = '<p>' . __( 'You can assign keywords to your posts using <strong>tags</strong>. Unlike categories, tags have no hierarchy, meaning there’s no relationship from one tag to another.' ) . '</p>'; |
|
231 | + $help = '<p>'.__('You can assign keywords to your posts using <strong>tags</strong>. Unlike categories, tags have no hierarchy, meaning there’s no relationship from one tag to another.').'</p>'; |
|
232 | 232 | |
233 | - if ( 'link_category' == $taxonomy ) |
|
234 | - $help .= '<p>' . __( 'You can delete Link Categories in the Bulk Action pull-down, but that action does not delete the links within the category. Instead, it moves them to the default Link Category.' ) . '</p>'; |
|
233 | + if ('link_category' == $taxonomy) |
|
234 | + $help .= '<p>'.__('You can delete Link Categories in the Bulk Action pull-down, but that action does not delete the links within the category. Instead, it moves them to the default Link Category.').'</p>'; |
|
235 | 235 | else |
236 | - $help .='<p>' . __( 'What’s the difference between categories and tags? Normally, tags are ad-hoc keywords that identify important information in your post (names, subjects, etc) that may or may not recur in other posts, while categories are pre-determined sections. If you think of your site like a book, the categories are like the Table of Contents and the tags are like the terms in the index.' ) . '</p>'; |
|
236 | + $help .= '<p>'.__('What’s the difference between categories and tags? Normally, tags are ad-hoc keywords that identify important information in your post (names, subjects, etc) that may or may not recur in other posts, while categories are pre-determined sections. If you think of your site like a book, the categories are like the Table of Contents and the tags are like the terms in the index.').'</p>'; |
|
237 | 237 | |
238 | - get_current_screen()->add_help_tab( array( |
|
238 | + get_current_screen()->add_help_tab(array( |
|
239 | 239 | 'id' => 'overview', |
240 | 240 | 'title' => __('Overview'), |
241 | 241 | 'content' => $help, |
242 | - ) ); |
|
242 | + )); |
|
243 | 243 | |
244 | - if ( 'category' == $taxonomy || 'post_tag' == $taxonomy ) { |
|
245 | - if ( 'category' == $taxonomy ) |
|
246 | - $help = '<p>' . __( 'When adding a new category on this screen, you’ll fill in the following fields:' ) . '</p>'; |
|
244 | + if ('category' == $taxonomy || 'post_tag' == $taxonomy) { |
|
245 | + if ('category' == $taxonomy) |
|
246 | + $help = '<p>'.__('When adding a new category on this screen, you’ll fill in the following fields:').'</p>'; |
|
247 | 247 | else |
248 | - $help = '<p>' . __( 'When adding a new tag on this screen, you’ll fill in the following fields:' ) . '</p>'; |
|
248 | + $help = '<p>'.__('When adding a new tag on this screen, you’ll fill in the following fields:').'</p>'; |
|
249 | 249 | |
250 | - $help .= '<ul>' . |
|
251 | - '<li>' . __( '<strong>Name</strong> — The name is how it appears on your site.' ) . '</li>'; |
|
250 | + $help .= '<ul>'. |
|
251 | + '<li>'.__('<strong>Name</strong> — The name is how it appears on your site.').'</li>'; |
|
252 | 252 | |
253 | - if ( ! global_terms_enabled() ) |
|
254 | - $help .= '<li>' . __( '<strong>Slug</strong> — The “slug” is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.' ) . '</li>'; |
|
253 | + if ( ! global_terms_enabled()) |
|
254 | + $help .= '<li>'.__('<strong>Slug</strong> — The “slug” is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.').'</li>'; |
|
255 | 255 | |
256 | - if ( 'category' == $taxonomy ) |
|
257 | - $help .= '<li>' . __( '<strong>Parent</strong> — Categories, unlike tags, can have a hierarchy. You might have a Jazz category, and under that have child categories for Bebop and Big Band. Totally optional. To create a subcategory, just choose another category from the Parent dropdown.' ) . '</li>'; |
|
256 | + if ('category' == $taxonomy) |
|
257 | + $help .= '<li>'.__('<strong>Parent</strong> — Categories, unlike tags, can have a hierarchy. You might have a Jazz category, and under that have child categories for Bebop and Big Band. Totally optional. To create a subcategory, just choose another category from the Parent dropdown.').'</li>'; |
|
258 | 258 | |
259 | - $help .= '<li>' . __( '<strong>Description</strong> — The description is not prominent by default; however, some themes may display it.' ) . '</li>' . |
|
260 | - '</ul>' . |
|
261 | - '<p>' . __( 'You can change the display of this screen using the Screen Options tab to set how many items are displayed per screen and to display/hide columns in the table.' ) . '</p>'; |
|
259 | + $help .= '<li>'.__('<strong>Description</strong> — The description is not prominent by default; however, some themes may display it.').'</li>'. |
|
260 | + '</ul>'. |
|
261 | + '<p>'.__('You can change the display of this screen using the Screen Options tab to set how many items are displayed per screen and to display/hide columns in the table.').'</p>'; |
|
262 | 262 | |
263 | - get_current_screen()->add_help_tab( array( |
|
263 | + get_current_screen()->add_help_tab(array( |
|
264 | 264 | 'id' => 'adding-terms', |
265 | - 'title' => 'category' == $taxonomy ? __( 'Adding Categories' ) : __( 'Adding Tags' ), |
|
265 | + 'title' => 'category' == $taxonomy ? __('Adding Categories') : __('Adding Tags'), |
|
266 | 266 | 'content' => $help, |
267 | - ) ); |
|
267 | + )); |
|
268 | 268 | } |
269 | 269 | |
270 | - $help = '<p><strong>' . __( 'For more information:' ) . '</strong></p>'; |
|
270 | + $help = '<p><strong>'.__('For more information:').'</strong></p>'; |
|
271 | 271 | |
272 | - if ( 'category' == $taxonomy ) |
|
273 | - $help .= '<p>' . __( '<a href="https://codex.wordpress.org/Posts_Categories_Screen" target="_blank">Documentation on Categories</a>' ) . '</p>'; |
|
274 | - elseif ( 'link_category' == $taxonomy ) |
|
275 | - $help .= '<p>' . __( '<a href="https://codex.wordpress.org/Links_Link_Categories_Screen" target="_blank">Documentation on Link Categories</a>' ) . '</p>'; |
|
272 | + if ('category' == $taxonomy) |
|
273 | + $help .= '<p>'.__('<a href="https://codex.wordpress.org/Posts_Categories_Screen" target="_blank">Documentation on Categories</a>').'</p>'; |
|
274 | + elseif ('link_category' == $taxonomy) |
|
275 | + $help .= '<p>'.__('<a href="https://codex.wordpress.org/Links_Link_Categories_Screen" target="_blank">Documentation on Link Categories</a>').'</p>'; |
|
276 | 276 | else |
277 | - $help .= '<p>' . __( '<a href="https://codex.wordpress.org/Posts_Tags_Screen" target="_blank">Documentation on Tags</a>' ) . '</p>'; |
|
277 | + $help .= '<p>'.__('<a href="https://codex.wordpress.org/Posts_Tags_Screen" target="_blank">Documentation on Tags</a>').'</p>'; |
|
278 | 278 | |
279 | - $help .= '<p>' . __('<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'; |
|
279 | + $help .= '<p>'.__('<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>').'</p>'; |
|
280 | 280 | |
281 | - get_current_screen()->set_help_sidebar( $help ); |
|
281 | + get_current_screen()->set_help_sidebar($help); |
|
282 | 282 | |
283 | - unset( $help ); |
|
283 | + unset($help); |
|
284 | 284 | } |
285 | 285 | |
286 | -require_once( ABSPATH . 'wp-admin/admin-header.php' ); |
|
286 | +require_once(ABSPATH.'wp-admin/admin-header.php'); |
|
287 | 287 | |
288 | -if ( ! current_user_can( $tax->cap->edit_terms ) ) { |
|
288 | +if ( ! current_user_can($tax->cap->edit_terms)) { |
|
289 | 289 | wp_die( |
290 | - '<h1>' . __( 'Cheatin’ uh?' ) . '</h1>' . |
|
291 | - '<p>' . __( 'You are not allowed to edit this item.' ) . '</p>', |
|
290 | + '<h1>'.__('Cheatin’ uh?').'</h1>'. |
|
291 | + '<p>'.__('You are not allowed to edit this item.').'</p>', |
|
292 | 292 | 403 |
293 | 293 | ); |
294 | 294 | } |
295 | 295 | |
296 | 296 | /** Also used by the Edit Tag form */ |
297 | -require_once( ABSPATH . 'wp-admin/includes/edit-tag-messages.php' ); |
|
297 | +require_once(ABSPATH.'wp-admin/includes/edit-tag-messages.php'); |
|
298 | 298 | |
299 | -$class = ( isset( $_REQUEST['error'] ) ) ? 'error' : 'updated'; |
|
299 | +$class = (isset($_REQUEST['error'])) ? 'error' : 'updated'; |
|
300 | 300 | |
301 | -if ( is_plugin_active( 'wpcat2tag-importer/wpcat2tag-importer.php' ) ) { |
|
302 | - $import_link = admin_url( 'admin.php?import=wpcat2tag' ); |
|
301 | +if (is_plugin_active('wpcat2tag-importer/wpcat2tag-importer.php')) { |
|
302 | + $import_link = admin_url('admin.php?import=wpcat2tag'); |
|
303 | 303 | } else { |
304 | - $import_link = admin_url( 'import.php' ); |
|
304 | + $import_link = admin_url('import.php'); |
|
305 | 305 | } |
306 | 306 | |
307 | 307 | ?> |
308 | 308 | |
309 | 309 | <div class="wrap nosubsub"> |
310 | -<h1><?php echo esc_html( $title ); |
|
311 | -if ( isset( $_REQUEST['s'] ) && strlen( $_REQUEST['s'] ) ) { |
|
310 | +<h1><?php echo esc_html($title); |
|
311 | +if (isset($_REQUEST['s']) && strlen($_REQUEST['s'])) { |
|
312 | 312 | /* translators: %s: search keywords */ |
313 | - printf( '<span class="subtitle">' . __( 'Search results for “%s”' ) . '</span>', esc_html( wp_unslash( $_REQUEST['s'] ) ) ); |
|
313 | + printf('<span class="subtitle">'.__('Search results for “%s”').'</span>', esc_html(wp_unslash($_REQUEST['s']))); |
|
314 | 314 | } |
315 | 315 | ?> |
316 | 316 | </h1> |
317 | 317 | |
318 | -<?php if ( $message ) : ?> |
|
318 | +<?php if ($message) : ?> |
|
319 | 319 | <div id="message" class="<?php echo $class; ?> notice is-dismissible"><p><?php echo $message; ?></p></div> |
320 | -<?php $_SERVER['REQUEST_URI'] = remove_query_arg( array( 'message', 'error' ), $_SERVER['REQUEST_URI'] ); |
|
320 | +<?php $_SERVER['REQUEST_URI'] = remove_query_arg(array('message', 'error'), $_SERVER['REQUEST_URI']); |
|
321 | 321 | endif; ?> |
322 | 322 | <div id="ajax-response"></div> |
323 | 323 | |
@@ -325,7 +325,7 @@ discard block |
||
325 | 325 | <input type="hidden" name="taxonomy" value="<?php echo esc_attr($taxonomy); ?>" /> |
326 | 326 | <input type="hidden" name="post_type" value="<?php echo esc_attr($post_type); ?>" /> |
327 | 327 | |
328 | -<?php $wp_list_table->search_box( $tax->labels->search_items, 'tag' ); ?> |
|
328 | +<?php $wp_list_table->search_box($tax->labels->search_items, 'tag'); ?> |
|
329 | 329 | |
330 | 330 | </form> |
331 | 331 | <br class="clear" /> |
@@ -343,26 +343,26 @@ discard block |
||
343 | 343 | <br class="clear" /> |
344 | 344 | </form> |
345 | 345 | |
346 | -<?php if ( 'category' == $taxonomy ) : ?> |
|
346 | +<?php if ('category' == $taxonomy) : ?> |
|
347 | 347 | <div class="form-wrap"> |
348 | 348 | <p> |
349 | 349 | <?php |
350 | - echo '<strong>' . __( 'Note:' ) . '</strong><br />'; |
|
350 | + echo '<strong>'.__('Note:').'</strong><br />'; |
|
351 | 351 | printf( |
352 | 352 | /* translators: %s: default category */ |
353 | - __( 'Deleting a category does not delete the posts in that category. Instead, posts that were only assigned to the deleted category are set to the category %s.' ), |
|
353 | + __('Deleting a category does not delete the posts in that category. Instead, posts that were only assigned to the deleted category are set to the category %s.'), |
|
354 | 354 | /** This filter is documented in wp-includes/category-template.php */ |
355 | - '<strong>' . apply_filters( 'the_category', get_cat_name( get_option( 'default_category') ) ) . '</strong>' |
|
355 | + '<strong>'.apply_filters('the_category', get_cat_name(get_option('default_category'))).'</strong>' |
|
356 | 356 | ); |
357 | 357 | ?> |
358 | 358 | </p> |
359 | -<?php if ( current_user_can( 'import' ) ) : ?> |
|
360 | -<p><?php printf( __( 'Categories can be selectively converted to tags using the <a href="%s">category to tag converter</a>.' ), esc_url( $import_link ) ) ?></p> |
|
359 | +<?php if (current_user_can('import')) : ?> |
|
360 | +<p><?php printf(__('Categories can be selectively converted to tags using the <a href="%s">category to tag converter</a>.'), esc_url($import_link)) ?></p> |
|
361 | 361 | <?php endif; ?> |
362 | 362 | </div> |
363 | -<?php elseif ( 'post_tag' == $taxonomy && current_user_can( 'import' ) ) : ?> |
|
363 | +<?php elseif ('post_tag' == $taxonomy && current_user_can('import')) : ?> |
|
364 | 364 | <div class="form-wrap"> |
365 | -<p><?php printf( __( 'Tags can be selectively converted to categories using the <a href="%s">tag to category converter</a>.' ), esc_url( $import_link ) ) ;?></p> |
|
365 | +<p><?php printf(__('Tags can be selectively converted to categories using the <a href="%s">tag to category converter</a>.'), esc_url($import_link)); ?></p> |
|
366 | 366 | </div> |
367 | 367 | <?php endif; |
368 | 368 | |
@@ -375,7 +375,7 @@ discard block |
||
375 | 375 | * |
376 | 376 | * @param string $taxonomy The taxonomy name. |
377 | 377 | */ |
378 | -do_action( "after-{$taxonomy}-table", $taxonomy ); |
|
378 | +do_action("after-{$taxonomy}-table", $taxonomy); |
|
379 | 379 | ?> |
380 | 380 | |
381 | 381 | </div> |
@@ -386,24 +386,24 @@ discard block |
||
386 | 386 | |
387 | 387 | <?php |
388 | 388 | |
389 | -if ( !is_null( $tax->labels->popular_items ) ) { |
|
390 | - if ( current_user_can( $tax->cap->edit_terms ) ) |
|
391 | - $tag_cloud = wp_tag_cloud( array( 'taxonomy' => $taxonomy, 'post_type' => $post_type, 'echo' => false, 'link' => 'edit' ) ); |
|
389 | +if ( ! is_null($tax->labels->popular_items)) { |
|
390 | + if (current_user_can($tax->cap->edit_terms)) |
|
391 | + $tag_cloud = wp_tag_cloud(array('taxonomy' => $taxonomy, 'post_type' => $post_type, 'echo' => false, 'link' => 'edit')); |
|
392 | 392 | else |
393 | - $tag_cloud = wp_tag_cloud( array( 'taxonomy' => $taxonomy, 'echo' => false ) ); |
|
393 | + $tag_cloud = wp_tag_cloud(array('taxonomy' => $taxonomy, 'echo' => false)); |
|
394 | 394 | |
395 | - if ( $tag_cloud ) : |
|
395 | + if ($tag_cloud) : |
|
396 | 396 | ?> |
397 | 397 | <div class="tagcloud"> |
398 | 398 | <h2><?php echo $tax->labels->popular_items; ?></h2> |
399 | -<?php echo $tag_cloud; unset( $tag_cloud ); ?> |
|
399 | +<?php echo $tag_cloud; unset($tag_cloud); ?> |
|
400 | 400 | </div> |
401 | 401 | <?php |
402 | 402 | endif; |
403 | 403 | } |
404 | 404 | |
405 | -if ( current_user_can($tax->cap->edit_terms) ) { |
|
406 | - if ( 'category' == $taxonomy ) { |
|
405 | +if (current_user_can($tax->cap->edit_terms)) { |
|
406 | + if ('category' == $taxonomy) { |
|
407 | 407 | /** |
408 | 408 | * Fires before the Add Category form. |
409 | 409 | * |
@@ -412,8 +412,8 @@ discard block |
||
412 | 412 | * |
413 | 413 | * @param object $arg Optional arguments cast to an object. |
414 | 414 | */ |
415 | - do_action( 'add_category_form_pre', (object) array( 'parent' => 0 ) ); |
|
416 | - } elseif ( 'link_category' == $taxonomy ) { |
|
415 | + do_action('add_category_form_pre', (object) array('parent' => 0)); |
|
416 | + } elseif ('link_category' == $taxonomy) { |
|
417 | 417 | /** |
418 | 418 | * Fires before the link category form. |
419 | 419 | * |
@@ -422,7 +422,7 @@ discard block |
||
422 | 422 | * |
423 | 423 | * @param object $arg Optional arguments cast to an object. |
424 | 424 | */ |
425 | - do_action( 'add_link_category_form_pre', (object) array( 'parent' => 0 ) ); |
|
425 | + do_action('add_link_category_form_pre', (object) array('parent' => 0)); |
|
426 | 426 | } else { |
427 | 427 | /** |
428 | 428 | * Fires before the Add Tag form. |
@@ -432,7 +432,7 @@ discard block |
||
432 | 432 | * |
433 | 433 | * @param string $taxonomy The taxonomy slug. |
434 | 434 | */ |
435 | - do_action( 'add_tag_form_pre', $taxonomy ); |
|
435 | + do_action('add_tag_form_pre', $taxonomy); |
|
436 | 436 | } |
437 | 437 | |
438 | 438 | /** |
@@ -444,7 +444,7 @@ discard block |
||
444 | 444 | * |
445 | 445 | * @param string $taxonomy The taxonomy slug. |
446 | 446 | */ |
447 | - do_action( "{$taxonomy}_pre_add_form", $taxonomy ); |
|
447 | + do_action("{$taxonomy}_pre_add_form", $taxonomy); |
|
448 | 448 | ?> |
449 | 449 | |
450 | 450 | <div class="form-wrap"> |
@@ -458,7 +458,7 @@ discard block |
||
458 | 458 | * |
459 | 459 | * @since 3.7.0 |
460 | 460 | */ |
461 | -do_action( "{$taxonomy}_term_new_form_tag" ); |
|
461 | +do_action("{$taxonomy}_term_new_form_tag"); |
|
462 | 462 | ?>> |
463 | 463 | <input type="hidden" name="action" value="add-tag" /> |
464 | 464 | <input type="hidden" name="screen" value="<?php echo esc_attr($current_screen->id); ?>" /> |
@@ -467,20 +467,20 @@ discard block |
||
467 | 467 | <?php wp_nonce_field('add-tag', '_wpnonce_add-tag'); ?> |
468 | 468 | |
469 | 469 | <div class="form-field form-required term-name-wrap"> |
470 | - <label for="tag-name"><?php _ex( 'Name', 'term name' ); ?></label> |
|
470 | + <label for="tag-name"><?php _ex('Name', 'term name'); ?></label> |
|
471 | 471 | <input name="tag-name" id="tag-name" type="text" value="" size="40" aria-required="true" /> |
472 | 472 | <p><?php _e('The name is how it appears on your site.'); ?></p> |
473 | 473 | </div> |
474 | -<?php if ( ! global_terms_enabled() ) : ?> |
|
474 | +<?php if ( ! global_terms_enabled()) : ?> |
|
475 | 475 | <div class="form-field term-slug-wrap"> |
476 | - <label for="tag-slug"><?php _e( 'Slug' ); ?></label> |
|
476 | + <label for="tag-slug"><?php _e('Slug'); ?></label> |
|
477 | 477 | <input name="slug" id="tag-slug" type="text" value="" size="40" /> |
478 | 478 | <p><?php _e('The “slug” is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.'); ?></p> |
479 | 479 | </div> |
480 | 480 | <?php endif; // global_terms_enabled() ?> |
481 | -<?php if ( is_taxonomy_hierarchical($taxonomy) ) : ?> |
|
481 | +<?php if (is_taxonomy_hierarchical($taxonomy)) : ?> |
|
482 | 482 | <div class="form-field term-parent-wrap"> |
483 | - <label for="parent"><?php _ex( 'Parent', 'term parent' ); ?></label> |
|
483 | + <label for="parent"><?php _ex('Parent', 'term parent'); ?></label> |
|
484 | 484 | <?php |
485 | 485 | $dropdown_args = array( |
486 | 486 | 'hide_empty' => 0, |
@@ -489,7 +489,7 @@ discard block |
||
489 | 489 | 'name' => 'parent', |
490 | 490 | 'orderby' => 'name', |
491 | 491 | 'hierarchical' => true, |
492 | - 'show_option_none' => __( 'None' ), |
|
492 | + 'show_option_none' => __('None'), |
|
493 | 493 | ); |
494 | 494 | |
495 | 495 | /** |
@@ -513,23 +513,23 @@ discard block |
||
513 | 513 | * @param string $taxonomy The taxonomy slug. |
514 | 514 | * @param string $context Filter context. Accepts 'new' or 'edit'. |
515 | 515 | */ |
516 | - $dropdown_args = apply_filters( 'taxonomy_parent_dropdown_args', $dropdown_args, $taxonomy, 'new' ); |
|
516 | + $dropdown_args = apply_filters('taxonomy_parent_dropdown_args', $dropdown_args, $taxonomy, 'new'); |
|
517 | 517 | |
518 | - wp_dropdown_categories( $dropdown_args ); |
|
518 | + wp_dropdown_categories($dropdown_args); |
|
519 | 519 | ?> |
520 | - <?php if ( 'category' == $taxonomy ) : // @todo: Generic text for hierarchical taxonomies ?> |
|
520 | + <?php if ('category' == $taxonomy) : // @todo: Generic text for hierarchical taxonomies ?> |
|
521 | 521 | <p><?php _e('Categories, unlike tags, can have a hierarchy. You might have a Jazz category, and under that have children categories for Bebop and Big Band. Totally optional.'); ?></p> |
522 | 522 | <?php endif; ?> |
523 | 523 | </div> |
524 | 524 | <?php endif; // is_taxonomy_hierarchical() ?> |
525 | 525 | <div class="form-field term-description-wrap"> |
526 | - <label for="tag-description"><?php _e( 'Description' ); ?></label> |
|
526 | + <label for="tag-description"><?php _e('Description'); ?></label> |
|
527 | 527 | <textarea name="description" id="tag-description" rows="5" cols="40"></textarea> |
528 | 528 | <p><?php _e('The description is not prominent by default; however, some themes may show it.'); ?></p> |
529 | 529 | </div> |
530 | 530 | |
531 | 531 | <?php |
532 | -if ( ! is_taxonomy_hierarchical( $taxonomy ) ) { |
|
532 | +if ( ! is_taxonomy_hierarchical($taxonomy)) { |
|
533 | 533 | /** |
534 | 534 | * Fires after the Add Tag form fields for non-hierarchical taxonomies. |
535 | 535 | * |
@@ -537,7 +537,7 @@ discard block |
||
537 | 537 | * |
538 | 538 | * @param string $taxonomy The taxonomy slug. |
539 | 539 | */ |
540 | - do_action( 'add_tag_form_fields', $taxonomy ); |
|
540 | + do_action('add_tag_form_fields', $taxonomy); |
|
541 | 541 | } |
542 | 542 | |
543 | 543 | /** |
@@ -549,11 +549,11 @@ discard block |
||
549 | 549 | * |
550 | 550 | * @param string $taxonomy The taxonomy slug. |
551 | 551 | */ |
552 | -do_action( "{$taxonomy}_add_form_fields", $taxonomy ); |
|
552 | +do_action("{$taxonomy}_add_form_fields", $taxonomy); |
|
553 | 553 | |
554 | -submit_button( $tax->labels->add_new_item ); |
|
554 | +submit_button($tax->labels->add_new_item); |
|
555 | 555 | |
556 | -if ( 'category' == $taxonomy ) { |
|
556 | +if ('category' == $taxonomy) { |
|
557 | 557 | /** |
558 | 558 | * Fires at the end of the Edit Category form. |
559 | 559 | * |
@@ -562,8 +562,8 @@ discard block |
||
562 | 562 | * |
563 | 563 | * @param object $arg Optional arguments cast to an object. |
564 | 564 | */ |
565 | - do_action( 'edit_category_form', (object) array( 'parent' => 0 ) ); |
|
566 | -} elseif ( 'link_category' == $taxonomy ) { |
|
565 | + do_action('edit_category_form', (object) array('parent' => 0)); |
|
566 | +} elseif ('link_category' == $taxonomy) { |
|
567 | 567 | /** |
568 | 568 | * Fires at the end of the Edit Link form. |
569 | 569 | * |
@@ -572,7 +572,7 @@ discard block |
||
572 | 572 | * |
573 | 573 | * @param object $arg Optional arguments cast to an object. |
574 | 574 | */ |
575 | - do_action( 'edit_link_category_form', (object) array( 'parent' => 0 ) ); |
|
575 | + do_action('edit_link_category_form', (object) array('parent' => 0)); |
|
576 | 576 | } else { |
577 | 577 | /** |
578 | 578 | * Fires at the end of the Add Tag form. |
@@ -582,7 +582,7 @@ discard block |
||
582 | 582 | * |
583 | 583 | * @param string $taxonomy The taxonomy slug. |
584 | 584 | */ |
585 | - do_action( 'add_tag_form', $taxonomy ); |
|
585 | + do_action('add_tag_form', $taxonomy); |
|
586 | 586 | } |
587 | 587 | |
588 | 588 | /** |
@@ -594,7 +594,7 @@ discard block |
||
594 | 594 | * |
595 | 595 | * @param string $taxonomy The taxonomy slug. |
596 | 596 | */ |
597 | -do_action( "{$taxonomy}_add_form", $taxonomy ); |
|
597 | +do_action("{$taxonomy}_add_form", $taxonomy); |
|
598 | 598 | ?> |
599 | 599 | </form></div> |
600 | 600 | <?php } ?> |
@@ -605,7 +605,7 @@ discard block |
||
605 | 605 | </div><!-- /col-container --> |
606 | 606 | </div><!-- /wrap --> |
607 | 607 | |
608 | -<?php if ( ! wp_is_mobile() ) : ?> |
|
608 | +<?php if ( ! wp_is_mobile()) : ?> |
|
609 | 609 | <script type="text/javascript"> |
610 | 610 | try{document.forms.addtag['tag-name'].focus();}catch(e){} |
611 | 611 | </script> |
@@ -614,4 +614,4 @@ discard block |
||
614 | 614 | |
615 | 615 | $wp_list_table->inline_edit(); |
616 | 616 | |
617 | -include( ABSPATH . 'wp-admin/admin-footer.php' ); |
|
617 | +include(ABSPATH.'wp-admin/admin-footer.php'); |
@@ -9,13 +9,15 @@ discard block |
||
9 | 9 | /** WordPress Administration Bootstrap */ |
10 | 10 | require_once( dirname( __FILE__ ) . '/admin.php' ); |
11 | 11 | |
12 | -if ( ! $taxnow ) |
|
12 | +if ( ! $taxnow ) { |
|
13 | 13 | wp_die( __( 'Invalid taxonomy' ) ); |
14 | +} |
|
14 | 15 | |
15 | 16 | $tax = get_taxonomy( $taxnow ); |
16 | 17 | |
17 | -if ( ! $tax ) |
|
18 | +if ( ! $tax ) { |
|
18 | 19 | wp_die( __( 'Invalid taxonomy' ) ); |
20 | +} |
|
19 | 21 | |
20 | 22 | if ( ! in_array( $tax->name, get_taxonomies( array( 'show_ui' => true ) ) ) ) { |
21 | 23 | wp_die( __( 'You are not allowed to manage these items.' ) ); |
@@ -78,24 +80,27 @@ discard block |
||
78 | 80 | |
79 | 81 | $ret = wp_insert_term( $_POST['tag-name'], $taxonomy, $_POST ); |
80 | 82 | $location = 'edit-tags.php?taxonomy=' . $taxonomy; |
81 | - if ( 'post' != $post_type ) |
|
82 | - $location .= '&post_type=' . $post_type; |
|
83 | + if ( 'post' != $post_type ) { |
|
84 | + $location .= '&post_type=' . $post_type; |
|
85 | + } |
|
83 | 86 | |
84 | 87 | if ( $referer && false !== strpos( $referer, 'edit-tags.php' ) ) { |
85 | 88 | $location = $referer; |
86 | 89 | } |
87 | 90 | |
88 | - if ( $ret && !is_wp_error( $ret ) ) |
|
89 | - $location = add_query_arg( 'message', 1, $location ); |
|
90 | - else |
|
91 | - $location = add_query_arg( array( 'error' => true, 'message' => 4 ), $location ); |
|
91 | + if ( $ret && !is_wp_error( $ret ) ) { |
|
92 | + $location = add_query_arg( 'message', 1, $location ); |
|
93 | + } else { |
|
94 | + $location = add_query_arg( array( 'error' => true, 'message' => 4 ), $location ); |
|
95 | + } |
|
92 | 96 | |
93 | 97 | break; |
94 | 98 | |
95 | 99 | case 'delete': |
96 | 100 | $location = 'edit-tags.php?taxonomy=' . $taxonomy; |
97 | - if ( 'post' != $post_type ) |
|
98 | - $location .= '&post_type=' . $post_type; |
|
101 | + if ( 'post' != $post_type ) { |
|
102 | + $location .= '&post_type=' . $post_type; |
|
103 | + } |
|
99 | 104 | |
100 | 105 | if ( $referer && false !== strpos( $referer, 'edit-tags.php' ) ) { |
101 | 106 | $location = $referer; |
@@ -139,8 +144,9 @@ discard block |
||
139 | 144 | } |
140 | 145 | |
141 | 146 | $location = 'edit-tags.php?taxonomy=' . $taxonomy; |
142 | - if ( 'post' != $post_type ) |
|
143 | - $location .= '&post_type=' . $post_type; |
|
147 | + if ( 'post' != $post_type ) { |
|
148 | + $location .= '&post_type=' . $post_type; |
|
149 | + } |
|
144 | 150 | if ( $referer && false !== strpos( $referer, 'edit-tags.php' ) ) { |
145 | 151 | $location = $referer; |
146 | 152 | } |
@@ -177,23 +183,26 @@ discard block |
||
177 | 183 | } |
178 | 184 | |
179 | 185 | $tag = get_term( $tag_ID, $taxonomy ); |
180 | - if ( ! $tag ) |
|
181 | - wp_die( __( 'You attempted to edit an item that doesn’t exist. Perhaps it was deleted?' ) ); |
|
186 | + if ( ! $tag ) { |
|
187 | + wp_die( __( 'You attempted to edit an item that doesn’t exist. Perhaps it was deleted?' ) ); |
|
188 | + } |
|
182 | 189 | |
183 | 190 | $ret = wp_update_term( $tag_ID, $taxonomy, $_POST ); |
184 | 191 | |
185 | 192 | $location = 'edit-tags.php?taxonomy=' . $taxonomy; |
186 | - if ( 'post' != $post_type ) |
|
187 | - $location .= '&post_type=' . $post_type; |
|
193 | + if ( 'post' != $post_type ) { |
|
194 | + $location .= '&post_type=' . $post_type; |
|
195 | + } |
|
188 | 196 | |
189 | 197 | if ( $referer && false !== strpos( $referer, 'edit-tags.php' ) ) { |
190 | 198 | $location = $referer; |
191 | 199 | } |
192 | 200 | |
193 | - if ( $ret && !is_wp_error( $ret ) ) |
|
194 | - $location = add_query_arg( 'message', 3, $location ); |
|
195 | - else |
|
196 | - $location = add_query_arg( array( 'error' => true, 'message' => 5 ), $location ); |
|
201 | + if ( $ret && !is_wp_error( $ret ) ) { |
|
202 | + $location = add_query_arg( 'message', 3, $location ); |
|
203 | + } else { |
|
204 | + $location = add_query_arg( array( 'error' => true, 'message' => 5 ), $location ); |
|
205 | + } |
|
197 | 206 | break; |
198 | 207 | } |
199 | 208 | |
@@ -218,22 +227,25 @@ discard block |
||
218 | 227 | } |
219 | 228 | |
220 | 229 | wp_enqueue_script('admin-tags'); |
221 | -if ( current_user_can($tax->cap->edit_terms) ) |
|
230 | +if ( current_user_can($tax->cap->edit_terms) ) { |
|
222 | 231 | wp_enqueue_script('inline-edit-tax'); |
232 | +} |
|
223 | 233 | |
224 | 234 | if ( 'category' == $taxonomy || 'link_category' == $taxonomy || 'post_tag' == $taxonomy ) { |
225 | 235 | $help =''; |
226 | - if ( 'category' == $taxonomy ) |
|
227 | - $help = '<p>' . sprintf(__( 'You can use categories to define sections of your site and group related posts. The default category is “Uncategorized” until you change it in your <a href="%s">writing settings</a>.' ) , 'options-writing.php' ) . '</p>'; |
|
228 | - elseif ( 'link_category' == $taxonomy ) |
|
229 | - $help = '<p>' . __( 'You can create groups of links by using Link Categories. Link Category names must be unique and Link Categories are separate from the categories you use for posts.' ) . '</p>'; |
|
230 | - else |
|
231 | - $help = '<p>' . __( 'You can assign keywords to your posts using <strong>tags</strong>. Unlike categories, tags have no hierarchy, meaning there’s no relationship from one tag to another.' ) . '</p>'; |
|
232 | - |
|
233 | - if ( 'link_category' == $taxonomy ) |
|
234 | - $help .= '<p>' . __( 'You can delete Link Categories in the Bulk Action pull-down, but that action does not delete the links within the category. Instead, it moves them to the default Link Category.' ) . '</p>'; |
|
235 | - else |
|
236 | - $help .='<p>' . __( 'What’s the difference between categories and tags? Normally, tags are ad-hoc keywords that identify important information in your post (names, subjects, etc) that may or may not recur in other posts, while categories are pre-determined sections. If you think of your site like a book, the categories are like the Table of Contents and the tags are like the terms in the index.' ) . '</p>'; |
|
236 | + if ( 'category' == $taxonomy ) { |
|
237 | + $help = '<p>' . sprintf(__( 'You can use categories to define sections of your site and group related posts. The default category is “Uncategorized” until you change it in your <a href="%s">writing settings</a>.' ) , 'options-writing.php' ) . '</p>'; |
|
238 | + } elseif ( 'link_category' == $taxonomy ) { |
|
239 | + $help = '<p>' . __( 'You can create groups of links by using Link Categories. Link Category names must be unique and Link Categories are separate from the categories you use for posts.' ) . '</p>'; |
|
240 | + } else { |
|
241 | + $help = '<p>' . __( 'You can assign keywords to your posts using <strong>tags</strong>. Unlike categories, tags have no hierarchy, meaning there’s no relationship from one tag to another.' ) . '</p>'; |
|
242 | + } |
|
243 | + |
|
244 | + if ( 'link_category' == $taxonomy ) { |
|
245 | + $help .= '<p>' . __( 'You can delete Link Categories in the Bulk Action pull-down, but that action does not delete the links within the category. Instead, it moves them to the default Link Category.' ) . '</p>'; |
|
246 | + } else { |
|
247 | + $help .='<p>' . __( 'What’s the difference between categories and tags? Normally, tags are ad-hoc keywords that identify important information in your post (names, subjects, etc) that may or may not recur in other posts, while categories are pre-determined sections. If you think of your site like a book, the categories are like the Table of Contents and the tags are like the terms in the index.' ) . '</p>'; |
|
248 | + } |
|
237 | 249 | |
238 | 250 | get_current_screen()->add_help_tab( array( |
239 | 251 | 'id' => 'overview', |
@@ -242,19 +254,22 @@ discard block |
||
242 | 254 | ) ); |
243 | 255 | |
244 | 256 | if ( 'category' == $taxonomy || 'post_tag' == $taxonomy ) { |
245 | - if ( 'category' == $taxonomy ) |
|
246 | - $help = '<p>' . __( 'When adding a new category on this screen, you’ll fill in the following fields:' ) . '</p>'; |
|
247 | - else |
|
248 | - $help = '<p>' . __( 'When adding a new tag on this screen, you’ll fill in the following fields:' ) . '</p>'; |
|
257 | + if ( 'category' == $taxonomy ) { |
|
258 | + $help = '<p>' . __( 'When adding a new category on this screen, you’ll fill in the following fields:' ) . '</p>'; |
|
259 | + } else { |
|
260 | + $help = '<p>' . __( 'When adding a new tag on this screen, you’ll fill in the following fields:' ) . '</p>'; |
|
261 | + } |
|
249 | 262 | |
250 | 263 | $help .= '<ul>' . |
251 | 264 | '<li>' . __( '<strong>Name</strong> — The name is how it appears on your site.' ) . '</li>'; |
252 | 265 | |
253 | - if ( ! global_terms_enabled() ) |
|
254 | - $help .= '<li>' . __( '<strong>Slug</strong> — The “slug” is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.' ) . '</li>'; |
|
266 | + if ( ! global_terms_enabled() ) { |
|
267 | + $help .= '<li>' . __( '<strong>Slug</strong> — The “slug” is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.' ) . '</li>'; |
|
268 | + } |
|
255 | 269 | |
256 | - if ( 'category' == $taxonomy ) |
|
257 | - $help .= '<li>' . __( '<strong>Parent</strong> — Categories, unlike tags, can have a hierarchy. You might have a Jazz category, and under that have child categories for Bebop and Big Band. Totally optional. To create a subcategory, just choose another category from the Parent dropdown.' ) . '</li>'; |
|
270 | + if ( 'category' == $taxonomy ) { |
|
271 | + $help .= '<li>' . __( '<strong>Parent</strong> — Categories, unlike tags, can have a hierarchy. You might have a Jazz category, and under that have child categories for Bebop and Big Band. Totally optional. To create a subcategory, just choose another category from the Parent dropdown.' ) . '</li>'; |
|
272 | + } |
|
258 | 273 | |
259 | 274 | $help .= '<li>' . __( '<strong>Description</strong> — The description is not prominent by default; however, some themes may display it.' ) . '</li>' . |
260 | 275 | '</ul>' . |
@@ -269,12 +284,13 @@ discard block |
||
269 | 284 | |
270 | 285 | $help = '<p><strong>' . __( 'For more information:' ) . '</strong></p>'; |
271 | 286 | |
272 | - if ( 'category' == $taxonomy ) |
|
273 | - $help .= '<p>' . __( '<a href="https://codex.wordpress.org/Posts_Categories_Screen" target="_blank">Documentation on Categories</a>' ) . '</p>'; |
|
274 | - elseif ( 'link_category' == $taxonomy ) |
|
275 | - $help .= '<p>' . __( '<a href="https://codex.wordpress.org/Links_Link_Categories_Screen" target="_blank">Documentation on Link Categories</a>' ) . '</p>'; |
|
276 | - else |
|
277 | - $help .= '<p>' . __( '<a href="https://codex.wordpress.org/Posts_Tags_Screen" target="_blank">Documentation on Tags</a>' ) . '</p>'; |
|
287 | + if ( 'category' == $taxonomy ) { |
|
288 | + $help .= '<p>' . __( '<a href="https://codex.wordpress.org/Posts_Categories_Screen" target="_blank">Documentation on Categories</a>' ) . '</p>'; |
|
289 | + } elseif ( 'link_category' == $taxonomy ) { |
|
290 | + $help .= '<p>' . __( '<a href="https://codex.wordpress.org/Links_Link_Categories_Screen" target="_blank">Documentation on Link Categories</a>' ) . '</p>'; |
|
291 | + } else { |
|
292 | + $help .= '<p>' . __( '<a href="https://codex.wordpress.org/Posts_Tags_Screen" target="_blank">Documentation on Tags</a>' ) . '</p>'; |
|
293 | + } |
|
278 | 294 | |
279 | 295 | $help .= '<p>' . __('<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'; |
280 | 296 | |
@@ -387,10 +403,11 @@ discard block |
||
387 | 403 | <?php |
388 | 404 | |
389 | 405 | if ( !is_null( $tax->labels->popular_items ) ) { |
390 | - if ( current_user_can( $tax->cap->edit_terms ) ) |
|
391 | - $tag_cloud = wp_tag_cloud( array( 'taxonomy' => $taxonomy, 'post_type' => $post_type, 'echo' => false, 'link' => 'edit' ) ); |
|
392 | - else |
|
393 | - $tag_cloud = wp_tag_cloud( array( 'taxonomy' => $taxonomy, 'echo' => false ) ); |
|
406 | + if ( current_user_can( $tax->cap->edit_terms ) ) { |
|
407 | + $tag_cloud = wp_tag_cloud( array( 'taxonomy' => $taxonomy, 'post_type' => $post_type, 'echo' => false, 'link' => 'edit' ) ); |
|
408 | + } else { |
|
409 | + $tag_cloud = wp_tag_cloud( array( 'taxonomy' => $taxonomy, 'echo' => false ) ); |
|
410 | + } |
|
394 | 411 | |
395 | 412 | if ( $tag_cloud ) : |
396 | 413 | ?> |
@@ -1,11 +1,11 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * My Sites dashboard. |
|
4 | - * |
|
5 | - * @package WordPress |
|
6 | - * @subpackage Multisite |
|
7 | - * @since 3.0.0 |
|
8 | - */ |
|
3 | + * My Sites dashboard. |
|
4 | + * |
|
5 | + * @package WordPress |
|
6 | + * @subpackage Multisite |
|
7 | + * @since 3.0.0 |
|
8 | + */ |
|
9 | 9 | |
10 | 10 | require_once( dirname( __FILE__ ) . '/admin.php' ); |
11 | 11 |
@@ -9,11 +9,13 @@ discard block |
||
9 | 9 | |
10 | 10 | require_once( dirname( __FILE__ ) . '/admin.php' ); |
11 | 11 | |
12 | -if ( !is_multisite() ) |
|
12 | +if ( !is_multisite() ) { |
|
13 | 13 | wp_die( __( 'Multisite support is not enabled.' ) ); |
14 | +} |
|
14 | 15 | |
15 | -if ( ! current_user_can('read') ) |
|
16 | +if ( ! current_user_can('read') ) { |
|
16 | 17 | wp_die( __( 'You do not have sufficient permissions to access this page.' ) ); |
18 | +} |
|
17 | 19 | |
18 | 20 | $action = isset( $_POST['action'] ) ? $_POST['action'] : 'splash'; |
19 | 21 | |
@@ -62,11 +64,13 @@ discard block |
||
62 | 64 | echo '<p>'; |
63 | 65 | _e( 'You must be a member of at least one site to use this page.' ); |
64 | 66 | echo '</p>'; |
65 | -else : |
|
67 | +else { |
|
68 | + : |
|
66 | 69 | ?> |
67 | 70 | <form id="myblogs" method="post"> |
68 | 71 | <?php |
69 | 72 | choose_primary_blog(); |
73 | +} |
|
70 | 74 | /** |
71 | 75 | * Fires before the sites list on the My Sites screen. |
72 | 76 | * |
@@ -7,69 +7,69 @@ discard block |
||
7 | 7 | * @since 3.0.0 |
8 | 8 | */ |
9 | 9 | |
10 | -require_once( dirname( __FILE__ ) . '/admin.php' ); |
|
10 | +require_once(dirname(__FILE__).'/admin.php'); |
|
11 | 11 | |
12 | -if ( !is_multisite() ) |
|
13 | - wp_die( __( 'Multisite support is not enabled.' ) ); |
|
12 | +if ( ! is_multisite()) |
|
13 | + wp_die(__('Multisite support is not enabled.')); |
|
14 | 14 | |
15 | -if ( ! current_user_can('read') ) |
|
16 | - wp_die( __( 'You do not have sufficient permissions to access this page.' ) ); |
|
15 | +if ( ! current_user_can('read')) |
|
16 | + wp_die(__('You do not have sufficient permissions to access this page.')); |
|
17 | 17 | |
18 | -$action = isset( $_POST['action'] ) ? $_POST['action'] : 'splash'; |
|
18 | +$action = isset($_POST['action']) ? $_POST['action'] : 'splash'; |
|
19 | 19 | |
20 | -$blogs = get_blogs_of_user( $current_user->ID ); |
|
20 | +$blogs = get_blogs_of_user($current_user->ID); |
|
21 | 21 | |
22 | 22 | $updated = false; |
23 | -if ( 'updateblogsettings' == $action && isset( $_POST['primary_blog'] ) ) { |
|
24 | - check_admin_referer( 'update-my-sites' ); |
|
23 | +if ('updateblogsettings' == $action && isset($_POST['primary_blog'])) { |
|
24 | + check_admin_referer('update-my-sites'); |
|
25 | 25 | |
26 | - $blog = get_blog_details( (int) $_POST['primary_blog'] ); |
|
27 | - if ( $blog && isset( $blog->domain ) ) { |
|
28 | - update_user_option( $current_user->ID, 'primary_blog', (int) $_POST['primary_blog'], true ); |
|
26 | + $blog = get_blog_details((int) $_POST['primary_blog']); |
|
27 | + if ($blog && isset($blog->domain)) { |
|
28 | + update_user_option($current_user->ID, 'primary_blog', (int) $_POST['primary_blog'], true); |
|
29 | 29 | $updated = true; |
30 | 30 | } else { |
31 | - wp_die( __( 'The primary site you chose does not exist.' ) ); |
|
31 | + wp_die(__('The primary site you chose does not exist.')); |
|
32 | 32 | } |
33 | 33 | } |
34 | 34 | |
35 | -$title = __( 'My Sites' ); |
|
35 | +$title = __('My Sites'); |
|
36 | 36 | $parent_file = 'index.php'; |
37 | 37 | |
38 | -get_current_screen()->add_help_tab( array( |
|
38 | +get_current_screen()->add_help_tab(array( |
|
39 | 39 | 'id' => 'overview', |
40 | 40 | 'title' => __('Overview'), |
41 | 41 | 'content' => |
42 | - '<p>' . __('This screen shows an individual user all of their sites in this network, and also allows that user to set a primary site. They can use the links under each site to visit either the front end or the dashboard for that site.') . '</p>' . |
|
43 | - '<p>' . __('Up until WordPress version 3.0, what is now called a Multisite Network had to be installed separately as WordPress MU (multi-user).') . '</p>' |
|
44 | -) ); |
|
42 | + '<p>'.__('This screen shows an individual user all of their sites in this network, and also allows that user to set a primary site. They can use the links under each site to visit either the front end or the dashboard for that site.').'</p>'. |
|
43 | + '<p>'.__('Up until WordPress version 3.0, what is now called a Multisite Network had to be installed separately as WordPress MU (multi-user).').'</p>' |
|
44 | +)); |
|
45 | 45 | |
46 | 46 | get_current_screen()->set_help_sidebar( |
47 | - '<p><strong>' . __('For more information:') . '</strong></p>' . |
|
48 | - '<p>' . __('<a href="https://codex.wordpress.org/Dashboard_My_Sites_Screen" target="_blank">Documentation on My Sites</a>') . '</p>' . |
|
49 | - '<p>' . __('<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>' |
|
47 | + '<p><strong>'.__('For more information:').'</strong></p>'. |
|
48 | + '<p>'.__('<a href="https://codex.wordpress.org/Dashboard_My_Sites_Screen" target="_blank">Documentation on My Sites</a>').'</p>'. |
|
49 | + '<p>'.__('<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>').'</p>' |
|
50 | 50 | ); |
51 | 51 | |
52 | -require_once( ABSPATH . 'wp-admin/admin-header.php' ); |
|
52 | +require_once(ABSPATH.'wp-admin/admin-header.php'); |
|
53 | 53 | |
54 | -if ( $updated ) { ?> |
|
55 | - <div id="message" class="updated notice is-dismissible"><p><strong><?php _e( 'Settings saved.' ); ?></strong></p></div> |
|
54 | +if ($updated) { ?> |
|
55 | + <div id="message" class="updated notice is-dismissible"><p><strong><?php _e('Settings saved.'); ?></strong></p></div> |
|
56 | 56 | <?php } ?> |
57 | 57 | |
58 | 58 | <div class="wrap"> |
59 | 59 | <h1><?php |
60 | -echo esc_html( $title ); |
|
60 | +echo esc_html($title); |
|
61 | 61 | |
62 | -if ( in_array( get_site_option( 'registration' ), array( 'all', 'blog' ) ) ) { |
|
62 | +if (in_array(get_site_option('registration'), array('all', 'blog'))) { |
|
63 | 63 | /** This filter is documented in wp-login.php */ |
64 | - $sign_up_url = apply_filters( 'wp_signup_location', network_site_url( 'wp-signup.php' ) ); |
|
65 | - printf( ' <a href="%s" class="page-title-action">%s</a>', esc_url( $sign_up_url ), esc_html_x( 'Add New', 'site' ) ); |
|
64 | + $sign_up_url = apply_filters('wp_signup_location', network_site_url('wp-signup.php')); |
|
65 | + printf(' <a href="%s" class="page-title-action">%s</a>', esc_url($sign_up_url), esc_html_x('Add New', 'site')); |
|
66 | 66 | } |
67 | 67 | ?></h1> |
68 | 68 | |
69 | 69 | <?php |
70 | -if ( empty( $blogs ) ) : |
|
70 | +if (empty($blogs)) : |
|
71 | 71 | echo '<p>'; |
72 | - _e( 'You must be a member of at least one site to use this page.' ); |
|
72 | + _e('You must be a member of at least one site to use this page.'); |
|
73 | 73 | echo '</p>'; |
74 | 74 | else : |
75 | 75 | ?> |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | * |
82 | 82 | * @since 3.0.0 |
83 | 83 | */ |
84 | - do_action( 'myblogs_allblogs_options' ); |
|
84 | + do_action('myblogs_allblogs_options'); |
|
85 | 85 | ?> |
86 | 86 | <br clear="all" /> |
87 | 87 | <ul class="my-sites striped"> |
@@ -98,14 +98,14 @@ discard block |
||
98 | 98 | * @param string $settings_html The settings HTML markup. Default empty. |
99 | 99 | * @param object $context Context of the setting (global or site-specific). Default 'global'. |
100 | 100 | */ |
101 | - $settings_html = apply_filters( 'myblogs_options', '', 'global' ); |
|
102 | - if ( $settings_html != '' ) { |
|
103 | - echo '<h3>' . __( 'Global Settings' ) . '</h3>'; |
|
101 | + $settings_html = apply_filters('myblogs_options', '', 'global'); |
|
102 | + if ($settings_html != '') { |
|
103 | + echo '<h3>'.__('Global Settings').'</h3>'; |
|
104 | 104 | echo $settings_html; |
105 | 105 | } |
106 | - reset( $blogs ); |
|
106 | + reset($blogs); |
|
107 | 107 | |
108 | - foreach ( $blogs as $user_blog ) { |
|
108 | + foreach ($blogs as $user_blog) { |
|
109 | 109 | echo "<li>"; |
110 | 110 | echo "<h3>{$user_blog->blogname}</h3>"; |
111 | 111 | /** |
@@ -116,16 +116,16 @@ discard block |
||
116 | 116 | * @param string $string The HTML site link markup. |
117 | 117 | * @param object $user_blog An object containing the site data. |
118 | 118 | */ |
119 | - echo "<p class='my-sites-actions'>" . apply_filters( 'myblogs_blog_actions', "<a href='" . esc_url( get_home_url( $user_blog->userblog_id ) ). "'>" . __( 'Visit' ) . "</a> | <a href='" . esc_url( get_admin_url( $user_blog->userblog_id ) ) . "'>" . __( 'Dashboard' ) . "</a>", $user_blog ) . "</p>"; |
|
119 | + echo "<p class='my-sites-actions'>".apply_filters('myblogs_blog_actions', "<a href='".esc_url(get_home_url($user_blog->userblog_id))."'>".__('Visit')."</a> | <a href='".esc_url(get_admin_url($user_blog->userblog_id))."'>".__('Dashboard')."</a>", $user_blog)."</p>"; |
|
120 | 120 | /** This filter is documented in wp-admin/my-sites.php */ |
121 | - echo apply_filters( 'myblogs_options', '', $user_blog ); |
|
121 | + echo apply_filters('myblogs_options', '', $user_blog); |
|
122 | 122 | echo "</li>"; |
123 | 123 | }?> |
124 | 124 | </ul> |
125 | 125 | <?php |
126 | - if ( count( $blogs ) > 1 || has_action( 'myblogs_allblogs_options' ) || has_filter( 'myblogs_options' ) ) { |
|
126 | + if (count($blogs) > 1 || has_action('myblogs_allblogs_options') || has_filter('myblogs_options')) { |
|
127 | 127 | ?><input type="hidden" name="action" value="updateblogsettings" /><?php |
128 | - wp_nonce_field( 'update-my-sites' ); |
|
128 | + wp_nonce_field('update-my-sites'); |
|
129 | 129 | submit_button(); |
130 | 130 | } |
131 | 131 | ?> |
@@ -133,4 +133,4 @@ discard block |
||
133 | 133 | <?php endif; ?> |
134 | 134 | </div> |
135 | 135 | <?php |
136 | -include( ABSPATH . 'wp-admin/admin-footer.php' ); |
|
136 | +include(ABSPATH.'wp-admin/admin-footer.php'); |