This file contains hidden or 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 | |
// If a child category for WooCommerce Product is set, but the parent/grandparent/etc category is not set, | |
// running this will also set all the ancestor categories (parent, grandparent, etc...) | |
if ( defined('WP_CLI') && WP_CLI ) { //Check to make sure WP_CLI is running. This way our code isn't loaded on normal site visits. | |
/** | |
* Class EA_Set_All_Ancestor_Cats_For_A_Product | |
*/ | |
class EA_Set_All_Ancestor_Cats_For_A_Product extends WP_CLI_Command { |
This file contains hidden or 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
// Save as: php-echo-open-html.sublime-snippet | |
<snippet> | |
<content><![CDATA[ | |
echo '<${1:div} ${2:class}="${3:value}">'; | |
]]></content> | |
<description>PHP echo statement with opening html tag with class</description> | |
<tabTrigger>phpechohtmlopen</tabTrigger> | |
<scope>source.php.embedded.block.html</scope> | |
</snippet> |