This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Create Shopping Cart Sales Rule with Specific Coupon Code Programmatically | |
*/ | |
// All customer group ids | |
$customerGroupIds = Mage::getModel('customer/group')->getCollection()->getAllIds(); | |
// SalesRule Rule model | |
$rule = Mage::getModel('salesrule/rule'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php $helper = Mage::helper('cms'); | |
$processor = $helper->getPageTemplateProcessor(); | |
$html = $processor->filter($minha_variavel); ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Nav Menu Dropdown Class | |
include_once( CHILD_DIR . '/lib/classes/nav-menu-dropdown.php' ); | |
/** | |
* Mobile Menu | |
* | |
*/ | |
function be_mobile_menu() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Obligatory alert of to use the thumbnail before publishing any article | |
*/ | |
function featured_image_requirement() { | |
if(!has_post_thumbnail()) { | |
wp_die( '<div>Your post is without thumbnail!</div><br><button class="button button-primary button-large" onclick="history.go(-1);">Back to posting</button>'); | |
} |
NewerOlder