Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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 month 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 (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2013-04-25T01:06:32.000Z (over 11 years ago)
- Last Synced: 2024-05-02T00:08:41.028Z (7 months 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 PluginsRequires: 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)