Changeset 1224049
- Timestamp:
- 08/18/2015 07:46:53 PM (11 years ago)
- Location:
- creative-commons-generator/trunk
- Files:
-
- 6 edited
-
ccg-admin.php (modified) (4 diffs)
-
ccg-init.php (modified) (1 diff)
-
ccg-post-options.php (modified) (3 diffs)
-
lang/ccg-domain-es_ES.mo (modified) (previous)
-
lang/ccg-domain-es_ES.po (modified) (13 diffs)
-
readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
creative-commons-generator/trunk/ccg-admin.php
r633999 r1224049 14 14 15 15 function ccg_set_default() { 16 16 17 if ( !get_option( 'ccg_options' ) ) { 18 17 19 $ccg_options = array( 18 20 'active' => TRUE, … … 32 34 update_option( 'ccg_options', $ccg_options ); 33 35 } 36 34 37 } 35 38 … … 60 63 } 61 64 62 $banner = "<a target='_blank' rel='license nofollow' href='http://creativecommons.org/licenses/" . $attributes . "/ 3.0/'><img alt='Creative Commons License' style='border-width:0' src='http://i.creativecommons.org/l/" . $attributes . "/3.0/88x31.png' /></a><br />";63 $islicensed = ' is licensed under a <a target="_blank" rel="license nofollow" href="http://creativecommons.org/licenses/' . $attributes . '/ 3.0/">' . $attributes_text . ' 3.0 Unported</a><br />';65 $banner = "<a target='_blank' rel='license nofollow' href='http://creativecommons.org/licenses/" . $attributes . "/4.0/'><img alt='Creative Commons License' style='border-width:0' src='http://i.creativecommons.org/l/" . $attributes . "/4.0/88x31.png' /></a><br />"; 66 $islicensed = ' is licensed under a <a target="_blank" rel="license nofollow" href="http://creativecommons.org/licenses/' . $attributes . '/4.0/">' . $attributes_text . ' 4.0 ' . __( 'International', 'ccg-domain' ) . '</a><br />'; 64 67 65 68 switch ( $who_call ) { … … 127 130 $ccg_options['more_url'] = esc_attr( esc_url( $form['ccg_more'] ) ); 128 131 $ccg_options['format'] = $form['ccg_format']; 129 132 130 133 return $ccg_options; 131 134 } -
creative-commons-generator/trunk/ccg-init.php
r633999 r1224049 4 4 Plugin URI: http://wordpress.org/extend/plugins/creative-commons-generator/ 5 5 Description: A Creative Commons banner for Wordpress!. 6 Version: 1. 36 Version: 1.4 7 7 Author: OptimalDevs 8 Author URI: http ://optimaldevs.com/8 Author URI: https://profiles.wordpress.org/optimaldevs/ 9 9 */ 10 10 load_plugin_textdomain( 'ccg-domain', false, dirname( plugin_basename( __FILE__ ) ) . '/lang/' ); -
creative-commons-generator/trunk/ccg-post-options.php
r632209 r1224049 4 4 5 5 function ccg_add_meta_box() { 6 add_meta_box( 7 'ccg_metabox', 8 __( 'Creative Commons Generator', 'ccg-domain' ), 9 'ccg_meta_box', 10 'post' 11 ); 6 7 $args = array( 8 'public' => true, 9 '_builtin' => false 10 ); 11 12 $output = 'names'; // names or objects, note names is the default 13 $operator = 'and'; // 'and' or 'or' 14 $post_types = get_post_types($args,$output,$operator); 15 $posttypes_array = array(); 16 17 foreach ($post_types as $post_type ) { 18 $posttypes_array[] = $post_type; 19 } 20 21 $posttypes_array[] = 'post'; 22 23 foreach ( $posttypes_array as $post_type ) { 24 25 add_meta_box( 26 'ccg_metabox', 27 __( 'Creative Commons Generator', 'ccg-domain' ), 28 'ccg_meta_box', 29 $post_type 30 ); 31 32 } 33 12 34 } 13 35 14 36 function ccg_save_post_data( $post_id ) { 37 15 38 if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) return; 16 39 if ( !isset( $_POST['ccg_nonce'] ) ) return; … … 20 43 $ccg_options = ccg_set_options( $_POST ); 21 44 update_post_meta( $post_id, '_ccg_options', $ccg_options ); 45 22 46 } 23 47 24 48 function ccg_meta_box( $post ) { 49 25 50 wp_nonce_field( plugin_basename( __FILE__ ), 'ccg_nonce' ); 26 51 27 52 // Get the current options 28 53 if ( get_post_meta( $post->ID, '_ccg_options' ) ) { 54 29 55 $ccg_old_options = get_post_meta( $post->ID, '_ccg_options', true ); 30 56 $ccg_author_name = $ccg_old_options['author_name']; 31 57 $ccg_author_url = $ccg_old_options['author_url']; 32 echo ccg_get_banner( $ccg_old_options, "meta_exist" ); 58 echo ccg_get_banner( $ccg_old_options, 'meta_exist' ); 59 33 60 } else { 61 34 62 $ccg_old_options = get_option('ccg_options'); 35 63 global $current_user; 36 64 $ccg_author_name = esc_attr( $current_user->display_name ); 37 65 $ccg_author_url = esc_url( get_author_posts_url( $current_user->ID ) ); 38 echo ccg_get_banner( $ccg_old_options, "publish" ); 66 echo ccg_get_banner( $ccg_old_options, 'publish' ); 67 39 68 } 40 69 … … 89 118 ccg_get_table( $ccg_old_options ); 90 119 } 120 121 122 91 123 ?> -
creative-commons-generator/trunk/lang/ccg-domain-es_ES.po
r631821 r1224049 1 1 msgid "" 2 2 msgstr "" 3 "Project-Id-Version: Creative Commons Generator 1. 0\n"4 "POT-Creation-Date: 201 2-11-27 09:57+0100\n"5 "PO-Revision-Date: 201 2-11-27 11:03+0100\n"3 "Project-Id-Version: Creative Commons Generator 1.4\n" 4 "POT-Creation-Date: 2015-08-18 21:42+0200\n" 5 "PO-Revision-Date: 2015-08-18 21:42+0200\n" 6 6 "Last-Translator: Alejandro Gálvez Sánchez y Andy Hernández Salazar\n" 7 "Language-Team: OptimalDevs < info@optimaldevs.com>\n"8 "Language: Spanish\n"7 "Language-Team: OptimalDevs <optimaldevs@gmail.com>\n" 8 "Language: es\n" 9 9 "MIME-Version: 1.0\n" 10 10 "Content-Type: text/plain; charset=UTF-8\n" 11 11 "Content-Transfer-Encoding: 8bit\n" 12 "X-Generator: Poedit 1. 5.4\n"12 "X-Generator: Poedit 1.8.4\n" 13 13 "X-Poedit-KeywordsList: __;_e\n" 14 14 "X-Poedit-Basepath: ..\n" … … 21 21 msgstr "Opciones de Creative Commons Generator" 22 22 23 #: ccg-admin.php: 4523 #: ccg-admin.php:50 24 24 msgid "Creative Commons Attribution" 25 25 msgstr "Creative Commons Attribution" 26 26 27 #: ccg-admin.php: 4927 #: ccg-admin.php:54 28 28 msgid "-NonCommercial" 29 29 msgstr "-NonCommercial" 30 30 31 #: ccg-admin.php:5 331 #: ccg-admin.php:58 32 32 msgid "-ShareAlike" 33 33 msgstr "-ShareAlike" 34 34 35 #: ccg-admin.php: 5735 #: ccg-admin.php:62 36 36 msgid "-NoDerivs" 37 37 msgstr "-NoDerivs" 38 38 39 #: ccg-admin.php:65 39 #: ccg-admin.php:66 40 msgid "International" 41 msgstr "Internacional" 42 43 #: ccg-admin.php:70 40 44 msgid "Title" 41 45 msgstr "Título" 42 46 43 #: ccg-admin.php: 6647 #: ccg-admin.php:71 44 48 msgid "Author-Name" 45 49 msgstr "Nombre-Autor" 46 50 47 #: ccg-admin.php: 8751 #: ccg-admin.php:92 48 52 msgid "This work" 49 53 msgstr "This work" 50 54 51 #: ccg-admin.php:1 5255 #: ccg-admin.php:141 52 56 msgid "Options" 53 57 msgstr "Opciones" 54 58 55 #: ccg-admin.php:1 5359 #: ccg-admin.php:142 56 60 msgid "Description" 57 61 msgstr "Descripción" 58 62 59 #: ccg-admin.php:1 6063 #: ccg-admin.php:149 60 64 msgid "Enable Creative Commons Generator" 61 65 msgstr "Activar Creative Commons Generator" 62 66 63 #: ccg-admin.php:1 6467 #: ccg-admin.php:153 64 68 msgid "" 65 69 "Creative Commons Generator display the banner below the post if you check " … … 69 73 "marca esta opción." 70 74 71 #: ccg-admin.php:1 7075 #: ccg-admin.php:159 72 76 msgid "Allow modifications of your work" 73 77 msgstr "Permitir modificaciones de la obra" 74 78 75 #: ccg-admin.php:1 7479 #: ccg-admin.php:163 76 80 msgid "" 77 81 "The licensor permits others to copy, distribute, display and perform the " … … 81 85 "de la obra así como la generación de obras derivadas." 82 86 83 #: ccg-admin.php:1 8087 #: ccg-admin.php:169 84 88 msgid "Allow modifications as long as others share alike" 85 89 msgstr "" 86 90 "Permitir modificaciones de la obra solo si se comparte de la misma manera" 87 91 88 #: ccg-admin.php:1 8492 #: ccg-admin.php:173 89 93 msgid "" 90 94 "The licensor permits others to create and distribute derivative works but " … … 94 98 "solamente bajo la misma licencia o bajo una licencia compatible." 95 99 96 #: ccg-admin.php:1 90100 #: ccg-admin.php:179 97 101 msgid "Disallow modifications of the work." 98 102 msgstr "No permitir modificaciones de la obra" 99 103 100 #: ccg-admin.php:1 94104 #: ccg-admin.php:183 101 105 msgid "" 102 106 "The licensor permits others to copy, distribute, display and perform only " … … 108 112 "distribuir obras derivadas basadas en ella." 109 113 110 #: ccg-admin.php: 200114 #: ccg-admin.php:189 111 115 msgid "Disallow commercial uses of your work" 112 116 msgstr "No permitir uso comercial de la obra" 113 117 114 #: ccg-admin.php: 204118 #: ccg-admin.php:193 115 119 msgid "" 116 120 "The licensor permits others to copy, distribute, display, and perform the " … … 120 124 "obtenga el permiso del licenciador." 121 125 122 #: ccg-admin.php: 210126 #: ccg-admin.php:199 123 127 msgid "Show title of work" 124 128 msgstr "Mostrar título de la obra" 125 129 126 #: ccg-admin.php:2 14 ccg-post-options.php:54130 #: ccg-admin.php:203 ccg-post-options.php:80 127 131 msgid "The title of the work you are licensing." 128 132 msgstr "El título de la obra que está licenciando." 129 133 130 #: ccg-admin.php:2 20134 #: ccg-admin.php:209 131 135 msgid "Show author of work" 132 136 msgstr "Mostrar autor de la obra" 133 137 134 #: ccg-admin.php:2 24 ccg-post-options.php:76138 #: ccg-admin.php:213 ccg-post-options.php:102 135 139 msgid "" 136 140 "The name of the person who should receive attribution for the work. Most " … … 140 144 "Generalmente, el autor." 141 145 142 #: ccg-admin.php:2 30 ccg-admin.php:297 ccg-post-options.php:81146 #: ccg-admin.php:219 ccg-admin.php:286 ccg-post-options.php:107 143 147 msgid "Link to the author of the work" 144 148 msgstr "Enlazar al autor de la obra" 145 149 146 #: ccg-admin.php:2 34 ccg-post-options.php:87150 #: ccg-admin.php:223 ccg-post-options.php:113 147 151 msgid "" 148 152 "The URL to which the work should be attributed. For example, the work's page " … … 152 156 "ejemplo, la página de la obra o el sitio del autor." 153 157 154 #: ccg-admin.php:2 40158 #: ccg-admin.php:229 155 159 msgid "More permissions URL:" 156 160 msgstr "Más permisos URL:" 157 161 158 #: ccg-admin.php:2 45162 #: ccg-admin.php:234 159 163 msgid "" 160 164 "A URL where a user can find information about obtaining rights that are not " … … 164 168 "no otorgados por la licencia CC." 165 169 166 #: ccg-admin.php:2 51170 #: ccg-admin.php:240 167 171 msgid "Format of work" 168 172 msgstr "Formato de la obra" 169 173 170 #: ccg-admin.php:2 53174 #: ccg-admin.php:242 171 175 msgid "Other / Multiple formats" 172 176 msgstr "Otros / Múltiples formatos" 173 177 174 #: ccg-admin.php:2 54178 #: ccg-admin.php:243 175 179 msgid "Audio" 176 180 msgstr "Audio" 177 181 178 #: ccg-admin.php:2 55182 #: ccg-admin.php:244 179 183 msgid "Video" 180 184 msgstr "Vídeo" 181 185 182 #: ccg-admin.php:2 56186 #: ccg-admin.php:245 183 187 msgid "Image" 184 188 msgstr "Imagen" 185 189 186 #: ccg-admin.php:2 57190 #: ccg-admin.php:246 187 191 msgid "Text" 188 192 msgstr "Texto" 189 193 190 #: ccg-admin.php:2 58194 #: ccg-admin.php:247 191 195 msgid "Dataset" 192 196 msgstr "Conjunto de datos" 193 197 194 #: ccg-admin.php:2 59198 #: ccg-admin.php:248 195 199 msgid "Interactive" 196 200 msgstr "Interactivo" 197 201 198 #: ccg-admin.php:2 64202 #: ccg-admin.php:253 199 203 msgid "" 200 204 "This describes what kind of work is being licensed. For example, a " … … 206 210 "múltiples\"." 207 211 208 #: ccg-admin.php:2 76212 #: ccg-admin.php:265 209 213 msgid "Creative Commons Generator - Options Page" 210 214 msgstr "Creative Commons Generator - Página de Opciones" 211 215 212 #: ccg-admin.php:2 83216 #: ccg-admin.php:272 213 217 msgid "Successfully saved configuration." 214 218 msgstr "Configuración guardada con éxito." 215 219 216 #: ccg-admin.php:2 86220 #: ccg-admin.php:275 217 221 msgid "Preview" 218 222 msgstr "Vista Previa" 219 223 220 #: ccg-admin.php:2 89224 #: ccg-admin.php:278 221 225 msgid "General Settings" 222 226 msgstr "Configuración General" 223 227 224 #: ccg-admin.php:2 90228 #: ccg-admin.php:279 225 229 msgid "" 226 230 "This setting is general and is used by default for all entries (old and " … … 233 237 "edicíon." 234 238 235 #: ccg-admin.php:2 93239 #: ccg-admin.php:282 236 240 msgid "Save Changes" 237 241 msgstr "Guardar Cambios" 238 242 239 #: ccg-admin.php:2 96 ccg-post-options.php:70243 #: ccg-admin.php:285 ccg-post-options.php:96 240 244 msgid "Author's Name:" 241 245 msgstr "Nombre del Autor:" 242 246 243 #: ccg-admin.php:2 96247 #: ccg-admin.php:285 244 248 msgid "The author's Display Name will be used by default." 245 249 msgstr "" 246 250 "Se usará por defecto el Display Name del usuario que publicó la noticia." 247 251 248 #: ccg-admin.php:2 97252 #: ccg-admin.php:286 249 253 msgid "The author's link in WordPress will be used by default." 250 254 msgstr "Se usará por defecto el enlace al autor en WordPress." 251 255 252 #: ccg-admin.php:2 98 ccg-post-options.php:48256 #: ccg-admin.php:287 ccg-post-options.php:74 253 257 msgid "Title of work:" 254 258 msgstr "Título de la obra:" 255 259 256 #: ccg-admin.php:2 98260 #: ccg-admin.php:287 257 261 msgid "" 258 262 "For entries created with disabled CCG will use the title of the post by " … … 264 268 "deberá ser introducido manualmente." 265 269 266 #: ccg-post-options.php: 8270 #: ccg-post-options.php:27 267 271 msgid "Creative Commons Generator" 268 272 msgstr "Creative Commons Generator" 269 273 270 #: ccg-post-options.php: 59274 #: ccg-post-options.php:85 271 275 msgid "Source work URL:" 272 276 msgstr "Fuenta de la obra URL:" 273 277 274 #: ccg-post-options.php: 65278 #: ccg-post-options.php:91 275 279 msgid "The URL of the work upon which this work is based or derived." 276 280 msgstr "" -
creative-commons-generator/trunk/readme.txt
r633999 r1224049 1 1 === Plugin Name === 2 Contributors: OptimalDevs 2 Contributors: OptimalDevs, Alejandro Galvez, Andy Hernandez 3 3 Donate link: http://optimaldevs.com/ 4 4 Tags: creative, commons, generator, post, attribution, cc, cc license, creative commons, legal, license, metadata, rights 5 5 Requires at least: 2.8 6 Tested up to: 3.4.57 Stable tag: 1. 36 Tested up to: 4.2.4 7 Stable tag: 1.4 8 8 License: GPLv3 9 9 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 18 18 19 19 * Official banner images provided by creativecommons.org. 20 * Version 3.0 and International jurisdiction license.21 * General settings for all post published .20 * Version 4.0 and International jurisdiction license. 21 * General settings for all post published (custom post types included). 22 22 * Specific settings for each post. 23 23 * Including metadata, according creativecommons.org. … … 47 47 == Changelog == 48 48 49 = 1.4 = 50 * Updated to Creative Commons License 4.0. 51 * Now it's compatible with custom post types. 52 * Tested with Wordpress 4.2.4. 53 49 54 = 1.3 = 50 55 * Added target=_blank for all links.
Note: See TracChangeset
for help on using the changeset viewer.