WordPress.org

Make WordPress Core

Ticket #33551: 33551.diff

File 33551.diff, 1.5 KB (added by obenland, 5 years ago)
  • src/wp-admin/includes/template.php

     
    13131313        if ( ! isset( $wp_settings_sections[$page] ) )
    13141314                return;
    13151315
     1316        /**
     1317         * Filters settings sections before they are displayed.
     1318         *
     1319         * @since 4.4.0
     1320         *
     1321         * @param array  $sections Array of all settings sections added to the specified page.
     1322         * @param string $page     Slug of the page where the sections are displayed.
     1323         */
     1324        $wp_settings_sections[ $page ] = apply_filters( 'settings_sections', $wp_settings_sections[ $page ], $page );
     1325
    13161326        foreach ( (array) $wp_settings_sections[$page] as $section ) {
    13171327                if ( $section['title'] )
    13181328                        echo "<h3>{$section['title']}</h3>\n";
     
    13481358        if ( ! isset( $wp_settings_fields[$page][$section] ) )
    13491359                return;
    13501360
     1361        /**
     1362         * Filters settings fields before they are displayed.
     1363         *
     1364         * @since 4.4.0
     1365         *
     1366         * @param array  $fields  Array of all settings fields added to the specified section.
     1367         * @param string $page    Slug of the page where the fields are displayed.
     1368         * @param string $section Slug of the section in which the fields are displayed.
     1369         */
     1370        $wp_settings_fields[ $page ][ $section ] = apply_filters( 'settings_fields', $wp_settings_fields[ $page ][ $section ], $page, $section );
     1371
    13511372        foreach ( (array) $wp_settings_fields[$page][$section] as $field ) {
    13521373                $class = '';
    13531374