https://github.com/ryanve/image_src
WP plugin for image_src
https://github.com/ryanve/image_src
wordpress wordpress-plugin wp-plugin
Last synced: about 1 year ago
JSON representation
WP plugin for image_src
- Host: GitHub
- URL: https://github.com/ryanve/image_src
- Owner: ryanve
- Created: 2013-02-02T06:34:00.000Z (about 13 years ago)
- Default Branch: master
- Last Pushed: 2013-04-25T01:06:32.000Z (almost 13 years ago)
- Last Synced: 2025-03-15T21:51:22.054Z (about 1 year ago)
- Topics: wordpress, wordpress-plugin, wp-plugin
- Language: PHP
- Homepage: https://github.com/ryanve/image_src
- Size: 152 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
### [WP plugin](http://wordpress.org/extend/plugins/image-src/): [image_src](https://github.com/ryanve/image_src)
Social media sites often use the `"image_src"` microformat for displaying link thumbnails. This simple plugin adds the image_src [rel value](http://microformats.org/wiki/existing-rel-values) to the code of your site. By default, the plugin applies only to singular views and it uses the [featured image](http://codex.wordpress.org/Post_Thumbnails). It only applies when an image is available.
### Install
1. Go to: WordPress **>** Plugins **>** Add New **>** and find "[image_src](http://wordpress.org/extend/plugins/image-src/)"
2. Activate via WordPress **>** Plugins **>** Installed Plugins
Requires: PHP 5.3+
### Customize
The `@image_src` [filter hook](http://codex.wordpress.org/Plugin_API#Filters) allows for image customization and/or extending the plugin to views without a [featured image](http://codex.wordpress.org/Post_Thumbnails):
```php
add_filter('@image_src', function ( $src = '' ) {
return $src ? $src : '/example.png';
});
```
### License: [MIT](http://opensource.org/licenses/MIT)
Copyright (C) 2013 by [Ryan Van Etten](https://github.com/ryanve)