Created
August 14, 2012 02:10
-
-
Save norcross/3345771 to your computer and use it in GitHub Desktop.
Hide comments and pingbacks on Shopp
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).ready(function($) { | |
//******************************************************** | |
// expand / collapse for settings page | |
//******************************************************** | |
$('div.settings_group div.dg_wrap').hide(); | |
// show or hide new license block licenses | |
$('div.settings_group input.toggle_group').click(function() { | |
var name = $(this).attr('name'); | |
$(this).toggleClass('toggle_active'); | |
$('div.dg_wrap[name=' + name + ']').toggle(); | |
return false; | |
}); | |
//******************************************************** | |
// set comments and pingbacks for Shopp | |
//******************************************************** | |
// set the boxes to no | |
$('.shopp form#product input#allow-comments').prop('checked', false); | |
$('.shopp form#product input#allow-trackpings').prop('checked', false); | |
// hide boxes completely | |
$('.shopp form#product input#allow-comments').parent('p').hide(); | |
$('.shopp form#product input#allow-trackpings').parent('p').hide(); | |
}); |
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 | |
function shopp_comment_hide() { | |
// change the URL and filename to match whatever it is you use | |
wp_enqueue_script( 'shopp-comments', get_bloginfo('stylesheet_directory').'/lib/js/shopp-comment-hide.js', array('jquery'), null, true ); | |
} | |
add_action( 'wp_enqueue_scripts', 'shopp_comment_hide' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment