Elementor\Tools::register_settings_fields PHP Метод

register_settings_fields() публичный Метод

    public function register_settings_fields()
    {
        $controls_class_name = __NAMESPACE__ . '\\Settings_Controls';
        $tools_section = 'elementor_tools_section';
        add_settings_section($tools_section, '', '__return_empty_string', self::PAGE_ID);
        $field_id = 'elementor_clear_cache';
        add_settings_field($field_id, __('Regenerate CSS', 'elementor'), [$controls_class_name, 'render'], self::PAGE_ID, $tools_section, ['id' => $field_id, 'type' => 'raw_html', 'html' => sprintf('<button data-nonce="%s" class="button elementor-button-spinner" id="elementor-clear-cache-button">%s</button>', wp_create_nonce('elementor_clear_cache'), __('Regenerate Files', 'elementor')), 'desc' => __('Styles set in Elementor are saved in CSS files in the uploads folder. Recreate those files, according to the most recent settings.', 'elementor')]);
        $field_id = 'elementor_raw_reset_api_data';
        add_settings_field($field_id, __('Sync Library', 'elementor'), [$controls_class_name, 'render'], self::PAGE_ID, $tools_section, ['id' => $field_id, 'type' => 'raw_html', 'html' => sprintf('<button data-nonce="%s" class="button elementor-button-spinner" id="elementor-library-sync-button">%s</button>', wp_create_nonce('elementor_reset_library'), __('Sync Library', 'elementor')), 'desc' => __('Elementor Library automatically updates on a daily basis. You can also manually update it by clicking on the sync button.', 'elementor')]);
    }