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 ps_wp_prepare_attachment_for_js($response, $attachment, $meta) { | |
if($response['type'] == 'image') { | |
$image_src = wp_get_attachment_image_src( $response['id'], 'thumbnail' ); //Use any image size added to your wordpress installation | |
if( is_array($image_src) ) { | |
$response['url'] = $image_src[0]; | |
} | |
} | |
return $response; |
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
add_filter( 'wpseo_add_meta_boxes', 'prefix_wpseo_add_meta_boxes ); | |
function prefix_wpseo_add_meta_boxes() { | |
global $post; | |
$post_types_without_seo = array( 'date', 'slide', 'video' ); | |
return !in_array( get_post_type($post), $post_types_without_seo); | |
} |
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
echo "<script>console.log( " . print_r($object, true) . " );</script>"; |
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
var fileSystem; | |
var documentRoot; | |
function onAppReady() { | |
window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, gotFS, function() {}); | |
} | |
function gotFS(fileSystem) { | |
fileSystem = fileSystem; | |
documentRoot = fileSystem.root.fullPath; |
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
$url = 'http://www.andioliphilipp.de'; | |
$doc_source = new DOMDocument; | |
$doc_source->validateOnParse = true; | |
@$doc_source->loadHTML(utf8_decode(file_get_contents($url))); | |
$content = $doc_source->getElementById('meta_partner'); | |
$doc_output = new DOMDocument; | |
$doc_output->appendChild($doc_output->importNode($content,true)); |