Code Duplication    Length = 19-19 lines in 2 locations

classes/admin.php 2 locations

@@ 909-927 (lines=19) @@
906
					'link_class' => 'button button-secondary',
907
				),
908
			);
909
			foreach ( $schedule_settings as $key => $attributes ) {
910
				$id       = $this->option_prefix . $key;
911
				$name     = $this->option_prefix . $key;
912
				$title    = $attributes['title'];
913
				$callback = $attributes['callback'];
914
				$page     = $attributes['page'];
915
				$section  = $attributes['section'];
916
				$args     = array_merge(
917
					$attributes['args'],
918
					array(
919
						'title'     => $title,
920
						'id'        => $id,
921
						'label_for' => $id,
922
						'name'      => $name,
923
					)
924
				);
925
				add_settings_field( $id, $title, $callback, $page, $section, $args );
926
				register_setting( $page, $id );
927
			}
928
		} // End foreach().
929
	}
930
@@ 1094-1112 (lines=19) @@
1091
				),
1092
			),
1093
		);
1094
		foreach ( $log_settings as $key => $attributes ) {
1095
			$id       = $this->option_prefix . $key;
1096
			$name     = $this->option_prefix . $key;
1097
			$title    = $attributes['title'];
1098
			$callback = $attributes['callback'];
1099
			$page     = $attributes['page'];
1100
			$section  = $attributes['section'];
1101
			$args     = array_merge(
1102
				$attributes['args'],
1103
				array(
1104
					'title'     => $title,
1105
					'id'        => $id,
1106
					'label_for' => $id,
1107
					'name'      => $name,
1108
				)
1109
			);
1110
			add_settings_field( $id, $title, $callback, $page, $section, $args );
1111
			register_setting( $page, $id );
1112
		}
1113
	}
1114
1115
	/**