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 | |
/** | |
* Force attachments download : | |
* | |
* In order for this to work, when you insert the file into your post through the media uploader, | |
* you have to select Post URL rather than File URL in the Link URL field before inserting into your post. | |
* A link to a filename will follow the browser's preferences, but by linking to the WP post link, | |
* you can control its behaviour.) | |
* | |
* @link https://gist.github.com/smeric/cb4520e848aaa0be703c |
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 | |
/** | |
* Redirect WooCommerce customer to profile page after a successful login through wp-login.php or | |
* redirect any unauthorised user trying to access any wp-admin files. | |
* | |
* @author Sébastien Méric <[email protected]> | |
* @param string $redirect_to URL to redirect to. | |
* @return string | |
*/ | |
add_action( 'init', 'woocommerce_custom_redirect_customer_to_account_page' ); |
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 | |
/** | |
* Woocommerce custom extra tab | |
* | |
* Adds a metabox to define a custom tab label and content on woocommerce product pages. Also remove predifined | |
* description tab title so we can define our own directly inside tab content. | |
* | |
* @link https://gist.github.com/smeric/ff09b2f993dc8378a04a | |
* @version 1.0.1 | |
* @package woocommerce_custom_extra_tab |
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 | |
/** | |
* Woocommerce "item" taxonomy | |
* | |
* This plugin is a template to add a custom taxonomy to products in woocommerce. | |
* One should search/replace every "Item" occurence with the taxonomy name. | |
* | |
* @link https://gist.github.com/smeric/523c54a16f2ed1870a60 | |
* @since 1.0.0 | |
* @package woocommerce_custom_taxonomy_product_item |
NewerOlder