Skip to content

Instantly share code, notes, and snippets.

View Rupashdas's full-sized avatar
🏠
Working from home

Rupash Das Rupashdas

🏠
Working from home
  • Chittagong, Bangladesh
View GitHub Profile
<?php
/**
* Create Shortcode for WooCommerce Cart Menu Item
*/
function canvas_cart_item() {
ob_start();
$cart_count = WC()->cart->cart_contents_count; // Set variable for cart item count
$cart_url = wc_get_cart_url(); // Set Cart URL
@Rupashdas
Rupashdas / elementor-widget.php
Last active June 1, 2020 21:34
Boilarplate widget for elementor
<?php
class Elementor_Faq_Widget Extends \Elementor\Widget_Base {
public function get_name() {
return "widgetName";
}
public function get_title() {
return __( "Widget Title", "textdomain" );
}
public function get_icon() {
return "fa fa-home";
@Rupashdas
Rupashdas / elementor-widget-extension.php
Last active June 1, 2020 21:35
Boilerplate Extension for creating new widget plugin for elementor
<?php
/*
Plugin Name: Timer element for elementor
Plugin URI: https://devrupash.com
Description: Timer element for elementor
Version: 1.0
Author: Rupash Das
Author URI: https://devrupash.com
License: GPLV2 or later
Text Domain: timerelement