Code Duplication    Length = 19-19 lines in 2 locations

classes/admin.php 2 locations

@@ 885-903 (lines=19) @@
882
					'link_class' => 'button button-secondary',
883
				),
884
			);
885
			foreach ( $schedule_settings as $key => $attributes ) {
886
				$id       = $this->option_prefix . $key;
887
				$name     = $this->option_prefix . $key;
888
				$title    = $attributes['title'];
889
				$callback = $attributes['callback'];
890
				$page     = $attributes['page'];
891
				$section  = $attributes['section'];
892
				$args     = array_merge(
893
					$attributes['args'],
894
					array(
895
						'title'     => $title,
896
						'id'        => $id,
897
						'label_for' => $id,
898
						'name'      => $name,
899
					)
900
				);
901
				add_settings_field( $id, $title, $callback, $page, $section, $args );
902
				register_setting( $page, $id );
903
			}
904
		} // End foreach().
905
	}
906
@@ 1070-1088 (lines=19) @@
1067
				),
1068
			),
1069
		);
1070
		foreach ( $log_settings as $key => $attributes ) {
1071
			$id       = $this->option_prefix . $key;
1072
			$name     = $this->option_prefix . $key;
1073
			$title    = $attributes['title'];
1074
			$callback = $attributes['callback'];
1075
			$page     = $attributes['page'];
1076
			$section  = $attributes['section'];
1077
			$args     = array_merge(
1078
				$attributes['args'],
1079
				array(
1080
					'title'     => $title,
1081
					'id'        => $id,
1082
					'label_for' => $id,
1083
					'name'      => $name,
1084
				)
1085
			);
1086
			add_settings_field( $id, $title, $callback, $page, $section, $args );
1087
			register_setting( $page, $id );
1088
		}
1089
	}
1090
1091
	/**