| @@ -1,220 +1,403 @@ | ||
| 1 | -<?php | |
| 2 | - | |
| 3 | -// Create a section. | |
| 4 | -CSF::createSection( | |
| 5 | - $prefix, | |
| 6 | - [ | |
| 7 | - 'title' => __( 'Forum Topics', 'bbp-core' ), | |
| 8 | - 'id' => 'topics_fields', | |
| 9 | - 'icon' => 'dashicons dashicons-menu-alt3', | |
| 10 | - 'fields' => [ | |
| 11 | - [ | |
| 12 | - 'id' => 'is_solved_topics', | |
| 13 | - 'type' => 'switcher', | |
| 14 | - 'default' => true, | |
| 15 | - 'title' => __( 'Solved Topics', 'bbp-core' ), | |
| 16 | - 'subtitle' => __( 'Enable/ Disable Solved Topics feature.', 'bbp-core' ), | |
| 17 | - ], | |
| 18 | - [ | |
| 19 | - 'id' => 'is_auto_approval_topics', | |
| 20 | - 'type' => 'switcher', | |
| 21 | - 'default' => true, | |
| 22 | - 'title' => __( 'Auto Approval', 'bbp-core' ), | |
| 23 | - 'subtitle' => __( 'Enable/ Disable Auto Approval feature.', 'bbp-core' ), | |
| 24 | - 'class' => 'st-pro-notice', | |
| 25 | - ], | |
| 26 | - [ | |
| 27 | - 'id' => 'topic_pending_notice', | |
| 28 | - 'type' => 'text', | |
| 29 | - 'title' => __( 'Pending Notice', 'bbp-core' ), | |
| 30 | - 'default' => __( 'Your topic is awaiting for moderation.', 'bbp-core' ), | |
| 31 | - 'dependency' => [ 'is_auto_approval_topics', '==', false ], | |
| 32 | - 'class' => 'st-pro-notice', | |
| 33 | - ], | |
| 34 | - [ | |
| 35 | - 'id' => 'anonymous_topic', | |
| 36 | - 'type' => 'switcher', | |
| 37 | - 'title' => __( 'Anonymous Topic', 'bbp-core' ), | |
| 38 | - 'subtitle' => __( 'Allow anonymous to create topics.', 'bbp-core' ), | |
| 39 | - 'class' => 'st-pro-notice', | |
| 40 | - ], | |
| 41 | - [ | |
| 42 | - 'id' => 'anonymous_topic_label', | |
| 43 | - 'type' => 'text', | |
| 44 | - 'title' => __( 'Anonymous Label', 'bbp-core' ), | |
| 45 | - 'default' => __( 'Post Anonymously', 'bbp-core' ), | |
| 46 | - 'dependency' => [ 'anonymous_topic', '==', 'true', ], | |
| 47 | - 'class' => 'st-pro-notice', | |
| 48 | - ], | |
| 49 | - | |
| 50 | - [ | |
| 51 | - 'type' => 'subheading', | |
| 52 | - 'title' => __( 'Reaction', 'bbp-core' ), | |
| 53 | - ], | |
| 54 | - | |
| 55 | - [ | |
| 56 | - 'id' => 'agree_disagree_voting', | |
| 57 | - 'type' => 'switcher', | |
| 58 | - 'title' => __( 'Agree/Disagree', 'bbp-core' ), | |
| 59 | - 'subtitle' => __( 'To enable or disable the agree/disagree reactions.', 'bbp-core' ), | |
| 60 | - 'class' => 'st-pro-notice bbpc-geo-roles-opt', | |
| 61 | - 'default' => true, | |
| 62 | - ], | |
| 63 | - | |
| 64 | - [ | |
| 65 | - 'id' => 'reaction_display_condition', | |
| 66 | - 'type' => 'select', | |
| 67 | - 'title' => __( 'Display Condition', 'bbp-core' ), | |
| 68 | - 'subtitle' => __( 'Select the condition to display the reaction buttons.', 'bbp-core' ), | |
| 69 | - 'options' => [ | |
| 70 | - 'always' => __( 'Always', 'bbp-core' ), | |
| 71 | - 'has_replies' => __( 'Has Replies', 'bbp-core' ), | |
| 72 | - ], | |
| 73 | - 'default' => 'always', | |
| 74 | - 'dependency' => [ 'agree_disagree_voting', '==', 'true', ], | |
| 75 | - 'class' => 'st-pro-notice bbpc-geo-roles-opt', | |
| 76 | - ], | |
| 77 | - | |
| 78 | - [ | |
| 79 | - 'id' => 'reaction_display_condition_count', | |
| 80 | - 'type' => 'text', | |
| 81 | - 'title' => __( 'Display Condition Count', 'bbp-core' ), | |
| 82 | - 'subtitle' => __( 'Number of replies to display the reaction buttons.', 'bbp-core' ), | |
| 83 | - 'default' => 5, | |
| 84 | - 'dependency' => [ | |
| 85 | - [ 'reaction_display_condition', '==', 'has_replies' ], | |
| 86 | - [ 'agree_disagree_voting', '==', 'true' ], | |
| 87 | - ], | |
| 88 | - 'class' => 'st-pro-notice bbpc-geo-roles-opt', | |
| 89 | - ], | |
| 90 | - | |
| 91 | - [ | |
| 92 | - 'type' => 'subheading', | |
| 93 | - 'title' => __( 'Same Topic Voting', 'bbp-core' ), | |
| 94 | - ], | |
| 95 | - [ | |
| 96 | - 'id' => 'same_topic_voting', | |
| 97 | - 'type' => 'switcher', | |
| 98 | - 'title' => __( 'Enable / Disable', 'bbp-core' ), | |
| 99 | - 'class' => 'st-pro-notice', | |
| 100 | - ], | |
| 101 | - array( | |
| 102 | - 'id' => 'same_topic_settings', | |
| 103 | - 'type' => 'tabbed', | |
| 104 | - 'title' => __( 'Settings', 'bbp-core' ), | |
| 105 | - 'subtitle' => __( 'Customize voting button text and color for single topic.', 'bbp-core' ), | |
| 106 | - 'dependency' => [ 'same_topic_voting', '==', 'true', ], | |
| 107 | - 'tabs' => array( | |
| 108 | - array( | |
| 109 | - 'title' => __( 'Button', 'bbp-core' ), | |
| 110 | - 'fields' => array( | |
| 111 | - [ | |
| 112 | - 'id' => 'same_topic_voting_label', | |
| 113 | - 'type' => 'text', | |
| 114 | - 'title' => __( 'Label', 'bbp-core' ), | |
| 115 | - 'default' => __( 'I have the same question', 'bbp-core' ), | |
| 116 | - 'class' => 'st-pro-notice' | |
| 117 | - ], | |
| 118 | - [ | |
| 119 | - 'id' => 'same_topic_color', | |
| 120 | - 'type' => 'link_color', | |
| 121 | - 'title' => __( 'Color', 'bbp-core' ), | |
| 122 | - 'output' => '.bbpc-same-topic-btn', | |
| 123 | - 'output_mode' => 'color', | |
| 124 | - 'output_important' => true, | |
| 125 | - 'class' => 'st-pro-notice' | |
| 126 | - ], | |
| 127 | - [ | |
| 128 | - 'id' => 'same_topic_bg_color_normal', | |
| 129 | - 'type' => 'background', | |
| 130 | - 'title' => __( 'Background', 'bbp-core' ), | |
| 131 | - 'background_image' => false, | |
| 132 | - 'background_attachment' => false, | |
| 133 | - 'background_position' => false, | |
| 134 | - 'background_repeat' => false, | |
| 135 | - 'background_size' => false, | |
| 136 | - 'output' => '.bbpc-same-topic-btn', | |
| 137 | - 'output_mode' => 'background', | |
| 138 | - 'output_important' => true, | |
| 139 | - 'class' => 'st-pro-notice' | |
| 140 | - ], | |
| 141 | - [ | |
| 142 | - 'id' => 'same_topic_bg_color_hover', | |
| 143 | - 'type' => 'background', | |
| 144 | - 'title' => __( 'Hover Background', 'bbp-core' ), | |
| 145 | - 'background_image' => false, | |
| 146 | - 'background_attachment' => false, | |
| 147 | - 'background_position' => false, | |
| 148 | - 'background_repeat' => false, | |
| 149 | - 'background_size' => false, | |
| 150 | - 'output' => '.bbpc-same-topic-btn:hover', | |
| 151 | - 'output_mode' => 'background', | |
| 152 | - 'output_important' => true, | |
| 153 | - 'class' => 'st-pro-notice' | |
| 154 | - ] | |
| 155 | - ) | |
| 156 | - ), | |
| 157 | - array( | |
| 158 | - 'title' => __( 'Success', 'bbp-core' ), | |
| 159 | - 'fields' => array( | |
| 160 | - [ | |
| 161 | - 'id' => 'same_topic_voting_success', | |
| 162 | - 'type' => 'text', | |
| 163 | - 'title' => __( 'Text', 'bbp-core' ), | |
| 164 | - 'default' => __( 'Updated vote successfully', 'bbp-core' ), | |
| 165 | - 'class' => 'st-pro-notice' | |
| 166 | - ], | |
| 167 | - [ | |
| 168 | - 'id' => 'same_topic_success_color', | |
| 169 | - 'type' => 'link_color', | |
| 170 | - 'title' => __( 'Color', 'bbp-core' ), | |
| 171 | - 'default' => array( | |
| 172 | - 'color' => '#4a4a4a', | |
| 173 | - 'hover' => '#4a4a4a', | |
| 174 | - ), | |
| 175 | - 'output' => '.same-topic-voting-notice', | |
| 176 | - 'output_mode' => 'color', | |
| 177 | - 'output_important' => true, | |
| 178 | - 'class' => 'st-pro-notice' | |
| 179 | - ], | |
| 180 | - [ | |
| 181 | - 'id' => 'same_topic_bg_success_color', | |
| 182 | - 'type' => 'background', | |
| 183 | - 'title' => __( 'Background', 'bbp-core' ), | |
| 184 | - 'background_image' => false, | |
| 185 | - 'background_attachment' => false, | |
| 186 | - 'background_position' => false, | |
| 187 | - 'background_repeat' => false, | |
| 188 | - 'background_size' => false, | |
| 189 | - 'default' => [ | |
| 190 | - 'background-color' => '#f9f9f9' | |
| 191 | - ], | |
| 192 | - 'output' => '.same-topic-voting-notice', | |
| 193 | - 'output_mode' => 'background', | |
| 194 | - 'output_important' => true, | |
| 195 | - 'class' => 'st-pro-notice' | |
| 196 | - ], | |
| 197 | - [ | |
| 198 | - 'id' => 'same_topic_bg_success_color_hover', | |
| 199 | - 'type' => 'background', | |
| 200 | - 'title' => __( 'Hover Background', 'bbp-core' ), | |
| 201 | - 'background_image' => false, | |
| 202 | - 'background_attachment' => false, | |
| 203 | - 'background_position' => false, | |
| 204 | - 'background_repeat' => false, | |
| 205 | - 'background_size' => false, | |
| 206 | - 'default' => [ | |
| 207 | - 'background-color' => '#f9f9f9' | |
| 208 | - ], | |
| 209 | - 'output' => '.same-topic-voting-notice:hover', | |
| 210 | - 'output_mode' => 'background', | |
| 211 | - 'output_important' => true, | |
| 212 | - 'class' => 'st-pro-notice' | |
| 213 | - ] | |
| 214 | - ) | |
| 215 | - ) | |
| 216 | - ) | |
| 217 | - ) | |
| 218 | - ] | |
| 219 | - ] | |
| 1 | +<?php | |
| 2 | + | |
| 3 | +// Create a section. | |
| 4 | +CSF::createSection( | |
| 5 | + $prefix, | |
| 6 | + [ | |
| 7 | + 'title' => __('Forum Topics', 'forumax'), | |
| 8 | + 'id' => 'topics_fields', | |
| 9 | + 'icon' => 'dashicons dashicons-menu-alt3', | |
| 10 | + 'fields' => [ | |
| 11 | + [ | |
| 12 | + 'title' => esc_html__('Title Prefix', 'forumax'), | |
| 13 | + 'id' => 'topic_title_prefix', | |
| 14 | + 'type' => 'text', | |
| 15 | + 'default' => esc_html__('Q:', 'forumax') | |
| 16 | + ], | |
| 17 | + [ | |
| 18 | + 'id' => 'is_solved_topics', | |
| 19 | + 'type' => 'switcher', | |
| 20 | + 'default' => true, | |
| 21 | + 'title' => __('Solved Topics', 'forumax'), | |
| 22 | + 'subtitle' => __('Enable/ Disable Solved Topics feature.', 'forumax'), | |
| 23 | + ], | |
| 24 | + [ | |
| 25 | + 'id' => 'auto_close_stale_topics', | |
| 26 | + 'type' => 'switcher', | |
| 27 | + 'title' => __('Auto-Close Stale Topics', 'forumax'), | |
| 28 | + 'subtitle' => __('Automatically close topics with no recent activity.', 'forumax'), | |
| 29 | + 'default' => false, | |
| 30 | + ], | |
| 31 | + [ | |
| 32 | + 'id' => 'auto_close_days', | |
| 33 | + 'type' => 'number', | |
| 34 | + 'title' => __('Close After (days)', 'forumax'), | |
| 35 | + 'subtitle' => __('Topics with no replies after this many days will be auto-closed.', 'forumax'), | |
| 36 | + 'default' => 90, | |
| 37 | + 'dependency' => ['auto_close_stale_topics', '==', 'true'], | |
| 38 | + ], | |
| 39 | + [ | |
| 40 | + 'id' => 'is_auto_approval_topics', | |
| 41 | + 'type' => 'switcher', | |
| 42 | + 'default' => false, | |
| 43 | + 'title' => __('Auto Approval', 'forumax'), | |
| 44 | + 'subtitle' => __('Enable/ Disable Auto Approval feature.', 'forumax'), | |
| 45 | + 'class' => 'st-pro-notice', | |
| 46 | + ], | |
| 47 | + [ | |
| 48 | + 'id' => 'topic_pending_notice', | |
| 49 | + 'type' => 'text', | |
| 50 | + 'title' => __('Pending Notice', 'forumax'), | |
| 51 | + 'default' => __('Your topic is awaiting for moderation.', 'forumax'), | |
| 52 | + 'dependency' => ['is_auto_approval_topics', '==', false], | |
| 53 | + 'class' => 'st-pro-notice', | |
| 54 | + ], | |
| 55 | + [ | |
| 56 | + 'id' => 'anonymous_topic', | |
| 57 | + 'type' => 'switcher', | |
| 58 | + 'title' => __('Anonymous Topic', 'forumax'), | |
| 59 | + 'subtitle' => __('Allow anonymous to create topics.', 'forumax'), | |
| 60 | + 'class' => 'st-pro-notice', | |
| 61 | + ], | |
| 62 | + [ | |
| 63 | + 'id' => 'anonymous_topic_label', | |
| 64 | + 'type' => 'text', | |
| 65 | + 'title' => __('Anonymous Label', 'forumax'), | |
| 66 | + 'default' => __('Post Anonymously', 'forumax'), | |
| 67 | + 'dependency' => ['anonymous_topic', '==', 'true',], | |
| 68 | + 'class' => 'st-pro-notice', | |
| 69 | + ], | |
| 70 | + | |
| 71 | + [ | |
| 72 | + 'type' => 'subheading', | |
| 73 | + 'title' => __('Reaction', 'forumax'), | |
| 74 | + ], | |
| 75 | + | |
| 76 | + [ | |
| 77 | + 'id' => 'topics_react_voting', | |
| 78 | + 'type' => 'switcher', | |
| 79 | + 'title' => __('React Reactions', 'forumax'), | |
| 80 | + 'subtitle' => __('To enable or disable the react reactions.', 'forumax'), | |
| 81 | + 'class' => 'st-promax-notice', | |
| 82 | + 'default' => false | |
| 83 | + ], | |
| 84 | + [ | |
| 85 | + 'id' => 'topics_react_label', | |
| 86 | + 'type' => 'text', | |
| 87 | + 'title' => __('React Button Text', 'forumax'), | |
| 88 | + 'default' => __('React', 'forumax'), | |
| 89 | + 'class' => 'st-promax-notice', | |
| 90 | + 'dependency' => ['topics_react_voting', '==', 'true',] | |
| 91 | + ], | |
| 92 | + | |
| 93 | + [ | |
| 94 | + 'id' => 'reactions', | |
| 95 | + 'type' => 'group', | |
| 96 | + 'title' => __('Emoji Reactions', 'forumax'), | |
| 97 | + 'subtitle' => __('Manage or add emoji reactions.', 'forumax'), | |
| 98 | + 'class' => 'st-promax-notice', | |
| 99 | + 'fields' => [ | |
| 100 | + [ | |
| 101 | + 'id' => 'icon', | |
| 102 | + 'type' => 'text', | |
| 103 | + 'title' => __('Icon (Emoji)', 'forumax'), | |
| 104 | + ], | |
| 105 | + [ | |
| 106 | + 'id' => 'label', | |
| 107 | + 'type' => 'text', | |
| 108 | + 'title' => __('Label', 'forumax'), | |
| 109 | + ], | |
| 110 | + ], | |
| 111 | + 'default' => [ | |
| 112 | + ['icon' => '👍', 'label' => 'Like'], | |
| 113 | + ['icon' => '👎', 'label' => 'Dislike'], | |
| 114 | + ['icon' => '❤️', 'label' => 'Love'], | |
| 115 | + ['icon' => '😂', 'label' => 'Haha'], | |
| 116 | + ['icon' => '😮', 'label' => 'Wow'], | |
| 117 | + ['icon' => '😢', 'label' => 'Sad'], | |
| 118 | + ['icon' => '😡', 'label' => 'Angry'], | |
| 119 | + ], | |
| 120 | + 'dependency' => ['topics_react_voting', '==', 'true',], | |
| 121 | + 'button_title' => __('Add Reaction', 'forumax'), | |
| 122 | + 'button_remove' => true, | |
| 123 | + 'add_title' => __('Add New Reaction', 'forumax'), | |
| 124 | + 'remove_title' => __('Remove Reaction', 'forumax'), | |
| 125 | + 'accordion_title_auto' => true, | |
| 126 | + 'accordion_title_number' => true, | |
| 127 | + 'accordion_title_prefix' => __('Reaction:', 'forumax'), | |
| 128 | + ], | |
| 129 | + [ | |
| 130 | + 'type' => 'subheading', | |
| 131 | + 'title' => __('Same Topic Voting', 'forumax'), | |
| 132 | + ], | |
| 133 | + [ | |
| 134 | + 'id' => 'same_topic_voting', | |
| 135 | + 'type' => 'switcher', | |
| 136 | + 'title' => __('Enable / Disable', 'forumax'), | |
| 137 | + 'class' => 'st-pro-notice', | |
| 138 | + ], | |
| 139 | + [ | |
| 140 | + 'id' => 'same_topic_settings', | |
| 141 | + 'type' => 'tabbed', | |
| 142 | + 'title' => __('Settings', 'forumax'), | |
| 143 | + 'subtitle' => __('Customize voting button text and color for single topic.', 'forumax'), | |
| 144 | + 'dependency' => ['same_topic_voting', '==', 'true',], | |
| 145 | + 'tabs' => array( | |
| 146 | + array( | |
| 147 | + 'title' => __('Button', 'forumax'), | |
| 148 | + 'fields' => array( | |
| 149 | + [ | |
| 150 | + 'id' => 'same_topic_voting_label', | |
| 151 | + 'type' => 'text', | |
| 152 | + 'title' => __('Label', 'forumax'), | |
| 153 | + 'default' => __('I have the same question', 'forumax'), | |
| 154 | + 'class' => 'st-pro-notice' | |
| 155 | + ], | |
| 156 | + [ | |
| 157 | + 'id' => 'same_topic_color', | |
| 158 | + 'type' => 'link_color', | |
| 159 | + 'title' => __('Color', 'forumax'), | |
| 160 | + 'output' => '.bbpc-same-topic-btn', | |
| 161 | + 'output_mode' => 'color', | |
| 162 | + 'output_important' => true, | |
| 163 | + 'class' => 'st-pro-notice' | |
| 164 | + ], | |
| 165 | + [ | |
| 166 | + 'id' => 'same_topic_bg_color_normal', | |
| 167 | + 'type' => 'background', | |
| 168 | + 'title' => __('Background', 'forumax'), | |
| 169 | + 'background_image' => false, | |
| 170 | + 'background_attachment' => false, | |
| 171 | + 'background_position' => false, | |
| 172 | + 'background_repeat' => false, | |
| 173 | + 'background_size' => false, | |
| 174 | + 'output' => '.bbpc-same-topic-btn', | |
| 175 | + 'output_mode' => 'background', | |
| 176 | + 'output_important' => true, | |
| 177 | + 'class' => 'st-pro-notice' | |
| 178 | + ], | |
| 179 | + [ | |
| 180 | + 'id' => 'same_topic_bg_color_hover', | |
| 181 | + 'type' => 'background', | |
| 182 | + 'title' => __('Hover Background', 'forumax'), | |
| 183 | + 'background_image' => false, | |
| 184 | + 'background_attachment' => false, | |
| 185 | + 'background_position' => false, | |
| 186 | + 'background_repeat' => false, | |
| 187 | + 'background_size' => false, | |
| 188 | + 'output' => '.bbpc-same-topic-btn:hover', | |
| 189 | + 'output_mode' => 'background', | |
| 190 | + 'output_important' => true, | |
| 191 | + 'class' => 'st-pro-notice' | |
| 192 | + ] | |
| 193 | + ) | |
| 194 | + ), | |
| 195 | + array( | |
| 196 | + 'title' => __('Success', 'forumax'), | |
| 197 | + 'fields' => array( | |
| 198 | + [ | |
| 199 | + 'id' => 'same_topic_voting_success', | |
| 200 | + 'type' => 'text', | |
| 201 | + 'title' => __('Text', 'forumax'), | |
| 202 | + 'default' => __('Updated vote successfully', 'forumax'), | |
| 203 | + 'class' => 'st-pro-notice' | |
| 204 | + ], | |
| 205 | + [ | |
| 206 | + 'id' => 'same_topic_success_color', | |
| 207 | + 'type' => 'link_color', | |
| 208 | + 'title' => __('Color', 'forumax'), | |
| 209 | + 'default' => array( | |
| 210 | + 'color' => '#4a4a4a', | |
| 211 | + 'hover' => '#4a4a4a', | |
| 212 | + ), | |
| 213 | + 'output' => '.same-topic-voting-notice', | |
| 214 | + 'output_mode' => 'color', | |
| 215 | + 'output_important' => true, | |
| 216 | + 'class' => 'st-pro-notice' | |
| 217 | + ], | |
| 218 | + [ | |
| 219 | + 'id' => 'same_topic_bg_success_color', | |
| 220 | + 'type' => 'background', | |
| 221 | + 'title' => __('Background', 'forumax'), | |
| 222 | + 'background_image' => false, | |
| 223 | + 'background_attachment' => false, | |
| 224 | + 'background_position' => false, | |
| 225 | + 'background_repeat' => false, | |
| 226 | + 'background_size' => false, | |
| 227 | + 'default' => [ | |
| 228 | + 'background-color' => '#f9f9f9' | |
| 229 | + ], | |
| 230 | + 'output' => '.same-topic-voting-notice', | |
| 231 | + 'output_mode' => 'background', | |
| 232 | + 'output_important' => true, | |
| 233 | + 'class' => 'st-pro-notice' | |
| 234 | + ], | |
| 235 | + [ | |
| 236 | + 'id' => 'same_topic_bg_success_color_hover', | |
| 237 | + 'type' => 'background', | |
| 238 | + 'title' => __('Hover Background', 'forumax'), | |
| 239 | + 'background_image' => false, | |
| 240 | + 'background_attachment' => false, | |
| 241 | + 'background_position' => false, | |
| 242 | + 'background_repeat' => false, | |
| 243 | + 'background_size' => false, | |
| 244 | + 'default' => [ | |
| 245 | + 'background-color' => '#f9f9f9' | |
| 246 | + ], | |
| 247 | + 'output' => '.same-topic-voting-notice:hover', | |
| 248 | + 'output_mode' => 'background', | |
| 249 | + 'output_important' => true, | |
| 250 | + 'class' => 'st-pro-notice' | |
| 251 | + ] | |
| 252 | + ) | |
| 253 | + ) | |
| 254 | + ) | |
| 255 | + ], | |
| 256 | + [ | |
| 257 | + 'type' => 'heading', | |
| 258 | + 'title' => esc_html__('Sharing Topics', 'forumax'), | |
| 259 | + ], | |
| 260 | + [ | |
| 261 | + 'id' => 'is_social_links', | |
| 262 | + 'type' => 'switcher', | |
| 263 | + 'title' => esc_html__('Share Button', 'forumax'), | |
| 264 | + 'text_on' => esc_html__('Enabled', 'forumax'), | |
| 265 | + 'text_off' => esc_html__('Disabled', 'forumax'), | |
| 266 | + 'text_width' => 92, | |
| 267 | + 'default' => true | |
| 268 | + ], | |
| 269 | + [ | |
| 270 | + 'id' => 'share_btn_label', | |
| 271 | + 'type' => 'text', | |
| 272 | + 'title' => esc_html__('Share Button Label', 'forumax'), | |
| 273 | + 'default' => esc_html__('Share this Topic', 'forumax'), | |
| 274 | + 'dependency' => array( | |
| 275 | + array('is_copy_link', '==', '1'), | |
| 276 | + array('is_social_links', '==', '1'), | |
| 277 | + ) | |
| 278 | + ], | |
| 279 | + [ | |
| 280 | + 'id' => 'is_copy_link', | |
| 281 | + 'type' => 'switcher', | |
| 282 | + 'title' => esc_html__('Copy Link Button', 'forumax'), | |
| 283 | + 'dependency' => array('is_social_links', '==', '1'), | |
| 284 | + 'text_width' => 72, | |
| 285 | + 'default' => true, | |
| 286 | + ], | |
| 287 | + [ | |
| 288 | + 'id' => 'copy_link_label', | |
| 289 | + 'type' => 'text', | |
| 290 | + 'title' => esc_html__('Copy Link Label', 'forumax'), | |
| 291 | + 'default' => esc_html__('Or copy link', 'forumax'), | |
| 292 | + 'dependency' => array( | |
| 293 | + array('is_copy_link', '==', '1'), | |
| 294 | + array('is_social_links', '==', '1'), | |
| 295 | + ) | |
| 296 | + ], | |
| 297 | + [ | |
| 298 | + 'id' => 'copy_link_text_success', | |
| 299 | + 'type' => 'text', | |
| 300 | + 'title' => esc_html__('Success Message', 'forumax'), | |
| 301 | + 'default' => esc_html__('URL copied to clipboard', 'forumax'), | |
| 302 | + 'dependency' => array( | |
| 303 | + array('is_copy_link', '==', '1'), | |
| 304 | + array('is_social_links', '==', '1'), | |
| 305 | + ) | |
| 306 | + ], | |
| 307 | + [ | |
| 308 | + 'type' => 'heading', | |
| 309 | + 'title' => __('Real-Time Alert', 'forumax'), | |
| 310 | + ], | |
| 311 | + [ | |
| 312 | + 'id' => 'real_time_alerts_enabled', | |
| 313 | + 'type' => 'switcher', | |
| 314 | + 'title' => __('Real-Time Chat Notice', 'forumax'), | |
| 315 | + 'default' => false, | |
| 316 | + 'class' => 'st-promax-notice', | |
| 317 | + ], | |
| 318 | + [ | |
| 319 | + 'id' => 'real_time_alerts_label', | |
| 320 | + 'type' => 'text', | |
| 321 | + 'title' => __('Alert Label', 'forumax'), | |
| 322 | + 'default' => __('See %d new topics', 'forumax'), | |
| 323 | + 'desc' => __('Use %d for the number of topics.', 'forumax'), | |
| 324 | + 'dependency' => ['real_time_alerts_enabled', '==', 'true'], | |
| 325 | + 'class' => 'st-promax-notice', | |
| 326 | + ], | |
| 327 | + [ | |
| 328 | + 'id' => 'real_time_alerts_interval', | |
| 329 | + 'type' => 'number', | |
| 330 | + 'title' => __('Polling Interval (seconds)', 'forumax'), | |
| 331 | + 'default' => 30, | |
| 332 | + 'min' => 5, | |
| 333 | + 'max' => 300, | |
| 334 | + 'dependency' => ['real_time_alerts_enabled', '==', 'true'], | |
| 335 | + 'class' => 'st-promax-notice', | |
| 336 | + ], | |
| 337 | + [ | |
| 338 | + 'id' => 'topic_subscription', | |
| 339 | + 'title' => esc_html__('Subscription', 'forumax'), | |
| 340 | + 'subtitle' => esc_html__('Subscription settings for logged out users.', 'forumax'), | |
| 341 | + 'type' => 'subheading' | |
| 342 | + ], | |
| 343 | + [ | |
| 344 | + 'title' => esc_html__('Enable / Disable', 'forumax'), | |
| 345 | + 'id' => 'is_topic_subscription', | |
| 346 | + 'type' => 'switcher', | |
| 347 | + 'text_on' => esc_html__('Show', 'forumax'), | |
| 348 | + 'text_off' => esc_html__('Hide', 'forumax'), | |
| 349 | + 'default' => '1', | |
| 350 | + 'text_width' => 80, | |
| 351 | + ], | |
| 352 | + [ | |
| 353 | + 'title' => esc_html__('Subscribe Button', 'forumax'), | |
| 354 | + 'id' => 'logout_subscription_btn', | |
| 355 | + 'type' => 'text', | |
| 356 | + 'default' => esc_html__('Subscribe', 'forumax'), | |
| 357 | + 'dependency' => array( 'is_topic_subscription', '==', '1' ) | |
| 358 | + ], | |
| 359 | + [ | |
| 360 | + 'title' => esc_html__('Title', 'forumax'), | |
| 361 | + 'id' => 'subscription_modal_title', | |
| 362 | + 'type' => 'text', | |
| 363 | + 'default' => esc_html__('Login to the community', 'forumax'), | |
| 364 | + 'dependency' => array( 'is_topic_subscription', '==', '1' ) | |
| 365 | + ], | |
| 366 | + [ | |
| 367 | + 'title' => esc_html__('Subtitle', 'forumax'), | |
| 368 | + 'id' => 'subscription_modal_subtitle', | |
| 369 | + 'type' => 'text', | |
| 370 | + 'default' => esc_html__('You must be logged in to subscribe to this topic.', 'forumax'), | |
| 371 | + 'dependency' => array( 'is_topic_subscription', '==', '1' ) | |
| 372 | + ], | |
| 373 | + [ | |
| 374 | + 'title' => esc_html__('Login Button', 'forumax'), | |
| 375 | + 'id' => 'logout_login_btn', | |
| 376 | + 'type' => 'text', | |
| 377 | + 'default' => esc_html__('Login', 'forumax'), | |
| 378 | + 'dependency' => array( 'is_topic_subscription', '==', '1' ) | |
| 379 | + ], | |
| 380 | + [ | |
| 381 | + 'title' => esc_html__('Login Type', 'forumax'), | |
| 382 | + 'id' => 'login_url_type', | |
| 383 | + 'type' => 'select', | |
| 384 | + 'default' => 'default', | |
| 385 | + 'options' => array( | |
| 386 | + 'default' => esc_html__('Default Login', 'forumax'), | |
| 387 | + 'custom' => esc_html__('Custom Page', 'forumax'), | |
| 388 | + ), | |
| 389 | + 'dependency' => array( 'is_topic_subscription', '==', '1' ) | |
| 390 | + ], | |
| 391 | + [ | |
| 392 | + 'title' => esc_html__('Select Page', 'forumax'), | |
| 393 | + 'id' => 'login_page', | |
| 394 | + 'type' => 'select', | |
| 395 | + 'options' => 'pages', | |
| 396 | + 'dependency' => array( | |
| 397 | + array( 'login_url_type', '==', 'custom' ), | |
| 398 | + array( 'is_topic_subscription', '==', '1' ), | |
| 399 | + ) | |
| 400 | + ] | |
| 401 | + ] | |
| 402 | + ] | |
| 220 | 403 | ); |