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 | |
// Initilise cURL | |
$ch = curl_init(); | |
// Set the cURL Options | |
$optArray = array( | |
CURLOPT_URL => 'https://example.com/api/getInfo/', | |
CURLOPT_RETURNTRANSFER => true | |
); |
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
function defer_parsing_of_js($url) | |
{ | |
if (is_admin()) return $url; //don't break WP Admin | |
if (false === strpos($url, '.js')) return $url; | |
if (strpos($url, 'jquery.js')) return $url; | |
return str_replace(' src', ' defer src', $url); | |
} | |
add_filter('script_loader_tag', 'defer_parsing_of_js', 10); |
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
/*Contact form 7 remove span*/ | |
add_filter('wpcf7_form_elements', function($content) { | |
$content = preg_replace('/<(span).*?class="\s*(?:.*\s)?wpcf7-form-control-wrap(?:\s[^"]+)?\s*"[^\>]*>(.*)<\/\1>/i', '\2', $content); | |
$content = str_replace('<br />', '', $content); | |
return $content; | |
}); |
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 | |
/** | |
* Using wp_dropdown_categories with the post type filter applied. | |
* | |
* @link https://joshuadnelson.com/category-taxonomy-dropdown-filtered-by-post-type/ | |
*/ | |
// Taxonomy dropdown arguments | |
$args = array( | |
'taxonomy' => 'department', |
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 | |
/* | |
Plugin Name: Dashboard Widget Activity Custom Post Type | |
Plugin URI: | |
Description: | |
Author: Daniele Mte90 Scasciafratte | |
Version: 1.0.0 | |
Author URI: http://mte90.net | |
*/ |
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 | |
/** | |
* Plugin Name: No Comment | |
* Description: A plugin to close, disable and remove comments from the WordPress admin UI. | |
* Version: 0.1 | |
* Author: Caspar Hübinger | |
* Author URI: https://profiles.wordpress.org/glueckpress/ | |
* License: GNU General Public License v2 or later | |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html | |
* |
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
.fa-bounce { | |
display: inline-block; | |
position: relative; | |
-moz-animation: bounce 1s infinite linear; | |
-o-animation: bounce 1s infinite linear; | |
-webkit-animation: bounce 1s infinite linear; | |
animation: bounce 1s infinite linear; | |
} | |
@-webkit-keyframes bounce { |