| 1 |
<?php |
| 2 |
/** |
| 3 |
* General |
| 4 |
* |
| 5 |
* Registers the "General" section of the theme's Redux options panel. Holds |
| 6 |
* site-wide layout preferences: the overall container width and the "back to |
| 7 |
* top" button toggle. Loaded from framework/options/main.php. |
| 8 |
* |
| 9 |
* @package wpstream-theme |
| 10 |
*/ |
| 11 |
|
| 12 |
|
| 13 |
// Exit if accessed directly. |
| 14 |
if ( ! defined( 'ABSPATH' ) ) { |
| 15 |
exit; |
| 16 |
} |
| 17 |
|
| 18 |
// The shared Redux option-set name (defined in theme-options.php). |
| 19 |
global $wpstream_opt_name; |
| 20 |
// Register this section against the theme's Redux option set. |
| 21 |
Redux::setSection( |
| 22 |
$wpstream_opt_name, |
| 23 |
array( |
| 24 |
'title' => esc_html__( 'General', 'hello-wpstream' ), // Panel section title. |
| 25 |
'id' => 'general-options', // Unique section identifier. |
| 26 |
'desc' => '', // Optional section description (unused). |
| 27 |
'icon' => 'el-icon-dashboard el-icon-small', // Elusive icon shown in the panel nav. |
| 28 |
'fields' => array( |
| 29 |
|
| 30 |
// Field: pick the max site container width from a preset button set. |
| 31 |
array( |
| 32 |
'id' => 'wpstream_site_width', |
| 33 |
'type' => 'button_set', |
| 34 |
'title' => esc_html__( 'Site Container Width', 'hello-wpstream' ), |
| 35 |
'subtitle' => esc_html__( 'Select website container width.', 'hello-wpstream' ), |
| 36 |
'options' => array( |
| 37 |
'1210px' => '1170px', |
| 38 |
'1310px' => '1270px', |
| 39 |
'1410px' => '1370px', |
| 40 |
'1480px' => '1440px', |
| 41 |
), |
| 42 |
'default' => '1210px', |
| 43 |
), |
| 44 |
// Field: on/off switch controlling the "back to top" scroll button. |
| 45 |
array( |
| 46 |
'id' => 'backtotop', |
| 47 |
'type' => 'switch', |
| 48 |
'title' => esc_html__( 'Back to Top', 'hello-wpstream' ), |
| 49 |
'desc' => '', |
| 50 |
'subtitle' => esc_html__( 'Show back to top button', 'hello-wpstream' ), |
| 51 |
'default' => 1, |
| 52 |
'on' => esc_html__( 'Yes', 'hello-wpstream' ), |
| 53 |
'off' => esc_html__( 'No', 'hello-wpstream' ), |
| 54 |
), |
| 55 |
|
| 56 |
|
| 57 |
), |
| 58 |
) |
| 59 |
); |
| 60 |
|