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
// Pullquote with parameters | |
function pullquote( $title, $content = null ) { | |
extract(shortcode_atts(array( | |
'title' => 'title' | |
), $title)); | |
return "<div class'wrapper'><button>{$title}</button><h3>{$content}</h3></div>"; | |
} | |
add_shortcode('pullquote', 'pullquote'); | |
//Use in content with this |
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
$string = "<<<HTML" . $this->remoteResponse->getBody() . " | |
HTML"; | |
$dom = new DOMDocument(); | |
$dom->loadHTML($string); | |
$xpath = new DOMXpath($dom); | |
$nlist = $xpath->query("//button[@id='id-of-button']"); | |
$node = $nlist->item(0); | |
$node->parentNode->removeChild($node); | |
var_dump($this); |
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 | |
/* | |
^(.+).log(?:\.(?:\d+))?(?:\.gz)?\:((?:\d|\.)+)\s-\s-\s\[((?:\d{2})\/(?:\w{3,4})\/(?:\d{4})):(\S+)\s\+(?:\d+)\]\s\"GET \/wp-content\/uploads\/(?:mp3s\/)?(\S+)\s\S+\s(\d{3})\s\d+\s\S+\s\"(.*)\"$ | |
*/ | |
$re = "/^(.+).log(?:\\.(?:\\d+))?(?:\\.gz)?\\:((?:\\d|\\.)+)\\s-\\s-\\s\\[((?:\\d{2})\\/(?:\\w{3,4})\\/(?:\\d{4})):(\\S+)\\s\\+(?:\\d+)\\]\\s\\\"GET \\/wp-content\\/uploads\\/(?:mp3s\\/)?(\\S+)\\s\\S+\\s(\\d{3})\\s\\d+\\s\\S+\\s\\\"(.*)\\\"$/mi"; | |
$file = file_get_contents('search_results.txt'); | |
preg_match_all($re, $file, $matches, PREG_SET_ORDER); | |
foreach($matches as $match) { | |
$comma_separated = implode("`,`", $match); | |
echo '`'.$comma_separated . "`<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
function add_meta_tags() { | |
global $post; | |
if ( is_archive() || is_home()) { | |
/* | |
* CONTEXT CLASS | |
* Here we go, need to create a context for the library pages and its facets | |
*/ | |
class Context | |
{ | |
public $isContentType = false; |
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
SELECT p1.id, p1.post_title, p1.post_name, | |
(SELECT GROUP_CONCAT(wt.name SEPARATOR ', ') FROM wp_posts p2 | |
INNER JOIN wp_term_relationships r ON r.object_id=p2.ID | |
INNER JOIN wp_term_taxonomy t ON t.term_taxonomy_id = r.term_taxonomy_id | |
INNER JOIN wp_terms wt on wt.term_id = t.term_id | |
WHERE t.taxonomy="category" | |
AND p2.id = p1.id | |
) as categories | |
FROM wp_posts p1 | |
WHERE p1.post_status = 'publish' |
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
.issuuembed > div > div { | |
background: white !Important; | |
} |