When you open the page, a series of divs appears over your content with important messages or images. You can close it with a simple click !
A Pen by Andrea Rufo on CodePen.
$(window).ready( function(){ | |
var titid = 0; | |
$('.documentation h3').each(function(){ | |
titid = titid+1; | |
$(this).attr('id', 'tit'+titid); | |
$('#indice').append('<li><a href="#tit' + titid + '">' + $(this).text() + '</a></li>'); | |
}) | |
When you open the page, a series of divs appears over your content with important messages or images. You can close it with a simple click !
A Pen by Andrea Rufo on CodePen.
<pre> | |
<?php | |
$n = 10000; | |
$min = 1; | |
$max = 20; | |
$values = array(); | |
<?php | |
// return the acronym of a name | |
function acronym($f){ | |
$words = explode(" ", $f); | |
$acronym = ""; | |
foreach ($words as $w){ |
<?php | |
// return the url of a random unsplash image with selected size | |
function fakeimg($w, $h, $last=495){ | |
if(!isset($h)) $h = $w; | |
return 'https://unsplash.it/'.$w.'/'.$h.'/?image='.rand(0,$last); | |
} |
.flexbox(@d: flex, @j: center, @a: center){ | |
display: @d; | |
justify-content: @j; | |
align-items: @a; | |
display: -webkit-@d; | |
-webkit-justify-content: @j; | |
-webkit-align-items: @a; | |
} |
<?php | |
/** | |
* Return the post thumbnail url of the content (use in loop) | |
* by Andrea Rufo www.andrearufo.it | |
* | |
* @param string $size the image size registered in theme via add_image_size() function | |
* @param int $id the ID of the post | |
* @return string url of the image | |
*/ |
<?php | |
/** | |
* Return the normalized collection of posts with custom fields | |
* @param string $type The custom post name | |
* @param array $infos The list of custom post types required | |
* @return array A collection of post object normalized | |
*/ | |
function wp_custom_post_normalized_table($type, $infos = []){ | |
global $wpdb; |