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
<div id="overlay"> | |
<div class="overlay-inner"> | |
An inspiration bit of text. | |
</div> | |
</div> | |
<div class="content"> | |
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus porttitor mollis dui, a adipiscing turpis suscipit at. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Pellentesque porttitor imperdiet porttitor. Phasellus et odio tincidunt, pharetra turpis a, tincidunt magna. Etiam euismod sodales nisl sed tempor. Nullam vestibulum et nibh eget viverra. Phasellus a nunc nec lectus lacinia pulvinar eget vitae augue. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Nullam gravida sem nec sapien sodales vestibulum. Phasellus vel ultricies felis. Sed augue mi, tempus ut tristique vel, vehicula vitae justo.</p> | |
<p>Ut posuere magna et odio vulputate cursus. Maecenas ultricies ante turpis, eget porta sapien interdum |
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
/** | |
* Indents a flat JSON string to make it more human-readable. | |
* | |
* http://www.daveperrett.com/articles/2008/03/11/format-json-with-php/ | |
*/ | |
function json_indent($json) | |
{ | |
$result = ''; | |
$pos = 0; | |
$strLen = strlen($json); |
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
add_action('admin_enqueue_scripts', 'ds_admin_theme_style'); | |
add_action('login_enqueue_scripts', 'ds_admin_theme_style'); | |
function ds_admin_theme_style() { | |
if (!current_user_can( 'manage_options' )) { | |
echo '<style>.update-nag, .updated, .error, .is-dismissible { display: none; }</style>'; | |
} | |
} |
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 | |
//AJAX ADD TO CART BUTTON | |
$product_id = 143; | |
if( !my_custom_cart_contains( $product_id ) ) { | |
?> | |
<button class="my-custom-add-to-cart-button" data-product-id="<?php echo $product_id; ?>">add to cart</button> | |
<?php | |
} else { | |
?> |
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
$(function() { | |
// Filter Ajax Load More | |
var alm_is_animating = false; | |
$('#alm-filter-nav li').eq(0).addClass('active'); // Set the initial button active state | |
// Nav btn click event | |
$('#alm-filter-nav li a').on('click', function(e){ | |
e.preventDefault(); | |
var el = $(this); // Our selected element |
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
#!/usr/bin/env python | |
''' | |
MySQL CRUD (Create Retrieve Update Delete) Operations using Python | |
''' | |
__author__ = "Alessandro Cucci" | |
__license__ = "MIT" | |
__version__ = "0.0.1" | |
__email__ = "[email protected]" | |
__status__ = "Development" |