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 | |
add_action("user_register", "set_user_admin_bar_false_by_default", 10, 1); | |
function set_user_admin_bar_false_by_default($user_id) { | |
update_user_meta( $user_id, 'show_admin_bar_front', '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
<?php | |
/* | |
* Change WooCommerce product category selection | |
* from checkbox to radio button, enforcing only one category | |
*/ | |
function fp_wc_checktoradio(){ | |
echo '<script type="text/javascript">jQuery("#product_catchecklist input").each(function(){this.type="radio"});</script>'; | |
} |
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
<script> | |
$("select"). removeAttr("multiple"); | |
</script> |
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
<div id="mySidenav" class="sidenav"> | |
<a href="javascript:void(0)" class="closebtn" onclick="closeNav()">×</a> | |
<a href="#">About</a> | |
<a href="#">Services</a> | |
<a href="#">Clients</a> | |
<a href="#">Contact</a> | |
</div> | |
<!-- Use any element to open the sidenav --> | |
<span onclick="openNav()">open</span> |
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
li { | |
display:block; | |
position:relative; | |
text-indent: -100%; | |
white-space: nowrap; | |
overflow: hidden; | |
} | |
li::after { | |
content: "visible pseudo-element"; |
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 fp_photoshop_myme_types($mime_types){ | |
$mime_types['psd'] = 'image/vnd.adobe.photoshop'; //Adding photoshop files | |
return $mime_types; | |
} | |
add_filter('upload_mimes', 'fp_photoshop_myme_types', 1, 1); |
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
{ | |
"title": "My test form", | |
"description": "", | |
"labelPlacement": "top_label", | |
"descriptionPlacement": "below", | |
"button": { | |
"type": "text", | |
"text": "Submit", | |
"imageUrl": "" | |
}, |
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 fp_register_my_cpts_todo() { | |
/** | |
* Post Type: Todos. | |
*/ | |
$labels = array( | |
"name" => __( "Todos", "american-idea-foundation" ), | |
"singular_name" => __( "Todo", "american-idea-foundation" ), |
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 | |
add_theme_support( 'infinite-scroll', array( | |
'container' => 'genesis_entry_content', | |
'footer' => 'genesis_entry_footer', | |
) ); |