Code Duplication    Length = 19-19 lines in 2 locations

includes/admin/give-metabox-functions.php 2 locations

@@ 1087-1105 (lines=19) @@
1084
 * @since  1.8
1085
 * @return string
1086
 */
1087
function give_get_current_setting_tab() {
1088
	// Get current setting page.
1089
	$current_setting_page = give_get_current_setting_page();
1090
1091
	/**
1092
	 * Filter the default tab for current setting page.
1093
	 *
1094
	 * @since 1.8
1095
	 *
1096
	 * @param string
1097
	 */
1098
	$default_current_tab = apply_filters( "give_default_setting_tab_{$current_setting_page}", 'general' );
1099
1100
	// Get current tab.
1101
	$current_tab = empty( $_GET['tab'] ) ? $default_current_tab : urldecode( $_GET['tab'] );
1102
1103
	// Output.
1104
	return $current_tab;
1105
}
1106
1107
1108
/**
@@ 1114-1132 (lines=19) @@
1111
 * @since  1.8
1112
 * @return string
1113
 */
1114
function give_get_current_setting_section() {
1115
	// Get current tab.
1116
	$current_tab = give_get_current_setting_tab();
1117
1118
	/**
1119
	 * Filter the default section for current setting page tab.
1120
	 *
1121
	 * @since 1.8
1122
	 *
1123
	 * @param string
1124
	 */
1125
	$default_current_section = apply_filters( "give_default_setting_tab_section_{$current_tab}", '' );
1126
1127
	// Get current section.
1128
	$current_section = empty( $_REQUEST['section'] ) ? $default_current_section : urldecode( $_REQUEST['section'] );
1129
1130
	// Output.
1131
	return $current_section;
1132
}
1133
1134
/**
1135
 * Get current setting page.