Version Description
- Adding Open Graph Namespace to the HTML tag
Download this release
Release Info
Developer | wonderm00n |
Plugin | Open Graph for Facebook, Google+ and Twitter Card Tags |
Version | 0.1.1 |
Comparing to | |
See all releases |
Code changes from version 0.1 to 0.1.1
- readme.txt +9 -1
- readme.txt.bak +0 -32
- wonderm00n-open-graph.php +14 -3
readme.txt
CHANGED
@@ -2,7 +2,9 @@
|
|
2 |
Contributors: wonderm00n
|
3 |
Donate link: http://example.com/
|
4 |
Tags: facebook, open graph, seo, share
|
5 |
-
|
|
|
|
|
6 |
|
7 |
This plugin inserts Facebook Open Grpah Tags into your WordPress Blog/Website for more effective Facebook sharing results.
|
8 |
|
@@ -11,6 +13,7 @@ This plugin inserts Facebook Open Grpah Tags into your WordPress Blog/Website fo
|
|
11 |
It allows the user to choose which tags are, or not, included and also the default image if the post/page doesn't have one.
|
12 |
|
13 |
The tags that this plugin inserts are:
|
|
|
14 |
* og:app_id : From settings on the options screen
|
15 |
* og:admins : From settings on the options screen
|
16 |
* og:site_name : From blog title
|
@@ -28,5 +31,10 @@ The tags that this plugin inserts are:
|
|
28 |
|
29 |
== Changelog ==
|
30 |
|
|
|
|
|
|
|
|
|
31 |
= 0.1 =
|
|
|
32 |
* First release
|
2 |
Contributors: wonderm00n
|
3 |
Donate link: http://example.com/
|
4 |
Tags: facebook, open graph, seo, share
|
5 |
+
Requires at least: 3
|
6 |
+
Tested up to: 3.2.1
|
7 |
+
Stable tag: 0.1.1
|
8 |
|
9 |
This plugin inserts Facebook Open Grpah Tags into your WordPress Blog/Website for more effective Facebook sharing results.
|
10 |
|
13 |
It allows the user to choose which tags are, or not, included and also the default image if the post/page doesn't have one.
|
14 |
|
15 |
The tags that this plugin inserts are:
|
16 |
+
|
17 |
* og:app_id : From settings on the options screen
|
18 |
* og:admins : From settings on the options screen
|
19 |
* og:site_name : From blog title
|
31 |
|
32 |
== Changelog ==
|
33 |
|
34 |
+
= 0.1.1 =
|
35 |
+
|
36 |
+
* Adding Open Graph Namespace to the HTML tag
|
37 |
+
|
38 |
= 0.1 =
|
39 |
+
|
40 |
* First release
|
readme.txt.bak
DELETED
@@ -1,32 +0,0 @@
|
|
1 |
-
=== Plugin Name ===
|
2 |
-
Contributors: wonderm00n
|
3 |
-
Donate link: http://example.com/
|
4 |
-
Tags: facebook, open graph, seo
|
5 |
-
Stable tag: 0.1
|
6 |
-
|
7 |
-
This plugin inserts Facebook Open Grpah Tags into your WordPress Blog/Website for more effective Facebook sharing results.
|
8 |
-
|
9 |
-
== Description ==
|
10 |
-
|
11 |
-
It allows the user to choose which tags are, or not, included and also the default image if the post/page doesn't have one.
|
12 |
-
|
13 |
-
The tags that this plugin inserts are:
|
14 |
-
* og:app_id : From settings on the options screen
|
15 |
-
* og:admins : From settings on the options screen
|
16 |
-
* og:site_name : From blog title
|
17 |
-
* og:title : From post/page/archive/tag/... title
|
18 |
-
* og:url : From the post/page permalink
|
19 |
-
* og:type : "article" for posts and pages and "website" for all the others
|
20 |
-
* og:description : From post/page excerpt if it exists, or from post/page content
|
21 |
-
* og:image : From post/page featured/thumbnail image, or if it doesn't exists from the first image in the post content, or if it doesn't exists from the first image on the post media gallery, or if it doesn't exists from the default image defined on the options menu
|
22 |
-
|
23 |
-
== Installation ==
|
24 |
-
|
25 |
-
1. Upload the `wonderm00n-open-graph` to the `/wp-content/plugins/` directory
|
26 |
-
2. Activate the plugin through the 'Plugins' menu in WordPress
|
27 |
-
3. Got to `Options`, `Wonderm00n's Open Graph` to set it up
|
28 |
-
|
29 |
-
== Changelog ==
|
30 |
-
|
31 |
-
= 0.1 =
|
32 |
-
* First release
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
wonderm00n-open-graph.php
CHANGED
@@ -1,14 +1,14 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* @package Wonderm00n's Simple Facebook Open Graph Tags
|
4 |
-
* @version 0.1
|
5 |
*/
|
6 |
/*
|
7 |
Plugin Name: Wonderm00n's Simple Facebook Open Graph Tags
|
8 |
Plugin URI: http://blog.wonderm00n.com/2011/10/14/wordpress-plugin-simple-facebook-open-graph-tags/
|
9 |
Description: This plugin inserts Facebook Open Graph Tags into your Wordpress Blog/Website for better Facebook sharing
|
10 |
Author: Marco Almeida (Wonderm00n)
|
11 |
-
Version: 0.1
|
12 |
Author URI: http://wonderm00n.com
|
13 |
*/
|
14 |
|
@@ -145,9 +145,20 @@ function wonderm00n_open_graph() {
|
|
145 |
';
|
146 |
echo $html;
|
147 |
}
|
148 |
-
|
149 |
add_action('wp_head', 'wonderm00n_open_graph', 1);
|
150 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
151 |
//Admin
|
152 |
if ( is_admin() ){
|
153 |
add_action('admin_menu', 'wonderm00n_open_graph_add_options');
|
1 |
<?php
|
2 |
/**
|
3 |
* @package Wonderm00n's Simple Facebook Open Graph Tags
|
4 |
+
* @version 0.1.1
|
5 |
*/
|
6 |
/*
|
7 |
Plugin Name: Wonderm00n's Simple Facebook Open Graph Tags
|
8 |
Plugin URI: http://blog.wonderm00n.com/2011/10/14/wordpress-plugin-simple-facebook-open-graph-tags/
|
9 |
Description: This plugin inserts Facebook Open Graph Tags into your Wordpress Blog/Website for better Facebook sharing
|
10 |
Author: Marco Almeida (Wonderm00n)
|
11 |
+
Version: 0.1.1
|
12 |
Author URI: http://wonderm00n.com
|
13 |
*/
|
14 |
|
145 |
';
|
146 |
echo $html;
|
147 |
}
|
|
|
148 |
add_action('wp_head', 'wonderm00n_open_graph', 1);
|
149 |
|
150 |
+
function wonderm00n_open_graph_add_opengraph_namespace( $output ) {
|
151 |
+
if (stristr($output,'xmlns:og')) {
|
152 |
+
//Already there
|
153 |
+
return $output;
|
154 |
+
} else {
|
155 |
+
//Let's add it
|
156 |
+
return $output . ' xmlns:og="http://opengraphprotocol.org/schema/"';
|
157 |
+
}
|
158 |
+
}
|
159 |
+
//We want to be last to add the namespace because some other plugin may already added it ;-)
|
160 |
+
add_filter('language_attributes', 'wonderm00n_open_graph_add_opengraph_namespace',9999);
|
161 |
+
|
162 |
//Admin
|
163 |
if ( is_admin() ){
|
164 |
add_action('admin_menu', 'wonderm00n_open_graph_add_options');
|