| 1 |  |  | <?php | 
            
                                                                                                            
                            
            
                                    
            
            
                | 2 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 3 |  |  | namespace GeminiLabs\SiteReviews\Integrations\WPBakery; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 4 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 5 |  |  | use GeminiLabs\SiteReviews\Shortcodes\SiteReviewsFormShortcode; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 6 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 7 |  |  | class VcSiteReviewsForm extends VcShortcode | 
            
                                                                                                            
                                                                
            
                                    
            
            
                | 8 |  |  | { | 
            
                                                                        
                            
            
                                    
            
            
                | 9 |  |  |     public static function vcShortcodeClass(): string | 
            
                                                                        
                            
            
                                    
            
            
                | 10 |  |  |     { | 
            
                                                                        
                            
            
                                    
            
            
                | 11 |  |  |         return SiteReviewsFormShortcode::class; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 12 |  |  |     } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 13 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 14 |  |  |     public static function vcShortcodeIcon(): string | 
            
                                                                                                            
                            
            
                                    
            
            
                | 15 |  |  |     { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 16 |  |  |         return glsr()->url('assets/images/icons/wpbakery/wpbakery-form.svg'); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 17 |  |  |     } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 18 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 19 |  |  |     public static function vcShortcodeSettings(): array | 
            
                                                                                                            
                            
            
                                    
            
            
                | 20 |  |  |     { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 21 |  |  |         return [ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 22 |  |  |             'assigned_posts' => [ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 23 |  |  |                 'type' => 'autocomplete', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 24 |  |  |                 'heading' => esc_html_x('Assign New Reviews to Pages', 'admin-text', 'site-reviews'), | 
            
                                                                                                            
                            
            
                                    
            
            
                | 25 |  |  |                 'param_name' => 'assigned_posts', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 26 |  |  |                 'settings' => [ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 27 |  |  |                     'multiple' => true, | 
            
                                                                                                            
                            
            
                                    
            
            
                | 28 |  |  |                     'sortable' => true, | 
            
                                                                                                            
                            
            
                                    
            
            
                | 29 |  |  |                 ], | 
            
                                                                                                            
                            
            
                                    
            
            
                | 30 |  |  |             ], | 
            
                                                                                                            
                            
            
                                    
            
            
                | 31 |  |  |             'assigned_terms' => [ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 32 |  |  |                 'type' => 'autocomplete', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 33 |  |  |                 'heading' => esc_html_x('Assign New Reviews to Categories', 'admin-text', 'site-reviews'), | 
            
                                                                                                            
                            
            
                                    
            
            
                | 34 |  |  |                 'param_name' => 'assigned_terms', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 35 |  |  |                 'settings' => [ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 36 |  |  |                     'multiple' => true, | 
            
                                                                                                            
                            
            
                                    
            
            
                | 37 |  |  |                     'sortable' => true, | 
            
                                                                                                            
                            
            
                                    
            
            
                | 38 |  |  |                 ], | 
            
                                                                                                            
                            
            
                                    
            
            
                | 39 |  |  |             ], | 
            
                                                                                                            
                            
            
                                    
            
            
                | 40 |  |  |             'assigned_users' => [ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 41 |  |  |                 'type' => 'autocomplete', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 42 |  |  |                 'heading' => esc_html_x('Assign New Reviews to Users', 'admin-text', 'site-reviews'), | 
            
                                                                                                            
                            
            
                                    
            
            
                | 43 |  |  |                 'param_name' => 'assigned_users', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 44 |  |  |                 'settings' => [ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 45 |  |  |                     'multiple' => true, | 
            
                                                                                                            
                            
            
                                    
            
            
                | 46 |  |  |                     'sortable' => true, | 
            
                                                                                                            
                            
            
                                    
            
            
                | 47 |  |  |                 ], | 
            
                                                                                                            
                            
            
                                    
            
            
                | 48 |  |  |             ], | 
            
                                                                                                            
                            
            
                                    
            
            
                | 49 |  |  |             'hide' => [ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 50 |  |  |                 'type' => 'checkbox', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 51 |  |  |                 'heading' => esc_html_x('Hide Options', 'admin-text', 'site-reviews'), | 
            
                                                                                                            
                            
            
                                    
            
            
                | 52 |  |  |                 'param_name' => 'hide', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 53 |  |  |                 'value' => array_flip(static::vcShortcode()->getHideOptions()), | 
            
                                                                                                            
                            
            
                                    
            
            
                | 54 |  |  |             ], | 
            
                                                                                                            
                            
            
                                    
            
            
                | 55 |  |  |             'reviews_id' => [ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 56 |  |  |                 'type' => 'textfield', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 57 |  |  |                 'heading' => esc_html_x('Reviews ID', 'admin-text', 'site-reviews'), | 
            
                                                                                                            
                            
            
                                    
            
            
                | 58 |  |  |                 'description' => esc_html_x('Enter the Custom ID of a reviews block, shortcode, or widget where the review should be displayed after submission.', 'admin-text', 'site-reviews'), | 
            
                                                                                                            
                            
            
                                    
            
            
                | 59 |  |  |                 'param_name' => 'reviews_id', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 60 |  |  |                 'group' => esc_html_x('Advanced', 'admin-text', 'site-reviews'), | 
            
                                                                                                            
                            
            
                                    
            
            
                | 61 |  |  |             ], | 
            
                                                                                                            
                            
            
                                    
            
            
                | 62 |  |  |             'id' => [ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 63 |  |  |                 'type' => 'textfield', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 64 |  |  |                 'heading' => esc_html_x('Custom ID', 'admin-text', 'site-reviews'), | 
            
                                                                                                            
                            
            
                                    
            
            
                | 65 |  |  |                 'description' => esc_html_x('This should be a unique value.', 'admin-text', 'site-reviews'), | 
            
                                                                                                            
                            
            
                                    
            
            
                | 66 |  |  |                 'param_name' => 'id', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 67 |  |  |                 'group' => esc_html_x('Advanced', 'admin-text', 'site-reviews'), | 
            
                                                                                                            
                            
            
                                    
            
            
                | 68 |  |  |             ], | 
            
                                                                                                            
                            
            
                                    
            
            
                | 69 |  |  |             'class' => [ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 70 |  |  |                 'type' => 'textfield', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 71 |  |  |                 'heading' => esc_html_x('Additional CSS classes', 'admin-text', 'site-reviews'), | 
            
                                                                                                            
                            
            
                                    
            
            
                | 72 |  |  |                 'description' => esc_html_x('Separate multiple classes with spaces.', 'admin-text', 'site-reviews'), | 
            
                                                                                                            
                            
            
                                    
            
            
                | 73 |  |  |                 'param_name' => 'class', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 74 |  |  |                 'group' => esc_html_x('Advanced', 'admin-text', 'site-reviews'), | 
            
                                                                                                            
                            
            
                                    
            
            
                | 75 |  |  |             ], | 
            
                                                                                                            
                            
            
                                    
            
            
                | 76 |  |  |         ]; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 77 |  |  |     } | 
            
                                                                                                            
                                                                
            
                                    
            
            
                | 78 |  |  | } | 
            
                                                        
            
                                    
            
            
                | 79 |  |  |  |