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 | |
function twitter_card_info() | |
{ | |
$twitter_excerpt = get_the_excerpt(); | |
if (!$twitter_excerpt) $twitter_excerpt = get_bloginfo('description'); | |
// .. | |
echo '<meta name="twitter:description" value="'.$twitter_excerpt.'" />'; | |
} | |
add_action('wp_head','twitter_card_info'); | |
?> |
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
test me |
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
<script type="text/javascript" src="http://some.server.com/injection/experiment.js"></script> |
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
$output .= $url . PHP_EOL; |
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
$app->get('/', function () use ($urls) { | |
$output = ''; | |
foreach ($urls as $url) { | |
$output .= $url; | |
} | |
return $output; | |
}); |
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
$urls = array('http://www.facebook.com', 'http://www.twitter.com', 'http://plus.google.com'); |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Bjoerns URL Shortener</title> | |
<meta name="author" content="Bjoern Wagner"> | |
<!-- Le HTML5 shim, for IE6-8 support of HTML elements --> | |
<!--[if lt IE 9]> | |
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> |
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 | |
// framework laden | |
require_once __DIR__.'/silex.phar'; | |
// neue Silex app instanziieren | |
$app = new Silex\Application(); | |
// die Route '/' mit einer sog. anonymen function beantworten, die 'hello world!' zurückgibt | |
$app->get('/', function() use($app) { |
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 | |
// framework laden | |
require_once __DIR__.'/silex.phar'; | |
// neue Silex app instanziieren | |
$app = new Silex\Application(); | |
// die Route '/' mit einer sog. anonymen function beantworten, die 'hello world!' zurückgibt | |
$app->get('/', function() use($app) { |
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
# | |
# .htaccess Dateien enthalten Direktiven für den Apache Webserver (wie er auf Heroku läuft) | |
# Diese hier sorgt dafür, dass alle Anfragen an deine Domain, die mit keiner Datei übereinstimmen, | |
# an die index.php weitergegeben werden. | |
# | |
# i.e. /index.php existiert | |
# /hallo/bjoern existiert nicht | |
# | |
<IfModule mod_rewrite.c> |
NewerOlder