jetpack
/
jetpack_vendor
/
automattic
/
jetpack-sharing-likes
/
src
/
settings
/
class-extras-section.php
class-extras-section.php in Jetpack – WP Security, Backup, Speed, & Growth 16.3-beta, at jetpack_vendor/automattic/jetpack-sharing-likes/src/settings/class-extras-section.php
| 1 | <?php |
| 2 | /** |
| 3 | * The section of Settings > Sharing that hosts other features' settings. |
| 4 | * |
| 5 | * @package automattic/jetpack-sharing-likes |
| 6 | */ |
| 7 | |
| 8 | declare( strict_types = 1 ); |
| 9 | |
| 10 | namespace Automattic\Jetpack\Sharing_Likes\Settings; |
| 11 | |
| 12 | /** |
| 13 | * Hosts the rows that close the services table whenever that table is hidden. |
| 14 | * |
| 15 | * Some of them, like the Twitter Site Tag, do not depend on the Sharing module. |
| 16 | */ |
| 17 | final class Extras_Section { |
| 18 | |
| 19 | /** |
| 20 | * Render the section, if anything wants to be on it. |
| 21 | */ |
| 22 | public static function render(): void { |
| 23 | $fields = Services_Config::global_options(); |
| 24 | if ( '' === $fields ) { |
| 25 | return; |
| 26 | } |
| 27 | |
| 28 | ?> |
| 29 | <div class="jetpack-sharing-settings__section"> |
| 30 | <h2><?php esc_html_e( 'Other settings', 'jetpack-sharing-likes' ); ?></h2> |
| 31 | <?php |
| 32 | Settings_Form::render_fields( |
| 33 | Settings_Form::SECTION_EXTRAS, |
| 34 | '<table class="form-table"><tbody>' . $fields . '</tbody></table>' |
| 35 | ); |
| 36 | ?> |
| 37 | </div> |
| 38 | <?php |
| 39 | } |
| 40 | } |
| 41 |