Code Duplication    Length = 3-13 lines in 3 locations

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

@@ 48-60 (lines=13) @@
45
	}
46
47
	function admin_head() {
48
		if ( isset( $_GET['configure'] ) && Jetpack::is_module( $_GET['configure'] ) && current_user_can( 'manage_options' ) ) {
49
			/**
50
			 * Fires in the <head> of a particular Jetpack configuation page.
51
			 *
52
			 * The dynamic portion of the hook name, `$_GET['configure']`,
53
			 * refers to the slug of module, such as 'stats', 'sso', etc.
54
			 * A complete hook for the latter would be
55
			 * 'jetpack_module_configuation_head_sso'.
56
			 *
57
			 * @since 3.0.0
58
			 */
59
			do_action( 'jetpack_module_configuration_head_' . $_GET['configure'] );
60
		}
61
	}
62
63
	// Render the page with a common top and bottom part, and page specific

class.jetpack.php 2 locations

@@ 3368-3370 (lines=3) @@
3365
	}
3366
3367
	function admin_head() {
3368
		if ( isset( $_GET['configure'] ) && Jetpack::is_module( $_GET['configure'] ) && current_user_can( 'manage_options' ) )
3369
			/** This action is documented in class.jetpack-admin-page.php */
3370
			do_action( 'jetpack_module_configuration_head_' . $_GET['configure'] );
3371
	}
3372
3373
	function admin_banner_styles() {
@@ 3797-3805 (lines=9) @@
3794
			add_action( 'jetpack_notices', array( $this, 'admin_notices' ) );
3795
		}
3796
3797
		if ( isset( $_GET['configure'] ) && Jetpack::is_module( $_GET['configure'] ) && current_user_can( 'manage_options' ) ) {
3798
			/**
3799
			 * Fires when a module configuration page is loaded.
3800
			 * The dynamic part of the hook is the configure parameter from the URL.
3801
			 *
3802
			 * @since 1.1.0
3803
			 */
3804
			do_action( 'jetpack_module_configuration_load_' . $_GET['configure'] );
3805
		}
3806
3807
		add_filter( 'jetpack_short_module_description', 'wptexturize' );
3808
	}