@@ 1391-1409 (lines=19) @@ | ||
1388 | * @since 1.8 |
|
1389 | * @return string |
|
1390 | */ |
|
1391 | function give_get_current_setting_tab() { |
|
1392 | // Get current setting page. |
|
1393 | $current_setting_page = give_get_current_setting_page(); |
|
1394 | ||
1395 | /** |
|
1396 | * Filter the default tab for current setting page. |
|
1397 | * |
|
1398 | * @since 1.8 |
|
1399 | * |
|
1400 | * @param string |
|
1401 | */ |
|
1402 | $default_current_tab = apply_filters( "give_default_setting_tab_{$current_setting_page}", 'general' ); |
|
1403 | ||
1404 | // Get current tab. |
|
1405 | $current_tab = empty( $_GET['tab'] ) ? $default_current_tab : urldecode( $_GET['tab'] ); |
|
1406 | ||
1407 | // Output. |
|
1408 | return $current_tab; |
|
1409 | } |
|
1410 | ||
1411 | ||
1412 | /** |
|
@@ 1418-1436 (lines=19) @@ | ||
1415 | * @since 1.8 |
|
1416 | * @return string |
|
1417 | */ |
|
1418 | function give_get_current_setting_section() { |
|
1419 | // Get current tab. |
|
1420 | $current_tab = give_get_current_setting_tab(); |
|
1421 | ||
1422 | /** |
|
1423 | * Filter the default section for current setting page tab. |
|
1424 | * |
|
1425 | * @since 1.8 |
|
1426 | * |
|
1427 | * @param string |
|
1428 | */ |
|
1429 | $default_current_section = apply_filters( "give_default_setting_tab_section_{$current_tab}", '' ); |
|
1430 | ||
1431 | // Get current section. |
|
1432 | $current_section = empty( $_REQUEST['section'] ) ? $default_current_section : urldecode( $_REQUEST['section'] ); |
|
1433 | ||
1434 | // Output. |
|
1435 | return $current_section; |
|
1436 | } |
|
1437 | ||
1438 | /** |
|
1439 | * Get current setting page. |