SVG Support - Version 2.2.3

Version Description

  • Modified code in svg-support/js/svg-inline.js and svg-support/js/min/svg-inline-min.js to allow JS control of the SVG elements and detect if they have been loaded (IMG tag swapped out). Thanks to laurosello for this suggestion and code contribution.
  • Fixed SVG thumbnails not displaying correctly in list view of the media library.
  • Cleaned up the code and comments a bit.
  • Added translation for Spanish. Thanks to Apasionados del Marketing for the translation.
Download this release

Release Info

Developer Benbodhi
Plugin Icon 128x128 SVG Support
Version 2.2.3
Comparing to
See all releases

Code changes from version 2.2.2 to 2.2.3

admin/admin-init.php CHANGED
@@ -42,7 +42,7 @@ add_action('admin_init', 'bodhi_svgs_register_settings');
42
  function bodhi_svgs_register_settings() {
43
 
44
  register_setting('bodhi_svgs_settings_group', 'bodhi_svgs_settings');
45
-
46
  }
47
 
48
  ?>
42
  function bodhi_svgs_register_settings() {
43
 
44
  register_setting('bodhi_svgs_settings_group', 'bodhi_svgs_settings');
45
+
46
  }
47
 
48
  ?>
admin/plugin-action-meta-links.php CHANGED
@@ -14,14 +14,14 @@ function bodhi_svgs_plugin_action_links( $links ) {
14
  $links[] = '<a href="'. get_admin_url(null, 'options-general.php?page=svg-support') .'">Settings</a>';
15
  //$links[] = '<a href="http://gowebben.com" target="_blank">More plugins by GoWebben</a>';
16
  return $links;
17
-
18
  }
19
 
20
  // add plugin_row_meta links
21
  add_filter( 'plugin_row_meta', 'bodhi_svgs_plugin_meta_links', 10, 2 );
22
 
