Changeset 1772686
- Timestamp:
- 11/21/2017 11:08:23 PM (8 years ago)
- Location:
- pixabay-images/trunk
- Files:
-
- 9 edited
-
langs/pixabay_images-de_DE.mo (modified) (previous)
-
langs/pixabay_images-de_DE.po (modified) (2 diffs)
-
langs/pixabay_images-es_ES.mo (modified) (previous)
-
langs/pixabay_images-es_ES.po (modified) (2 diffs)
-
langs/pixabay_images-sr_RS.mo (modified) (previous)
-
langs/pixabay_images-sr_RS.po (modified) (2 diffs)
-
pixabay-images.php (modified) (5 diffs)
-
readme.txt (modified) (4 diffs)
-
settings.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
pixabay-images/trunk/langs/pixabay_images-de_DE.po
r1717044 r1772686 1 1 msgid "" 2 2 msgstr "" 3 "Project-Id-Version: Pixabay Images WordPress Plugin\n"4 "POT-Creation-Date: 2014-06-03 15:00+0100\n"5 "PO-Revision-Date: 2014-06-04 09:20+0100\n"6 "Last-Translator: Simon Steinberger <simon@pixabay.com>\n"7 "Language-Team: \n"8 "Language: \n"9 3 "MIME-Version: 1.0\n" 10 4 "Content-Type: text/plain; charset=UTF-8\n" 11 5 "Content-Transfer-Encoding: 8bit\n" 12 "X-Poedit-KeywordsList: _e;__;esc_html_e;esc_attr_e;esc_html__;esc_attr__\n"13 6 14 7 msgid "Photos" … … 30 23 msgstr "Suchen" 31 24 25 msgid "Search for \"red roses\", \"flowers -red\", \"city OR town\", etc." 26 msgstr "Suche nach \"rote rosen\", \"blumen -rot\", \"blau OR grün\", etc." 27 32 28 msgid "All" 33 29 msgstr "Alle" 30 31 msgid "Exclude inappropriate or explicit images" 32 msgstr "Nur jugendfreie Bilder anzeigen" 34 33 35 34 msgid "Insert image credits" -
pixabay-images/trunk/langs/pixabay_images-es_ES.po
r1717044 r1772686 1 1 msgid "" 2 2 msgstr "" 3 "Project-Id-Version: Pixabay Images WordPress Plugin\n"4 "POT-Creation-Date: 2014-06-03 15:00+0100\n"5 "PO-Revision-Date: 2014-06-04 09:44+0100\n"6 "Last-Translator: Simon Steinberger <simon@pixabay.com>\n"7 "Language-Team: \n"8 "Language: \n"9 3 "MIME-Version: 1.0\n" 10 4 "Content-Type: text/plain; charset=UTF-8\n" 11 5 "Content-Transfer-Encoding: 8bit\n" 12 "X-Poedit-KeywordsList: _e;__;esc_html_e;esc_attr_e;esc_html__;esc_attr__\n"13 6 14 7 msgid "Photos" … … 30 23 msgstr "Buscar" 31 24 25 msgid "Search for \"red roses\", \"flowers -red\", \"city OR town\", etc." 26 msgstr "" 27 32 28 msgid "All" 33 29 msgstr "Todos" 30 31 msgid "Exclude inappropriate or explicit images" 32 msgstr "Filtrar resultados explícitos" 34 33 35 34 msgid "Insert image credits" -
pixabay-images/trunk/langs/pixabay_images-sr_RS.po
r1717044 r1772686 1 1 msgid "" 2 2 msgstr "" 3 "Project-Id-Version: Pixabay Images WordPress Plugin\n"4 3 "MIME-Version: 1.0\n" 5 4 "Content-Type: text/plain; charset=UTF-8\n" … … 24 23 msgstr "Traži" 25 24 25 msgid "Search for \"red roses\", \"flowers -red\", \"city OR town\", etc." 26 msgstr "" 27 26 28 msgid "All" 27 29 msgstr "Svi" 30 31 msgid "Exclude inappropriate or explicit images" 32 msgstr "Vylúčiť obmedzené obrázky" 28 33 29 34 msgid "Insert image credits" -
pixabay-images/trunk/pixabay-images.php
r1717044 r1772686 3 3 /* 4 4 Plugin Name: Pixabay Images 5 Plugin URI: https://pixabay.com/blog/posts/p- 36/5 Plugin URI: https://pixabay.com/blog/posts/p-136/ 6 6 Description: Find quality public domain images from Pixabay and upload them with just one click. 7 Version: 3. 07 Version: 3.1 8 8 Author: Simon Steinberger 9 9 Author URI: https://pixabay.com/users/Simon/ … … 100 100 var post_id = <?=absint($_REQUEST['post_id']) ?>, 101 101 lang = '<?= $pixabay_images_settings['language']?$pixabay_images_settings['language']:substr(get_locale(), 0, 2) ?>', 102 safesearch = '<?= $pixabay_images_settings['safesearch']=='true'?'true':'false' ?>', 102 103 per_page = 30, form = jQuery('#pixabay_images_form'), hits, q, image_type, orientation; 103 104 … … 117 118 function call_api(q, p){ 118 119 var xhr = new XMLHttpRequest(); 119 xhr.open('GET', 'https://pixabay.com/api/?key=27347-23fd1708b1c4f768195a5093b&response_group=high_resolution&lang='+lang+'& image_type='+image_type+'&orientation='+orientation+'&per_page='+per_page+'&page='+p+'&search_term='+encodeURIComponent(q));120 xhr.open('GET', 'https://pixabay.com/api/?key=27347-23fd1708b1c4f768195a5093b&response_group=high_resolution&lang='+lang+'&safesearch='+safesearch+'&image_type='+image_type+'&orientation='+orientation+'&per_page='+per_page+'&page='+p+'&search_term='+encodeURIComponent(q)); 120 121 xhr.onreadystatechange = function(){ 121 122 if (this.status == 200 && this.readyState == 4) { … … 187 188 $pixabay_images_settings = get_option('pixabay_images_options'); 188 189 189 // parse image_url190 $url = str_replace('https:', 'http:', $_POST['image_url']);191 $parsed_url = parse_url($url);192 if(strcmp($parsed_url['host'], 'pixabay.com')) {193 die('Error: Invalid host in URL (must be pixabay.com)');194 }195 196 190 // get image file 197 $response = wp_remote_get($ url);191 $response = wp_remote_get($_POST['image_url']); 198 192 if (is_wp_error($response)) die('Error: '.$response->get_error_message()); 199 193 … … 206 200 $q_tags[$k] = trim($v); 207 201 } 208 $path_info = pathinfo($ url);202 $path_info = pathinfo($_POST['image_url']); 209 203 $file_name = sanitize_file_name(implode('_', $q_tags).'_'.time().'.'.$path_info['extension']); 210 204 -
pixabay-images/trunk/readme.txt
r1717044 r1772686 4 4 Tags: images, photos, pictures, cliparts, clip arts, illustrations, vectors, vector graphics, stock photos, stock images, stock pictures, royalty-free, public domain, pd, copyright-free, free, free images, cc0, cc, creative commons, commercial use, insert, search, upload, media 5 5 Requires at least: 3.5.1 6 Tested up to: 4. 8.17 Stable tag: 3. 06 Tested up to: 4.9 7 Stable tag: 3.1 8 8 License: GPLv2 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 13 13 == Description == 14 14 15 [Pixabay Images](https://pixabay.com/blog/posts/p- 50/) is a WordPress plugin that let's you pick CC0 public domain pictures from [Pixabay](https://pixabay.com/) and insert them with just a click anywhere on your blog. The images are safe to use, and paying attribution or linking back to the source is not required.15 [Pixabay Images](https://pixabay.com/blog/posts/p-136/) is a WordPress plugin that let's you pick CC0 public domain pictures from [Pixabay](https://pixabay.com/) and insert them with just a click anywhere on your blog. The images are safe to use, and paying attribution or linking back to the source is not required. 16 16 17 17 Features include: … … 24 24 * Unobtrusive integration into WordPress. 25 25 26 For more information, check out [Pixabay.com](https://pixabay.com/blog/posts/p- 50/).26 For more information, check out [Pixabay.com](https://pixabay.com/blog/posts/p-136/). 27 27 28 28 == Installation == … … 157 157 * Larger preview images. 158 158 159 = 3.1 = 160 161 * Compatibility tested for WordPress 4.9 162 * Included SafeSearch filter in settings 163 * Fixed https://wordpress.org/support/topic/error-file-attachment-metadata-error-3/ 164 159 165 == Upgrade Notice == 160 166 -
pixabay-images/trunk/settings.php
r1717044 r1772686 14 14 add_settings_section('pixabay_images_options_section', '', '', 'pixabay_images_settings'); 15 15 add_settings_field('language-id', __('Language', 'pixabay_images'), 'pixabay_images_render_language', 'pixabay_images_settings', 'pixabay_images_options_section'); 16 add_settings_field('safesearch-id', 'SafeSearch', 'pixabay_images_render_safesearch', 'pixabay_images_settings', 'pixabay_images_options_section'); 16 17 add_settings_field('attribution-id', __('Attribution', 'pixabay_images'), 'pixabay_images_render_attribution', 'pixabay_images_settings', 'pixabay_images_options_section'); 17 18 add_settings_field('button-id', __('Button', 'pixabay_images'), 'pixabay_images_render_button', 'pixabay_images_settings', 'pixabay_images_options_section'); … … 27 28 foreach ($pixabay_images_gallery_languages as $k => $v) { echo '<option value="'.$k.'"'.($options['language']==$k?' selected="selected"':'').'>'.$v.'</option>'; } 28 29 echo '</select>'; 30 } 31 32 function pixabay_images_render_safesearch(){ 33 $options = get_option('pixabay_images_options'); 34 echo '<label><input name="pixabay_images_options[safesearch]" value="true" type="checkbox"'.($options['safesearch']=='true'?' checked="checked"':'').'> '.__('Exclude inappropriate or explicit images', 'pixabay_images').'</label>'; 29 35 } 30 36 … … 64 70 $options = get_option('pixabay_images_options'); 65 71 if ($pixabay_images_gallery_languages[$input['language']]) $options['language'] = $input['language']; 72 if ($input['safesearch']) $options['safesearch'] = 'true'; else $options['safesearch'] = 'false'; 66 73 if ($input['attribution']) $options['attribution'] = 'true'; else $options['attribution'] = 'false'; 67 74 if ($input['button']) $options['button'] = 'true'; else $options['button'] = 'false';
Note: See TracChangeset
for help on using the changeset viewer.