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 | |
// credits: https://github.com/woocommerce/woocommerce/issues/17487#issuecomment-565433819 | |
add_action( 'woocommerce_product_duplicate', function ( $duplicate, $product ) { | |
$taxonomies = [ 'taxonomy1', 'taxonomy2' ]; | |
foreach ( $taxonomies as $taxonomy ) { | |
$terms = get_the_terms( $product->get_id(), $taxonomy ); | |
if ( ! is_wp_error( $terms ) ) { | |
wp_set_object_terms( $duplicate->get_id(), wp_list_pluck( $terms, 'term_id' ), $taxonomy ); | |
} |
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 | |
/** | |
* WordPress Chosen Taxonomy Metabox | |
* Author: Helen Hou-Sandi | |
* | |
* Use Chosen for a replacement taxonomy metabox in WordPress | |
* Useful for taxonomies that aren't changed much on the fly and are | |
* non-hierarchical in nature, as Chosen is for flat selection only. | |
* You can always use the taxonomy admin screen to add/edit taxonomy terms. | |
* Categories need slightly different treatment from the rest in order to |
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
/** | |
* fullPage 2.0.9 | |
* https://github.com/alvarotrigo/fullPage.js | |
* MIT licensed | |
* | |
* Copyright (C) 2013 alvarotrigo.com - A project by Alvaro Trigo | |
*/ | |
(function($) { | |
$.fn.fullpage = function(options) { |
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 | |
/********* DO NOT COPY THE PARTS ABOVE THIS LINE *********/ | |
/* Create Custom Yoast Sitemap | |
* Credit: Unknown | |
* Last Tested: Unknown | |
********* | |
* HOW TO USE | |
* Replace TYPE with your custom type | |
*/ |
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 | |
// Let’s instantiate this class in our functions.php file: | |
if( is_admin() ) { | |
require 'simple_settings_page.php'; | |
new simple_settings_page(); | |
} |