Changeset 2972425
- Timestamp:
- 09/27/2023 10:33:08 PM (2 years ago)
- Location:
- easy-cart/trunk
- Files:
-
- 2 edited
-
plugin.php (modified) (3 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
easy-cart/trunk/plugin.php
r2812697 r2972425 4 4 * Plugin URI: https://www.zdatatech.com/portfolio/plugins/easy-cart 5 5 * Description: A simple shopping cart using shortcodes. You desginate a page with slug /cart and add [easy_cart/] shortcode to the /cart page and post [add_to_cart] shortcodes in other places on your wordpress site. This also serves as a example on using transient storage instead of sessions. 6 * Version: 1. 26 * Version: 1.8 7 7 * Requires at least: 5.3 8 * Tested up to: 6.3 8 9 * Requires PHP: 5.6 9 10 * Author: Zeshan B … … 15 16 */ 16 17 17 18 18 add_action( 'init', 'ectp_check_cookie' ); 19 19 20 20 add_action( 'init', 'ectp_easy_cart_shortcodes' ); 21 22 add_action( 'init', 'ectp_easy_cart_block_patterns' ); 23 24 add_action( 'init', 'ectp_register_easycart_pattern_categories' ); 21 25 22 26 … … 297 301 298 302 } 299 300 303 304 function ectp_register_easycart_pattern_categories() { 305 register_block_pattern_category( 306 'easy-cart', 307 array( 'label' => __( 'Easy Cart', 'Add to Cart' ) ) 308 ); 309 } 310 311 function ectp_easy_cart_block_patterns() { 312 register_block_pattern( 313 'Easy-Cart/add-to-cart-pattern', 314 array( 315 'title' => __( 'Add To Cart', 'Add To Cart' ), 316 'description' => _x( 'Add To Cart Shortcode', 'Block pattern description', 'Easy Cart' ), 317 'categories' => array( 'easy-cart' ), 318 'content' => "<!-- wp:shortcode --> 319 [add_to_cart itemid='201298' product_name='Your product name One' product_desc='description of your product.' product_qty=1 price=5.00 /] 320 <!-- /wp:shortcode -->", 321 ) 322 ); 323 324 register_block_pattern( 325 'Easy-Cart/easy-cart', 326 array( 327 'title' => __( 'Easy Cart', 'Easy Cart' ), 328 'description' => _x( 'Display cart Shortcode', 'Block pattern description', 'Easy Cart' ), 329 'categories' => array( 'easy-cart' ), 330 'content' => "<!-- wp:shortcode -->[easy_cart /]<!-- /wp:shortcode -->", 331 ) 332 ); 333 334 register_block_pattern( 335 'Easy-Cart/empty-cart', 336 array( 337 'title' => __( 'Empty Cart', 'Empty Cart' ), 338 'description' => _x( 'Empty Cart Shortcode', 'Block pattern description', 'Empty Cart' ), 339 'categories' => array( 'easy-cart' ), 340 'content' => "<!-- wp:shortcode -->[empty_cart /]<!-- /wp:shortcode -->", 341 ) 342 ); 343 } 301 344 302 345 ?> -
easy-cart/trunk/readme.txt
r2972320 r2972425 5 5 Tested up to: 6.3 6 6 Requires PHP: 8.0 7 Stable tag: 1. 37 Stable tag: 1.8 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 48 48 49 49 == Changelog == 50 51 = 1.8 = 52 * Registered shortcodes as block patterns 50 53 51 54 = 1.3 =
Note: See TracChangeset
for help on using the changeset viewer.