Code Duplication    Length = 7-7 lines in 2 locations

modules/shortcodes/slideshow.php 1 location

@@ 76-82 (lines=7) @@
73
		return $types;
74
	}
75
76
	function register_settings() {
77
		add_settings_section( 'slideshow_section', __( 'Image Gallery Slideshow', 'jetpack' ), '__return_empty_string', 'media' );
78
79
		add_settings_field( 'jetpack_slideshow_background_color', __( 'Background color', 'jetpack' ), array( $this, 'slideshow_background_color_callback' ), 'media', 'slideshow_section' );
80
81
		register_setting( 'media', 'jetpack_slideshow_background_color', array( $this, 'slideshow_background_color_sanitize' ) );
82
	}
83
84
	function slideshow_background_color_callback() {
85
		$options = array(

modules/likes.php 1 location

@@ 290-296 (lines=7) @@
287
	  * Options to be added to the discussion page (see also admin_settings_init, etc below for Sharing settings page)
288
	  */
289
290
	function admin_discussion_likes_settings_init() {
291
		// Add a temporary section, until we can move the setting out of there and with the rest of the email notification settings
292
		add_settings_section( 'likes-notifications', __( 'Likes Notifications', 'jetpack' ), array( $this, 'admin_discussion_likes_settings_section' ), 'discussion' );
293
		add_settings_field( 'social-notifications', __( 'Email me whenever', 'jetpack' ), array( $this, 'admin_discussion_likes_settings_field' ), 'discussion', 'likes-notifications' );
294
		// Register the setting
295
		register_setting( 'discussion', 'social_notifications_like', array( $this, 'admin_discussion_likes_settings_validate' ) );
296
	}
297
298
	function admin_discussion_likes_settings_section() {
299
		// Atypical usage here.  We emit jquery to move likes notification checkbox to be with the rest of the email notification settings