Changeset 2376567
- Timestamp:
- 09/07/2020 02:03:03 PM (6 years ago)
- Location:
- master-elements/trunk
- Files:
-
- 2 added
- 5 edited
-
addons/widgets.php (modified) (2 diffs)
-
addons/widgets/woo-next-prev-button/woo-next-prev-button.php (modified) (2 diffs)
-
addons/widgets/woo-product-comments (added)
-
addons/widgets/woo-product-comments/woo-product-comments.php (added)
-
changelog.txt (modified) (1 diff)
-
masterelements.php (modified) (1 diff)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
master-elements/trunk/addons/widgets.php
r2376549 r2376567 323 323 'woo-product-archive' =>[ 324 324 325 326 327 325 'name' => 'MW: Archive Products', 328 326 329 330 331 327 'id' => 'me_woo_product_archive', 332 328 333 334 335 329 'item' => 'woo-product-archive', 336 330 … … 344 338 345 339 'item' => 'woo-product-stock', 340 ], 341 342 'woo-product-comments' => [ 343 344 'name' => 'MW: Product Comments', 345 346 'id' => 'me_woo_product_comments', 347 348 'item' => 'woo-product-comments', 346 349 ], 347 350 -
master-elements/trunk/addons/widgets/woo-next-prev-button/woo-next-prev-button.php
r2376549 r2376567 68 68 } 69 69 70 function bbloomer_prev_next_product(){ 70 protected function _register_controls(){ 71 72 $this->start_controls_section( 73 'me_pagination_button', 74 [ 75 'label' => __( 'Pagination Button', 'masterelements' ), 76 'tab' => Controls_Manager::TAB_CONTENT, 77 ] 78 ); 79 80 $this->add_control( 81 'me_pagination_button_before', 82 [ 83 'label' => __('Show Button Before Product', 'masterelements'), 84 'type' => Controls_Manager::SWITCHER, 85 'return_value' => 'true', 86 'default' => '', 87 ] 88 ); 89 90 $this->add_control( 91 'me_pagination_button_after', 92 [ 93 'label' => __('Show Button After Product', 'masterelements'), 94 'type' => Controls_Manager::SWITCHER, 95 'return_value' => 'true', 96 'default' => '', 97 ] 98 ); 99 100 $this->end_controls_section(); 101 102 $this->start_controls_section( 103 'me_pagination_button_text', 104 [ 105 'label' => __( 'Previous/Next Style', 'masterelements' ), 106 'tab' => Controls_Manager::TAB_STYLE, 107 ] 108 ); 109 $this->start_controls_tabs('me_pagination_button_style_tabs'); 110 111 // Start Normal Submit button tab 112 $this->start_controls_tab( 113 'me_pagination_button_normal_tab', 114 [ 115 'label' => __( 'Normal', 'masterelements' ), 116 ] 117 ); 118 $this->add_control( 119 'me_pagination_button_text_color', 120 [ 121 'label' => __( 'Text Color', 'masterelements' ), 122 'type' => Controls_Manager::COLOR, 123 'selectors' => [ 124 '{{WRAPPER}} .prev_next_buttons a[rel="next"]' => 'color: {{VALUE}};', 125 ], 126 ] 127 ); 128 $this->add_control( 129 'me_pagination_button_bg_color', 130 [ 131 'label' => __('Background Color', 'masterelements'), 132 'type' => Controls_Manager::COLOR, 133 'selectors' => [ 134 '{{WRAPPER}} .prev_next_buttons a[rel="next"]' => 'background-color: {{VALUE}}', 135 ], 136 ] 137 ); 138 $this->add_group_control( 139 Group_Control_Border::get_type(), 140 [ 141 'name' => 'me_pagination_button_border', 142 'label' => __( 'Border', 'masterelements' ), 143 'selector' => '{{WRAPPER}} .prev_next_buttons a[rel="next"]', 144 'separator' =>'before', 145 ] 146 ); 147 148 $this->add_responsive_control( 149 'me_pagination_button_border_radius', 150 [ 151 'label' => esc_html__( 'Border Radius', 'masterelements' ), 152 'type' => Controls_Manager::DIMENSIONS, 153 'selectors' => [ 154 '{{WRAPPER}} .prev_next_buttons a[rel="next"]' => 'border-radius: {{TOP}}px {{RIGHT}}px {{BOTTOM}}px {{LEFT}}px;', 155 ], 156 ] 157 ); 158 $this->add_responsive_control( 159 'me_pagination_button_margin', 160 [ 161 'label' => esc_html__( 'Margin', 'masterelements' ), 162 'type' => Controls_Manager::DIMENSIONS, 163 'size_units' => [ 'px', 'em' ], 164 'selectors' => [ 165 '{{WRAPPER}} .prev_next_buttons a[rel="next"]' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', 166 ], 167 'separator' => 'before', 168 ] 169 ); 170 $this->end_controls_tab(); 171 172 $this->start_controls_tab( 173 'me_pagination_button_hover_tab', 174 [ 175 'label' => __( 'Hover', 'masterelements' ), 176 ] 177 ); 178 $this->add_control( 179 'me_pagination_button_text_color_hover', 180 [ 181 'label' => __( 'Text Color', 'masterelements' ), 182 'type' => Controls_Manager::COLOR, 183 'selectors' => [ 184 '{{WRAPPER}} .prev_next_buttons a[rel="next"]:hover' => 'color: {{VALUE}};', 185 ], 186 ] 187 ); 188 $this->add_control( 189 'me_pagination_button_bg_color_hover', 190 [ 191 'label' => __('Background Color', 'masterelements'), 192 'type' => Controls_Manager::COLOR, 193 'selectors' => [ 194 '{{WRAPPER}} .prev_next_buttons a[rel="next"]:hover' => 'background-color: {{VALUE}}', 195 ], 196 ] 197 ); 198 $this->add_group_control( 199 Group_Control_Border::get_type(), 200 [ 201 'name' => 'me_pagination_button_border_hover', 202 'label' => __( 'Border', 'masterelements' ), 203 'selector' => '{{WRAPPER}} .prev_next_buttons a[rel="next"]:hover', 204 'separator' =>'before', 205 ] 206 ); 207 208 $this->add_responsive_control( 209 'me_pagination_button_border_radius_hover', 210 [ 211 'label' => esc_html__( 'Border Radius', 'masterelements' ), 212 'type' => Controls_Manager::DIMENSIONS, 213 'selectors' => [ 214 '{{WRAPPER}} .prev_next_buttons a[rel="next"]:hover' => 'border-radius: {{TOP}}px {{RIGHT}}px {{BOTTOM}}px {{LEFT}}px;', 215 ], 216 ] 217 ); 218 $this->end_controls_tab(); 219 220 $this->end_controls_tabs(); 221 222 $this->end_controls_section(); 223 } 224 225 function master_prev_next_product(){ 71 226 72 227 echo '<div class="prev_next_buttons">'; 73 228 74 // 'product_cat' will make sure to return next/prev from current category75 229 $previous = next_post_link('%link', '← PREVIOUS', TRUE, ' ', 'product_cat'); 76 230 $next = previous_post_link('%link', 'NEXT →', TRUE, ' ', 'product_cat'); … … 82 236 83 237 } 238 84 239 protected function render() 85 240 { 86 add_action('woocommerce_before_single_product', array($this, 'bbloomer_prev_next_product')); 87 88 // and if you also want them at the bottom... 89 add_action('woocommerce_after_single_product', array($this, 'bbloomer_prev_next_product')); 241 $settings = $this->get_settings_for_display(); 242 $master_button = new Master_Woocommerce_Functions(); 243 if ( $master_button :: mw_is_is_edit_mode() ) { 244 245 echo "Previous and Next Button will be shown on the page this addon is applied on."; 246 } 247 else{ 248 249 if( $settings['me_pagination_button_before'] == 'true') 250 { 251 add_action('woocommerce_before_single_product', array($this, 'master_prev_next_product')); 252 do_action( 'woocommerce_before_single_product', array($this, 'master_prev_next_product') ); 253 } 254 elseif($settings['me_pagination_button_after'] == 'true'){ 255 add_action('woocommerce_after_single_product', array($this, 'master_prev_next_product')); 256 do_action( 'woocommerce_after_single_product', array($this, 'master_prev_next_product') ); 257 } 258 259 } 90 260 91 261 } -
master-elements/trunk/changelog.txt
r2376549 r2376567 1 07/09/2020 2 3 Version 4.4 4 5 [New] pagination addon 6 [New] Comment addon 7 1 8 07/09/2020 2 9 -
master-elements/trunk/masterelements.php
r2376549 r2376567 10 10 * Plugin URI: https://akdesigner.com/ 11 11 * Author: TeamDevBunch 12 * Version: 4. 312 * Version: 4.4 13 13 * Tested up to: 5.5 14 14 * Author URI: https://devbunch.com/ -
master-elements/trunk/readme.txt
r2376549 r2376567 64 64 65 65 == Changelog == 66 = 07/09/2020 Version 4.4 = 67 * [New] pagination addon 68 * [New] Comment addon 69 66 70 = 07/09/2020 Version 4.3 = 67 71 * [Fix] item css fix
Note: See TracChangeset
for help on using the changeset viewer.