Skip to content

Commit 10d1235

Browse files
committed
version update/prefix corrected and update in readme
1 parent 1f5a385 commit 10d1235

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

readme.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
This plugin tells WordPress to create three additional sizes for images you upload. Then it outputs special HTML (via a shortcode) that works with the Picturefill library to achieve responsive images in content.
22

33
### Usage
4-
5-
Shortcode -
4+
5+
Shortcode -
66
[responsive imageid="12" size1="0" size2="500" size3="1000"]
77

88
PHP (use in template files) -
99

10-
<?php
11-
$image = get_field('upload_image');
10+
<?php
11+
$imageid = 'your image id';
1212
$mappings = array(
1313
0 => 'small-img', // zero maps to default
1414
250 => 'large-img',
1515
1000 => 'full-width'
1616
);
1717
?>
18-
<span data-picture data-alt="<?php echo get_img_alt($image) ?>">
19-
<?php echo getPictureSrcs($image, $mappings) ?>
20-
<noscript> <?php echo wp_get_attachment_image($image, $mappings[2]) ?> </noscript>
18+
<span data-picture data-alt="<?php echo tevkori_get_img_alt($imageid) ?>">
19+
<?php echo tevkori_get_picture_srcs($imageid, $mappings) ?>
20+
<noscript> <?php echo wp_get_attachment_image($imageid, $mappings[2]) ?> </noscript>
2121
</span>
2222

2323
### Prereqs
2424

25-
Make sure your current theme has
25+
Make sure your current theme has
2626

2727
'add_theme_support( 'post-thumbnails' );'
2828

wp-tevko-responsive-images.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
Plugin Name: WP Tevko Responsive Images
55
Plugin URI: http://timevko.com
66
Description: Fully responsive image solution using picturefill and the ID of your image.
7-
Version: 0.2.3
7+
Version: 1.0.0
88
Author: Tim Evko
99
Author URI: http://timevko.com
1010
License: MIT
@@ -58,7 +58,7 @@ function tevkori_responsive_shortcode( $atts ) {
5858
);
5959

6060
return
61-
'<span data-picture data-alt="'. get_img_alt( $imageid ) .'">'
61+
'<span data-picture data-alt="'. tevkori_get_img_alt( $imageid ) .'">'
6262
. tevkori_get_picture_srcs( $imageid, $mappings ) .
6363
'<noscript>' . wp_get_attachment_image( $imageid, $size2 ) . ' </noscript>
6464
</span>';

0 commit comments

Comments
 (0)