diff --git src/wp-admin/includes/template.php src/wp-admin/includes/template.php
index 0771b7129e..4277ed4e2f 100644
|
|
|
function add_settings_field( $id, $title, $callback, $page, $section = 'default'
|
| 1734 | 1734 | ); |
| 1735 | 1735 | } |
| 1736 | 1736 | |
| | 1737 | /** |
| | 1738 | * Removes field from a section of a settings page. |
| | 1739 | * |
| | 1740 | * Part of the Settings API. Use this to remove a previously |
| | 1741 | * declared settings field. |
| | 1742 | * |
| | 1743 | * |
| | 1744 | * @since 6.3 |
| | 1745 | * |
| | 1746 | * @global array $wp_settings_fields Storage array of settings fields and info about their pages/sections. |
| | 1747 | * |
| | 1748 | * @param string $id Slug-name to identify the field. |
| | 1749 | * @param string $page The slug-name of the settings page on which to show the section |
| | 1750 | * (general, reading, writing, ...). |
| | 1751 | * @param string $section Optional. The slug-name of the section of the settings page |
| | 1752 | * with which the field is associated. Default 'default'. |
| | 1753 | */ |
| | 1754 | function remove_settings_field( $id, $page, $section = 'default' ) { |
| | 1755 | global $wp_settings_fields; |
| | 1756 | |
| | 1757 | if ( isset( $wp_settings_fields[ $page ][ $section ][ $id ] ) ) { |
| | 1758 | unset( $wp_settings_fields[ $page ][ $section ][ $id ] ); |
| | 1759 | } |
| | 1760 | } |
| | 1761 | |
| 1737 | 1762 | /** |
| 1738 | 1763 | * Prints out all settings sections added to a particular settings page. |
| 1739 | 1764 | * |