Code Duplication    Length = 13-14 lines in 2 locations

_inc/lib/admin-pages/class.jetpack-landing-page.php 1 location

@@ 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.

_inc/lib/admin-pages/class.jetpack-react-page.php 1 location

@@ 99-112 (lines=14) @@
96
	// Render the configuration page for the module if it exists and an error
97
	// screen if the module is not configurable
98
	// @todo remove when real settings are in place
99
	function render_nojs_configurable( $module_name ) {
100
		$module_name = preg_replace( '/[^\da-z\-]+/', '', $_GET['configure'] );
101
102
		include_once( JETPACK__PLUGIN_DIR . '_inc/header.php' );
103
		echo '<div class="clouds-sm"></div>';
104
		echo '<div class="wrap configure-module">';
105
106
		if ( Jetpack::is_module( $module_name ) && current_user_can( 'jetpack_configure_modules' ) ) {
107
			Jetpack::admin_screen_configure_module( $module_name );
108
		} else {
109
			echo '<h2>' . esc_html__( 'Error, bad module.', 'jetpack' ) . '</h2>';
110
		}
111
112
		echo '</div><!-- /wrap -->';
113
	}
114
115
	function page_render() {