SBR_Advanced_Tab.php
1 month ago
SBR_Feeds_Tab.php
1 month ago
SBR_General_Tab.php
1 month ago
SBR_Translation_Tab.php
1 month ago
SBR_General_Tab.php
109 lines
| 1 | <?php |
| 2 | |
| 3 | /** |
| 4 | * Class General Settings Tab |
| 5 | * |
| 6 | * @since 1.0 |
| 7 | */ |
| 8 | |
| 9 | namespace SmashBalloon\Reviews\Common\Settings\Tabs; |
| 10 | |
| 11 | use Smashballoon\Customizer\V2\SB_SettingsPage_Tab; |
| 12 | |
| 13 | if (!defined('ABSPATH')) { |
| 14 | exit; // Exit if accessed directly |
| 15 | } |
| 16 | |
| 17 | class SBR_General_Tab extends SB_SettingsPage_Tab { |
| 18 | /** |
| 19 | * Get the Settings Tab info |
| 20 | * |
| 21 | * @since 1.0 |
| 22 | * |
| 23 | * @return array |
| 24 | */ |
| 25 | protected function tab_info() |
| 26 | { |
| 27 | return [ |
| 28 | 'id' => 'sb-general-tab', |
| 29 | 'name' => __('General', 'reviews-feed') |
| 30 | ]; |
| 31 | } |
| 32 | |
| 33 | /** |
| 34 | * Get the Settings Tab Section |
| 35 | * |
| 36 | * @since 1.0 |
| 37 | * |
| 38 | * @return array |
| 39 | */ |
| 40 | protected function tab_sections() |
| 41 | { |
| 42 | return [ |
| 43 | 'licensekey_section' => [ |
| 44 | 'type' => 'licensekey', |
| 45 | 'heading' => __('License Key', 'reviews-feed'), |
| 46 | 'isProSetting' => true, |
| 47 | 'description' => __('Your license key provides access to updates and support', 'reviews-feed'), |
| 48 | 'separator' => true |
| 49 | ], |
| 50 | |
| 51 | 'licensekeyfree_section' => [ |
| 52 | 'type' => 'licensekeyfree', |
| 53 | 'heading' => __('License Key', 'reviews-feed'), |
| 54 | 'isFreeSetting' => true, |
| 55 | 'description' => __('Your license key provides access to updates and support', 'reviews-feed'), |
| 56 | 'separator' => true |
| 57 | ], |
| 58 | |
| 59 | 'sources_section' => [ |
| 60 | 'heading' => __('Manage Sources', 'reviews-feed'), |
| 61 | 'inputDescription' => __('Add or remove connected accounts', 'reviews-feed'), |
| 62 | 'type' => 'sources', |
| 63 | ], |
| 64 | 'apikeys_section' => [ |
| 65 | 'heading' => __('Manage API Keys', 'reviews-feed'), |
| 66 | 'type' => 'apikeys', |
| 67 | 'inputDescription' => __('Update or modify an API key', 'reviews-feed'), |
| 68 | 'separator' => true |
| 69 | ], |
| 70 | |
| 71 | 'preservesettings_section' => [ |
| 72 | 'id' => 'preserve_settings', |
| 73 | 'type' => 'switcher', |
| 74 | 'heading' => __('Preserve settings if plugin is removed', 'reviews-feed'), |
| 75 | 'info' => __('This will make sure that all of your feeds and settings are still saved even if the plugin is uninstalled', 'reviews-feed'), |
| 76 | 'options' => [ |
| 77 | 'enabled' => true, |
| 78 | 'disabled' => false |
| 79 | ], |
| 80 | 'separator' => true |
| 81 | ], |
| 82 | |
| 83 | 'importfeed_section' => [ |
| 84 | 'heading' => __('Import Feed Settings', 'reviews-feed'), |
| 85 | 'type' => 'importfeed', |
| 86 | 'info' => __('You will need a JSON file previously exported from the Reviews Feed Plugin', 'reviews-feed') |
| 87 | ], |
| 88 | 'exportfeed_section' => [ |
| 89 | 'heading' => __('Export Feed Settings', 'reviews-feed'), |
| 90 | 'type' => 'exportfeed', |
| 91 | 'info' => __('Export settings for one or more of your feeds', 'reviews-feed'), |
| 92 | 'separator' => true |
| 93 | ], |
| 94 | |
| 95 | 'importcollection_section' => [ |
| 96 | 'heading' => __('Import Collection', 'reviews-feed'), |
| 97 | 'type' => 'importcollection', |
| 98 | 'info' => __('You will need a JSON file previously exported from the collections Reviews Feed Plugin', 'reviews-feed') |
| 99 | ], |
| 100 | 'exportcollection_section' => [ |
| 101 | 'heading' => __('Export Collection', 'reviews-feed'), |
| 102 | 'type' => 'exportcollection', |
| 103 | 'info' => __('Export collection reviews', 'reviews-feed'), |
| 104 | 'separator' => true |
| 105 | ], |
| 106 | ]; |
| 107 | } |
| 108 | } |
| 109 |