23
  function bodhi_svgs_plugin_meta_links( $links, $file ) {
24
-
25
  $plugin_file = 'svg-support/svg-support.php';
26
  if ( $file == $plugin_file ) {
27
  return array_merge(
@@ -35,7 +35,7 @@ function bodhi_svgs_plugin_meta_links( $links, $file ) {
35
  }
36
 
37
  return $links;
38
-
39
  }
40
 
41
  ?>
14
  $links[] = '<a href="'. get_admin_url(null, 'options-general.php?page=svg-support') .'">Settings</a>';
15
  //$links[] = '<a href="http://gowebben.com" target="_blank">More plugins by GoWebben</a>';
16
  return $links;
17
+
18
  }
19
 
20
  // add plugin_row_meta links
21
  add_filter( 'plugin_row_meta', 'bodhi_svgs_plugin_meta_links', 10, 2 );
22
 
23
  function bodhi_svgs_plugin_meta_links( $links, $file ) {
24
+
25
  $plugin_file = 'svg-support/svg-support.php';
26
  if ( $file == $plugin_file ) {
27
  return array_merge(
35
  }
36
 
37
  return $links;
38
+
39
  }
40
 
41
  ?>
admin/svgs-settings-page.php CHANGED
@@ -1,25 +1,25 @@
1
  <div class="wrap">
2
-
3
  <div id="icon-upload" class="icon32"></div>
4
- <h2><?php _e( 'SVG Support Settings and Usage', 'svgsupport' ); ?><span class="svgs-version">Ver <?php global $plugin_version; echo $plugin_version; ?></span></h2>
5
 
6
  <div id="poststuff">
7
 
8
  <div class="meta-box-sortables ui-sortable">
9
-
10
  <div class="postbox">
11
-
12
  <h3><span><?php _e( 'Introduction', 'svgsupport' ); ?></span></h3>
13
  <div class="inside">
14
-
15
  <p><?php _e( 'When using SVG images on your WordPress site, it can be hard to style elements within the SVG using CSS. <strong>Now you can, easily!</strong>', 'svgsupport' ); ?></p>
16
  <p><?php _e( 'This plugin not only provides SVG Support like the name says, it also allows you to easily embed your full SVG file\'s code using a simple IMG tag. By adding the class <code>style-svg</code> to your IMG elements, this plugin dynamically replaces any IMG elements containing the <code>style-svg</code> class with your complete SVG.', 'svgsupport' ); ?></p>
17
  <p><?php _e( 'The main purpose of this is to allow styling of SVG elements. Usually your styling options are restricted when using <code>embed</code>, <code>object</code> or <code>img</code> tags alone.', 'svgsupport' ); ?></p>
18
 
19
  </div> <!-- .inside -->
20
-
21
  </div> <!-- .postbox -->
22
-
23
  </div> <!-- .meta-box-sortables .ui-sortable -->
24
 
25
  <div id="post-body" class="metabox-holder columns-2">
@@ -94,7 +94,7 @@
94
  </div> <!-- .postbox -->
95
 
96
  <div class="postbox">
97
-
98
  <h3><span><?php _e( 'Usage', 'svgsupport' ); ?></span></h3>
99
  <div class="inside">
100
 
@@ -112,9 +112,9 @@
112
  <p><em><?php _e( 'Please Note:', 'svgsupport' ); ?></em>
113
  <br><em><?php _e( '- You will need to set your own height and width in your CSS for SVG files to display correctly.', 'svgsupport' ); ?></em>
114
  <br><em><?php _e( '- Your uploaded image needs to be an SVG file for this plugin to replace the img tag with the inline SVG code. It will not create SVG files for you.', 'svgsupport' ); ?></em></p>
115
-
116
  </div> <!-- .inside -->
117
-
118
  </div> <!-- .postbox -->
119
 
120
  </div> <!-- .meta-box-sortables .ui-sortable -->
1
  <div class="wrap">
2
+
3
  <div id="icon-upload" class="icon32"></div>
4
+ <h2><?php _e( 'SVG Support Settings and Usage', 'svgsupport' ); ?><span class="svgs-version">Ver <?php global $svgs_plugin_version; echo $svgs_plugin_version; ?></span></h2>
5
 
6
  <div id="poststuff">
7
 
8
  <div class="meta-box-sortables ui-sortable">
9
+
10
  <div class="postbox">
11
+
12
  <h3><span><?php _e( 'Introduction', 'svgsupport' ); ?></span></h3>
13
  <div class="inside">
14
+
15
  <p><?php _e( 'When using SVG images on your WordPress site, it can be hard to style elements within the SVG using CSS. <strong>Now you can, easily!</strong>', 'svgsupport' ); ?></p>
16
  <p><?php _e( 'This plugin not only provides SVG Support like the name says, it also allows you to easily embed your full SVG file\'s code using a simple IMG tag. By adding the class <code>style-svg</code> to your IMG elements, this plugin dynamically replaces any IMG elements containing the <code>style-svg</code> class with your complete SVG.', 'svgsupport' ); ?></p>
17
  <p><?php _e( 'The main purpose of this is to allow styling of SVG elements. Usually your styling options are restricted when using <code>embed</code>, <code>object</code> or <code>img</code> tags alone.', 'svgsupport' ); ?></p>
18
 
19
  </div> <!-- .inside -->
20
+
21
  </div> <!-- .postbox -->
22
+
23
  </div> <!-- .meta-box-sortables .ui-sortable -->
24
 
25
  <div id="post-body" class="metabox-holder columns-2">
94
  </div> <!-- .postbox -->
95
 
96
  <div class="postbox">
97
+
98
  <h3><span><?php _e( 'Usage', 'svgsupport' ); ?></span></h3>
99
  <div class="inside">
100
 
112
  <p><em><?php _e( 'Please Note:', 'svgsupport' ); ?></em>
113
  <br><em><?php _e( '- You will need to set your own height and width in your CSS for SVG files to display correctly.', 'svgsupport' ); ?></em>
114
  <br><em><?php _e( '- Your uploaded image needs to be an SVG file for this plugin to replace the img tag with the inline SVG code. It will not create SVG files for you.', 'svgsupport' ); ?></em></p>
115
+
116
  </div> <!-- .inside -->
117
+
118
  </div> <!-- .postbox -->
119
 
120
  </div> <!-- .meta-box-sortables .ui-sortable -->
css/.sass-cache/2d7711e41fe8fdd2638823a7fcb5fbf7b4fba050/svgs-admin.scssc CHANGED
Binary file
css/svgs-admin.css CHANGED
@@ -1 +1 @@
1
- .svgs-version{font-size:10px;margin-left:7px}.postbox .inside a{text-decoration:none}
1
+ .svgs-version{font-size:10px;margin-left:7px}.postbox .inside a{text-decoration:none}h3{padding:0 12px}table.media .column-title .media-icon img{width:60px;height:60px}
css/svgs-admin.scss CHANGED
@@ -1,7 +1,21 @@
 
 
 
1
  .svgs-version {
2
  font-size: 10px;
3
  margin-left: 7px;
4
  }
5
  .postbox .inside a {
6
  text-decoration: none;
 
 
 
 
 
 
 
 
 
 
 
7
  }
1
+ /**
2
+ * Settings Page
3
+ */
4
  .svgs-version {
5
  font-size: 10px;
6
  margin-left: 7px;
7
  }
8
  .postbox .inside a {
9
  text-decoration: none;
10
+ }
11
+ h3 {
12
+ padding: 0 12px;
13
+ }
14
+
15
+ /**
16
+ * Media Library
17
+ */
18
+ table.media .column-title .media-icon img {
19
+ width: 60px;
20
+ height: 60px;
21
  }
functions/enqueue.php CHANGED
@@ -6,7 +6,9 @@ if ( ! defined( 'ABSPATH' ) ) {
6
  exit; // Exit if accessed directly
7
  }
8
 
9
- // enqueue and localize JS for IMG tag replacement
 
 
10
  add_action( 'wp_enqueue_scripts', 'bodhi_svgs_inline' );
11
 
12
  function bodhi_svgs_inline() {
@@ -20,31 +22,34 @@ function bodhi_svgs_inline() {
20
  } else {
21
  wp_register_script('bodhi_svg_inline', plugins_url('svg-support/js/min/svg-inline-min.js'), array('jquery'), '1.0.0', false );
22
  }
 
23
  wp_enqueue_script('bodhi_svg_inline');
24
  wp_localize_script( 'bodhi_svg_inline', 'cssTarget', $css_target );
25
 
26
  }
27
 
28
- // check if we're on our settings page for conditional loading
29
- function bodhi_svgs_settings_page_only() {
 
 
30
 
31
- $screen = get_current_screen();
 
 
 
 
 
 
32
 
33
- if( is_object($screen) && $screen->id == 'settings_page_svg-support' ) {
34
- return true;
35
- } else {
36
- return false;
37
- }
38
-
39
  }
40
 
41
- // enqueue admin settings css only on our settings page
42
- add_action( 'admin_enqueue_scripts', 'bodhi_svgs_admin_style' );
43
 
44
- function bodhi_svgs_admin_style() {
45
 
46
- if( bodhi_svgs_settings_page_only() ) {
47
- wp_enqueue_style( 'bodhi_svgs_admin_style', plugins_url('svg-support/css/svgs-admin.css') );
48
  }
49
 
50
  }
6
  exit; // Exit if accessed directly
7
  }
8
 
9
+ /**
10
+ * Enqueue and localize JS for IMG tag replacement
11
+ */
12
  add_action( 'wp_enqueue_scripts', 'bodhi_svgs_inline' );
13
 
14
  function bodhi_svgs_inline() {
22
  } else {
23
  wp_register_script('bodhi_svg_inline', plugins_url('svg-support/js/min/svg-inline-min.js'), array('jquery'), '1.0.0', false );
24
  }
25
+
26
  wp_enqueue_script('bodhi_svg_inline');
27
  wp_localize_script( 'bodhi_svg_inline', 'cssTarget', $css_target );
28
 
29
  }
