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
function custom_song_post_type() { | |
register_post_type('song', array( | |
'labels' => array( | |
'name' => 'Songs', | |
'singular_name' => 'Song', | |
), | |
'public' => true, | |
'has_archive' => true, | |
'supports' => array('title', 'editor', 'thumbnail'), | |
)); |
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
var input = $('#inputfield')[0] | |
var ev = $.Event('keyup') | |
ev.which = 32 | |
setInterval(function() { | |
if ($('.highlight')[0]) { | |
input.focus() | |
input.value = $('.highlight').text() | |
$(input).trigger(ev) | |
} | |
}, 100) |
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
jQuery(document).on( "click", ".header-cart-button", function(e) { | |
e.preventDefault(); | |
jQuery('.orderable-floating-cart__button').trigger('click'); | |
}); |
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
// Prevent WP from adding <p> tags on all post types | |
function disable_wp_auto_p( $content ) { | |
remove_filter( 'the_content', 'wpautop' ); | |
remove_filter( 'the_excerpt', 'wpautop' ); | |
return $content; | |
} | |
add_filter( 'the_content', 'disable_wp_auto_p', 0 ); |
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
add_action( | |
'admin_footer', | |
function() { | |
if ( ! class_exists( 'Orderable_Live_View' ) ) { | |
return; | |
} | |
if ( ! Orderable_Live_View::is_live_view() ) { | |
return; | |
} |
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
/** | |
* Disable Attribute Swatches fee functionality. | |
*/ | |
add_filter( 'iconic_was_disable_fees', '__return_true' ); |
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
add_filter('yith_wccl_enable_handle_variation_gallery','__return_false'); |
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
// 1. Show Buttons | |
add_action( 'woocommerce_before_add_to_cart_quantity', 'iconic_display_quantity_plus' ); | |
function iconic_display_quantity_plus() { | |
echo '<button type="button" class="plus" >+</button>'; | |
} | |
add_action( 'woocommerce_after_add_to_cart_quantity', 'iconic_display_quantity_minus' ); | |
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
/** | |
* Iconic Flux checkout allow theme's style.css. | |
* | |
* @param array $allowed Array of allowed sources. | |
* | |
* @return array | |
*/ | |
function iconic_flux_allow_themes_style_on_checkout( $allowed ) { | |
$allowed[] = get_stylesheet_uri().'?b'; | |
$allowed[] = get_template_directory_uri() . '/assets/css/styles.css'; |
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
/** | |
* Change min/max date for admin | |
* | |
* @return void | |
*/ | |
function iconic_admin_set_min_date() { | |
global $iconic_wds; | |
if ( empty( $iconic_wds ) || ! current_user_can( 'manage_woocommerce' ) ) { |
NewerOlder