Upload
wordpress-kitchen
View
103
Download
3
Embed Size (px)
Citation preview
WordPress и
социальные сети
Open Graph
<head>
<meta property="og:title" content="The Rock" />
<meta property="og:type" content="video.movie" />
<meta property="og:url" content="http://www.imdb.com/title/tt0117500/" />
<meta property="og:image"
content="http://ia.media-imdb.com/images/rock.jpg" />
...
</head>
Rich Snippets
<div itemscope itemtype="http://data-vocabulary.org/Recipe" > <h1 itemprop="name">Grandma's Holiday Apple Pie</h1> <img itemprop="photo" src="apple-pie.jpg" /> By <span itemprop="author">Carol Smith</span> Published: <time datetime="2009-11-05" itemprop="published">November 5, 2009</time> ...</div>
Graph API
1. HTTP2. PHP SDK3. JavaScript SDK
VK
Open API
1. HTTP2. JavaScript SDK
PythonRuby
Transients
set_transient ( string $transient, mixed $value, int $expiration )
function get_instagram_feed( $feed ){if( !$images = get_transient(‘instagram-’.$feed) ){
$images = …… ;set_transient(instagram-’.$feed, $images, 5 * 60);
}return $images;
}
TLC Transients
https://github.com/markjaquith/WP-TLC-Transients
tlc_transient( 'example-feed' ) ->updates_with( 'my_callback' ) ->expires_in( 300 ) ->background_only() ->get();