Skip to content

Commit c974c08

Browse files
committed
All: remove unused blog_id remnant from WP-MU/sunrise era
1 parent d77ba33 commit c974c08

File tree

1 file changed

+10
-38
lines changed

1 file changed

+10
-38
lines changed

sites.php

Lines changed: 10 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,17 @@ function jquery_sites() {
55
if ( isset( $sites ) )
66
return $sites;
77

8-
$sites = array( /* blog_id, cookie domain */
8+
# Historical: Formerly hosted plugins.jquery.com
9+
# Historical: Formerly hosted qunitjs.com
10+
# Historical: Formerly hosted sizzlejs.com
11+
# Historical: Formerly hosted api.qunitjs.com
12+
# Historical: Formerly hosted books.jquery.com
13+
# Historical: Formerly hosted events.jquery.org
14+
# Historical: Formerly hosted irc.jquery.org.
15+
# Historical: Formerly hosted codeorigin.jquery.com
16+
17+
$sites = array(
918
'jquery.com' => array(
10-
'blog_id' => 1,
1119
'cookie_domain' => '.jquery.com',
1220
'options' => array(
1321
'blogname' => 'jQuery',
@@ -23,7 +31,6 @@ function jquery_sites() {
2331
),
2432
),
2533
'blog.jquery.com' => array(
26-
'blog_id' => 2,
2734
'cookie_domain' => '.jquery.com',
2835
'options' => array(
2936
'blogname' => 'Official jQuery Blog',
@@ -37,7 +44,6 @@ function jquery_sites() {
3744
),
3845
),
3946
'api.jquery.com' => array(
40-
'blog_id' => 3,
4147
'cookie_domain' => '.jquery.com',
4248
'options' => array(
4349
'blogname' => 'jQuery API Documentation',
@@ -51,9 +57,7 @@ function jquery_sites() {
5157
'jquery_typesense_collection' => 'jquery_com',
5258
),
5359
),
54-
# Historical: Database blog_id 4 is reserved for plugins.jquery.com
5560
'learn.jquery.com' => array(
56-
'blog_id' => 5,
5761
'cookie_domain' => '.jquery.com',
5862
'options' => array(
5963
'blogname' => 'jQuery Learning Center',
@@ -65,7 +69,6 @@ function jquery_sites() {
6569
),
6670
),
6771
'jqueryui.com' => array(
68-
'blog_id' => 6,
6972
'cookie_domain' => '.jqueryui.com',
7073
'options' => array(
7174
'blogname' => 'jQuery UI',
@@ -81,7 +84,6 @@ function jquery_sites() {
8184
),
8285
),
8386
'blog.jqueryui.com' => array(
84-
'blog_id' => 7,
8587
'cookie_domain' => '.jqueryui.com',
8688
'options' => array(
8789
'blogname' => 'jQuery UI Blog',
@@ -92,7 +94,6 @@ function jquery_sites() {
9294
),
9395
'api.jqueryui.com' => array(
9496
'subsites' => true, // Has one level of sub-sites (api.jqueryui.com/([^/]+))
95-
'blog_id' => 8,
9697
'cookie_domain' => '.jqueryui.com',
9798
'options' => array(
9899
'blogname' => 'jQuery UI API Documentation',
@@ -108,7 +109,6 @@ function jquery_sites() {
108109
),
109110
),
110111
'api.jqueryui.com/1.8' => array(
111-
'blog_id' => 17,
112112
'cookie_domain' => '.jqueryui.com',
113113
'options' => array(
114114
'blogname' => 'jQuery UI 1.8 Documentation',
@@ -125,7 +125,6 @@ function jquery_sites() {
125125
),
126126
),
127127
'api.jqueryui.com/1.9' => array(
128-
'blog_id' => 21,
129128
'cookie_domain' => '.jqueryui.com',
130129
'options' => array(
131130
'blogname' => 'jQuery UI 1.9 Documentation',
@@ -142,7 +141,6 @@ function jquery_sites() {
142141
),
143142
),
144143
'jquery.org' => array(
145-
'blog_id' => 9,
146144
'cookie_domain' => '.jquery.org',
147145
'options' => array(
148146
'blogname' => 'jQuery Foundation',
@@ -153,10 +151,7 @@ function jquery_sites() {
153151
'jquery_body_class' => 'jquery-foundation',
154152
),
155153
),
156-
# Historical: Database blog_id 10 is reserved for qunitjs.com.
157-
# Historical: Database blog_id 11 is reserved for sizzlejs.com.
158154
'jquerymobile.com' => array(
159-
'blog_id' => 12,
160155
'cookie_domain' => '.jquerymobile.com',
161156
'options' => array(
162157
'blogname' => 'jQuery Mobile',
@@ -172,7 +167,6 @@ function jquery_sites() {
172167
),
173168
'api.jquerymobile.com' => array(
174169
'subsites' => true, // Has one level of sub-sites (api.jquerymobile.com/([^/]+))
175-
'blog_id' => 13,
176170
'cookie_domain' => '.jquerymobile.com',
177171
'options' => array(
178172
'blogname' => 'jQuery Mobile API Documentation',
@@ -187,11 +181,7 @@ function jquery_sites() {
187181
'jquery_twitter_link' => 'https://twitter.com/jquerymobile',
188182
),
189183
),
190-
# Historical: Database blog_id 14 is reserved for api.qunitjs.com.
191-
# Historical: Database blog_id 15 is reserved for books.jquery.com
192-
# Historical: Database blog_id 16 is reserved for events.jquery.org
193184
'brand.jquery.org' => array(
194-
'blog_id' => 18,
195185
'cookie_domain' => '.jquery.org',
196186
'options' => array(
197187
'blogname' => 'jQuery Brand Guidelines',
@@ -203,7 +193,6 @@ function jquery_sites() {
203193
),
204194
),
205195
'contribute.jquery.org' => array(
206-
'blog_id' => 19,
207196
'cookie_domain' => '.jquery.org',
208197
'options' => array(
209198
'blogname' => 'Contribute to jQuery',
@@ -214,9 +203,7 @@ function jquery_sites() {
214203
'jquery_body_class' => 'jquery-foundation',
215204
),
216205
),
217-
# Historical: Database blog_id 20 is reserved for irc.jquery.org.
218206
'meetings.jquery.org' => array(
219-
'blog_id' => 22,
220207
'cookie_domain' => '.jquery.org',
221208
'options' => array(
222209
'blogname' => 'jQuery Meetings',
@@ -227,9 +214,7 @@ function jquery_sites() {
227214
'jquery_body_class' => 'jquery-foundation',
228215
),
229216
),
230-
# Historical: Database blog_id 23 is reserved for codeorigin.jquery.com
231217
'api.jquerymobile.com/1.3' => array(
232-
'blog_id' => 24,
233218
'cookie_domain' => '.jquerymobile.com',
234219
'options' => array(
235220
'blogname' => 'jQuery Mobile 1.3 Documentation',
@@ -246,7 +231,6 @@ function jquery_sites() {
246231
),
247232
),
248233
'api.jqueryui.com/1.10' => array(
249-
'blog_id' => 25,
250234
'cookie_domain' => '.jqueryui.com',
251235
'options' => array(
252236
'blogname' => 'jQuery UI 1.10 Documentation',
@@ -263,7 +247,6 @@ function jquery_sites() {
263247
),
264248
),
265249
'api.jqueryui.com/1.12' => array(
266-
'blog_id' => 26,
267250
'cookie_domain' => '.jqueryui.com',
268251
'options' => array(
269252
'blogname' => 'jQuery UI 1.12 Documentation',
@@ -280,7 +263,6 @@ function jquery_sites() {
280263
),
281264
),
282265
'api.jqueryui.com/1.11' => array(
283-
'blog_id' => 27,
284266
'cookie_domain' => '.jqueryui.com',
285267
'options' => array(
286268
'blogname' => 'jQuery UI 1.11 Documentation',
@@ -297,7 +279,6 @@ function jquery_sites() {
297279
),
298280
),
299281
'api.jquerymobile.com/1.4' => array(
300-
'blog_id' => 28,
301282
'cookie_domain' => '.jquerymobile.com',
302283
'options' => array(
303284
'blogname' => 'jQuery Mobile 1.4 Documentation',
@@ -314,7 +295,6 @@ function jquery_sites() {
314295
),
315296
),
316297
'releases.jquery.com' => array(
317-
'blog_id' => 29,
318298
'cookie_domain' => '.jquery.com',
319299
'options' => array(
320300
'blogname' => 'jQuery CDN',
@@ -327,7 +307,6 @@ function jquery_sites() {
327307
),
328308
),
329309
'api.jqueryui.com/1.13' => array(
330-
'blog_id' => 30,
331310
'cookie_domain' => '.jqueryui.com',
332311
'options' => array(
333312
'blogname' => 'jQuery UI 1.13 Documentation',
@@ -345,13 +324,6 @@ function jquery_sites() {
345324
),
346325
);
347326

348-
uasort( $sites, function( $a, $b ) {
349-
if ( $a['blog_id'] == $b['blog_id'] )
350-
die( 'Two sites have the same blog_id.' );
351-
if ( $a['blog_id'] > $b['blog_id'] )
352-
return 1;
353-
return -1;
354-
} );
355327
return $sites;
356328
}
357329

0 commit comments

Comments
 (0)