Add Open Graph protocol support
|Reported by:||lukbarros||Owned by:|
Whereas the wordpress software is content management and this must be compatible for shares on social networks that has adopted fecebook pulled by the open graph protocol (http://ogp.me/).
I feel in my projects this lack, before doing this manually in my header.php (in my head at the session theme html document) and ended up finding some third party plugins that try to solve the problem in different ways however implementing the outline of issues as: "What og: image page view?".
Believing in the importance of the protocol, and I believe that many front-ends will agree with the importance, decides to research and implement the class wpog initially responsible for managing the data and writing the html tags ophen graph.
Not all tags contemplated, but the intention here is to be able to show the architecture of the class as well as the base implementation of which will derive the other to meet all the definitions of open graph.
I urge you to download the attachment with implmentação (wordpress 3.5 + standard implementation), use, test, and we discuss the incorporation of the standard design wordpress.
Note comments documented in the code to understand it better.
To locate the changes:
1 - in wp-includes \ load.php on line 348 was added to the global function that Lavanta $ wpog.
2 - in wp-settings.php on line 75 was added to the called function explained in item 1.
3 - in wp-includes the file was added wp-og.php containing the class wpog and 2 functions to the list of functions 'template tags' for use in themes.
4 - in wp-content \ themes \ wpogTest \ header.php on line 28 demonstrate ways to use the new class wpog.
I hope feedbacks!
Change History (9)
- Keywords close removed
- Milestone Awaiting Review deleted
- Resolution set to wontfix
- Status changed from new to closed