Changeset 1483370
- Timestamp:
- 08/25/2016 01:27:50 PM (9 years ago)
- Location:
- vcgs-toolbox
- Files:
-
- 6 edited
- 6 copied
-
tags/1.9.21 (copied) (copied from vcgs-toolbox/trunk)
-
tags/1.9.21/comentarios-pendientes.php (modified) (3 diffs)
-
tags/1.9.21/css/piopialob.css (copied) (copied from vcgs-toolbox/trunk/css/piopialob.css)
-
tags/1.9.21/img/admin-icon.png (copied) (copied from vcgs-toolbox/trunk/img/admin-icon.png)
-
tags/1.9.21/js/piopialo.js (copied) (copied from vcgs-toolbox/trunk/js/piopialo.js)
-
tags/1.9.21/readme.txt (copied) (copied from vcgs-toolbox/trunk/readme.txt) (2 diffs)
-
tags/1.9.21/settings.php (modified) (4 diffs)
-
tags/1.9.21/vcgs-toolbox.php (copied) (copied from vcgs-toolbox/trunk/vcgs-toolbox.php) (3 diffs)
-
trunk/comentarios-pendientes.php (modified) (3 diffs)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/settings.php (modified) (4 diffs)
-
trunk/vcgs-toolbox.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
vcgs-toolbox/tags/1.9.21/comentarios-pendientes.php
r1386077 r1483370 67 67 68 68 // return just the missing replies in the comment table 69 //add_action( 'pre_get_comments', array( $this, 'return_missing_list' ) );70 add_filter('comments_clauses', array($this, 'return_missing_list') , 10, 2);69 add_action( 'pre_get_comments', array( $this, 'return_missing_list' ) ); 70 //add_filter('comments_clauses', array($this, 'return_missing_list') , 10, 2); 71 71 72 72 // Add the 'Missing Reply' custom column … … 164 164 } else { 165 165 $currenturl = "edit-comments.php?comment_status=all&missing_reply=1&comment_type=comment&markreplied=".$comment_id; 166 $message = '<a href="'.$currenturl.'" title=" Marcar como respondido">NO</a>';166 $message = '<a href="'.$currenturl.'" title="Pincha en este enlace si quieres que este comentario no aparezca en la lista de pendientes de responder">NO</a>'; 167 167 $status = 'cnrt-has-not-replied'; 168 168 … … 311 311 * @since 1.0 312 312 */ 313 314 public function return_missing_list(array $pieces, WP_Comment_Query $query) { 315 if (! is_admin()) 316 { return $pieces; } 317 // Esta función sólo se puede ejecutar si es admin 318 $current_screen = get_current_screen(); 319 320 if ( is_admin() && ('edit-comments' == $current_screen->base) && (isset($_GET['missing_reply'])) && ($_GET['markreplied']) ) 321 { 322 update_comment_meta( $_GET['markreplied'], '_cnrt_missing',false ); 323 } 324 325 // bail on anything not admin 326 if ( is_admin() && ('edit-comments' == $current_screen->base) && (isset($_GET['missing_reply']))) 327 { 328 global $wpdb; 329 $options = get_option('vcgstb_options'); 330 $pieces['join'] = " INNER JOIN ".$wpdb->commentmeta." ON ( ".$wpdb->comments.".comment_ID = ".$wpdb->commentmeta.".comment_id )"; 331 $pieces['where'] = "(comment_approved = '1') AND (comment_date >= DATE_SUB(NOW(), INTERVAL ".$options['cope_interval']." MONTH)) AND (".$wpdb->commentmeta.".meta_key = '_cnrt_missing') AND (".$wpdb->commentmeta.".meta_value = true) AND comment_type != 'pingback' AND comment_type != 'trackback'"; 332 } 333 return $pieces; 334 } 335 313 314 // return just the missing replies in the comment table 315 public function return_missing_list( $comments = array() ) { 316 $options = get_option('vcgstb_options'); 317 // bail on anything not admin 318 if ( ! is_admin() ) 319 return; 320 321 // only run this on the comments table 322 $current_screen = get_current_screen(); 323 324 if( 'edit-comments' !== $current_screen->base ) 325 return; 326 327 // check for query param 328 if ( ! isset( $_GET['missing_reply'] ) ) 329 return; 330 331 // now run action to show missing 332 $comments->query_vars['meta_key'] = '_cnrt_missing'; 333 $comments->query_vars['meta_value'] = '1'; 334 $comments->query_vars['date_query'] = array( 335 'after' => $options['cope_interval'].' months ago' 336 ); 337 $comments->query_vars['type']='comment'; 338 339 // Because at this point, the meta query has already been parsed, 340 // we need to re-parse it to incorporate our changes 341 $comments->meta_query->parse_query_vars( $comments->query_vars ); 342 } // end missing_reply_list 343 344 336 345 /** 337 346 * Add the meta tag to comments for query logic later -
vcgs-toolbox/tags/1.9.21/readme.txt
r1480934 r1483370 3 3 Tags: tools,twitter,tweet this,analytics,icons 4 4 Requires at least: 3.9 5 Tested up to: 4. 5.35 Tested up to: 4.6 6 6 License: GPL2 7 Stable tag: 1.9.2 07 Stable tag: 1.9.21 8 8 9 9 Very simple plugin that includes some awesome options, features, shortcodes and scripts for improve your blogging experience. … … 40 40 41 41 == Changelog == 42 = 1.9.21 = 43 * Mejorado el rendimiento de la opción "Comentarios pendientes de responder" 44 * Añadida función de citar los comentarios en Facebook -> Configuración->Vcgs Tooblox->Comentarios 45 * Comprobada la compatibilidad con Wordpress 4.6 46 * Solución de algunos problemas 47 * Eliminación de la opción de añadir las librerías de Bootstrap en tu blog 42 48 = 1.9.20 = 43 49 * Cambiado el icono de administración por uno más feo -
vcgs-toolbox/tags/1.9.21/settings.php
r1348441 r1483370 67 67 'std' => false, 68 68 'desc' => '<p>Esta sección se refiere a incluir o no los scripts de Font Awesome que te permitirán usar la nomenclatura para mostrar iconos de Font Awesome en tus posts. Puedes ver un vídeo y ejemplos en mi post: <a href="http://www.vcgs.net/blog/posticoning-mejorar-aspecto-posts-con-iconos/" target="_blank">Posticoning</a>.</p>')); 69 $options_panel->addCheckbox('bs_activate',array('name'=> 'Incluir las librerías Bootstrap', 70 'std' => false, 71 'desc' => '<p>Esta sección se refiere a incluir o no los scripts de cabecera de Bootstrap para poder aprovechar todo su potencial dentro de nuestras páginas. Por poner un ejemplo, puedes ver cómo aprovecharlo en este post, utilizando la utilizadad Layoutit. <strong>¡Cuidado! -> Esta configuración puede provocar algun problema con tu Theme. Si, tras activarlo, observas resultados que no te cuadran, desactívalo enseguida.</strong></p>')); 69 72 70 // MIDENLACE 73 71 $options_panel->addCheckbox('me_activate',array('name'=> 'Activar el Shortcode Midenlace', … … 82 80 'std' => false, 83 81 'desc' => '<p>Se refiere a si quieres activar la función por la cual <strong>vcgs-toolbox añadirá automáticamente la imagen destacada de tus posts a tu feed rss</strong>. Por defecto, la imagen destacada no está incluida en el cuerpo de un post cuando se consulta a través del feed, lo que puede provocar que tus posts no se vean muy bien cuando tus lectores usen Feedly o cualquier otro lector RSS. Activando esta opción te aseguras que la imagen destacada se insertará al principio de los posts y éstos se verán bien en las aplicaciones de los usuarios..</p>')); 84 82 83 85 84 $options_panel->CloseTab(); 86 85 … … 151 150 )); 152 151 153 //CONVERTIR TAMBIÉN FRASES DE CLICK TO TWEET152 //Compartir y citar texto seleccionado 154 153 $options_panel->addCheckbox('pp_selector',array('name'=> 'Piopiar texto seleccionado', 155 154 'std' => false, 156 155 'desc' => '<p>Si activas esta casilla, se ofrecerá a tus lectores la posibilidad de tuitear el texto que seleccionen de tu post.</p>')); 156 157 157 158 158 $options_panel->CloseTab(); … … 191 191 'std' => true, 192 192 'desc' => 'Si activas esta opción, se añadirá también un enlace para que tus lectores puedan tuitear los comentarios que dejan entre sí. Además, si tienes instalado el plugin <a href="https://wordpress.org/plugins/twitter-comment-field/" target="_blank">Twitter Comment Field</a>, Vcgs Toolbox reconocerá el usuario de Twitter de quien comenta y lo mencionará en el tuit. Recuerda que esta opción solo causa efecto si tienes activada la función de Piopialo')); 193 // AÑADIR LINK DE COMPARTIR COMENTARIOS EN FACEBOOK 194 $options_panel->addCheckbox('pp_fco',array('name'=> 'Añadir Link para Citar comentarios en Facebook', 195 'std' => true, 196 'desc' => 'Si activas esta opción, se añadirá también un enlace para que tus lectores puedan citar los comentarios que dejan entre sí, <strong>ahora también en Facebook</strong>.')); 193 197 // COMENTARIOS PENDIENTES DE RESPONDER 194 198 $options_panel->addCheckbox('cope_activate',array('name'=> 'Activar la función de "Comentarios sin Responder"', -
vcgs-toolbox/tags/1.9.21/vcgs-toolbox.php
r1480934 r1483370 4 4 * Plugin URI: http://www.vcgs.net/blog 5 5 * Description: La Caja de Herramientas de Víctor Campuzano. Un plugin construido por una comunidad con herramientas y funciones que te ayudarán a hacer más satisfactoria tu experiencia como Blogger. Por favor, visita <a href="http://www.vcgs.net/blog" target="_blank">vcgs.net/blog</a> para más información o contactar conmigo. 6 * Version: 1.9.2 06 * Version: 1.9.21 7 7 * Author: Víctor Campuzano (vcgs) 8 8 * Author URI: http://www.vcgs.net/blog/ … … 313 313 $url = urlencode(get_comment_link(get_comment_ID())); 314 314 if (is_admin() || is_feed()) { 315 $enlace = '<p><a class="piopialo-comment" href="http://www.twitter.com/intent/tweet/?text='.$tuitear.'&url='.$url.'&related='.rawurlencode($authusername[0].','.$commentusername[0]).'" title="Piopia este comentario"> - Tuitea este comentario <i class="fa fa-twitter"></i></a></p>';315 $enlace = '<p><a class="piopialo-comment" href="http://www.twitter.com/intent/tweet/?text='.$tuitear.'&url='.$url.'&related='.rawurlencode($authusername[0].','.$commentusername[0]).'" title="Piopia este comentario"><i class="fa fa-twitter"></i> Citar Comentario</a></p>'; 316 316 } else { 317 $enlace = '<p ><span class="piopialo-comment" data-piolink="http://www.twitter.com/intent/tweet/?text='.$tuitear.'&url='.$url.'&related='.rawurlencode($authusername[0].','.$commentusername[0]).'" title="Piopia este comentario"> - Tuitea este comentario <i class="fa fa-twitter"></i></span></p>';317 $enlace = '<p class="comment-quote-link comment-piolink"><span class="piopialo-comment" data-piolink="http://www.twitter.com/intent/tweet/?text='.$tuitear.'&url='.$url.'&related='.rawurlencode($authusername[0].','.$commentusername[0]).'" title="Pincha aquí para compartir un enlace directo a este comentario"><i class="fa fa-twitter"></i> Citar Comentario</span></p>'; 318 318 } 319 319 320 320 return $text.$enlace; 321 321 } 322 } 322 } 323 323 324 324 // Selector de texto … … 339 339 } 340 340 341 // Función de citar los comentarios en Facebook 342 if($options['pp_fco']=="1") 343 { 344 add_filter( 'comment_text', 'modificar_comentario_facebook'); 345 function modificar_comentario_facebook( $text ){ 346 347 $options = get_option('vcgstb_options'); 348 349 $cid=get_comment_ID(); 350 // Obtener el nombre del autor del comentario 351 $cauthor = get_comment_author($cid); 352 353 // Obtener la URL directa del comentario 354 $url = urlencode(get_comment_link($cid)); 355 // Obtener el texto "en bruto" del comentario 356 $ctext = rawurlencode($cauthor.' ha comentado: '.strip_tags(get_comment_text($cid))); 357 if (is_admin() || is_feed()) { 358 $enlace = '<p><a class="facecita-comment" href="https://www.facebook.com/sharer/sharer.php?u='.$url.'"e='.$ctext.'" title="Cita este compentario en Facebook con un link directo"><i class="fa fa-facebook"></i> Citar Comentario</a></p>'; 359 } else { 360 $enlace = '<p class="comment-quote-link comment-facelink"><span class="piopialo-comment" data-piolink="https://www.facebook.com/sharer/sharer.php?u='.$url.'"e='.$ctext.'" title="Cita este comentario en Facebook con un link directo"><i class="fa fa-facebook"></i> Citar Comentario</span></p>'; 361 } 362 363 return $text.$enlace; 364 } 365 } 341 366 342 367 // Ahora comenzamos con el tema de midenlace -
vcgs-toolbox/trunk/comentarios-pendientes.php
r1386077 r1483370 67 67 68 68 // return just the missing replies in the comment table 69 //add_action( 'pre_get_comments', array( $this, 'return_missing_list' ) );70 add_filter('comments_clauses', array($this, 'return_missing_list') , 10, 2);69 add_action( 'pre_get_comments', array( $this, 'return_missing_list' ) ); 70 //add_filter('comments_clauses', array($this, 'return_missing_list') , 10, 2); 71 71 72 72 // Add the 'Missing Reply' custom column … … 164 164 } else { 165 165 $currenturl = "edit-comments.php?comment_status=all&missing_reply=1&comment_type=comment&markreplied=".$comment_id; 166 $message = '<a href="'.$currenturl.'" title=" Marcar como respondido">NO</a>';166 $message = '<a href="'.$currenturl.'" title="Pincha en este enlace si quieres que este comentario no aparezca en la lista de pendientes de responder">NO</a>'; 167 167 $status = 'cnrt-has-not-replied'; 168 168 … … 311 311 * @since 1.0 312 312 */ 313 314 public function return_missing_list(array $pieces, WP_Comment_Query $query) { 315 if (! is_admin()) 316 { return $pieces; } 317 // Esta función sólo se puede ejecutar si es admin 318 $current_screen = get_current_screen(); 319 320 if ( is_admin() && ('edit-comments' == $current_screen->base) && (isset($_GET['missing_reply'])) && ($_GET['markreplied']) ) 321 { 322 update_comment_meta( $_GET['markreplied'], '_cnrt_missing',false ); 323 } 324 325 // bail on anything not admin 326 if ( is_admin() && ('edit-comments' == $current_screen->base) && (isset($_GET['missing_reply']))) 327 { 328 global $wpdb; 329 $options = get_option('vcgstb_options'); 330 $pieces['join'] = " INNER JOIN ".$wpdb->commentmeta." ON ( ".$wpdb->comments.".comment_ID = ".$wpdb->commentmeta.".comment_id )"; 331 $pieces['where'] = "(comment_approved = '1') AND (comment_date >= DATE_SUB(NOW(), INTERVAL ".$options['cope_interval']." MONTH)) AND (".$wpdb->commentmeta.".meta_key = '_cnrt_missing') AND (".$wpdb->commentmeta.".meta_value = true) AND comment_type != 'pingback' AND comment_type != 'trackback'"; 332 } 333 return $pieces; 334 } 335 313 314 // return just the missing replies in the comment table 315 public function return_missing_list( $comments = array() ) { 316 $options = get_option('vcgstb_options'); 317 // bail on anything not admin 318 if ( ! is_admin() ) 319 return; 320 321 // only run this on the comments table 322 $current_screen = get_current_screen(); 323 324 if( 'edit-comments' !== $current_screen->base ) 325 return; 326 327 // check for query param 328 if ( ! isset( $_GET['missing_reply'] ) ) 329 return; 330 331 // now run action to show missing 332 $comments->query_vars['meta_key'] = '_cnrt_missing'; 333 $comments->query_vars['meta_value'] = '1'; 334 $comments->query_vars['date_query'] = array( 335 'after' => $options['cope_interval'].' months ago' 336 ); 337 $comments->query_vars['type']='comment'; 338 339 // Because at this point, the meta query has already been parsed, 340 // we need to re-parse it to incorporate our changes 341 $comments->meta_query->parse_query_vars( $comments->query_vars ); 342 } // end missing_reply_list 343 344 336 345 /** 337 346 * Add the meta tag to comments for query logic later -
vcgs-toolbox/trunk/readme.txt
r1480934 r1483370 3 3 Tags: tools,twitter,tweet this,analytics,icons 4 4 Requires at least: 3.9 5 Tested up to: 4. 5.35 Tested up to: 4.6 6 6 License: GPL2 7 Stable tag: 1.9.2 07 Stable tag: 1.9.21 8 8 9 9 Very simple plugin that includes some awesome options, features, shortcodes and scripts for improve your blogging experience. … … 40 40 41 41 == Changelog == 42 = 1.9.21 = 43 * Mejorado el rendimiento de la opción "Comentarios pendientes de responder" 44 * Añadida función de citar los comentarios en Facebook -> Configuración->Vcgs Tooblox->Comentarios 45 * Comprobada la compatibilidad con Wordpress 4.6 46 * Solución de algunos problemas 47 * Eliminación de la opción de añadir las librerías de Bootstrap en tu blog 42 48 = 1.9.20 = 43 49 * Cambiado el icono de administración por uno más feo -
vcgs-toolbox/trunk/settings.php
r1348441 r1483370 67 67 'std' => false, 68 68 'desc' => '<p>Esta sección se refiere a incluir o no los scripts de Font Awesome que te permitirán usar la nomenclatura para mostrar iconos de Font Awesome en tus posts. Puedes ver un vídeo y ejemplos en mi post: <a href="http://www.vcgs.net/blog/posticoning-mejorar-aspecto-posts-con-iconos/" target="_blank">Posticoning</a>.</p>')); 69 $options_panel->addCheckbox('bs_activate',array('name'=> 'Incluir las librerías Bootstrap', 70 'std' => false, 71 'desc' => '<p>Esta sección se refiere a incluir o no los scripts de cabecera de Bootstrap para poder aprovechar todo su potencial dentro de nuestras páginas. Por poner un ejemplo, puedes ver cómo aprovecharlo en este post, utilizando la utilizadad Layoutit. <strong>¡Cuidado! -> Esta configuración puede provocar algun problema con tu Theme. Si, tras activarlo, observas resultados que no te cuadran, desactívalo enseguida.</strong></p>')); 69 72 70 // MIDENLACE 73 71 $options_panel->addCheckbox('me_activate',array('name'=> 'Activar el Shortcode Midenlace', … … 82 80 'std' => false, 83 81 'desc' => '<p>Se refiere a si quieres activar la función por la cual <strong>vcgs-toolbox añadirá automáticamente la imagen destacada de tus posts a tu feed rss</strong>. Por defecto, la imagen destacada no está incluida en el cuerpo de un post cuando se consulta a través del feed, lo que puede provocar que tus posts no se vean muy bien cuando tus lectores usen Feedly o cualquier otro lector RSS. Activando esta opción te aseguras que la imagen destacada se insertará al principio de los posts y éstos se verán bien en las aplicaciones de los usuarios..</p>')); 84 82 83 85 84 $options_panel->CloseTab(); 86 85 … … 151 150 )); 152 151 153 //CONVERTIR TAMBIÉN FRASES DE CLICK TO TWEET152 //Compartir y citar texto seleccionado 154 153 $options_panel->addCheckbox('pp_selector',array('name'=> 'Piopiar texto seleccionado', 155 154 'std' => false, 156 155 'desc' => '<p>Si activas esta casilla, se ofrecerá a tus lectores la posibilidad de tuitear el texto que seleccionen de tu post.</p>')); 156 157 157 158 158 $options_panel->CloseTab(); … … 191 191 'std' => true, 192 192 'desc' => 'Si activas esta opción, se añadirá también un enlace para que tus lectores puedan tuitear los comentarios que dejan entre sí. Además, si tienes instalado el plugin <a href="https://wordpress.org/plugins/twitter-comment-field/" target="_blank">Twitter Comment Field</a>, Vcgs Toolbox reconocerá el usuario de Twitter de quien comenta y lo mencionará en el tuit. Recuerda que esta opción solo causa efecto si tienes activada la función de Piopialo')); 193 // AÑADIR LINK DE COMPARTIR COMENTARIOS EN FACEBOOK 194 $options_panel->addCheckbox('pp_fco',array('name'=> 'Añadir Link para Citar comentarios en Facebook', 195 'std' => true, 196 'desc' => 'Si activas esta opción, se añadirá también un enlace para que tus lectores puedan citar los comentarios que dejan entre sí, <strong>ahora también en Facebook</strong>.')); 193 197 // COMENTARIOS PENDIENTES DE RESPONDER 194 198 $options_panel->addCheckbox('cope_activate',array('name'=> 'Activar la función de "Comentarios sin Responder"', -
vcgs-toolbox/trunk/vcgs-toolbox.php
r1480934 r1483370 4 4 * Plugin URI: http://www.vcgs.net/blog 5 5 * Description: La Caja de Herramientas de Víctor Campuzano. Un plugin construido por una comunidad con herramientas y funciones que te ayudarán a hacer más satisfactoria tu experiencia como Blogger. Por favor, visita <a href="http://www.vcgs.net/blog" target="_blank">vcgs.net/blog</a> para más información o contactar conmigo. 6 * Version: 1.9.2 06 * Version: 1.9.21 7 7 * Author: Víctor Campuzano (vcgs) 8 8 * Author URI: http://www.vcgs.net/blog/ … … 313 313 $url = urlencode(get_comment_link(get_comment_ID())); 314 314 if (is_admin() || is_feed()) { 315 $enlace = '<p><a class="piopialo-comment" href="http://www.twitter.com/intent/tweet/?text='.$tuitear.'&url='.$url.'&related='.rawurlencode($authusername[0].','.$commentusername[0]).'" title="Piopia este comentario"> - Tuitea este comentario <i class="fa fa-twitter"></i></a></p>';315 $enlace = '<p><a class="piopialo-comment" href="http://www.twitter.com/intent/tweet/?text='.$tuitear.'&url='.$url.'&related='.rawurlencode($authusername[0].','.$commentusername[0]).'" title="Piopia este comentario"><i class="fa fa-twitter"></i> Citar Comentario</a></p>'; 316 316 } else { 317 $enlace = '<p ><span class="piopialo-comment" data-piolink="http://www.twitter.com/intent/tweet/?text='.$tuitear.'&url='.$url.'&related='.rawurlencode($authusername[0].','.$commentusername[0]).'" title="Piopia este comentario"> - Tuitea este comentario <i class="fa fa-twitter"></i></span></p>';317 $enlace = '<p class="comment-quote-link comment-piolink"><span class="piopialo-comment" data-piolink="http://www.twitter.com/intent/tweet/?text='.$tuitear.'&url='.$url.'&related='.rawurlencode($authusername[0].','.$commentusername[0]).'" title="Pincha aquí para compartir un enlace directo a este comentario"><i class="fa fa-twitter"></i> Citar Comentario</span></p>'; 318 318 } 319 319 320 320 return $text.$enlace; 321 321 } 322 } 322 } 323 323 324 324 // Selector de texto … … 339 339 } 340 340 341 // Función de citar los comentarios en Facebook 342 if($options['pp_fco']=="1") 343 { 344 add_filter( 'comment_text', 'modificar_comentario_facebook'); 345 function modificar_comentario_facebook( $text ){ 346 347 $options = get_option('vcgstb_options'); 348 349 $cid=get_comment_ID(); 350 // Obtener el nombre del autor del comentario 351 $cauthor = get_comment_author($cid); 352 353 // Obtener la URL directa del comentario 354 $url = urlencode(get_comment_link($cid)); 355 // Obtener el texto "en bruto" del comentario 356 $ctext = rawurlencode($cauthor.' ha comentado: '.strip_tags(get_comment_text($cid))); 357 if (is_admin() || is_feed()) { 358 $enlace = '<p><a class="facecita-comment" href="https://www.facebook.com/sharer/sharer.php?u='.$url.'"e='.$ctext.'" title="Cita este compentario en Facebook con un link directo"><i class="fa fa-facebook"></i> Citar Comentario</a></p>'; 359 } else { 360 $enlace = '<p class="comment-quote-link comment-facelink"><span class="piopialo-comment" data-piolink="https://www.facebook.com/sharer/sharer.php?u='.$url.'"e='.$ctext.'" title="Cita este comentario en Facebook con un link directo"><i class="fa fa-facebook"></i> Citar Comentario</span></p>'; 361 } 362 363 return $text.$enlace; 364 } 365 } 341 366 342 367 // Ahora comenzamos con el tema de midenlace
Note: See TracChangeset
for help on using the changeset viewer.