Skip to content

Commit 908f8ec

Browse files
committed
image functions
1 parent 0715bf8 commit 908f8ec

File tree

1 file changed

+34
-2
lines changed

1 file changed

+34
-2
lines changed

wp-bootstrap-images.php

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ class WP_Bootstrap_Images {
2222
*/
2323
public function __construct() {
2424

25-
// add_filter( 'get_image_tag_class', array( $this, 'responsive_image_class' ) );
25+
// Uncomment to auto add Responsive class to all images.
26+
// add_filter( 'get_image_tag_class', array( $this, 'image_responsive_class' ) );
2627

2728
}
2829

@@ -37,11 +38,42 @@ function image_responsive_class( $class ) {
3738
$class .= ' img-responsive';
3839
return $class;
3940
}
40-
41+
42+
/**
43+
* image_rounded_class function.
44+
*
45+
* @access public
46+
* @param mixed $class
47+
* @return void
48+
*/
4149
function image_rounded_class( $class ) {
4250
$class .= ' img-rounded';
4351
return $class;
4452
}
53+
54+
/**
55+
* image_circle_class function.
56+
*
57+
* @access public
58+
* @param mixed $class
59+
* @return void
60+
*/
61+
function image_circle_class( $class ) {
62+
$class .= ' img-circle';
63+
return $class;
64+
}
65+
66+
/**
67+
* image_thumbnail_class function.
68+
*
69+
* @access public
70+
* @param mixed $class
71+
* @return void
72+
*/
73+
function image_thumbnail_class( $class ) {
74+
$class .= ' img-thumbnail';
75+
return $class;
76+
}
4577
}
4678

4779
new WP_Bootstrap_Images();

0 commit comments

Comments
 (0)