| 1 |
<?php |
| 2 |
/** |
| 3 |
* The main class for Settings configurations. |
| 4 |
* |
| 5 |
* @package Smart_Post_Show |
| 6 |
* @subpackage Smart_Post_Show/admin/views |
| 7 |
*/ |
| 8 |
|
| 9 |
if ( ! defined( 'ABSPATH' ) ) { |
| 10 |
exit; // Exit if accessed directly. |
| 11 |
} |
| 12 |
|
| 13 |
/** |
| 14 |
* Settings. |
| 15 |
*/ |
| 16 |
class SPS_ReplaceLayout { |
| 17 |
/** |
| 18 |
* Create a Replace_Layout page. |
| 19 |
* |
| 20 |
* @param string $prefix The settings. |
| 21 |
* @return void |
| 22 |
*/ |
| 23 |
public static function Replace_Layout( $prefix ) { |
| 24 |
SP_PC::createOptions( |
| 25 |
$prefix, |
| 26 |
array( |
| 27 |
'menu_title' => __( 'Replace Layout', 'post-carousel' ), |
| 28 |
'menu_parent' => 'edit.php?post_type=sp_post_carousel', |
| 29 |
'menu_type' => 'submenu', // menu, submenu, options, theme, etc. |
| 30 |
'menu_slug' => 'pcp_replace_layout', |
| 31 |
'theme' => 'light', |
| 32 |
'show_all_options' => false, |
| 33 |
'show_search' => false, |
| 34 |
'show_footer' => false, |
| 35 |
'show_bar_menu' => false, |
| 36 |
'show_reset_all' => false, |
| 37 |
'class' => 'sp-pc-settings pcp_replace_layout', |
| 38 |
'framework_title' => __( 'Replace Layout', 'post-carousel' ), |
| 39 |
) |
| 40 |
); |
| 41 |
|
| 42 |
SP_PC::createSection( |
| 43 |
$prefix, |
| 44 |
array( |
| 45 |
'title' => __( 'Standard Archives', 'post-carousel' ), |
| 46 |
'fields' => array( |
| 47 |
array( |
| 48 |
'id' => 'home', |
| 49 |
'type' => 'switcher', |
| 50 |
'title' => __( 'Posts Page (Default Blog)', 'post-carousel' ), |
| 51 |
'text_on' => __( 'Enabled', 'post-carousel' ), |
| 52 |
'text_off' => __( 'Disabled', 'post-carousel' ), |
| 53 |
'text_width' => 100, |
| 54 |
'default' => true, |
| 55 |
), |
| 56 |
array( |
| 57 |
'id' => 'sps_home', |
| 58 |
'type' => 'fieldset', |
| 59 |
'class' => 'spsp_no_border', |
| 60 |
'dependency' => array( 'home', '==', 'true', true ), |
| 61 |
'fields' => array( |
| 62 |
array( |
| 63 |
'id' => 'pcp_which_show', |
| 64 |
'class' => 'pcp_post_ids', |
| 65 |
'type' => 'select', |
| 66 |
'title' => __( 'The Layout To Show Posts', 'post-carousel' ), |
| 67 |
'options' => array( |
| 68 |
'sp_post_carousel' => __( 'Choose show(s)', 'post-carousel' ), |
| 69 |
), |
| 70 |
'chosen' => true, |
| 71 |
'sortable' => false, |
| 72 |
'multiple' => false, |
| 73 |
'placeholder' => __( 'Choose show(s)', 'post-carousel' ), |
| 74 |
), |
| 75 |
array( |
| 76 |
'id' => 'replace_way', |
| 77 |
'class' => 'pcp_post_ids', |
| 78 |
'type' => 'radio', |
| 79 |
'title' => __( 'The Way To Retrieve Posts', 'post-carousel' ), |
| 80 |
'default' => 'no_change', |
| 81 |
'options' => array( |
| 82 |
'no_change' => 'No change', |
| 83 |
'change_sort' => 'Change order only (use "Sort by" setting of the show)', |
| 84 |
'change_full' => 'Change completely (use all "Filter Content" of the show)', |
| 85 |
), |
| 86 |
), |
| 87 |
), |
| 88 |
), |
| 89 |
array( |
| 90 |
'id' => 'search', |
| 91 |
'title' => __( 'Search', 'post-carousel' ), |
| 92 |
'text_on' => __( 'Enabled', 'post-carousel' ), |
| 93 |
'text_off' => __( 'Disabled', 'post-carousel' ), |
| 94 |
'type' => 'switcher', |
| 95 |
'text_width' => 100, |
| 96 |
'default' => false, |
| 97 |
), |
| 98 |
array( |
| 99 |
'id' => 'sps_search', |
| 100 |
'type' => 'fieldset', |
| 101 |
'class' => 'spsp_no_border', |
| 102 |
'dependency' => array( 'search', '==', 'true', true ), |
| 103 |
'fields' => array( |
| 104 |
array( |
| 105 |
'id' => 'pcp_which_show', |
| 106 |
'class' => 'pcp_post_ids', |
| 107 |
'type' => 'select', |
| 108 |
'title' => __( 'The Layout To Show Posts', 'post-carousel' ), |
| 109 |
'options' => 'sp_post_carousel', |
| 110 |
'chosen' => true, |
| 111 |
'sortable' => false, |
| 112 |
'multiple' => false, |
| 113 |
'placeholder' => __( 'Choose show(s)', 'post-carousel' ), |
| 114 |
'query_args' => array( |
| 115 |
'posts_per_page' => -1, |
| 116 |
), |
| 117 |
), |
| 118 |
array( |
| 119 |
'id' => 'replace_way', |
| 120 |
'class' => 'pcp_post_ids', |
| 121 |
'type' => 'radio', |
| 122 |
'title' => __( 'The Way To Retrieve Posts', 'post-carousel' ), |
| 123 |
'default' => 'no_change', |
| 124 |
'options' => array( |
| 125 |
'no_change' => 'No change', |
| 126 |
'change_sort' => 'Change order only (use "Sort by" setting of the show)', |
| 127 |
'change_full' => 'Change completely (use all "Filter Content" of the show)', |
| 128 |
), |
| 129 |
), |
| 130 |
), |
| 131 |
), |
| 132 |
array( |
| 133 |
'id' => 'author', |
| 134 |
'title' => __( 'Author Page', 'post-carousel' ), |
| 135 |
'text_on' => __( 'Enabled', 'post-carousel' ), |
| 136 |
'text_off' => __( 'Disabled', 'post-carousel' ), |
| 137 |
'type' => 'switcher', |
| 138 |
'text_width' => 100, |
| 139 |
'default' => false, |
| 140 |
), |
| 141 |
array( |
| 142 |
'id' => 'sps_author', |
| 143 |
'type' => 'fieldset', |
| 144 |
'class' => 'spsp_no_border', |
| 145 |
'dependency' => array( 'author', '==', 'true', true ), |
| 146 |
'fields' => array( |
| 147 |
array( |
| 148 |
'id' => 'pcp_which_show', |
| 149 |
'class' => 'pcp_post_ids', |
| 150 |
'type' => 'select', |
| 151 |
'title' => __( 'The Layout To Show Posts', 'post-carousel' ), |
| 152 |
'options' => 'sp_post_carousel', |
| 153 |
'chosen' => true, |
| 154 |
'sortable' => false, |
| 155 |
'multiple' => false, |
| 156 |
'placeholder' => __( 'Choose show(s)', 'post-carousel' ), |
| 157 |
'query_args' => array( |
| 158 |
'posts_per_page' => -1, |
| 159 |
), |
| 160 |
), |
| 161 |
array( |
| 162 |
'id' => 'replace_way', |
| 163 |
'class' => 'pcp_post_ids', |
| 164 |
'type' => 'radio', |
| 165 |
'title' => __( 'The Way To Retrieve Posts', 'post-carousel' ), |
| 166 |
'default' => 'no_change', |
| 167 |
'options' => array( |
| 168 |
'no_change' => 'No change', |
| 169 |
'change_sort' => 'Change order only (use "Sort by" setting of the show)', |
| 170 |
'change_full' => 'Change completely (use all "Filter Content" of the show)', |
| 171 |
), |
| 172 |
), |
| 173 |
), |
| 174 |
), |
| 175 |
array( |
| 176 |
'id' => 'time', |
| 177 |
'text_on' => __( 'Enabled', 'post-carousel' ), |
| 178 |
'text_off' => __( 'Disabled', 'post-carousel' ), |
| 179 |
'type' => 'switcher', |
| 180 |
'text_width' => 100, |
| 181 |
'default' => false, |
| 182 |
'title' => __( 'Date, Month, Year', 'post-carousel' ), |
| 183 |
), |
| 184 |
array( |
| 185 |
'id' => 'sps_time', |
| 186 |
'type' => 'fieldset', |
| 187 |
'class' => 'spsp_no_border', |
| 188 |
'dependency' => array( 'time', '==', 'true', true ), |
| 189 |
'fields' => array( |
| 190 |
array( |
| 191 |
'id' => 'pcp_which_show', |
| 192 |
'class' => 'pcp_post_ids', |
| 193 |
'type' => 'select', |
| 194 |
'title' => __( 'The Layout To Show Posts', 'post-carousel' ), |
| 195 |
'options' => 'sp_post_carousel', |
| 196 |
'chosen' => true, |
| 197 |
'sortable' => false, |
| 198 |
'multiple' => false, |
| 199 |
'placeholder' => __( 'Choose show(s)', 'post-carousel' ), |
| 200 |
'query_args' => array( |
| 201 |
'posts_per_page' => -1, |
| 202 |
), |
| 203 |
), |
| 204 |
array( |
| 205 |
'id' => 'replace_way', |
| 206 |
'class' => 'pcp_post_ids', |
| 207 |
'type' => 'radio', |
| 208 |
'title' => __( 'The Way To Retrieve Posts', 'post-carousel' ), |
| 209 |
'default' => 'no_change', |
| 210 |
'options' => array( |
| 211 |
'no_change' => 'No change', |
| 212 |
'change_sort' => 'Change order only (use "Sort by" setting of the show)', |
| 213 |
'change_full' => 'Change completely (use all "Filter Content" of the show)', |
| 214 |
), |
| 215 |
), |
| 216 |
), |
| 217 |
), |
| 218 |
), |
| 219 |
) |
| 220 |
); |
| 221 |
|
| 222 |
SP_PC::createSection( |
| 223 |
$prefix, |
| 224 |
array( |
| 225 |
'title' => __( 'Taxonomy Archives', 'post-carousel' ), |
| 226 |
'fields' => array(), |
| 227 |
) |
| 228 |
); |
| 229 |
SP_PC::createSection( |
| 230 |
$prefix, |
| 231 |
array( |
| 232 |
'title' => __( 'Post Type Archives', 'post-carousel' ), |
| 233 |
'fields' => array(), |
| 234 |
) |
| 235 |
); |
| 236 |
} |
| 237 |
} |
| 238 |
|