30
 
31
+ /**
32
+ * Enqueue CSS for settings page and media library
33
+ */
34
+ function bodhi_svgs_specific_pages_only() {
35
 
36
+ $screen = get_current_screen();
37
+ // check which page we're on - our settings page or the media library
38
+ if ( is_object($screen) && $screen->id == 'settings_page_svg-support' || is_object($screen) && $screen->id == 'upload' ) {
39
+ return true;
40
+ } else {
41
+ return false;
42
+ }
43
 
 
 
 
 
 
 
44
  }
45
 
46
+ // enqueue our admin css only on our settings page or the media library
47
+ add_action( 'admin_enqueue_scripts', 'bodhi_svgs_admin_css' );
48
 
49
+ function bodhi_svgs_admin_css() {
50
 
51
+ if( bodhi_svgs_specific_pages_only() ) {
52
+ wp_enqueue_style( 'bodhi_svgs_admin_css', plugins_url('svg-support/css/svgs-admin.css') );
53
  }
54
 
55
  }
functions/thumbnail-display.php CHANGED
@@ -9,15 +9,15 @@ if ( ! defined( 'ABSPATH' ) ) {
9
  add_action('admin_init', 'bodhi_svgs_display_thumbs');
10
 
11
  function bodhi_svgs_display_thumbs() {
12
-
13
  ob_start();
14
 
15
  add_action( 'shutdown', 'bodhi_svgs_thumbs_filter', 0 );
16
  function bodhi_svgs_thumbs_filter() {
17
-
18
  $final = '';
19
  $ob_levels = count( ob_get_level() );
20
-
21
  for ( $i = 0; $i < $ob_levels; $i++ ) {
22
 
23
  $final .= ob_get_clean();
@@ -36,7 +36,7 @@ function bodhi_svgs_display_thumbs() {
36
  '<# } else if ( \'svg+xml\' === data.subtype ) { #>
37
  <img class="details-image" src="{{ data.url }}" draggable="false" />
38
  <# } else if ( \'image\' === data.type && data.sizes && data.sizes.full ) { #>',
39
-
40
  $content
41
  );
42
 
@@ -47,7 +47,7 @@ function bodhi_svgs_display_thumbs() {
47
  <img src="{{ data.url }}" class="thumbnail" draggable="false" />
48
  </div>
49
  <# } else if ( \'image\' === data.type && data.sizes ) { #>',
50
-
51
  $content
52
  );
53
 
9
  add_action('admin_init', 'bodhi_svgs_display_thumbs');
10
 
11
  function bodhi_svgs_display_thumbs() {
12
+
13
  ob_start();
14
 
15
  add_action( 'shutdown', 'bodhi_svgs_thumbs_filter', 0 );
16
  function bodhi_svgs_thumbs_filter() {
17
+
18
  $final = '';
19
  $ob_levels = count( ob_get_level() );
20
+
21
  for ( $i = 0; $i < $ob_levels; $i++ ) {
22
 
23
  $final .= ob_get_clean();
36
  '<# } else if ( \'svg+xml\' === data.subtype ) { #>
37
  <img class="details-image" src="{{ data.url }}" draggable="false" />
38
  <# } else if ( \'image\' === data.type && data.sizes && data.sizes.full ) { #>',
39
+
40
  $content
41
  );
42
 
47
  <img src="{{ data.url }}" class="thumbnail" draggable="false" />
48
  </div>
49
  <# } else if ( \'image\' === data.type && data.sizes ) { #>',
50
+
51
  $content
52
  );
53
 
languages/svgsupport-es_ES.mo ADDED
Binary file
languages/svgsupport-es_ES.po ADDED
@@ -0,0 +1,243 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: SVG Support v2.1.4\n"
4
+ "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: \n"
6
+ "PO-Revision-Date: 2016-03-21 19:32+0100\n"
7
+ "Last-Translator: Ramon <marketing@apasionados.es>\n"
8
+ "Language-Team: Apasionados.es <info@apasionados.es>\n"
9
+ "Language: es_ES\n"
10
+ "Plural-Forms: nplurals=2; plural=n != 1;\n"
11
+ "MIME-Version: 1.0\n"
12
+ "Content-Type: text/plain; charset=UTF-8\n"
13
+ "Content-Transfer-Encoding: 8bit\n"
14
+ "X-Poedit-SourceCharset: UTF-8\n"
15
+ "X-Generator: Poedit 1.8.7\n"
16
+ "X-Poedit-KeywordsList: _:1;gettext:1;dgettext:2;ngettext:1,2;dngettext:2,3;__:1;"
17
+ "_e:1;_c:1;_n:1,2;_n_noop:1,2;_nc:1,2;__ngettext:1,2;__ngettext_noop:1,2;_x:1,2c;"
18
+ "_ex:1,2c;_nx:1,2,4c;_nx_noop:1,2,3c;_n_js:1,2;_nx_js:1,2,3c;esc_attr__:1;"
19
+ "esc_html__:1;esc_attr_e:1;esc_html_e:1;esc_attr_x:1,2c;esc_html_x:1,2c;"
20
+ "comments_number_link:2,3;t:1;st:1;trans:1;transChoice:1,2\n"
21
+ "X-Poedit-Basepath: ..\n"
22
+ "X-Textdomain-Support: yes\n"
23
+ "X-Loco-Target-Locale: en_AU\n"
24
+ "X-Poedit-SearchPath-0: .\n"
25
+
26
+ #: admin/admin-init.php:12
27
+ msgid "SVG Support Options and Instructions"
28
+ msgstr "SVG Support Opciones e Instrucciones"
29
+
30
+ #. translators: plugin header field 'Name'
31
+ #: admin/admin-init.php:13 svg-support.php:0
32
+ msgid "SVG Support"
33
+ msgstr "SVG Support"
34
+
35
+ #: admin/admin-init.php:26
36
+ msgid "You can't play with this."
37
+ msgstr "No puedes jugar con esto."
38
+
39
+ #: admin/plugin-action-meta-links.php:27
40
+ msgid "Get Support"
41
+ msgstr "Obtener soporte"
42
+
43
+ #: admin/plugin-action-meta-links.php:28
44
+ msgid "Donate to author"
45
+ msgstr "Donar al autor"
46
+
47
+ #: admin/svgs-settings-page.php:4
48
+ msgid "SVG Support Settings and Usage"
49
+ msgstr "SVG Support Configuración y Uso"
50
+
51
+ #: admin/svgs-settings-page.php:12
52
+ msgid "Introduction"
53
+ msgstr "Introducción"
54
+
55
+ #: admin/svgs-settings-page.php:15
56
+ msgid ""
57
+ "When using SVG images on your WordPress site, it can be hard to style elements "
58
+ "within the SVG using CSS. <strong>Now you can, easily!</strong>"
59
+ msgstr ""
60
+ "Al usar imágenes SVG en un sitio de WordPress es complicado darle formato a los "
61
+ "elementos SVG usando CSS. <strong>¡Ahora esto es sencillo!</strong>"
62
+
63
+ #: admin/svgs-settings-page.php:16
64
+ msgid ""
65
+ "This plugin not only provides SVG Support like the name says, it also allows you "
66
+ "to easily embed your full SVG file's code using a simple IMG tag. By adding the "
67
+ "class <code>style-svg</code> to your IMG elements, this plugin dynamically "
68
+ "replaces any IMG elements containing the <code>style-svg</code> class with your "
69
+ "complete SVG."
70
+ msgstr ""
71
+ "Este plugin no solo da soporte SVG como su nombre indica, sino que además permite "
72
+ "insertar el código completo SVG utilizando una simple etiqueta IMG. Añadiendo la "
73
+ "clase <code>style-svg</code> a los elementos IMG este plugin los reemplaza de "
74
+ "forma dinámica con los SVG completos."
75
+
76
+ #: admin/svgs-settings-page.php:17
77
+ msgid ""
78
+ "The main purpose of this is to allow styling of SVG elements. Usually your "
79
+ "styling options are restricted when using <code>embed</code>, <code>object</code> "
80
+ "or <code>img</code> tags alone."
81
+ msgstr ""
82
+ "El objetivo principal es permitir darle formato a los elementos SVG. Normalmente "
83
+ "las opciones de formato están restringidas al usar solo las etiquetas "
84
+ "<code>embed</code>, <code>object</code> o <code>img</code>."
85
+
86
+ #: admin/svgs-settings-page.php:34
87
+ msgid "Settings"
88
+ msgstr "Configuración"
89
+
90
+ #: admin/svgs-settings-page.php:46
91
+ msgid "Restrict to Administrators"
92
+ msgstr "Restringir a los administradores"
93
+
94
+ #: admin/svgs-settings-page.php:51
95
+ msgid "Yes"
96
+ msgstr "Si"
97
+
98
+ #: admin/svgs-settings-page.php:51
99
+ msgid " Restricts SVG upload priveledges to Administrators."
100
+ msgstr " Restringe la subida de archivos SVG a los administradores."
101
+
102
+ #: admin/svgs-settings-page.php:56
103
+ msgid "CSS Class to target"
104
+ msgstr "Clase CSS objetivo"
105
+
106
+ #: admin/svgs-settings-page.php:59
107
+ msgid ""
108
+ "The default target class is <code>style-svg</code>. You can change it to your own "
109
+ "class such as <code>my-class</code> by typing it here.<br />Leave blank to use "
110
+ "the default class."
111
+ msgstr ""
112
+ "La clase por defecto es <code>style-svg</code>. Puedes cambiarla por una clase "
113
+ "propia como <code>my-class</code> tecleándola aquí.<br />Déjalo en blanco para "
114
+ "usar la clase por defecto."
115
+
116
+ #: admin/svgs-settings-page.php:65
117
+ msgid "Save Changes"
118
+ msgstr "Guardar cambios"
119
+
120
+ #: admin/svgs-settings-page.php:76
121
+ msgid "Usage"
122
+ msgstr "Uso"
123
+
124
+ #: admin/svgs-settings-page.php:79
125
+ msgid "You can simply upload SVG images to your media library like any other file."
126
+ msgstr ""
127
+ "Puedes subir fácilmente imágenes SVG a tu librería de medios como otros formatos "
128
+ "de archivo."
129
+
130
+ #: admin/svgs-settings-page.php:80
131
+ msgid ""
132
+ "Now, embed your SVG image like a standard image with the addition of adding the "
133
+ "class <code>style-svg</code> (or your custom class from above) to any IMG tags "
134
+ "that you want this plugin to swap out with your actual SVG code."
135
+ msgstr ""
136
+ "Ahora, incluye tu imagen SVG como una imágen estándar añadiendo la clase "
137
+ "<code>style-svg</code> (o tu clase propia definida arriba) a cualquier etiqueta "
138
+ "IMG que quieres que se cambie por el código SVG."
139
+
140
+ #: admin/svgs-settings-page.php:81
141
+ msgid "For example:"
142
+ msgstr "por ejemplo:"
143
+
144
+ #: admin/svgs-settings-page.php:84
145
+ msgid "or"
146
+ msgstr "o"
147
+
148
+ #: admin/svgs-settings-page.php:87
149
+ msgid ""
150
+ "The whole IMG tag element will now be dynamically replaced by the actual code of "
151
+ "your SVG, making the inner content targetable."
152
+ msgstr ""
153
+ "Toda la etiqueta IMG ahora se reemplaza de forma dinámica con el código del SVG "
154
+ "haciendo su contenido accesible."
155
+
156
+ #: admin/svgs-settings-page.php:88
157
+ msgid "This allows you to target elements within your SVG using CSS."
158
+ msgstr "Esto permite acceder a los elementos SVG usando CSS."
159
+
160
+ #: admin/svgs-settings-page.php:90
161
+ msgid ""
162
+ "Note: Your uploaded image needs to be an SVG file for this plugin to replace the "
163
+ "img tag with the inline SVG code. It will not create SVG files for you."
164
+ msgstr ""
165
+ "Nota: La imagen subida tiene que ser un SVG para que este plugin reemplace la "
166
+ "etiqueta IMG con el código SVG. No crea archivos SVG."
167
+
168
+ #: admin/svgs-settings-page.php:107
169
+ msgid "Features"
170
+ msgstr "Características"
171
+
172
+ #: admin/svgs-settings-page.php:110
173
+ msgid "SVG Support for your media library"
174
+ msgstr "Soporte SVG para la librería de medios"
175
+
176
+ #: admin/svgs-settings-page.php:111
177
+ msgid "Style SVG elements directly using CSS"
178
+ msgstr "Dar formato a los elementos SVG usando CSS"
179
+
180
+ #: admin/svgs-settings-page.php:112
181
+ msgid "Restrict to Administrators only"
182
+ msgstr "Restringido para administradores"
183
+
184
+ #: admin/svgs-settings-page.php:113
185
+ msgid "Extremely Simple To Use"
186
+ msgstr "Muy fácil de usar"
187
+
188
+ #: admin/svgs-settings-page.php:121
189
+ msgid "About the plugin"
190
+ msgstr "Sobre el plugin"
191
+
192
+ #: admin/svgs-settings-page.php:123
193
+ msgid "You can read about this plugin in detail on"
194
+ msgstr "Puedes leer todo sobre el plugin en"
195
+
196
+ #: admin/svgs-settings-page.php:123
197
+ msgid "The WordPress Plugin Repository"
198
+ msgstr "El repositorio de plugins de WordPress"
199
+
200
+ #: admin/svgs-settings-page.php:124
201
+ msgid "Need help?"
202
+ msgstr "¿Necesitas ayuda?"
203
+
204
+ #: admin/svgs-settings-page.php:124
205
+ msgid "Visit Support"
206
+ msgstr "Visitar soporte"
207
+
208
+ #: admin/svgs-settings-page.php:125
209
+ msgid "Buy Benbodhi a Beer &rarr;"
210
+ msgstr "Comprar una cerveza para Benbodhi &rarr;"
211
+
212
+ #: admin/svgs-settings-page.php:126
213
+ msgid "from"
214
+ msgstr "de"
215
+
216
+ #. translators: plugin header field 'PluginURI'
217
+ #: svg-support.php:0
218
+ msgid "http://wordpress.org/plugins/svg-support/"
219
+ msgstr "http://wordpress.org/plugins/svg-support/"
220
+
221
+ #. translators: plugin header field 'Description'
222
+ #: svg-support.php:0
223
+ msgid ""
224
+ "Allow SVG file uploads using the WordPress Media Library uploader plus direct "
225
+ "styling of SVG elements using CSS."
226
+ msgstr ""
227
+ "Permitir la subida de archivos SVG a través de la librería de medios además de "
228
+ "dar formato a los elementos SVG usando CSS."
229
+
230
+ #. translators: plugin header field 'Author'
231
+ #: svg-support.php:0
232
+ msgid "Benbodhi"
233
+ msgstr "Benbodhi"
234
+
235
+ #. translators: plugin header field 'AuthorURI'
236
+ #: svg-support.php:0
237
+ msgid "http://benbodhi.com"
238
+ msgstr "http://benbodhi.com"
239
+
240
+ #. translators: plugin header field 'Version'
241
+ #: svg-support.php:0
242
+ msgid "2.1.4"
243
+ msgstr "2.1.4"
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: Benbodhi
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=F7W2NUFAVQGW2
4
  Tags: svg, vector, css, style, mime, mime type, embed, img, inline
5
  Requires at least: 4.0
6
- Tested up to: 4.4
7
- Stable tag: 2.2.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -59,7 +59,8 @@ As with allowing uploads of any files, there is potential risks involved. Only a
59
  = Translations =
60
 
61
  * English - default, always included
62
- * Serbian - translated and submitted by Ogi Djuraskovic from [first site guide]( http://firstsiteguide.com/)
 
63
  * *Your translation? - [Just send it in](http://gowebben.com/contact/)*
64
 
65
  *Note:* This plugin is localized/translateable by default. This is very important for all users worldwide. So please contribute your language to the plugin to make it even more useful.<br />
@@ -109,6 +110,13 @@ I will put the answers to any questions asked here.
109
 
110
  == Changelog ==
111
 
 
 
 
 
 
 
 
112
  = 2.2.2 =
113
 
114
  * Changed another anonymous function in svg-support/functions/thumbnail-display.php that was causing errors for some.
@@ -182,6 +190,12 @@ I will put the answers to any questions asked here.
182
 
183
  == Upgrade Notice ==
184
 
 
 
 
 
 
 
185
  = 2.2.2 =
186
 
187
  * Fix - Another change from anonymous function that was triggering errors for some.
@@ -248,11 +262,13 @@ I will put the answers to any questions asked here.
248
  == Future Features ==
249
  * Option to choose which user ID can access the settings
250
  * Option to choose specific user ID's for usage restriction (both helpful if you have multiple administrators)
251
- * Better compatibility with visual editor and post formats
252
 
253
  Again, feel free to [shoot me suggestions](mailto:wp@benbodhi.com)
254
 
255
  == Credits ==
256
  Plugin by [Benbodhi Mantra](http://benbodhi.com/) [@benbodhi](http://twitter.com/benbodhi) from [GoWebben](http://gowebben.com/) [@GoWebben](http://twitter.com/gowebben)
257
 
258
- Thanks to Ogi Djuraskovic from [first site guide]( http://firstsiteguide.com/) for providing the Serbian translation!
 
 
 
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=F7W2NUFAVQGW2
4
  Tags: svg, vector, css, style, mime, mime type, embed, img, inline
5
  Requires at least: 4.0
6
+ Tested up to: 4.6
7
+ Stable tag: 2.2.3
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
59
  = Translations =
60
 
61
  * English - default, always included
62
+ * Serbian - translated and submitted by Ogi Djuraskovic from [first site guide](http://firstsiteguide.com/)
63
+ * Spanish - translated and submitted by [Apasionados del Marketing](http://apasionados.es)
64
  * *Your translation? - [Just send it in](http://gowebben.com/contact/)*
65
 
66
  *Note:* This plugin is localized/translateable by default. This is very important for all users worldwide. So please contribute your language to the plugin to make it even more useful.<br />
110
 
111
  == Changelog ==
112
 
113
+ = 2.2.3 =
114
+
115
+ * Modified code in svg-support/js/svg-inline.js and svg-support/js/min/svg-inline-min.js to allow JS control of the SVG elements and detect if they have been loaded (IMG tag swapped out). Thanks to [laurosello](https://wordpress.org/support/profile/laurosollero) for this suggestion and code contribution.
116
+ * Fixed SVG thumbnails not displaying correctly in list view of the media library.
117
+ * Cleaned up the code and comments a bit.
118
+ * Added translation for Spanish. Thanks to [Apasionados del Marketing](http://apasionados.es) for the translation.
119
+
120
  = 2.2.2 =
121
 
122
  * Changed another anonymous function in svg-support/functions/thumbnail-display.php that was causing errors for some.
190
 
191
  == Upgrade Notice ==
192
 
193
+ = 2.2.3 =
194
+
195
+ * Feature - Changed code to allow JS detection if SVG has loaded and ability to control SVG using JS.
196
+ * Fix - Thumbnail display in media library list view.
197
+ * Added Spanish translation and cleaned up code/comments a bit.
198
+
199
  = 2.2.2 =
200
 
201
  * Fix - Another change from anonymous function that was triggering errors for some.
262
  == Future Features ==
263
  * Option to choose which user ID can access the settings
264
  * Option to choose specific user ID's for usage restriction (both helpful if you have multiple administrators)
 
265
 
266
  Again, feel free to [shoot me suggestions](mailto:wp@benbodhi.com)
267
 
268
  == Credits ==
269
  Plugin by [Benbodhi Mantra](http://benbodhi.com/) [@benbodhi](http://twitter.com/benbodhi) from [GoWebben](http://gowebben.com/) [@GoWebben](http://twitter.com/gowebben)
270
 
271
+ Thanks to [laurosello](https://wordpress.org/support/profile/laurosollero) for his code contribution in svg-inline.php.
272
+ Thanks to Ogi Djuraskovic from [first site guide]( http://firstsiteguide.com/) for providing the Serbian translation!
273
+ Thanks to [Apasionados del Marketing](http://apasionados.es) for the Spanish translation.
274
+ Logo By W3C, CC BY 2.5, [https://commons.wikimedia.org/w/index.php?curid=1895005](https://commons.wikimedia.org/w/index.php?curid=1895005).
svg-support.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: SVG Support
4
  Plugin URI: http://wordpress.org/plugins/svg-support/
5
  Description: Allow SVG file uploads using the WordPress Media Library uploader plus direct styling of SVG elements using CSS.
6
- Version: 2.2.2
7
  Author: Benbodhi
8
  Author URI: http://benbodhi.com
9
  Text Domain: svgsupport
@@ -35,7 +35,7 @@ if ( ! defined( 'ABSPATH' ) ) {
35
  /********************************************
36
  * GLOBAL VARIABLES
37
  ********************************************/
38
- $plugin_version = '2.2.2'; // for use on admin pages
39
  $plugin_file = plugin_basename(__FILE__); // plugin file for reference
40
  define( 'BODHI_SVGS_PLUGIN_PATH', plugin_dir_path( __FILE__ ) ); // define the absolute plugin path for includes
41
  $bodhi_svgs_options = get_option('bodhi_svgs_settings'); // retrieve our plugin settings from the options table
3
  Plugin Name: SVG Support
4
  Plugin URI: http://wordpress.org/plugins/svg-support/
5
  Description: Allow SVG file uploads using the WordPress Media Library uploader plus direct styling of SVG elements using CSS.
6
+ Version: 2.2.3
7
  Author: Benbodhi
8
  Author URI: http://benbodhi.com
9
  Text Domain: svgsupport
35
  /********************************************
36
  * GLOBAL VARIABLES
37
  ********************************************/
38
+ $svgs_plugin_version = '2.2.3'; // for use on admin pages
39
  $plugin_file = plugin_basename(__FILE__); // plugin file for reference
40
  define( 'BODHI_SVGS_PLUGIN_PATH', plugin_dir_path( __FILE__ ) ); // define the absolute plugin path for includes
41
  $bodhi_svgs_options = get_option('bodhi_svgs_settings'); // retrieve our plugin settings from the options table