Skip to content

Commit 15d67d0

Browse files
jzaeffererrdworth
authored andcommitted
Revert "jqueryui.com: Sort demos by title"
This reverts commit 78349dc. Deployment is currently half-broken. Will revert again once jqueryui.com deployment is back up. (cherry picked from commit d6ff09d) Conflicts: themes/jquery/js/scripts.js
1 parent b208a14 commit 15d67d0

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

mu-plugins/jqueryui.com/jquery-filters.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,13 @@
1111

1212
$plugin = $post->post_name;
1313
$demoList = json_decode( file_get_contents( GW_RESOURCE_DIR . '/demos/demo-list.json' ) );
14-
$demos = $demoList->$plugin;
15-
$defaultDemo = $demos[ 0 ];
14+
$defaultDemo = $demoList->$plugin->default;
1615

1716
$demoContent .=
1817
'<div class="demo-list">' .
1918
'<h2>Examples</h2>' .
2019
'<ul>';
21-
foreach ( $demoList->$plugin as $demo ) {
22-
$filename = $demo->filename;
20+
foreach ( $demoList->$plugin as $filename => $demo ) {
2321
$demoContent .=
2422
($filename === 'default' ? '<li class="active">' : '<li>') .
2523
'<a href="/resources/demos/' . $plugin . '/' . $filename . '.html">' .

0 commit comments

Comments
 (0)