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 | |
/* | |
* Displays an array of used modules | |
*/ | |
function display_used_modules() { | |
//Name of the flexible content field | |
$flexible_content_field_name = 'modules'; | |
echo 'Used modules <br />'; |
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
* { background-color: rgba(255,0,0,.2); } | |
* * { background-color: rgba(0,255,0,.2); } | |
* * * { background-color: rgba(0,0,255,.2); } | |
* * * * { background-color: rgba(255,0,255,.2); } | |
* * * * * { background-color: rgba(0,255,255,.2); } | |
* * * * * * { background-color: rgba(255,255,0,.2); } |
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 | |
/** | |
* Noindex protected posts | |
*/ | |
add_filter( 'wp', function() | |
{ | |
global $post; | |
if(!empty($post->post_password)){ | |
add_filter( 'wp_robots', 'wp_robots_no_robots' ); | |
} |
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 | |
/** | |
* Source https://gist.github.com/tineo/5234972 | |
*/ | |
public static function getWithCurl($url) | |
{ | |
$curl = curl_init(); | |
// Setup headers - I used the same headers from Firefox version 2.0.0.6 | |
// below was split up because php.net said the line was too long. :/ |