carousel.php
3 years ago
general.php
2 weeks ago
get-shortcodes.php
3 years ago
grid.php
3 years ago
sortable.php
3 years ago
style.php
3 years ago
general.php
314 lines
| 1 | <?php |
| 2 | $post_type = ! empty( $post_type ) ? $post_type : 'post'; |
| 3 | $term_from = ! empty( $term_from ) ? $term_from : 'category'; |
| 4 | $display_term = ! empty( $display_term ) ? $display_term : 'yes'; |
| 5 | $display_header_title = ! empty( $display_header_title ) ? $display_header_title : 'no'; |
| 6 | $display_title = ! empty( $display_title ) ? $display_title : 'yes'; |
| 7 | $display_content = ! empty( $display_content ) ? $display_content : 'yes'; |
| 8 | $display_read_more = ! empty( $display_read_more ) ? $display_read_more : 'yes'; |
| 9 | $read_more_type = ! empty( $read_more_type ) ? $read_more_type : 'link'; |
| 10 | $display_author = ! empty( $display_author ) ? $display_author : 'yes'; |
| 11 | $display_date = ! empty( $display_date ) ? $display_date : 'yes'; |
| 12 | $post_from = ! empty( $post_from ) ? $post_from : 'latest'; |
| 13 | ?> |
| 14 | <!-- General settings --> |
| 15 | <div id="tab-2" class="adl-tab-content" style="display: none;"> |
| 16 | <div class="cmb2-wrap form-table"> |
| 17 | |
| 18 | <table class='cmb2-metabox'> |
| 19 | <tr> |
| 20 | <th><label for="gc[post_type]"><?php esc_html_e('Post type', PGCU_TEXTDOMAIN); ?></label></th> |
| 21 | <td> |
| 22 | <select id="pgcu_post_type" name="gc[post_type]"> |
| 23 | <?php |
| 24 | $custom_posts = get_post_types(array( |
| 25 | 'public'=>true, |
| 26 | )); |
| 27 | $exclude = array( 'adl-shortcode','attachment', 'revision', 'nav_menu_item' ); |
| 28 | |
| 29 | foreach ( $exclude as $ex ) { |
| 30 | unset( $custom_posts[ $ex ] ); |
| 31 | } |
| 32 | |
| 33 | if( ! empty( $custom_posts ) ) { |
| 34 | foreach( $custom_posts as $value ){ |
| 35 | $done = get_object_taxonomies( (object) array( 'post_type' => 'names', 'hide_empty' => true ) ); |
| 36 | ?> |
| 37 | |
| 38 | <option value="<?php echo esc_attr( $value );?>" <?php if(!empty($post_type) && $post_type ==$value){ echo "selected";}?> ><?php echo $value;?></option> |
| 39 | <?php |
| 40 | } |
| 41 | } |
| 42 | ?> |
| 43 | </select> |
| 44 | |
| 45 | </td> |
| 46 | |
| 47 | </tr> |
| 48 | |
| 49 | <tr> |
| 50 | <th><label for="sel5"><?php esc_html_e('Layout', PGCU_TEXTDOMAIN); ?></label></th> |
| 51 | <td> |
| 52 | <select name="gc[layout]" id="sel5"> |
| 53 | <option value="carousel">Carousel</option> |
| 54 | <option value="grid" <?php if(!empty($layout) && $layout == "grid"){ echo "selected";}?>>Grid</option> |
| 55 | <option value="isotope" <?php if(!empty($layout) && $layout == "isotope"){ echo "selected";}?>>Sortable Grid</option> |
| 56 | <option disabled>Masonry (Pro)</option> |
| 57 | </select> |
| 58 | |
| 59 | </td> |
| 60 | </tr> |
| 61 | |
| 62 | <tr> |
| 63 | <th><label for="gc[theme]"><?php esc_html_e('Select Theme', PGCU_TEXTDOMAIN); ?></label></th> |
| 64 | <td> |
| 65 | <select id="gc[theme]" name="gc[theme]"> |
| 66 | <option value="theme-1">Theme-1</option> |
| 67 | <option value="theme-2" <?php if(!empty($theme) && $theme == "theme-2"){ echo "selected"; } ?>>Theme-2</option> |
| 68 | <option value="theme-3" <?php if(!empty($theme) && $theme == "theme-3"){ echo "selected"; } ?>>Theme-3</option> |
| 69 | <option value="theme-4" <?php if(!empty($theme) && $theme == "theme-4"){ echo "selected"; } ?>>Theme-4</option> |
| 70 | <option disabled>Theme-5(Pro)</option> |
| 71 | <option disabled>Theme-6(Pro)</option> |
| 72 | <option disabled>Theme-7(Pro)</option> |
| 73 | <option disabled>Theme-8(Pro)</option> |
| 74 | <option disabled>Theme-9(Pro)</option> |
| 75 | <option disabled>Theme-10(Pro)</option> |
| 76 | <option disabled>Theme-11(Pro)</option> |
| 77 | <option disabled>Theme-12(Pro)</option> |
| 78 | <option disabled>Theme-13(Pro)</option> |
| 79 | <option disabled>Theme-14(Pro)</option> |
| 80 | <option disabled>Theme-15(Pro)</option> |
| 81 | <option disabled>Theme-16(Pro)</option> |
| 82 | <option disabled>Theme-17(Pro)</option> |
| 83 | <option disabled>Theme-18(Pro)</option> |
| 84 | <option disabled>Theme-19(Pro)</option> |
| 85 | <option disabled>Theme-20(Pro)</option> |
| 86 | <option disabled>Theme-21(Pro)</option> |
| 87 | </select> |
| 88 | </td> |
| 89 | </tr> |
| 90 | |
| 91 | <tr> |
| 92 | <th><label for="gc[total_posts]"><?php esc_html_e('Total Posts', PGCU_TEXTDOMAIN); ?></label></th> |
| 93 | <td> |
| 94 | <input type='number' class="cmb2-text-medium" id="gc[total_posts]" name="gc[total_posts]" value="<?php echo esc_attr( ! empty( $total_posts ) ? $total_posts : '12' ); ?>"/> |
| 95 | |
| 96 | </td> |
| 97 | </tr> |
| 98 | |
| 99 | <tr> |
| 100 | <th><label for="gc[post_from]"><?php esc_html_e('Display Post From', PGCU_TEXTDOMAIN); ?></label> |
| 101 | </th> |
| 102 | <td> |
| 103 | <select id="gc[post_from]" name="gc[post_from]"> |
| 104 | <option value="latest" <?php checked( 'latest', $post_from, true ); ?>>Latest Posts</option> |
| 105 | <option value="older" <?php checked( 'older', $post_from, true ); ?>>Older Posts</option> |
| 106 | <option disabled>Feature Posts (Pro)</option> |
| 107 | <option disabled>Populer Posts (Pro)</option> |
| 108 | <option disabled>Random Posts (Pro)</option> |
| 109 | <option disabled>Posts by Category (Pro)</option> |
| 110 | <option disabled>Posts by Id (Pro)</option> |
| 111 | <option disabled>Posts by Tag (Pro)</option> |
| 112 | <option disabled>Posts by Year (Pro)</option> |
| 113 | <option disabled>Posts by Month (Pro)</option> |
| 114 | </select> |
| 115 | |
| 116 | </td> |
| 117 | </tr> |
| 118 | |
| 119 | <tr> |
| 120 | <th><label for="gc[display_header_title]"><?php esc_html_e('Display Header Title', PGCU_TEXTDOMAIN); ?></label></th> |
| 121 | <td> |
| 122 | <ul class="cmb2-radio-list cmb2-list cmb2-radio-switch"> |
| 123 | <li> |
| 124 | <input type="radio" class="cmb2-option cmb2-radio-switch1" name="gc[display_header_title]" id="gc[display_header_title1]" value="yes" <?php checked( 'yes', $display_header_title, true ); ?>> |
| 125 | <label for="gc[display_header_title1]"><?php esc_html_e('Yes', PGCU_TEXTDOMAIN); ?></label> |
| 126 | </li> |
| 127 | <li> |
| 128 | <input type="radio" class="cmb2-option cmb2-radio-switch2" name="gc[display_header_title]" id="gc[display_header_title2]" value="no" <?php checked( 'no', $display_header_title, true ); ?>> |
| 129 | <label for="gc[display_header_title2]"><?php esc_html_e('No', PGCU_TEXTDOMAIN); ?></label> |
| 130 | </li> |
| 131 | </ul> |
| 132 | </td> |
| 133 | </tr> |
| 134 | |
| 135 | <tr class='pgcu_header_title'> |
| 136 | <th><label for="gc[header_title]"><?php esc_html_e('Header Title', PGCU_TEXTDOMAIN); ?></label></th> |
| 137 | <td> |
| 138 | <input type='text' class="cmb2-text-medium" id="gc[header_title]" name="gc[header_title]" value="<?php echo esc_attr( ! empty( $header_title ) ? $header_title : '' ); ?>"/> |
| 139 | |
| 140 | </td> |
| 141 | </tr> |
| 142 | |
| 143 | <tr> |
| 144 | <th><label for="gc[display_title]"><?php esc_html_e('Display Title', PGCU_TEXTDOMAIN); ?></label></th> |
| 145 | <td> |
| 146 | <ul class="cmb2-radio-list cmb2-list cmb2-radio-switch"> |
| 147 | <li> |
| 148 | <input type="radio" class="cmb2-option cmb2-radio-switch1" name="gc[display_title]" id="gc[display_title1]" value="yes" <?php checked( 'yes', $display_title, true ); ?>> |
| 149 | <label for="gc[display_title1]"><?php esc_html_e('Yes', PGCU_TEXTDOMAIN); ?></label> |
| 150 | </li> |
| 151 | <li> |
| 152 | <input type="radio" class="cmb2-option cmb2-radio-switch2" name="gc[display_title]" id="gc[display_title2]" value="no" <?php checked( 'no', $display_title, true ); ?>> |
| 153 | <label for="gc[display_title2]"><?php esc_html_e('No', PGCU_TEXTDOMAIN); ?></label> |
| 154 | </li> |
| 155 | </ul> |
| 156 | </td> |
| 157 | </tr> |
| 158 | |
| 159 | <tr> |
| 160 | <th><label for="gc[display_content]"><?php esc_html_e('Display Content', PGCU_TEXTDOMAIN); ?></label></th> |
| 161 | <td> |
| 162 | <ul class="cmb2-radio-list cmb2-list cmb2-radio-switch"> |
| 163 | <li> |
| 164 | <input type="radio" class="cmb2-option cmb2-radio-switch1" name="gc[display_content]" id="gc[display_content1]" value="yes" <?php checked( 'yes', $display_content, true ); ?>> |
| 165 | <label for="gc[display_content1]"><?php esc_html_e('Yes', PGCU_TEXTDOMAIN); ?></label> |
| 166 | </li> |
| 167 | <li> |
| 168 | <input type="radio" class="cmb2-option cmb2-radio-switch2" name="gc[display_content]" id="gc[display_content2]" value="no" <?php checked( 'no', $display_content, true ); ?>> |
| 169 | <label for="gc[display_content2]"><?php esc_html_e('No', PGCU_TEXTDOMAIN); ?></label> |
| 170 | </li> |
| 171 | </ul> |
| 172 | </td> |
| 173 | </tr> |
| 174 | |
| 175 | <tr> |
| 176 | <th><label for="gc[content_word_limit]"><?php esc_html_e('Content Word Limit', PGCU_TEXTDOMAIN); ?></label></th> |
| 177 | <td> |
| 178 | <input type='number' class="cmb2-text-medium" id="gc[content_word_limit]" name="gc[content_word_limit]" value="<?php echo esc_attr( ! empty( $content_word_limit ) ? $content_word_limit : '16' ); ?>"/> |
| 179 | </td> |
| 180 | </tr> |
| 181 | |
| 182 | <tr> |
| 183 | <th><label for="gc[display_read_more]"><?php esc_html_e('Display Read more', PGCU_TEXTDOMAIN); ?></label></th> |
| 184 | <td> |
| 185 | <ul class="cmb2-radio-list cmb2-list cmb2-radio-switch"> |
| 186 | <li> |
| 187 | <input type="radio" class="cmb2-option cmb2-radio-switch1" name="gc[display_read_more]" id="gc[display_read_more1]" value="yes" <?php checked( 'yes', $display_read_more, true ); ?>> |
| 188 | <label for="gc[display_read_more1]"><?php esc_html_e('Yes', PGCU_TEXTDOMAIN); ?></label> |
| 189 | </li> |
| 190 | <li> |
| 191 | <input type="radio" class="cmb2-option cmb2-radio-switch2" name="gc[display_read_more]" id="gc[display_read_more2]" value="no" <?php checked( 'no', $display_read_more, true ); ?>> |
| 192 | <label for="gc[display_read_more2]"><?php esc_html_e('No', PGCU_TEXTDOMAIN); ?></label> |
| 193 | </li> |
| 194 | </ul> |
| 195 | </td> |
| 196 | </tr> |
| 197 | |
| 198 | <tr class="gc-read-more-type-section"> |
| 199 | <th><label for="gc[read_more_type]"><?php esc_html_e('Read More Type', PGCU_TEXTDOMAIN); ?></label></th> |
| 200 | <td> |
| 201 | <select class='pgcu_read_more_depend' id="gc[read_more_type]" name="gc[read_more_type]"> |
| 202 | <option value="link" <?php selected( $read_more_type, 'link' ); ?>>Link Type</option> |
| 203 | <option value="button" <?php selected( $read_more_type, 'button' ); ?>>Button Type</option> |
| 204 | </select> |
| 205 | </td> |
| 206 | |
| 207 | </tr> |
| 208 | |
| 209 | <tr> |
| 210 | <th><label for="gc[display_author]"><?php esc_html_e('Display Author Name', PGCU_TEXTDOMAIN); ?></label></th> |
| 211 | <td> |
| 212 | <ul class="cmb2-radio-list cmb2-list cmb2-radio-switch"> |
| 213 | <li> |
| 214 | <input type="radio" class="cmb2-option cmb2-radio-switch1" name="gc[display_author]" id="gc[display_author1]" value="yes" <?php checked( 'yes', $display_author, true ); ?>> |
| 215 | <label for="gc[display_author1]"><?php esc_html_e('Yes', PGCU_TEXTDOMAIN); ?></label> |
| 216 | </li> |
| 217 | <li> |
| 218 | <input type="radio" class="cmb2-option cmb2-radio-switch2" name="gc[display_author]" id="gc[display_author2]" value="no" <?php checked( 'no', $display_author, true ); ?>> |
| 219 | <label for="gc[display_author2]"><?php esc_html_e('No', PGCU_TEXTDOMAIN); ?></label> |
| 220 | </li> |
| 221 | </ul> |
| 222 | </td> |
| 223 | </tr> |
| 224 | |
| 225 | <tr> |
| 226 | <th><label for="gc[display_date]"><?php esc_html_e('Display Date', PGCU_TEXTDOMAIN); ?></label></th> |
| 227 | <td> |
| 228 | <ul class="cmb2-radio-list cmb2-list cmb2-radio-switch"> |
| 229 | <li> |
| 230 | <input type="radio" class="cmb2-option cmb2-radio-switch1" name="gc[display_date]" id="gc[display_date1]" value="yes" <?php checked( 'yes', $display_date, true ); ?>> |
| 231 | <label for="gc[display_date1]"><?php esc_html_e('Yes', PGCU_TEXTDOMAIN); ?></label> |
| 232 | </li> |
| 233 | <li> |
| 234 | <input type="radio" class="cmb2-option cmb2-radio-switch2" name="gc[display_date]" id="gc[display_date2]" value="no" <?php checked( 'no', $display_date, true ); ?>> |
| 235 | <label for="gc[display_date2]"><?php esc_html_e('No', PGCU_TEXTDOMAIN); ?></label> |
| 236 | </li> |
| 237 | </ul> |
| 238 | </td> |
| 239 | </tr> |
| 240 | |
| 241 | <tr> |
| 242 | <th><label for="gc[display_term]"><?php esc_html_e('Display Term', PGCU_TEXTDOMAIN); ?></label></th> |
| 243 | <td> |
| 244 | <ul class="cmb2-radio-list cmb2-list cmb2-radio-switch"> |
| 245 | <li> |
| 246 | <input type="radio" class="cmb2-option cmb2-radio-switch1" name="gc[display_term]" id="gc[display_term1]" value="yes" <?php checked( 'yes', $display_term, true ); ?>> |
| 247 | <label for="gc[display_term1]"><?php esc_html_e('Yes', PGCU_TEXTDOMAIN); ?></label> |
| 248 | </li> |
| 249 | <li> |
| 250 | <input type="radio" class="cmb2-option cmb2-radio-switch2" name="gc[display_term]" id="gc[display_term2]" value="no" <?php checked( 'no', $display_term, true ); ?>> |
| 251 | <label for="gc[display_term2]"><?php esc_html_e('No', PGCU_TEXTDOMAIN); ?></label> |
| 252 | </li> |
| 253 | </ul> |
| 254 | </td> |
| 255 | </tr> |
| 256 | |
| 257 | <tr> |
| 258 | <th><label for="gc[term_from]"><?php esc_html_e('Term From', PGCU_TEXTDOMAIN); ?></label></th> |
| 259 | <td> |
| 260 | <select class='pgcu_post_type_depend' id="gc[term_from]" name="gc[term_from]"> |
| 261 | <?php |
| 262 | $terms = get_object_taxonomies( (object) array( 'post_type' => $post_type, 'hide_empty' => false ) ); |
| 263 | if( $terms ) { |
| 264 | foreach( $terms as $term ) { |
| 265 | ?> |
| 266 | <option value="<?php echo esc_attr( $term ); ?>" <?php selected( $term_from, $term ); ?>><?php echo $term; ?></option> |
| 267 | <?php } } ?> |
| 268 | </select> |
| 269 | |
| 270 | </td> |
| 271 | |
| 272 | </tr> |
| 273 | |
| 274 | <tr> |
| 275 | <th><label for="gc[image_resize_crop]"><?php esc_html_e('Enable Image Resizing & Cropping', PGCU_TEXTDOMAIN); ?></label></th> |
| 276 | <td> |
| 277 | <ul class="cmb2-radio-list cmb2-list cmb2-radio-switch"> |
| 278 | <li> |
| 279 | <input type="radio" class="cmb2-option cmb2-radio-switch1" name="gc[image_resize_crop]" id="gc[image_resize_crop1]" value="yes" <?php if(empty($image_resize_crop) || 'no' !== $image_resize_crop) { echo 'checked'; } ?>> |
| 280 | <label for="gc[image_resize_crop1]"><?php esc_html_e('Yes', PGCU_TEXTDOMAIN); ?></label> |
| 281 | </li> |
| 282 | <li> |
| 283 | <input type="radio" class="cmb2-option cmb2-radio-switch2" name="gc[image_resize_crop]" id="gc[image_resize_crop2]" value="no" <?php if (!empty($image_resize_crop)) { checked('no', $image_resize_crop); } ?>> |
| 284 | <label for="gc[image_resize_crop2]"><?php esc_html_e('No', PGCU_TEXTDOMAIN); ?></label> |
| 285 | </li> |
| 286 | </ul> |
| 287 | |
| 288 | <p class="description">If the product images are not in the same size, this feature is helpful. It automatically resizes and crops. Note: your image must be higher than/equal to the cropping size set below. Otherwise, you may need to enable image upscaling feature from the settings below.</p> |
| 289 | </td> |
| 290 | |
| 291 | </tr> |
| 292 | |
| 293 | <tr> |
| 294 | <th><label for="gc[image_width]"><?php esc_html_e('Image Width', PGCU_TEXTDOMAIN); ?></label></th> |
| 295 | <td> |
| 296 | <input type='number' class="cmb2-text-medium" id="gc[image_width]" name="gc[image_width]" value="<?php echo esc_attr( ! empty( $image_width ) ? $image_width : '300' ); ?>"/> |
| 297 | <p class="description"><?php esc_html_e('Image cropping width.', PGCU_TEXTDOMAIN); ?></p> |
| 298 | </td> |
| 299 | </tr> |
| 300 | |
| 301 | <tr> |
| 302 | <th><label for="gc[image_hight]"><?php esc_html_e('Image Height', PGCU_TEXTDOMAIN); ?></label></th> |
| 303 | <td> |
| 304 | <input type='number' class="cmb2-text-medium" id="gc[image_hight]" name="gc[image_hight]" value="<?php if(empty($image_hight)) {echo '200'; |
| 305 | }else{ echo esc_attr( $image_hight ) ; } ?>"/> |
| 306 | <p class="description"><?php esc_html_e('Image cropping height.', PGCU_TEXTDOMAIN); ?></p> |
| 307 | </td> |
| 308 | </tr> |
| 309 | |
| 310 | </table> |
| 311 | |
| 312 | </div> |
| 313 | |
| 314 | </div> |