Changeset 3464012
- Timestamp:
- 02/18/2026 07:29:57 AM (6 weeks ago)
- Location:
- fancy-post-grid
- Files:
-
- 87 added
- 8 edited
-
tags/2.0.2 (added)
-
tags/2.0.2/assets (added)
-
tags/2.0.2/assets/css (added)
-
tags/2.0.2/assets/css/dashboard.css (added)
-
tags/2.0.2/assets/css/elementor-branding.css (added)
-
tags/2.0.2/assets/css/elementor-widgets.css (added)
-
tags/2.0.2/assets/css/shortcode-frontend.css (added)
-
tags/2.0.2/assets/css/shortcode-metabox.css (added)
-
tags/2.0.2/assets/img (added)
-
tags/2.0.2/assets/img/fpg-icon.png (added)
-
tags/2.0.2/assets/img/fpg-icon.svg (added)
-
tags/2.0.2/assets/js (added)
-
tags/2.0.2/assets/js/dashboard.js (added)
-
tags/2.0.2/assets/js/elementor-widgets.js (added)
-
tags/2.0.2/assets/js/shortcode-frontend.js (added)
-
tags/2.0.2/assets/js/shortcode-metabox.js (added)
-
tags/2.0.2/assets/js/term-meta.js (added)
-
tags/2.0.2/assets/vendor (added)
-
tags/2.0.2/assets/vendor/magnific-popup (added)
-
tags/2.0.2/assets/vendor/magnific-popup/magnific-popup.css (added)
-
tags/2.0.2/assets/vendor/magnific-popup/magnific-popup.min.js (added)
-
tags/2.0.2/assets/vendor/plyr (added)
-
tags/2.0.2/assets/vendor/plyr/plyr.css (added)
-
tags/2.0.2/assets/vendor/plyr/plyr.polyfilled.js (added)
-
tags/2.0.2/assets/vendor/remixicon (added)
-
tags/2.0.2/assets/vendor/remixicon/fonts (added)
-
tags/2.0.2/assets/vendor/remixicon/fonts/remixicon.eot (added)
-
tags/2.0.2/assets/vendor/remixicon/fonts/remixicon.svg (added)
-
tags/2.0.2/assets/vendor/remixicon/fonts/remixicon.ttf (added)
-
tags/2.0.2/assets/vendor/remixicon/fonts/remixicon.woff (added)
-
tags/2.0.2/assets/vendor/remixicon/fonts/remixicon.woff2 (added)
-
tags/2.0.2/assets/vendor/remixicon/remixicon.css (added)
-
tags/2.0.2/assets/vendor/rs-swiper (added)
-
tags/2.0.2/assets/vendor/rs-swiper/swiper-bundle.min.css (added)
-
tags/2.0.2/assets/vendor/rs-swiper/swiper-bundle.min.js (added)
-
tags/2.0.2/assets/vendor/select2 (added)
-
tags/2.0.2/assets/vendor/select2/select2.min.css (added)
-
tags/2.0.2/assets/vendor/select2/select2.min.js (added)
-
tags/2.0.2/assets/vendor/sharer (added)
-
tags/2.0.2/assets/vendor/sharer/sharer.min.js (added)
-
tags/2.0.2/fancy-post-grid.php (added)
-
tags/2.0.2/includes (added)
-
tags/2.0.2/includes/admin (added)
-
tags/2.0.2/includes/admin/class-dashboard.php (added)
-
tags/2.0.2/includes/admin/class-post-meta.php (added)
-
tags/2.0.2/includes/admin/class-term-meta.php (added)
-
tags/2.0.2/includes/admin/view (added)
-
tags/2.0.2/includes/admin/view/settings.php (added)
-
tags/2.0.2/includes/admin/view/site-builder.php (added)
-
tags/2.0.2/includes/admin/view/welcome.php (added)
-
tags/2.0.2/includes/class-admin.php (added)
-
tags/2.0.2/includes/class-global-assets.php (added)
-
tags/2.0.2/includes/class-plugin.php (added)
-
tags/2.0.2/includes/class-post-views.php (added)
-
tags/2.0.2/includes/elementor (added)
-
tags/2.0.2/includes/elementor/class-elementor-addons.php (added)
-
tags/2.0.2/includes/elementor/traits (added)
-
tags/2.0.2/includes/elementor/traits/trait-button-helper.php (added)
-
tags/2.0.2/includes/elementor/traits/trait-common-controls.php (added)
-
tags/2.0.2/includes/elementor/traits/trait-query-builder.php (added)
-
tags/2.0.2/includes/elementor/traits/trait-slider-controls.php (added)
-
tags/2.0.2/includes/elementor/widgets (added)
-
tags/2.0.2/includes/elementor/widgets/cards (added)
-
tags/2.0.2/includes/elementor/widgets/cards/card-style.php (added)
-
tags/2.0.2/includes/elementor/widgets/class-button.php (added)
-
tags/2.0.2/includes/elementor/widgets/class-date-time.php (added)
-
tags/2.0.2/includes/elementor/widgets/class-divider.php (added)
-
tags/2.0.2/includes/elementor/widgets/class-heading.php (added)
-
tags/2.0.2/includes/elementor/widgets/class-icon-box.php (added)
-
tags/2.0.2/includes/elementor/widgets/class-image.php (added)
-
tags/2.0.2/includes/elementor/widgets/class-post-grid.php (added)
-
tags/2.0.2/includes/elementor/widgets/class-post-slider.php (added)
-
tags/2.0.2/includes/elementor/widgets/class-social-icons.php (added)
-
tags/2.0.2/includes/elementor/widgets/class-social-share.php (added)
-
tags/2.0.2/includes/functions.php (added)
-
tags/2.0.2/includes/shortcode (added)
-
tags/2.0.2/includes/shortcode/class-shortcode-cpt.php (added)
-
tags/2.0.2/includes/shortcode/class-shortcode-metabox.php (added)
-
tags/2.0.2/includes/shortcode/class-shortcode-renderer.php (added)
-
tags/2.0.2/includes/shortcode/templates (added)
-
tags/2.0.2/includes/shortcode/templates/card-one.php (added)
-
tags/2.0.2/languages (added)
-
tags/2.0.2/languages/fancy-post-grid.pot (added)
-
tags/2.0.2/readme.txt (added)
-
trunk/assets/css/shortcode-frontend.css (added)
-
trunk/assets/css/shortcode-metabox.css (modified) (1 diff)
-
trunk/assets/js/shortcode-frontend.js (added)
-
trunk/assets/js/shortcode-metabox.js (modified) (1 diff)
-
trunk/fancy-post-grid.php (modified) (1 diff)
-
trunk/includes/shortcode/class-shortcode-cpt.php (modified) (5 diffs)
-
trunk/includes/shortcode/class-shortcode-metabox.php (modified) (15 diffs)
-
trunk/includes/shortcode/class-shortcode-renderer.php (modified) (9 diffs)
-
trunk/includes/shortcode/templates/card-one.php (added)
-
trunk/languages/fancy-post-grid.pot (modified) (59 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
fancy-post-grid/trunk/assets/css/shortcode-metabox.css
r3456923 r3464012 1 .fpg-metabox{background:#fff}.fpg-metabox .fpg-metabox-tabs{display:flex;gap:6px;border-bottom:1px solid #e2e4e7;margin-bottom:16px}.fpg-metabox .fpg-metabox-tabs .fpg-metabox-tab{position:relative;padding:10px 18px;background:rgba(0,0,0,0);border:none;cursor:pointer;font-weight:600;color:#555;transition:all .25s ease}.fpg-metabox .fpg-metabox-tabs .fpg-metabox-tab::after{content:"";position:absolute;left:50%;bottom:-1px;width:0;height:3px;background:#2271b1;transition:all .25s ease;transform:translateX(-50%)}.fpg-metabox .fpg-metabox-tabs .fpg-metabox-tab:hover{color:#2271b1}.fpg-metabox .fpg-metabox-tabs .fpg-metabox-tab.is-active{color:#2271b1}.fpg-metabox .fpg-metabox-tabs .fpg-metabox-tab.is-active::after{width:100%}.fpg-metabox .fpg-metabox-tab-panel{display:none;animation:fpgFadeIn .25s ease}@keyframes fpgFadeIn{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}.fpg-metabox .fpg-metabox-field{display:flex;align-items:center;justify-content:space-between;gap:50px}.fpg-metabox .fpg-metabox-field:not(:last-child){margin-bottom:20px}.fpg-metabox .fpg-metabox-field .fpg-field-info{width:35%}.fpg-metabox .fpg-metabox-field .fpg-field-info label{display:block;font-size:15px;font-weight:500;color:#131313}.fpg-metabox .fpg-metabox-field .fpg-field-info p{margin:5px 0 0;font-size:15px;line-height:1.5}.fpg-metabox .fpg-metabox-field .fpg-field-wrap{width:50%}.fpg-metabox .fpg-metabox-field .fpg-field-wrap select{min-width:250px}1 .fpg-metabox{background:#fff}.fpg-metabox .fpg-metabox-tabs{display:flex;gap:6px;border-bottom:1px solid #e2e4e7;margin-bottom:16px}.fpg-metabox .fpg-metabox-tabs .fpg-metabox-tab{position:relative;padding:10px 18px;background:rgba(0,0,0,0);border:none;cursor:pointer;font-weight:600;color:#555;transition:all .25s ease}.fpg-metabox .fpg-metabox-tabs .fpg-metabox-tab::after{content:"";position:absolute;left:50%;bottom:-1px;width:0;height:3px;background:#2271b1;transition:all .25s ease;transform:translateX(-50%)}.fpg-metabox .fpg-metabox-tabs .fpg-metabox-tab:hover{color:#2271b1}.fpg-metabox .fpg-metabox-tabs .fpg-metabox-tab.is-active{color:#2271b1}.fpg-metabox .fpg-metabox-tabs .fpg-metabox-tab.is-active::after{width:100%}.fpg-metabox .fpg-metabox-tab-panel{display:none;animation:fpgFadeIn .25s ease}@keyframes fpgFadeIn{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}.fpg-metabox .fpg-metabox-field{display:flex;align-items:center;justify-content:space-between;gap:50px}.fpg-metabox .fpg-metabox-field:not(:last-child){margin-bottom:20px}.fpg-metabox .fpg-metabox-field .fpg-field-info{width:35%}.fpg-metabox .fpg-metabox-field .fpg-field-info h4{display:block;font-size:15px;font-weight:500;color:#131313;margin:0}.fpg-metabox .fpg-metabox-field .fpg-field-info p{margin:5px 0 0;font-size:15px;line-height:1.5}.fpg-metabox .fpg-metabox-field .fpg-field-wrap{width:50%}.fpg-metabox .fpg-metabox-field .fpg-field-wrap select{min-width:250px}.fpg-metabox .fpg-metabox-field .fpg-switcher{position:relative;display:inline-block;width:44px;height:22px}.fpg-metabox .fpg-metabox-field .fpg-switcher input{opacity:0;width:0;height:0}.fpg-metabox .fpg-metabox-field .fpg-switcher input:checked+.fpg-switcher-label{background-color:#2271b1}.fpg-metabox .fpg-metabox-field .fpg-switcher input:checked+.fpg-switcher-label::before{transform:translateX(22px)}.fpg-metabox .fpg-metabox-field .fpg-switcher input:focus+.fpg-switcher-label{box-shadow:0 0 0 2px rgba(34,113,177,.2)}.fpg-metabox .fpg-metabox-field .fpg-switcher .fpg-switcher-label{position:absolute;inset:0;cursor:pointer;background-color:#ccc;transition:.3s;border-radius:22px}.fpg-metabox .fpg-metabox-field .fpg-switcher .fpg-switcher-label::before{content:"";position:absolute;height:18px;width:18px;left:2px;bottom:2px;background-color:#fff;transition:.3s;border-radius:50%}.fpg-metabox .fpg-metabox-field .fpg-switcher-label+.fpg-switcher-label{position:static;margin-left:8px;vertical-align:middle;cursor:default;background:none}.fpg-metabox .fpg-metabox-field .fpg-switcher-label+.fpg-switcher-label::before{display:none} -
fancy-post-grid/trunk/assets/js/shortcode-metabox.js
r3456923 r3464012 1 jQuery(function ($) { 1 jQuery(($) => { 2 'use strict'; 2 3 3 const $tabs = $('.fpg-metabox-tab'); 4 const $panels = $('.fpg-metabox-tab-panel'); 4 const FPGMetabox = { 5 init() { 6 this.initTabs(); 7 this.initSelect2(); 8 this.initConditionalFields(); 9 }, 5 10 6 $tabs.on('click', function () { 7 const tab = $(this).data('tab'); 11 initTabs() { 12 const $tabs = $('.fpg-metabox-tab'); 13 const $panels = $('.fpg-metabox-tab-panel'); 8 14 9 $tabs.removeClass('is-active');10 $(this).addClass('is-active');15 $tabs.on('click', function () { 16 const tab = $(this).data('tab'); 11 17 12 $panels.hide(); 13 $('#fpg-metabox-tab-' + tab).fadeIn(150); 18 $tabs.removeClass('is-active'); 19 $(this).addClass('is-active'); 20 21 $panels.hide(); 22 $(`#fpg-metabox-tab-${tab}`).fadeIn(150); 23 }); 24 25 $tabs.first().trigger('click'); 26 }, 27 28 initSelect2() { 29 // Initialize regular select2 (non-AJAX) 30 $('.fpg-select2:not([data-ajax="true"])').select2({ 31 width: '100%', 32 placeholder: 'Select options...', 33 }); 34 35 // Initialize AJAX-enabled select2 36 $('.fpg-select2[data-ajax="true"]').each((index, element) => { 37 const $select = $(element); 38 const type = $select.attr('data-type'); 39 40 if (!type) { 41 console.warn('Select2 AJAX: No data-type attribute found', $select); 42 return; 43 } 44 45 // Store pre-selected options before initializing Select2 46 const preSelectedData = []; 47 $select.find('option').each(function () { 48 if ($(this).is(':selected')) { 49 preSelectedData.push({ 50 id: $(this).val(), 51 text: $(this).text() 52 }); 53 } 54 }); 55 56 $select.select2({ 57 width: '100%', 58 placeholder: 'Search and select...', 59 minimumInputLength: 0, 60 allowClear: true, 61 ajax: { 62 url: fpgMetabox.ajaxUrl, 63 dataType: 'json', 64 delay: 250, 65 data: (params) => ({ 66 action: 'fpg_load_select_options', 67 nonce: fpgMetabox.nonce, 68 type, 69 search: params.term || '', 70 page: params.page || 1 71 }), 72 processResults: (response, params) => { 73 params.page = params.page || 1; 74 75 if (response.success) { 76 return { 77 results: response.data.results, 78 pagination: { 79 more: response.data.pagination.more 80 } 81 }; 82 } 83 84 return {results: []}; 85 }, 86 cache: true 87 }, 88 templateResult: this.formatOption, 89 templateSelection: this.formatSelection, 90 escapeMarkup: (markup) => markup 91 }); 92 93 // Re-add pre-selected options programmatically 94 if (preSelectedData.length > 0) { 95 preSelectedData.forEach((item) => { 96 // Check if option already exists 97 if ($select.find(`option[value='${item.id}']`).length === 0) { 98 const newOption = new Option(item.text, item.id, true, true); 99 $select.append(newOption); 100 } else { 101 $select.find(`option[value='${item.id}']`).prop('selected', true); 102 } 103 }); 104 $select.trigger('change'); 105 } 106 }); 107 }, 108 109 initConditionalFields() { 110 // Check all fields on load 111 this.applyConditions(); 112 113 // Listen for changes 114 $(document).on('change', 'select, input', () => { 115 this.applyConditions(); 116 }); 117 }, 118 119 applyConditions() { 120 $('.fpg-metabox-field').each(function () { 121 const condition = $(this).data('condition'); 122 if (!condition?.key) return; 123 124 const $inputs = $(`[name="fpg_meta[${condition.key}]"]`); 125 126 let value; 127 128 const $checkbox = $inputs.filter('[type="checkbox"]'); 129 130 if ($checkbox.length) { 131 value = $checkbox.is(':checked'); 132 } else { 133 value = $inputs.val(); 134 } 135 136 $(this).toggle(value === condition.value); 137 }); 138 }, 139 140 formatOption(option) { 141 if (option.loading) { 142 return option.text; 143 } 144 145 return $('<span></span>').text(option.text); 146 }, 147 148 formatSelection(option) { 149 return option.text || option.id; 150 } 151 }; 152 153 $(function () { 154 FPGMetabox.init(); 14 155 }); 15 16 $tabs.first().trigger('click');17 18 $('.fpg-select2').select2({19 width: '100%'20 });21 22 function applyConditions() {23 $('.fpg-metabox-field').each(function () {24 const condition = $(this).data('condition');25 if (!condition || !condition.key) return;26 27 const $target = $('[name="fpg_meta[' + condition.key + ']"]');28 const value = $target.val();29 30 $(this).toggle(value === condition.value);31 });32 }33 34 $(document).on('change', 'select, input', applyConditions);35 applyConditions();36 156 }); -
fancy-post-grid/trunk/fancy-post-grid.php
r3456954 r3464012 6 6 * Author: RSTheme 7 7 * Author URI: https://rstheme.com/ 8 * Version: 2.0. 18 * Version: 2.0.2 9 9 * Text Domain: fancy-post-grid 10 10 * Domain Path: /languages -
fancy-post-grid/trunk/includes/shortcode/class-shortcode-cpt.php
r3456923 r3464012 24 24 2 25 25 ); 26 27 add_action( 'add_meta_boxes', [ $this, 'register_shortcode_panel' ] ); 26 28 } 27 29 … … 52 54 'hierarchical' => false, 53 55 'capability_type' => 'post', 54 'supports' => [ 'title', 'author' ,],56 'supports' => [ 'title', 'author' ], 55 57 ] ); 56 58 } 57 59 58 60 public function replace_cpt_enter_title( $input, $post ) { 59 60 61 if ( isset( $post->post_type ) && $post->post_type === $this->post_type ) { 61 62 return esc_html__( 'Enter Shortcode Name', 'fancy-post-grid' ); … … 65 66 } 66 67 67 public function add_custom_column( $columns ) { 68 unset( $columns[ 'author' ] ); 68 private function get_shortcode( $post_id ): string { 69 return sprintf( '[fpg_shortcode id="%d"]', absint( $post_id ) ); 70 } 71 72 public function add_custom_column( $columns ): array { 69 73 unset( $columns[ 'date' ] ); 70 74 71 $columns[ 'shortcode' ] = __( 'Shortcode', 'fancy-post-grid' ); 72 $columns[ 'author' ] = __( 'Author', 'fancy-post-grid' ); 73 $columns[ 'date' ] = __( 'Date', 'fancy-post-grid' ); 75 $new_columns = []; 74 76 75 return $columns; 77 foreach ( $columns as $key => $label ) { 78 $new_columns[ $key ] = $label; 79 80 if ( 'title' === $key ) { 81 $new_columns[ 'shortcode' ] = __( 'Shortcode', 'fancy-post-grid' ); 82 } 83 } 84 85 $new_columns[ 'date' ] = __( 'Date', 'fancy-post-grid' ); 86 87 return $new_columns; 76 88 } 77 89 … … 81 93 } 82 94 83 $shortcode = sprintf( 84 '[fpg_shortcode id="%d"]', 85 $post_id 86 ); 95 $shortcode = $this->get_shortcode( $post_id ); 87 96 ?> 88 97 <input … … 96 105 <?php 97 106 } 107 108 public function register_shortcode_panel() { 109 add_meta_box( 110 'fpg_shortcode_display_panel', 111 __( 'Shortcode', 'fancy-post-grid' ), 112 [ $this, 'render_shortcode_panel' ], 113 $this->post_type, 114 'side', 115 'high' 116 ); 117 } 118 119 public function render_shortcode_panel( $post ) { 120 if ( 'auto-draft' === $post->post_status ) { 121 echo '<p>' . esc_html__( 'Save this shortcode to generate its ID.', 'fancy-post-grid' ) . '</p>'; 122 123 return; 124 } 125 126 $shortcode = $this->get_shortcode( $post->ID ); 127 ?> 128 129 <p style="margin-bottom:6px;"> 130 <?php esc_html_e( 'Copy this shortcode and paste it anywhere:', 'fancy-post-grid' ); ?> 131 </p> 132 133 <input 134 type="text" 135 class="widefat fpg-shortcode-input" 136 value="<?php echo esc_attr( $shortcode ); ?>" 137 readonly 138 onclick="this.select();" 139 style="cursor:pointer;margin-bottom:6px;" 140 /> 141 142 <button 143 type="button" 144 class="button button-small" 145 onclick="navigator.clipboard.writeText('<?php echo esc_js( $shortcode ); ?>')" 146 > 147 <?php esc_html_e( 'Copy', 'fancy-post-grid' ); ?> 148 </button> 149 <?php 150 } 98 151 } -
fancy-post-grid/trunk/includes/shortcode/class-shortcode-metabox.php
r3456923 r3464012 11 11 private string $post_type = 'fpg_shortcode'; 12 12 13 private string $nonce_action = 'fpg_shortcode_meta_nonce';14 15 private string $nonce_name = 'fpg_shortcode_meta_nonce_field';16 17 13 private const NONCE_ACTION = 'fpg_shortcode_meta_nonce'; 18 14 … … 22 18 23 19 public function __construct() { 24 add_action( 'init', function () { 25 $this->meta_fields = $this->get_meta_fields_config(); 26 } ); 20 add_action( 'init', [ $this, 'configure_meta_fields' ] ); 27 21 28 22 add_action( 'admin_enqueue_scripts', [ $this, 'enqueue_assets' ] ); 29 23 add_action( 'add_meta_boxes', [ $this, 'add_metabox' ] ); 30 24 add_action( 'save_post', [ $this, 'save_metabox' ], 10, 2 ); 31 } 32 33 private function get_meta_fields_config(): array { 25 26 // AJAX handlers for dynamic options 27 add_action( 'wp_ajax_fpg_load_select_options', [ $this, 'ajax_load_select_options' ] ); 28 } 29 30 public function configure_meta_fields(): void { 34 31 $config = [ 35 32 'layout' => [ 36 'label' => __( 'Layout', 'fancy-post-grid' ), 37 'icon' => 'dashicons-grid-view', 33 'label' => __( 'Layout Settings', 'fancy-post-grid' ), 38 34 'fields' => [ 39 35 [ … … 49 45 ], 50 46 [ 51 'id' => 'card_layout', 52 'type' => 'select', 53 'label' => __( 'Card Layout', 'fancy-post-grid' ), 54 'description' => __( 'Choose the card design layout.', 'fancy-post-grid' ), 55 'options' => [ 56 'one' => __( 'Layout One', 'fancy-post-grid' ), 57 'two' => __( 'Layout Two', 'fancy-post-grid' ), 58 'three' => __( 'Layout Three', 'fancy-post-grid' ), 47 'id' => 'col_lg', 48 'type' => 'number', 49 'label' => __( 'Column Large', 'fancy-post-grid' ), 50 'description' => __( 'Column for large device.', 'fancy-post-grid' ), 51 'default' => 3, 52 ], 53 [ 54 'id' => 'col_md', 55 'type' => 'number', 56 'label' => __( 'Column Medium', 'fancy-post-grid' ), 57 'description' => __( 'Column for medium device.', 'fancy-post-grid' ), 58 'default' => 2, 59 ], 60 [ 61 'id' => 'col_sm', 62 'type' => 'number', 63 'label' => __( 'Column Small', 'fancy-post-grid' ), 64 'description' => __( 'Column for small device.', 'fancy-post-grid' ), 65 'default' => 1, 66 ], 67 [ 68 'id' => 'col_gap', 69 'type' => 'number', 70 'label' => __( 'Column Gap', 'fancy-post-grid' ), 71 'description' => __( 'Space between per column.', 'fancy-post-grid' ), 72 'default' => 30, 73 ], 74 [ 75 'id' => 'row_gap', 76 'type' => 'number', 77 'label' => __( 'Row Gap', 'fancy-post-grid' ), 78 'description' => __( 'Space between per row.', 'fancy-post-grid' ), 79 'default' => 30, 80 'condition' => [ 'key' => 'layout_type', 'value' => 'grid' ], 81 ] 82 ], 83 ], 84 'card_setting' => [ 85 'label' => __( 'Card Settings', 'fancy-post-grid' ), 86 'fields' => [ 87 [ 88 'id' => 'title_tag', 89 'type' => 'select', 90 'label' => __( 'Title Tag', 'fancy-post-grid' ), 91 'default' => 'h4', 92 'options' => [ 93 'h1' => 'H1', 94 'h2' => 'H2', 95 'h3' => 'H3', 96 'h4' => 'H4', 97 'h5' => 'H5', 98 'h6' => 'H6', 99 'p' => 'P', 100 'div' => 'DIV', 101 'span' => 'SPAN', 59 102 ], 60 'default' => 'one', 61 ], 62 [ 63 'id' => 'pagination', 64 'type' => 'switcher', 65 'label' => __( 'Enable Pagination', 'fancy-post-grid' ), 66 'description' => __( 'Show pagination for posts.', 'fancy-post-grid' ), 67 'default' => false, 68 ], 69 ], 103 ], 104 [ 105 'id' => 'show_thumb', 106 'type' => 'switcher', 107 'label' => __( 'Show Thumbnail', 'fancy-post-grid' ), 108 'default' => true, 109 ], 110 [ 111 'id' => 'thumb_size', 112 'type' => 'select', 113 'label' => __( 'Thumbnail Size', 'fancy-post-grid' ), 114 'default' => 'large', 115 'options' => $this->get_image_sizes_options(), 116 'condition' => [ 'key' => 'show_thumb', 'value' => true ], 117 ], 118 [ 119 'id' => 'show_excerpt', 120 'type' => 'switcher', 121 'label' => __( 'Show Excerpt', 'fancy-post-grid' ), 122 'default' => false, 123 ], 124 [ 125 'id' => 'excerpt_length', 126 'type' => 'number', 127 'label' => __( 'Excerpt Length', 'fancy-post-grid' ), 128 'default' => 30, 129 'condition' => [ 'key' => 'show_excerpt', 'value' => true ], 130 ], 131 [ 132 'id' => 'read_more', 133 'type' => 'switcher', 134 'label' => __( 'Read More', 'fancy-post-grid' ), 135 'default' => false, 136 ], 137 [ 138 'id' => 'read_more_text', 139 'type' => 'text', 140 'label' => __( 'Read More Text', 'fancy-post-grid' ), 141 'default' => __( 'Read More', 'fancy-post-grid' ), 142 'condition' => [ 'key' => 'read_more', 'value' => true ], 143 ], 144 [ 145 'id' => 'show_category', 146 'type' => 'switcher', 147 'label' => __( 'Show Category', 'fancy-post-grid' ), 148 'default' => true, 149 ] 150 ] 70 151 ], 71 152 'query_builder' => [ 72 153 'label' => __( 'Query Builder', 'fancy-post-grid' ), 73 'icon' => 'dashicons-filter',74 154 'fields' => [ 75 155 [ … … 122 202 'default' => 0, 123 203 'min' => 0, 204 ], 205 [ 206 'id' => 'order', 207 'type' => 'select', 208 'label' => __( 'Order', 'fancy-post-grid' ), 209 'default' => 'DESC', 210 'options' => [ 211 'ASC' => __( 'Ascending', 'fancy-post-grid' ), 212 'DESC' => __( 'Descending', 'fancy-post-grid' ), 213 ] 214 ], 215 [ 216 'id' => 'order_by', 217 'type' => 'select', 218 'label' => __( 'Order By', 'fancy-post-grid' ), 219 'default' => 'date', 220 'options' => [ 221 'none' => __( 'None', 'fancy-post-grid' ), 222 'ID' => __( 'ID', 'fancy-post-grid' ), 223 'title' => __( 'Title', 'fancy-post-grid' ), 224 'author' => __( 'Author', 'fancy-post-grid' ), 225 'name' => __( 'Name', 'fancy-post-grid' ), 226 'date' => __( 'Date', 'fancy-post-grid' ), 227 'modified' => __( 'Modified', 'fancy-post-grid' ), 228 'rand' => __( 'Random', 'fancy-post-grid' ), 229 'comment_count' => __( 'Comment Count', 'fancy-post-grid' ), 230 'menu_order' => __( 'Menu Order', 'fancy-post-grid' ), 231 ] 124 232 ], 125 233 [ … … 199 307 ]; 200 308 201 return apply_filters( 'fpg_meta_fields_config', $config ); 309 apply_filters( 'fpg_meta_fields_config', $config ); 310 311 $this->meta_fields = $config; 202 312 } 203 313 … … 213 323 wp_enqueue_style( 'fpg-metabox', FPG_ASSETS . 'css/shortcode-metabox.css', [], FPG_VERSION ); 214 324 wp_enqueue_script( 'fpg-metabox', FPG_ASSETS . 'js/shortcode-metabox.js', [ 'jquery', 'select2' ], FPG_VERSION, true ); 325 326 // Localize script for AJAX 327 wp_localize_script( 'fpg-metabox', 'fpgMetabox', [ 328 'ajaxUrl' => admin_url( 'admin-ajax.php' ), 329 'nonce' => wp_create_nonce( 'fpg_metabox_ajax' ), 330 ] ); 215 331 } 216 332 … … 316 432 } 317 433 318 private function render_field( array $field, array$saved ): void {434 private function render_field( $field, $saved ): void { 319 435 $id = $field[ 'id' ]; 320 436 $type = $field[ 'type' ]; … … 325 441 326 442 echo '<div class="fpg-field-info">'; 327 echo '< label>' . esc_html( $field[ 'label' ] ) . '</label>';443 echo '<h4>' . esc_html( $field[ 'label' ] ) . '</h4>'; 328 444 if ( ! empty( $field[ 'description' ] ) ) { 329 445 echo '<p>' . esc_html( $field[ 'description' ] ) . '</p>'; … … 344 460 break; 345 461 346 default:347 do_action( 'fpg_render_custom_field',$field, $value );462 case 'text': 463 $this->render_text_field( $field, $value ); 348 464 break; 349 465 } … … 352 468 } 353 469 354 private function render_select_field( array$field, $value ): void {470 private function render_select_field( $field, $value ): void { 355 471 $id = $field[ 'id' ]; 356 472 $options = $field[ 'options' ]; 357 473 $multiple = ! empty( $field[ 'multiple' ] ); 358 474 359 printf( 360 '<select name="fpg_meta[%s]%s" class="fpg-select %s" %s>', 361 esc_attr( $id ), 362 $multiple ? '[]' : '', 363 $multiple ? 'fpg-select2' : '', 364 $multiple ? 'multiple' : '' 365 ); 475 // Check if this is a dynamic field that needs AJAX 476 $is_dynamic = in_array( $options, [ 'posts', 'categories', 'tags' ], true ); 477 $use_ajax = $is_dynamic && $multiple; 478 479 $select_attrs = [ 480 sprintf( 'name="fpg_meta[%s]%s"', esc_attr( $id ), $multiple ? '[]' : '' ), 481 sprintf( 'class="fpg-select %s"', $multiple ? 'fpg-select2' : '' ), 482 ]; 483 484 if ( $multiple ) { 485 $select_attrs[] = 'multiple="multiple"'; 486 } 487 488 if ( $use_ajax ) { 489 $select_attrs[] = 'data-ajax="true"'; 490 $select_attrs[] = sprintf( 'data-type="%s"', esc_attr( $options ) ); 491 } 492 493 printf( '<select %s>', implode( ' ', $select_attrs ) ); 366 494 367 495 if ( is_array( $options ) ) { 496 // Static options 368 497 foreach ( $options as $key => $label ) { 369 $this->render_option( 370 $key, 371 $label, 372 $value, 373 $multiple 374 ); 498 $this->render_option( $key, $label, $value, $multiple ); 499 } 500 } elseif ( $use_ajax ) { 501 // AJAX-enabled field: load only selected values initially 502 if ( ! empty( $value ) ) { 503 $selected_items = $this->get_selected_items( $options, (array) $value ); 504 foreach ( $selected_items as $item ) { 505 $this->render_dynamic_option( $item, $options, $value, $multiple ); 506 } 375 507 } 376 508 } else { 509 // Non-AJAX dynamic field: load all options (backward compatibility) 377 510 foreach ( $this->get_dynamic_options( $options ) as $item ) { 378 switch ( $options ) { 379 case 'posts': 380 $key = $item->ID; 381 $label = $item->post_title; 382 break; 383 384 case 'categories': 385 case 'tags': 386 $key = $item->term_id; 387 $label = $item->name; 388 break; 389 390 default: 391 continue 2; 392 } 393 394 $this->render_option( 395 $key, 396 $label, 397 $value, 398 $multiple 399 ); 511 $this->render_dynamic_option( $item, $options, $value, $multiple ); 400 512 } 401 513 } … … 404 516 } 405 517 406 private function render_number_field( array $field, $value ): void { 518 private function render_number_field( $field, $value ): void { 519 $attrs = []; 520 521 if ( isset( $field[ 'min' ] ) ) { 522 $attrs[] = 'min="' . esc_attr( $field[ 'min' ] ) . '"'; 523 } 524 525 if ( isset( $field[ 'max' ] ) ) { 526 $attrs[] = 'max="' . esc_attr( $field[ 'max' ] ) . '"'; 527 } 528 529 if ( isset( $field[ 'step' ] ) ) { 530 $attrs[] = 'step="' . esc_attr( $field[ 'step' ] ) . '"'; 531 } 532 407 533 printf( 408 '<input type="number" name="fpg_meta[%s]" value="%s" min="%s" max="%s">', 534 '<input type="number" 535 name="fpg_meta[%s]" 536 value="%s" 537 %s 538 >', 409 539 esc_attr( $field[ 'id' ] ), 410 540 esc_attr( $value ), 411 esc_attr( $field[ 'min' ] ) ?? '', 412 esc_attr( $field[ 'max' ] ) ?? '' 541 implode( ' ', $attrs ) 413 542 ); 414 543 } 415 544 545 private function render_text_field( $field, $value ): void { 546 printf( 547 '<input type="text" 548 name="fpg_meta[%s]" 549 value="%s" 550 placeholder="%s" 551 >', 552 esc_attr( $field[ 'id' ] ), 553 esc_attr( $value ), 554 esc_attr( $field[ 'placeholder' ] ?? '' ), 555 ); 556 } 557 416 558 private function render_switcher_field( array $field, $value ): void { 417 printf( 418 '<input type="hidden" name="fpg_meta[%s]" value="0"> 419 <input type="checkbox" name="fpg_meta[%s]" value="1" %s>', 420 esc_attr( $field[ 'id' ] ), 421 esc_attr( $field[ 'id' ] ), 422 checked( $value, true, false ) 423 ); 424 } 425 426 private function get_dynamic_options( string $type ): array { 559 $id = esc_attr( $field[ 'id' ] ); 560 $checked = checked( $value, true, false ); 561 ?> 562 <label class="fpg-switcher"> 563 <input type="hidden" name="fpg_meta[<?php echo $id; ?>]" value="0"> 564 565 <input 566 type="checkbox" 567 name="fpg_meta[<?php echo $id; ?>]" 568 value="1" 569 <?php echo $checked; ?> 570 > 571 572 <span class="fpg-switcher-label"></span> 573 </label> 574 <?php 575 } 576 577 private function get_dynamic_options( $type, $limit = - 1, $search = '' ): array { 578 switch ( $type ) { 579 case 'posts': 580 $args = [ 581 'post_type' => 'post', 582 'posts_per_page' => $limit > 0 ? $limit : 50, 583 'post_status' => 'publish', 584 'orderby' => 'title', 585 'order' => 'ASC', 586 ]; 587 588 if ( ! empty( $search ) ) { 589 $args[ 's' ] = $search; 590 } 591 592 return get_posts( $args ); 593 594 case 'categories': 595 $args = [ 596 'taxonomy' => 'category', 597 'hide_empty' => false, 598 'orderby' => 'name', 599 'order' => 'ASC', 600 ]; 601 602 if ( $limit > 0 ) { 603 $args[ 'number' ] = $limit; 604 } 605 606 if ( ! empty( $search ) ) { 607 $args[ 'search' ] = $search; 608 } 609 610 return get_terms( $args ); 611 612 case 'tags': 613 $args = [ 614 'taxonomy' => 'post_tag', 615 'hide_empty' => false, 616 'orderby' => 'name', 617 'order' => 'ASC', 618 ]; 619 620 if ( $limit > 0 ) { 621 $args[ 'number' ] = $limit; 622 } 623 624 if ( ! empty( $search ) ) { 625 $args[ 'search' ] = $search; 626 } 627 628 return get_terms( $args ); 629 } 630 631 return []; 632 } 633 634 private function get_selected_items( $type, $ids ): array { 635 if ( empty( $ids ) ) { 636 return []; 637 } 638 427 639 switch ( $type ) { 428 640 case 'posts': 429 641 return get_posts( [ 430 642 'post_type' => 'post', 431 'posts_per_page' => 50,643 'posts_per_page' => - 1, 432 644 'post_status' => 'publish', 645 'post__in' => array_map( 'intval', $ids ), 646 'orderby' => 'post__in', 433 647 ] ); 434 648 … … 437 651 'taxonomy' => 'category', 438 652 'hide_empty' => false, 653 'include' => array_map( 'intval', $ids ), 439 654 ] ); 440 655 … … 443 658 'taxonomy' => 'post_tag', 444 659 'hide_empty' => false, 660 'include' => array_map( 'intval', $ids ), 445 661 ] ); 446 662 } … … 449 665 } 450 666 451 private function render_option( $key, string $label, $value, bool $multiple ): void { 667 private function render_dynamic_option( $item, $type, $value, $multiple ): void { 668 switch ( $type ) { 669 case 'posts': 670 $key = $item->ID; 671 $label = $item->post_title; 672 break; 673 674 case 'categories': 675 case 'tags': 676 $key = $item->term_id; 677 $label = $item->name; 678 break; 679 680 default: 681 return; 682 } 683 684 $this->render_option( $key, $label, $value, $multiple ); 685 } 686 687 private function render_option( $key, $label, $value, $multiple ): void { 452 688 printf( 453 689 '<option value="%s" %s>%s</option>', … … 463 699 ); 464 700 } 701 702 public function ajax_load_select_options(): void { 703 check_ajax_referer( 'fpg_metabox_ajax', 'nonce' ); 704 705 $type = isset( $_GET[ 'type' ] ) ? sanitize_text_field( wp_unslash( $_GET[ 'type' ] ) ) : ''; 706 $search = isset( $_GET[ 'search' ] ) ? sanitize_text_field( wp_unslash( $_GET[ 'search' ] ) ) : ''; 707 $page = isset( $_GET[ 'page' ] ) ? absint( $_GET[ 'page' ] ) : 1; 708 709 if ( ! in_array( $type, [ 'posts', 'categories', 'tags' ], true ) ) { 710 wp_send_json_error( [ 'message' => 'Invalid type' ] ); 711 } 712 713 $per_page = 10; 714 $offset = ( $page - 1 ) * $per_page; 715 716 $items = $this->get_dynamic_options( $type, $per_page, $search ); 717 $results = []; 718 719 foreach ( $items as $item ) { 720 switch ( $type ) { 721 case 'posts': 722 $results[] = [ 723 'id' => $item->ID, 724 'text' => $item->post_title, 725 ]; 726 break; 727 728 case 'categories': 729 case 'tags': 730 $results[] = [ 731 'id' => $item->term_id, 732 'text' => $item->name, 733 ]; 734 break; 735 } 736 } 737 738 wp_send_json_success( [ 739 'results' => $results, 740 'pagination' => [ 741 'more' => count( $items ) === $per_page, 742 ], 743 ] ); 744 } 745 746 private function get_image_sizes_options(): array { 747 $options = []; 748 749 $core_sizes = [ 750 'thumbnail' => [ 751 'label' => __( 'Thumbnail', 'fancy-post-grid' ), 752 'width' => get_option( 'thumbnail_size_w' ), 753 'height' => get_option( 'thumbnail_size_h' ), 754 ], 755 'medium' => [ 756 'label' => __( 'Medium', 'fancy-post-grid' ), 757 'width' => get_option( 'medium_size_w' ), 758 'height' => get_option( 'medium_size_h' ), 759 ], 760 'medium_large' => [ 761 'label' => __( 'Medium Large', 'fancy-post-grid' ), 762 'width' => get_option( 'medium_large_size_w' ), 763 'height' => get_option( 'medium_large_size_h' ), // often 0 764 ], 765 'large' => [ 766 'label' => __( 'Large', 'fancy-post-grid' ), 767 'width' => get_option( 'large_size_w' ), 768 'height' => get_option( 'large_size_h' ), 769 ], 770 ]; 771 772 foreach ( $core_sizes as $key => $data ) { 773 $options[ $key ] = sprintf( 774 '%s - %d x %d', 775 $data[ 'label' ], 776 $data[ 'width' ], 777 $data[ 'height' ] 778 ); 779 } 780 781 // Get all registered sizes 782 $all_sizes = get_intermediate_image_sizes(); 783 $custom_sizes = wp_get_additional_image_sizes(); 784 785 foreach ( $all_sizes as $size ) { 786 if ( isset( $core_sizes[ $size ] ) ) { 787 continue; 788 } 789 790 // Custom registered sizes 791 if ( isset( $custom_sizes[ $size ] ) ) { 792 $width = $custom_sizes[ $size ][ 'width' ]; 793 $height = $custom_sizes[ $size ][ 'height' ]; 794 795 $label = ucwords( str_replace( [ '-', '_' ], ' ', $size ) ); 796 797 $options[ $size ] = sprintf( 798 '%s - %d x %d', 799 $label, 800 $width, 801 $height 802 ); 803 } 804 } 805 806 $options[ 'full' ] = __( 'Full', 'fancy-post-grid' ); 807 808 return $options; 809 } 465 810 } 466 -
fancy-post-grid/trunk/includes/shortcode/class-shortcode-renderer.php
r3456923 r3464012 10 10 11 11 private string $post_type = 'fpg_shortcode'; 12 12 13 private string $shortcode = 'fpg_shortcode'; 14 13 15 private string $meta_key = '_fpg_shortcode_meta'; 16 17 private array $current_meta = []; 14 18 15 19 public function __construct() { 16 20 add_shortcode( $this->shortcode, [ $this, 'render' ] ); 21 22 add_action( 'wp_enqueue_scripts', [ $this, 'enqueue_assets_if_shortcode' ] ); 23 } 24 25 public function enqueue_assets_if_shortcode(): void { 26 global $post; 27 28 if ( isset( $post ) && has_shortcode( $post->post_content, $this->shortcode ) ) { 29 wp_enqueue_style( 30 'fpg-shortcode', 31 FPG_ASSETS . 'css/shortcode-frontend.css', 32 [ 'rs-swiper' ], 33 FPG_VERSION 34 ); 35 36 wp_enqueue_script( 37 'fpg-shortcode', 38 FPG_ASSETS . 'js/shortcode-frontend.js', 39 [ 'rs-swiper' ], 40 FPG_VERSION, 41 true 42 ); 43 } 17 44 } 18 45 19 46 public function render( array $atts ): string { 20 21 47 $atts = shortcode_atts( 22 48 [ … … 39 65 } 40 66 41 $meta = get_post_meta( $post_id, $this->meta_key, true ); 42 $meta = is_array( $meta ) ? $meta : []; 43 44 $query_args = $this->build_query_args( $meta ); 67 $meta = get_post_meta( $post_id, $this->meta_key, true ); 68 $this->current_meta = is_array( $meta ) ? $meta : []; 69 70 $query_args = $this->build_query_args(); 71 $style_atts = $this->build_style_atts(); 72 $slider_config = $this->build_slider_config(); 73 $layout = $this->get_setting( 'layout_type', 'grid' ); 74 $classes = "fpg-shortcode-wrapper fpg-shortcode-{$post_id} fpg-layout-{$layout}"; 75 76 if ( 'slider' === $layout ) { 77 $classes .= ' fpg-swiper-active swiper'; 78 } 45 79 46 80 $query = new WP_Query( $query_args ); … … 48 82 ob_start(); 49 83 ?> 50 <div class="fpg-grid-wrapper fpg-grid-<?php echo esc_attr( $meta[ 'layout' ][ 'layout_type' ] ?? 'grid' ); ?>" data-id="<?php echo esc_attr( $post_id ); ?>"> 84 <div 85 class="<?php echo esc_attr( $classes ) ?>" 86 data-id="<?php echo esc_attr( $post_id ); ?>" 87 <?php if ( ! empty( $style_atts ) ) : ?> 88 style="<?php echo esc_attr( $style_atts ) ?>" 89 <?php endif; ?> 90 <?php if ( ! empty( $slider_config ) ) : ?> 91 data-slider="<?php echo $slider_config; ?>" 92 <?php endif; ?> 93 > 51 94 <?php if ( $query->have_posts() ) : ?> 52 <div class="fpg-grid-row"> 53 <?php while ( $query->have_posts() ) : $query->the_post(); ?> 54 <div class="fpg-grid-item fpg-card-<?php echo esc_attr( $meta[ 'layout' ][ 'card_layout' ] ?? 'one' ); ?>"> 55 <?php $this->render_card( get_the_ID(), $meta ); ?> 56 </div> 57 <?php endwhile; ?> 95 <?php 96 if ( 'slider' === $layout ) { 97 echo '<div class="swiper-wrapper">'; 98 } 99 while ( $query->have_posts() ) : $query->the_post(); 100 if ( 'slider' === $layout ) { 101 echo '<div class="swiper-slide">'; 102 } 103 include FPG_INCLUDES . 'shortcode/templates/card-one.php'; 104 if ( 'slider' === $layout ) { 105 echo '</div>'; 106 } 107 endwhile; 108 wp_reset_postdata(); 109 if ( 'slider' === $layout ) { 110 echo '</div>'; 111 } 112 ?> 113 <?php else : ?> 114 <div class="fpg-shortcode-np-posts"> 115 <?php esc_html_e( 'No posts found.', 'fancy-post-grid' ); ?> 58 116 </div> 59 60 <?php if ( ! empty( $meta[ 'layout' ][ 'pagination' ] ) ) : ?>61 <div class="fpg-pagination">62 <?php echo wp_kses_post(63 paginate_links( [64 'total' => $query->max_num_pages,65 'current' => max( 1, get_query_var( 'paged' ) ),66 ] )67 ); ?>68 </div>69 <?php endif; ?>70 71 <?php wp_reset_postdata(); ?>72 <?php else : ?>73 <p><?php esc_html_e( 'No posts found.', 'fancy-post-grid' ); ?></p>74 117 <?php endif; ?> 75 118 </div> … … 79 122 } 80 123 81 private function build_query_args( array $meta ): array { 82 124 private function build_query_args(): array { 83 125 $args = [ 84 126 'post_type' => 'post', 85 'posts_per_page' => absint( $ meta[ 'query_builder' ][ 'posts_per_page' ] ?? 10),86 'offset' => absint( $ meta[ 'query_builder' ][ 'offset' ] ?? 0),127 'posts_per_page' => absint( $this->get_setting( 'posts_per_page', 10 ) ), 128 'offset' => absint( $this->get_setting( 'offset', 0 ) ), 87 129 'post_status' => 'publish', 130 'order' => $this->get_setting( 'order', 'DESC' ), 131 'orderby' => $this->get_setting( 'order_by', 'date' ), 88 132 ]; 89 133 90 if ( ( $meta[ 'query_builder' ][ 'posts_by' ] ?? 'default' ) === 'specific' && ! empty( $meta[ 'query_builder' ][ 'post_ids' ]) ) {91 $args[ 'post__in' ] = array_map( 'absint', $ meta[ 'query_builder' ][ 'post_ids' ]);134 if ( $this->get_setting( 'posts_by', 'default' ) === 'specific' && ! empty( $this->get_setting( 'post_ids', [] ) ) ) { 135 $args[ 'post__in' ] = array_map( 'absint', $this->get_setting( 'post_ids', [] ) ); 92 136 $args[ 'orderby' ] = 'post__in'; 93 137 } 94 138 95 if ( ( $meta[ 'query_builder' ][ 'posts_by' ] ??'default' ) === 'default' ) {96 if ( ! empty( $ meta[ 'query_builder' ][ 'include_category' ]) ) {97 $args[ 'category__in' ] = array_map( 'absint', $ meta[ 'query_builder' ][ 'include_category' ]);139 if ( $this->get_setting( 'posts_by', 'default' ) === 'default' ) { 140 if ( ! empty( $this->get_setting( 'include_category', [] ) ) ) { 141 $args[ 'category__in' ] = array_map( 'absint', $this->get_setting( 'include_category', [] ) ); 98 142 } 99 if ( ! empty( $ meta[ 'query_builder' ][ 'exclude_category' ]) ) {100 $args[ 'category__not_in' ] = array_map( 'absint', $ meta[ 'query_builder' ][ 'exclude_category' ]);143 if ( ! empty( $this->get_setting( 'exclude_category', [] ) ) ) { 144 $args[ 'category__not_in' ] = array_map( 'absint', $this->get_setting( 'exclude_category', [] ) ); 101 145 } 102 146 } 103 147 104 if ( ! empty( $ meta[ 'query_builder' ][ 'include_tags' ]) ) {105 $args[ 'tag__in' ] = array_map( 'absint', $ meta[ 'query_builder' ][ 'include_tags' ]);106 } 107 if ( ! empty( $ meta[ 'query_builder' ][ 'exclude_tags' ]) ) {108 $args[ 'tag__not_in' ] = array_map( 'absint', $ meta[ 'query_builder' ][ 'exclude_tags' ]);109 } 110 111 if ( ! empty( $ meta[ 'query_builder' ][ 'exclude_posts' ]) ) {112 $args[ 'post__not_in' ] = array_map( 'absint', $ meta[ 'query_builder' ][ 'exclude_posts' ]);148 if ( ! empty( $this->get_setting( 'include_tags', [] ) ) ) { 149 $args[ 'tag__in' ] = array_map( 'absint', $this->get_setting( 'include_tags', [] ) ); 150 } 151 if ( ! empty( $this->get_setting( 'exclude_tags', [] ) ) ) { 152 $args[ 'tag__not_in' ] = array_map( 'absint', $this->get_setting( 'exclude_tags', [] ) ); 153 } 154 155 if ( ! empty( $this->get_setting( 'exclude_posts', [] ) ) ) { 156 $args[ 'post__not_in' ] = array_map( 'absint', $this->get_setting( 'exclude_posts', [] ) ); 113 157 } 114 158 115 159 $meta_query = []; 116 if ( ! empty( $meta[ 'query_builder' ][ 'featured_post_only' ] ) ) { 160 161 if ( $this->get_setting( 'featured_post_only' ) ) { 117 162 $meta_query[] = [ 118 163 'key' => '_fpg_featured_post', … … 120 165 ]; 121 166 } 122 if ( ! empty( $meta[ 'query_builder' ][ 'trending_post_only' ] ) ) { 167 168 if ( $this->get_setting( 'trending_post_only' ) ) { 123 169 $meta_query[] = [ 124 170 'key' => '_fpg_trending_post', … … 126 172 ]; 127 173 } 128 if ( ! empty( $meta[ 'query_builder' ][ 'editor_picks_post_only' ] ) ) { 174 175 if ( $this->get_setting( 'editor_picks_post_only' ) ) { 129 176 $meta_query[] = [ 130 177 'key' => '_fpg_editor_picks_post', … … 132 179 ]; 133 180 } 134 if ( ! empty( $meta[ 'query_builder' ][ 'popular_posts_only' ] ) ) { 181 182 if ( $this->get_setting( 'popular_posts_only' ) ) { 135 183 $meta_query[] = [ 136 184 'key' => '_fpg_post_views_count', … … 141 189 $args[ 'orderby' ] = 'meta_value_num'; 142 190 $args[ 'meta_key' ] = '_fpg_post_views_count'; 143 $args[ 'order' ] = 'DESC';144 } 191 } 192 145 193 if ( $meta_query ) { 146 194 $args[ 'meta_query' ] = $meta_query; … … 150 198 } 151 199 152 private function render_card( int $post_id, array $meta ): void { 153 $layout = $meta[ 'layout' ][ 'card_layout' ] ?? 'one'; 154 ?> 155 <div class="fpg-card-content fpg-card-<?php echo esc_attr( $layout ); ?>"> 156 <a href="<?php echo esc_url( get_permalink( $post_id ) ); ?>"> 157 <?php if ( has_post_thumbnail( $post_id ) ) : ?> 158 <div class="fpg-card-thumb"> 159 <?php echo get_the_post_thumbnail( $post_id, 'medium' ); ?> 160 </div> 161 <?php endif; ?> 162 <h3 class="fpg-card-title"><?php echo esc_html( get_the_title( $post_id ) ); ?></h3> 163 </a> 164 <div class="fpg-card-excerpt"> 165 <?php echo wp_kses_post( wp_trim_words( get_post_field( 'post_content', $post_id ), 20 ) ); ?> 166 </div> 167 </div> 168 <?php 200 private function build_style_atts(): string { 201 $style = ''; 202 203 if ( 'grid' === $this->get_setting( 'layout_type', 'grid' ) ) { 204 $style .= '--col-lg:' . $this->get_setting( 'col_lg', 3 ) . ';'; 205 $style .= '--col-md:' . $this->get_setting( 'col_md', 2 ) . ';'; 206 $style .= '--col-sm:' . $this->get_setting( 'col_sm', 1 ) . ';'; 207 $style .= '--col-gap:' . $this->get_setting( 'col_gap', 30 ) . 'px;'; 208 $style .= '--row-gap:' . $this->get_setting( 'row_gap', 30 ) . 'px;'; 209 } 210 211 212 return $style; 213 } 214 215 private function build_slider_config(): string { 216 if ( 'slider' !== $this->get_setting( 'layout_type', 'grid' ) ) { 217 return ''; 218 } 219 220 $config = [ 221 'colLg' => (int) $this->get_setting( 'col_lg', 3 ), 222 'colMd' => (int) $this->get_setting( 'col_md', 2 ), 223 'colSm' => (int) $this->get_setting( 'col_sm', 1 ), 224 'colGap' => (int) $this->get_setting( 'col_gap', 30 ), 225 ]; 226 227 return esc_attr( wp_json_encode( $config ) ); 228 } 229 230 private function get_setting( string $key, $default = null ) { 231 return $this->current_meta[ $key ] ?? $default; 169 232 } 170 233 } -
fancy-post-grid/trunk/languages/fancy-post-grid.pot
r3456923 r3464012 4 4 "Project-Id-Version: Fancy Post Grid - Ultimate Post Grid Builder\n" 5 5 "Report-Msgid-Bugs-To: \n" 6 "POT-Creation-Date: 2026-02- 08 08:47+0000\n"6 "POT-Creation-Date: 2026-02-18 06:21+0000\n" 7 7 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 8 8 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" … … 227 227 msgstr "" 228 228 229 #: includes/shortcode/class-shortcode-cpt.php:3 4229 #: includes/shortcode/class-shortcode-cpt.php:36 230 230 msgid "Add New Shortcode" 231 231 msgstr "" … … 271 271 msgstr "" 272 272 273 #: includes/shortcode/class-shortcode-cpt.php:3 3273 #: includes/shortcode/class-shortcode-cpt.php:35 274 274 msgid "All Shortcodes" 275 275 msgstr "" … … 331 331 msgstr "" 332 332 333 #: includes/shortcode/class-shortcode-metabox.php:211 333 334 #: includes/elementor/traits/trait-query-builder.php:111 334 335 msgid "Ascending" 335 336 msgstr "" 336 337 337 #: includes/shortcode/class-shortcode- cpt.php:72338 #: includes/shortcode/class-shortcode-metabox.php:224 338 339 #: includes/elementor/widgets/cards/card-style.php:21 339 340 msgid "Author" … … 562 563 msgstr "" 563 564 564 #: includes/shortcode/class-shortcode-metabox.php: 53565 msgid "Card Layout"565 #: includes/shortcode/class-shortcode-metabox.php:85 566 msgid "Card Settings" 566 567 msgstr "" 567 568 … … 618 619 msgstr "" 619 620 620 #: includes/shortcode/class-shortcode-metabox.php:1 03621 #: includes/shortcode/class-shortcode-metabox.php:183 621 622 msgid "Choose how to select posts." 622 623 msgstr "" … … 628 629 msgstr "" 629 630 630 #: includes/shortcode/class-shortcode-metabox.php: 129631 #: includes/shortcode/class-shortcode-metabox.php:237 631 632 msgid "Choose specific posts to display." 632 633 msgstr "" … … 639 640 msgid "" 640 641 "Choose the AI model responsible for generating images from text prompts." 641 msgstr ""642 643 #: includes/shortcode/class-shortcode-metabox.php:54644 msgid "Choose the card design layout."645 642 msgstr "" 646 643 … … 704 701 msgstr "" 705 702 703 #: includes/shortcode/class-shortcode-metabox.php:50 704 msgid "Column for large device." 705 msgstr "" 706 707 #: includes/shortcode/class-shortcode-metabox.php:57 708 msgid "Column for medium device." 709 msgstr "" 710 711 #: includes/shortcode/class-shortcode-metabox.php:64 712 msgid "Column for small device." 713 msgstr "" 714 715 #: includes/shortcode/class-shortcode-metabox.php:70 716 msgid "Column Gap" 717 msgstr "" 718 719 #: includes/shortcode/class-shortcode-metabox.php:49 720 msgid "Column Large" 721 msgstr "" 722 723 #: includes/shortcode/class-shortcode-metabox.php:56 724 msgid "Column Medium" 725 msgstr "" 726 706 727 #: includes/elementor/traits/trait-slider-controls.php:1006 707 728 #: includes/elementor/widgets/class-date-time.php:300 … … 713 734 msgstr "" 714 735 736 #: includes/shortcode/class-shortcode-metabox.php:63 737 msgid "Column Small" 738 msgstr "" 739 740 #: includes/shortcode/class-shortcode-metabox.php:229 741 msgid "Comment Count" 742 msgstr "" 743 715 744 #: includes/admin/view/settings.php:81 716 745 msgid "Configure AI-powered content generation and image creation" … … 740 769 msgstr "" 741 770 771 #: includes/shortcode/class-shortcode-cpt.php:147 772 msgid "Copy" 773 msgstr "" 774 775 #: includes/shortcode/class-shortcode-cpt.php:130 776 msgid "Copy this shortcode and paste it anywhere:" 777 msgstr "" 778 742 779 #: includes/elementor/widgets/class-heading.php:725 743 780 #: includes/elementor/widgets/class-icon-box.php:728 … … 756 793 #: includes/admin/view/welcome.php:42 757 794 msgid "Create beautiful grid and slider layouts for your posts" 795 msgstr "" 796 797 #. Description of the plugin 798 msgid "" 799 "Create beautiful, responsive post grids, sliders, and carousels using " 800 "Elementor, Gutenberg, or shortcodes." 758 801 msgstr "" 759 802 … … 813 856 msgstr "" 814 857 815 #: includes/shortcode/class-shortcode-cpt.php:73 858 #: includes/shortcode/class-shortcode-cpt.php:85 859 #: includes/shortcode/class-shortcode-metabox.php:226 816 860 #: includes/elementor/widgets/class-date-time.php:161 817 861 msgid "Date" … … 873 917 msgstr "" 874 918 875 #: includes/shortcode/class-shortcode-metabox.php:1 05919 #: includes/shortcode/class-shortcode-metabox.php:185 876 920 msgid "Default Query" 877 921 msgstr "" 878 922 923 #: includes/shortcode/class-shortcode-metabox.php:212 879 924 #: includes/elementor/traits/trait-query-builder.php:110 880 925 msgid "Descending" … … 989 1034 msgstr "" 990 1035 991 #: includes/shortcode/class-shortcode-cpt.php:3 51036 #: includes/shortcode/class-shortcode-cpt.php:37 992 1037 msgid "Edit Shortcode" 993 1038 msgstr "" 994 1039 995 #: includes/shortcode/class-shortcode-metabox.php: 901040 #: includes/shortcode/class-shortcode-metabox.php:170 996 1041 #: includes/elementor/traits/trait-query-builder.php:88 997 1042 msgid "Editor Picks Only" … … 1040 1085 msgstr "" 1041 1086 1042 #: includes/shortcode/class-shortcode-metabox.php:651043 msgid "Enable Pagination"1044 msgstr ""1045 1046 1087 #: includes/elementor/widgets/class-icon-box.php:234 1047 1088 msgid "" … … 1068 1109 msgstr "" 1069 1110 1070 #: includes/shortcode/class-shortcode-cpt.php:6 11111 #: includes/shortcode/class-shortcode-cpt.php:62 1071 1112 msgid "Enter Shortcode Name" 1072 1113 msgstr "" … … 1084 1125 msgstr "" 1085 1126 1086 #: includes/shortcode/class-shortcode-metabox.php:152 1127 #: includes/shortcode/class-shortcode-metabox.php:127 1128 msgid "Excerpt Length" 1129 msgstr "" 1130 1131 #: includes/shortcode/class-shortcode-metabox.php:260 1087 1132 msgid "Exclude Categories" 1088 1133 msgstr "" … … 1092 1137 msgstr "" 1093 1138 1094 #: includes/shortcode/class-shortcode-metabox.php: 1881139 #: includes/shortcode/class-shortcode-metabox.php:296 1095 1140 #: includes/elementor/traits/trait-query-builder.php:210 1096 1141 msgid "Exclude Posts" 1097 1142 msgstr "" 1098 1143 1099 #: includes/shortcode/class-shortcode-metabox.php: 1761144 #: includes/shortcode/class-shortcode-metabox.php:284 1100 1145 msgid "Exclude Tags" 1101 1146 msgstr "" … … 1142 1187 msgstr "" 1143 1188 1144 #. Description of the plugin1145 msgid ""1146 "Fancy Post Grid lets you showcase posts in 9+ modern styles with full "1147 "support for Gutenberg blocks, Elementor widgets, and shortcodes — simple, "1148 "responsive, and customizable."1149 msgstr ""1150 1151 1189 #: includes/admin/view/welcome.php:27 1152 1190 msgid "Fancy Post Grid Tutorial" 1153 1191 msgstr "" 1154 1192 1155 #: includes/shortcode/class-shortcode-metabox.php: 781193 #: includes/shortcode/class-shortcode-metabox.php:158 1156 1194 #: includes/elementor/traits/trait-query-builder.php:71 1157 1195 msgid "Featured Posts Only" … … 1230 1268 msgstr "" 1231 1269 1270 #: includes/shortcode/class-shortcode-metabox.php:806 1271 msgid "Full" 1272 msgstr "" 1273 1232 1274 #: includes/admin/view/site-builder.php:115 1233 1275 msgid "Full Site Editing" … … 1282 1324 msgstr "" 1283 1325 1284 #: includes/shortcode/class-shortcode-metabox.php:4 51326 #: includes/shortcode/class-shortcode-metabox.php:41 1285 1327 msgid "Grid" 1286 1328 msgstr "" … … 1539 1581 msgstr "" 1540 1582 1583 #: includes/shortcode/class-shortcode-metabox.php:222 1584 msgid "ID" 1585 msgstr "" 1586 1541 1587 #: includes/elementor/traits/trait-slider-controls.php:600 1542 1588 msgid "" … … 1594 1640 msgstr "" 1595 1641 1596 #: includes/shortcode/class-shortcode-metabox.php: 1401642 #: includes/shortcode/class-shortcode-metabox.php:248 1597 1643 msgid "Include Categories" 1598 1644 msgstr "" 1599 1645 1600 #: includes/shortcode/class-shortcode-metabox.php: 1641646 #: includes/shortcode/class-shortcode-metabox.php:272 1601 1647 msgid "Include Tags" 1602 1648 msgstr "" … … 1649 1695 msgstr "" 1650 1696 1651 #: includes/shortcode/class-shortcode-metabox.php:36 1652 msgid "Layout" 1653 msgstr "" 1654 1655 #: includes/shortcode/class-shortcode-metabox.php:56 1656 msgid "Layout One" 1657 msgstr "" 1658 1659 #: includes/shortcode/class-shortcode-metabox.php:58 1660 msgid "Layout Three" 1661 msgstr "" 1662 1663 #: includes/shortcode/class-shortcode-metabox.php:57 1664 msgid "Layout Two" 1665 msgstr "" 1666 1667 #: includes/shortcode/class-shortcode-metabox.php:42 1697 #: includes/shortcode/class-shortcode-metabox.php:766 1698 msgid "Large" 1699 msgstr "" 1700 1701 #: includes/shortcode/class-shortcode-metabox.php:33 1702 msgid "Layout Settings" 1703 msgstr "" 1704 1705 #: includes/shortcode/class-shortcode-metabox.php:38 1668 1706 msgid "Layout Type" 1669 1707 msgstr "" … … 1769 1807 msgstr "" 1770 1808 1809 #: includes/shortcode/class-shortcode-metabox.php:756 1810 msgid "Medium" 1811 msgstr "" 1812 1813 #: includes/shortcode/class-shortcode-metabox.php:761 1814 msgid "Medium Large" 1815 msgstr "" 1816 1771 1817 #: includes/admin/view/site-builder.php:95 1772 1818 msgid "Mega Menu" … … 1775 1821 #: includes/elementor/widgets/class-icon-box.php:233 1776 1822 msgid "Menu Mode?" 1823 msgstr "" 1824 1825 #: includes/shortcode/class-shortcode-metabox.php:230 1826 msgid "Menu Order" 1777 1827 msgstr "" 1778 1828 … … 1799 1849 msgstr "" 1800 1850 1851 #: includes/shortcode/class-shortcode-metabox.php:227 1852 msgid "Modified" 1853 msgstr "" 1854 1801 1855 #: includes/elementor/widgets/class-date-time.php:189 1802 1856 msgid "Month Day, Year" … … 1819 1873 msgstr "" 1820 1874 1875 #: includes/shortcode/class-shortcode-metabox.php:225 1876 msgid "Name" 1877 msgstr "" 1878 1821 1879 #: includes/elementor/traits/trait-slider-controls.php:359 1822 1880 msgid "Nav Style" … … 1835 1893 msgstr "" 1836 1894 1837 #: includes/shortcode/class-shortcode-cpt.php:3 61895 #: includes/shortcode/class-shortcode-cpt.php:38 1838 1896 msgid "New Shortcode" 1839 1897 msgstr "" … … 1879 1937 msgstr "" 1880 1938 1881 #: includes/shortcode/class-shortcode-renderer.php: 731939 #: includes/shortcode/class-shortcode-renderer.php:115 1882 1940 msgid "No posts found." 1883 1941 msgstr "" 1884 1942 1885 #: includes/shortcode/class-shortcode-cpt.php: 391943 #: includes/shortcode/class-shortcode-cpt.php:41 1886 1944 msgid "No Shortcodes found" 1887 1945 msgstr "" 1888 1946 1889 #: includes/shortcode/class-shortcode-cpt.php:4 01947 #: includes/shortcode/class-shortcode-cpt.php:42 1890 1948 msgid "No Shortcodes found in Trash" 1891 1949 msgstr "" … … 1900 1958 msgstr "" 1901 1959 1960 #: includes/shortcode/class-shortcode-metabox.php:221 1902 1961 #: includes/elementor/traits/trait-button-helper.php:168 1903 1962 #: includes/elementor/traits/trait-button-helper.php:187 … … 1927 1986 msgstr "" 1928 1987 1929 #: includes/shortcode/class-shortcode-metabox.php: 1211988 #: includes/shortcode/class-shortcode-metabox.php:201 1930 1989 msgid "Number of posts to skip." 1931 1990 msgstr "" … … 1945 2004 msgstr "" 1946 2005 1947 #: includes/shortcode/class-shortcode-metabox.php: 1202006 #: includes/shortcode/class-shortcode-metabox.php:200 1948 2007 #: includes/elementor/traits/trait-query-builder.php:137 1949 2008 msgid "Offset" … … 1972 2031 #: includes/admin/view/settings.php:93 1973 2032 msgid "OpenRouter Settings" 2033 msgstr "" 2034 2035 #: includes/shortcode/class-shortcode-metabox.php:208 2036 msgid "Order" 2037 msgstr "" 2038 2039 #: includes/shortcode/class-shortcode-metabox.php:218 2040 msgid "Order By" 1974 2041 msgstr "" 1975 2042 … … 2024 2091 msgstr "" 2025 2092 2026 #: includes/shortcode/class-shortcode-metabox.php: 962093 #: includes/shortcode/class-shortcode-metabox.php:176 2027 2094 msgid "Popular Posts Only" 2028 2095 msgstr "" … … 2079 2146 msgstr "" 2080 2147 2081 #: includes/shortcode/class-shortcode-metabox.php:1 022148 #: includes/shortcode/class-shortcode-metabox.php:182 2082 2149 msgid "Posts By" 2083 2150 msgstr "" 2084 2151 2085 #: includes/shortcode/class-shortcode-metabox.php:1 132152 #: includes/shortcode/class-shortcode-metabox.php:193 2086 2153 msgid "Posts Per Page" 2087 2154 msgstr "" … … 2156 2223 msgstr "" 2157 2224 2158 #: includes/shortcode/class-shortcode-metabox.php: 722225 #: includes/shortcode/class-shortcode-metabox.php:153 2159 2226 #: includes/elementor/traits/trait-query-builder.php:65 2160 2227 msgid "Query Builder" … … 2163 2230 #: includes/elementor/widgets/class-post-grid.php:72 2164 2231 msgid "Query Type" 2232 msgstr "" 2233 2234 #: includes/shortcode/class-shortcode-metabox.php:228 2235 msgid "Random" 2236 msgstr "" 2237 2238 #: includes/shortcode/class-shortcode-metabox.php:134 2239 #: includes/shortcode/class-shortcode-metabox.php:141 2240 #: includes/shortcode/templates/card-one.php:56 2241 msgid "Read More" 2242 msgstr "" 2243 2244 #: includes/shortcode/class-shortcode-metabox.php:140 2245 msgid "Read More Text" 2165 2246 msgstr "" 2166 2247 … … 2242 2323 msgstr "" 2243 2324 2325 #: includes/shortcode/class-shortcode-metabox.php:77 2326 msgid "Row Gap" 2327 msgstr "" 2328 2244 2329 #: includes/elementor/traits/trait-slider-controls.php:998 2245 2330 #: includes/elementor/widgets/class-date-time.php:298 … … 2267 2352 msgstr "" 2268 2353 2354 #: includes/shortcode/class-shortcode-cpt.php:121 2355 msgid "Save this shortcode to generate its ID." 2356 msgstr "" 2357 2269 2358 #: includes/elementor/widgets/class-image.php:142 2270 2359 msgid "Scale" … … 2301 2390 msgstr "" 2302 2391 2303 #: includes/shortcode/class-shortcode-cpt.php: 382392 #: includes/shortcode/class-shortcode-cpt.php:40 2304 2393 msgid "Search Shortcodes" 2305 2394 msgstr "" … … 2313 2402 msgstr "" 2314 2403 2315 #: includes/shortcode/class-shortcode-metabox.php: 1532404 #: includes/shortcode/class-shortcode-metabox.php:261 2316 2405 msgid "Select categories to exclude." 2317 2406 msgstr "" 2318 2407 2319 #: includes/shortcode/class-shortcode-metabox.php: 1412408 #: includes/shortcode/class-shortcode-metabox.php:249 2320 2409 msgid "Select categories to include." 2321 2410 msgstr "" … … 2333 2422 msgstr "" 2334 2423 2335 #: includes/shortcode/class-shortcode-metabox.php: 1892424 #: includes/shortcode/class-shortcode-metabox.php:297 2336 2425 msgid "Select posts to exclude." 2337 2426 msgstr "" … … 2341 2430 msgstr "" 2342 2431 2343 #: includes/shortcode/class-shortcode-metabox.php: 1282432 #: includes/shortcode/class-shortcode-metabox.php:236 2344 2433 #: includes/elementor/traits/trait-query-builder.php:146 2345 2434 msgid "Select Specific Posts" … … 2350 2439 msgstr "" 2351 2440 2352 #: includes/shortcode/class-shortcode-metabox.php: 1772441 #: includes/shortcode/class-shortcode-metabox.php:285 2353 2442 msgid "Select tags to exclude." 2354 2443 msgstr "" 2355 2444 2356 #: includes/shortcode/class-shortcode-metabox.php: 1652445 #: includes/shortcode/class-shortcode-metabox.php:273 2357 2446 msgid "Select tags to include." 2358 2447 msgstr "" 2359 2448 2360 #: includes/shortcode/class-shortcode-metabox.php: 432449 #: includes/shortcode/class-shortcode-metabox.php:39 2361 2450 msgid "Select the layout type for displaying posts." 2362 2451 msgstr "" … … 2389 2478 msgstr "" 2390 2479 2391 #: includes/shortcode/class-shortcode-cpt.php:32 2392 #: includes/shortcode/class-shortcode-cpt.php:71 2480 #: includes/shortcode/class-shortcode-cpt.php:34 2481 #: includes/shortcode/class-shortcode-cpt.php:81 2482 #: includes/shortcode/class-shortcode-cpt.php:111 2393 2483 #: includes/admin/view/settings.php:42 2394 2484 msgid "Shortcode" … … 2399 2489 msgstr "" 2400 2490 2401 #: includes/shortcode/class-shortcode-metabox.php: 2202491 #: includes/shortcode/class-shortcode-metabox.php:336 2402 2492 msgid "Shortcode Settings" 2403 2493 msgstr "" 2404 2494 2405 2495 #: includes/admin/class-dashboard.php:36 2406 #: includes/shortcode/class-shortcode-cpt.php:3 12496 #: includes/shortcode/class-shortcode-cpt.php:33 2407 2497 msgid "Shortcodes" 2408 2498 msgstr "" … … 2422 2512 msgstr "" 2423 2513 2514 #: includes/shortcode/class-shortcode-metabox.php:147 2515 msgid "Show Category" 2516 msgstr "" 2517 2424 2518 #: includes/elementor/widgets/class-date-time.php:170 2425 2519 msgid "Show Date" … … 2430 2524 msgstr "" 2431 2525 2526 #: includes/shortcode/class-shortcode-metabox.php:121 2527 msgid "Show Excerpt" 2528 msgstr "" 2529 2432 2530 #: includes/elementor/widgets/class-social-icons.php:64 2433 2531 msgid "Show Icons" 2434 2532 msgstr "" 2435 2533 2436 #: includes/shortcode/class-shortcode-metabox.php:662437 msgid "Show pagination for posts."2438 msgstr ""2439 2440 2534 #: includes/elementor/widgets/class-divider.php:77 2441 2535 msgid "Show Progress" … … 2448 2542 #: includes/elementor/widgets/class-social-icons.php:76 2449 2543 msgid "Show Social Texts" 2544 msgstr "" 2545 2546 #: includes/shortcode/class-shortcode-metabox.php:107 2547 msgid "Show Thumbnail" 2450 2548 msgstr "" 2451 2549 … … 2494 2592 msgstr "" 2495 2593 2496 #: includes/shortcode/class-shortcode-metabox.php:4 62594 #: includes/shortcode/class-shortcode-metabox.php:42 2497 2595 msgid "Slider" 2498 2596 msgstr "" … … 2540 2638 msgstr "" 2541 2639 2640 #: includes/shortcode/class-shortcode-metabox.php:71 2641 msgid "Space between per column." 2642 msgstr "" 2643 2644 #: includes/shortcode/class-shortcode-metabox.php:78 2645 msgid "Space between per row." 2646 msgstr "" 2647 2542 2648 #: includes/elementor/widgets/class-social-icons.php:262 2543 2649 #: includes/elementor/widgets/class-social-icons.php:400 … … 2545 2651 msgstr "" 2546 2652 2547 #: includes/shortcode/class-shortcode-metabox.php:1 062653 #: includes/shortcode/class-shortcode-metabox.php:186 2548 2654 #: includes/elementor/traits/trait-query-builder.php:125 2549 2655 msgid "Specific Posts" … … 2742 2848 msgstr "" 2743 2849 2850 #: includes/shortcode/class-shortcode-metabox.php:751 2851 msgid "Thumbnail" 2852 msgstr "" 2853 2854 #: includes/shortcode/class-shortcode-metabox.php:113 2855 msgid "Thumbnail Size" 2856 msgstr "" 2857 2744 2858 #: includes/elementor/widgets/class-date-time.php:58 2745 2859 msgid "Time" … … 2762 2876 msgstr "" 2763 2877 2878 #: includes/shortcode/class-shortcode-metabox.php:223 2764 2879 #: includes/elementor/widgets/class-icon-box.php:929 2765 2880 msgid "Title" … … 2773 2888 #: includes/elementor/widgets/class-icon-box.php:322 2774 2889 msgid "Title HTML Tag" 2890 msgstr "" 2891 2892 #: includes/shortcode/class-shortcode-metabox.php:90 2893 msgid "Title Tag" 2775 2894 msgstr "" 2776 2895 … … 2826 2945 msgstr "" 2827 2946 2828 #: includes/shortcode/class-shortcode-metabox.php: 842947 #: includes/shortcode/class-shortcode-metabox.php:164 2829 2948 #: includes/elementor/traits/trait-query-builder.php:80 2830 2949 msgid "Trending Posts Only" … … 2940 3059 msgstr "" 2941 3060 2942 #: includes/shortcode/class-shortcode-cpt.php:3 73061 #: includes/shortcode/class-shortcode-cpt.php:39 2943 3062 msgid "View Shortcode" 2944 3063 msgstr "" -
fancy-post-grid/trunk/readme.txt
r3456954 r3464012 5 5 Tested up to: 6.9 6 6 Requires PHP: 7.4 7 Stable tag: 2.0. 17 Stable tag: 2.0.2 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 89 89 == Changelog == 90 90 91 = 2.0.2 (18 Feb, 2026) = 92 Fixed: 93 * Missing Shortcode Module styles 94 91 95 = 2.0.1 (09 Feb, 2026) = 92 96 Added:
Note: See TracChangeset
for help on using the changeset viewer.