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
["ABeeZee","Abel","Abhaya Libre","Abril Fatface","Aclonica","Acme","Actor","Adamina","Advent Pro","Aguafina Script","Akaya Kanadaka","Akaya Telivigala","Akronim","Aladin","Alata","Alatsi","Aldrich","Alef","Alegreya","Alegreya SC","Alegreya Sans","Alegreya Sans SC","Aleo","Alex Brush","Alfa Slab One","Alice","Alike","Alike Angular","Allan","Allerta","Allerta Stencil","Allison","Allura","Almarai","Almendra","Almendra Display","Almendra SC","Alumni Sans","Amarante","Amaranth","Amatic SC","Amethysta","Amiko","Amiri","Amita","Anaheim","Andada Pro","Andika","Andika New Basic","Angkor","Annie Use Your Telescope","Anonymous Pro","Antic","Antic Didone","Antic Slab","Anton","Antonio","Arapey","Arbutus","Arbutus Slab","Architects Daughter","Archivo","Archivo Black","Archivo Narrow","Are You Serious","Aref Ruqaa","Arima Madurai","Arimo","Arizonia","Armata","Arsenal","Artifika","Arvo","Arya","Asap","Asap Condensed","Asar","Asset","Assistant","Astloch","Asul","Athiti","Atkinson Hyperlegible","Atma","Atomic Age","Aubrey","A |
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 | |
function get_charset() | |
{ | |
return 'utf-8'; | |
} | |
/** | |
* kses 0.2.2 - HTML/XHTML filter that only allows some elements and attributes | |
* Copyright (C) 2002, 2003, 2005 Ulf Harnhammar |
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 | |
// composer install ezyang/htmlpurifier | |
require 'vendor/autoload.php'; | |
$config = HTMLPurifier_Config::createDefault(); | |
$config->set('HTML.AllowedElements', 'a,i,b,p,div,strong,h1,h2,h3,h4,h5,ol,ul,li,br'); | |
$config->set('HTML.AllowedAttributes', 'href,title,target,name'); | |
$config->set('HTML.Attr.Name.UseCDATA', true); | |
$config->set('AutoFormat.RemoveEmpty.RemoveNbsp', true); | |
$config->set('Attr.AllowedFrameTargets', ['_blank']); |
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
# ============================= | |
# CHECK REQUIREMENTS | |
# ============================= | |
requirement=1; | |
#check if pv command exist | |
if ! which pv >/dev/null; then | |
echo "You need to install pv" | |
requirement=0 | |
fi |
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 | |
/* | |
USAGE: | |
$task = new WP_Bulk_Task('test-bulk-task', 'product'); | |
$task->set_callback(function($post){ | |
error_log($post->ID); | |
}); | |
$task->set_posts_per_page(1); | |
$task->register(); | |
*/ |
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 | |
/** | |
* This program is free software: you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License as published by | |
* the Free Software Foundation, either version 3 of the License, or | |
* (at your option) any later version. | |
* | |
* This program is distributed in the hope that it will be useful, | |
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
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 | |
function example_measure_execution_time(){ | |
$start = microtime(true); | |
// Here your script | |
$duration = microtime(true) - $start; // in seconds | |
echo 'the script take '. $duration.' to be executed'; | |
} |
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 | |
function bo_print_nice_array($array) | |
{ | |
echo '$array='; | |
bo_print_nice_array_content($array, 1); | |
echo ';'; | |
} | |
function bo_print_nice_array_content($array, $deep = 1) |
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 | |
// attach a post type to pictifly regeneration | |
add_filter('pf_post_type_regenerate', 'prefix_pf_post_type_regenerate', 1, 1); | |
function prefix_pf_post_type_regenerate($post_types){ | |
$post_types=['custom_type']; | |
return $post_types; | |
} | |
// Create custom method to regenerate image | |
add_action('pf_post_images_regenerate', 'prefix_pf_post_images_regenerate',10, 2); |
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 fish_greeting | |
echo ' '(set_color F00)' | |
'(set_color c01232)' _______ _______ _________ _______ _______ _______ | |
'(set_color af1132)'( ___ )( ____ \\__ __/( ____ )( ____ \( ____ \ | |
'(set_color 9c1133)'| ( ) || ( \/ ) ( | ( )|| ( \/| ( \/ | |
'(set_color 880f34)'| | | || | | | | (____)|| (__ | (__ | |
'(set_color 770e33)'| | | || | | | | __)| __) | __) | |
'(set_color 6d0e34)'| | | || | | | | (\ ( | ( | ( | |
'(set_color 550d34)'| (___) || (____/\ | | | ) \ \__| (____/\| (____/\ | |
'(set_color 550d34)'(_______)(_______/ )_( |/ \__/(_______/(_______/ '(set_color 46092a)' |