I updated Social Meta

in code

Some dude made a request for an Open Graph plugin on the /r/wordpress subreddit. I gave a pointless link to a library I knew he can’t use, because his question was lazy:


I realized the library can be fiddly to use when I looked back over my post, so I refactored the script as a class with a constructor.


$my_social_meta_instance = new Social_Meta(array(
    'twitter' => '@username',
    'facebook' => 'username',
    'fallback_image' => array(
        'url' => get_template_directory_uri() . '/path/to/image.jpg',
        'path' => get_template_directory() . '/path/to/image.jpg'

Article Images has been likewise updated; it now has a function to set fallback image.

Wat een (Bergachtig) Dag!

in ireland

Your email address will not be published. Required fields are marked *