| @@ 54-64 (lines=11) @@ | ||
| 51 | add_action( 'jetpack_unrecognized_action', array( $this, 'handle_unrecognized_action' ) ); |
|
| 52 | } |
|
| 53 | ||
| 54 | static function sort_requires_connection_last( $module1, $module2 ) { |
|
| 55 | if ( $module1['requires_connection'] == $module2['requires_connection'] ) { |
|
| 56 | return 0; |
|
| 57 | } elseif ( $module1['requires_connection'] ) { |
|
| 58 | return 1; |
|
| 59 | } elseif ( $module2['requires_connection'] ) { |
|
| 60 | return -1; |
|
| 61 | } |
|
| 62 | ||
| 63 | return 0; |
|
| 64 | } |
|
| 65 | ||
| 66 | // Produce JS understandable objects of modules containing information for |
|
| 67 | // presentation like description, name, configuration url, etc. |
|
| @@ 190-199 (lines=10) @@ | ||
| 187 | return true; |
|
| 188 | } |
|
| 189 | ||
| 190 | static function sort_requires_connection_last( $module1, $module2 ) { |
|
| 191 | if ( $module1['requires_connection'] == $module2['requires_connection'] ) { |
|
| 192 | return 0; |
|
| 193 | } |
|
| 194 | if ( $module1['requires_connection'] ) { |
|
| 195 | return 1; |
|
| 196 | } |
|
| 197 | if ( $module2['requires_connection'] ) { |
|
| 198 | return -1; |
|
| 199 | } |
|
| 200 | ||
| 201 | return 0; |
|
| 202 | } |
|