| @@ 223-235 (lines=13) @@ | ||
| 220 | ||
| 221 | // Render the configuration page for the module if it exists and an error |
|
| 222 | // screen if the module is not configurable |
|
| 223 | function render_nojs_configurable() { |
|
| 224 | echo '<div class="clouds-sm"></div>'; |
|
| 225 | echo '<div class="wrap configure-module">'; |
|
| 226 | ||
| 227 | $module_name = preg_replace( '/[^\da-z\-]+/', '', $_GET['configure'] ); |
|
| 228 | if ( Jetpack::is_module( $module_name ) && current_user_can( 'jetpack_configure_modules' ) ) { |
|
| 229 | Jetpack::admin_screen_configure_module( $module_name ); |
|
| 230 | } else { |
|
| 231 | echo '<h2>' . esc_html__( 'Error, bad module.', 'jetpack' ) . '</h2>'; |
|
| 232 | } |
|
| 233 | ||
| 234 | echo '</div><!-- /wrap -->'; |
|
| 235 | } |
|
| 236 | ||
| 237 | /* |
|
| 238 | * Build an array of Jump Start stats urls. |
|
| @@ 59-72 (lines=14) @@ | ||
| 56 | // Render the configuration page for the module if it exists and an error |
|
| 57 | // screen if the module is not configurable |
|
| 58 | // @todo remove when real settings are in place |
|
| 59 | function render_nojs_configurable() { |
|
| 60 | include_once( JETPACK__PLUGIN_DIR . '_inc/header.php' ); |
|
| 61 | echo '<div class="clouds-sm"></div>'; |
|
| 62 | echo '<div class="wrap configure-module">'; |
|
| 63 | ||
| 64 | $module_name = preg_replace( '/[^\da-z\-]+/', '', $_GET['configure'] ); |
|
| 65 | if ( Jetpack::is_module( $module_name ) && current_user_can( 'jetpack_configure_modules' ) ) { |
|
| 66 | Jetpack::admin_screen_configure_module( $module_name ); |
|
| 67 | } else { |
|
| 68 | echo '<h2>' . esc_html__( 'Error, bad module.', 'jetpack' ) . '</h2>'; |
|
| 69 | } |
|
| 70 | ||
| 71 | echo '</div><!-- /wrap -->'; |
|
| 72 | } |
|
| 73 | ||
| 74 | function page_render() { |
|
| 75 | // Handle redirects to configuration pages |
|