Changeset 3080852
- Timestamp:
- 05/03/2024 10:25:16 AM (2 years ago)
- Location:
- ai-content-creator
- Files:
-
- 6 edited
- 1 copied
-
tags/1.1.3 (copied) (copied from ai-content-creator/trunk)
-
tags/1.1.3/admin/posproduccion.php (modified) (3 diffs)
-
tags/1.1.3/ai-content-creator.php (modified) (4 diffs)
-
tags/1.1.3/readme.txt (modified) (2 diffs)
-
trunk/admin/posproduccion.php (modified) (3 diffs)
-
trunk/ai-content-creator.php (modified) (4 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
ai-content-creator/tags/1.1.3/admin/posproduccion.php
r3080807 r3080852 172 172 // siendo el contenido de la sección <body> con algunos arreglos. 173 173 174 $respuesta = $aicc_generacion->respuesta(); 175 $modelo = $aicc_generacion->modelo(); 176 $titulo = $aicc_generacion->titulo(); 177 178 /* 179 // La respuesta es un array, toma el cuerpo de la respuesta HTTP. 180 $body = wp_remote_retrieve_body( $respuesta ); 181 $response_body = json_decode( $body, true ); 182 */ 183 $response_body = $aicc_generacion->response_body(); 174 $modelo = $aicc_generacion->modelo(); 175 $titulo = $aicc_generacion->titulo(); 176 $response_body = $aicc_generacion->response_body(); 184 177 185 178 $respuesta_mensaje = aicc_contenido_mensaje_respuesta( $modelo, $response_body ); … … 210 203 $causa_fin_respuesta = $response_body['choices'][0]['finish_reason']; 211 204 } 212 } else { 213 if ( isset( $response_body['choices'][0]['finish_reason'] ) ) { 214 $causa_fin_respuesta = $response_body['choices'][0]['finish_reason']; 215 } 205 } elseif ( isset( $response_body['choices'][0]['finish_reason'] ) ) { 206 $causa_fin_respuesta = $response_body['choices'][0]['finish_reason']; 216 207 } 217 208 return $causa_fin_respuesta; … … 230 221 $respuesta_mensaje = $respuesta_body['choices'][0]['message']['content']; 231 222 } 232 } else { 233 if ( isset( $respuesta_body['choices'][0]['text'] ) ) { 234 $respuesta_mensaje = $respuesta_body['choices'][0]['text']; 235 } 223 } elseif ( isset( $respuesta_body['choices'][0]['text'] ) ) { 224 $respuesta_mensaje = $respuesta_body['choices'][0]['text']; 236 225 } 237 226 return $respuesta_mensaje; -
ai-content-creator/tags/1.1.3/ai-content-creator.php
r3080807 r3080852 4 4 * Plugin URI: https://taller.abcdatos.net/ai-content-creator-wordpress/ 5 5 * Description: Creates new posts content using AI API 6 * Version: 1.1. 26 * Version: 1.1.3-dev 7 7 * Author: ABCdatos 8 8 * Author URI: https://taller.abcdatos.net/ … … 19 19 /** Requerido o se obtiene error Plugin is not compatible with language packs: Missing load_plugin_textdomain(). en el canal de Slack #meta-language-packs. */ 20 20 function aicc_load_plugin_textdomain() { 21 load_plugin_textdomain( 'ai-content-creator', false, basename( dirname( __FILE__ )) . '/languages' );21 load_plugin_textdomain( 'ai-content-creator', false, basename( __DIR__ ) . '/languages' ); 22 22 } 23 23 add_action( 'plugins_loaded', 'aicc_load_plugin_textdomain' ); … … 104 104 */ 105 105 function aicc_enqueue_admin_styles( $hook_suffix ) { 106 // // Reemplaza 'mi-plugin-page' con el slug de la página del plugin en el panel de administración 107 // if ( 'mi-plugin-page' === $hook_suffix ) { 106 if ( 'aicc_articles' === $hook_suffix ) { 108 107 wp_enqueue_style( 109 108 'aicc-pixabay', … … 112 111 '1.0.0' 113 112 ); 114 //}113 } 115 114 } 116 115 -
ai-content-creator/tags/1.1.3/readme.txt
r3080807 r3080852 4 4 Requires at least: 4.2 5 5 Tested up to: 6.5 6 Stable tag: 1.1. 26 Stable tag: 1.1.3 7 7 Requires PHP: 5.5 8 8 License: GPLv2 … … 99 99 == Changelog == 100 100 101 = 1.1.3 = 102 *May 03 2024* 103 * Small performance improvements. 104 * Corrected fatal error. 105 101 106 = 1.1.2 = 102 107 *May 03 2024* -
ai-content-creator/trunk/admin/posproduccion.php
r3080807 r3080852 172 172 // siendo el contenido de la sección <body> con algunos arreglos. 173 173 174 $respuesta = $aicc_generacion->respuesta(); 175 $modelo = $aicc_generacion->modelo(); 176 $titulo = $aicc_generacion->titulo(); 177 178 /* 179 // La respuesta es un array, toma el cuerpo de la respuesta HTTP. 180 $body = wp_remote_retrieve_body( $respuesta ); 181 $response_body = json_decode( $body, true ); 182 */ 183 $response_body = $aicc_generacion->response_body(); 174 $modelo = $aicc_generacion->modelo(); 175 $titulo = $aicc_generacion->titulo(); 176 $response_body = $aicc_generacion->response_body(); 184 177 185 178 $respuesta_mensaje = aicc_contenido_mensaje_respuesta( $modelo, $response_body ); … … 210 203 $causa_fin_respuesta = $response_body['choices'][0]['finish_reason']; 211 204 } 212 } else { 213 if ( isset( $response_body['choices'][0]['finish_reason'] ) ) { 214 $causa_fin_respuesta = $response_body['choices'][0]['finish_reason']; 215 } 205 } elseif ( isset( $response_body['choices'][0]['finish_reason'] ) ) { 206 $causa_fin_respuesta = $response_body['choices'][0]['finish_reason']; 216 207 } 217 208 return $causa_fin_respuesta; … … 230 221 $respuesta_mensaje = $respuesta_body['choices'][0]['message']['content']; 231 222 } 232 } else { 233 if ( isset( $respuesta_body['choices'][0]['text'] ) ) { 234 $respuesta_mensaje = $respuesta_body['choices'][0]['text']; 235 } 223 } elseif ( isset( $respuesta_body['choices'][0]['text'] ) ) { 224 $respuesta_mensaje = $respuesta_body['choices'][0]['text']; 236 225 } 237 226 return $respuesta_mensaje; -
ai-content-creator/trunk/ai-content-creator.php
r3080807 r3080852 4 4 * Plugin URI: https://taller.abcdatos.net/ai-content-creator-wordpress/ 5 5 * Description: Creates new posts content using AI API 6 * Version: 1.1. 26 * Version: 1.1.3-dev 7 7 * Author: ABCdatos 8 8 * Author URI: https://taller.abcdatos.net/ … … 19 19 /** Requerido o se obtiene error Plugin is not compatible with language packs: Missing load_plugin_textdomain(). en el canal de Slack #meta-language-packs. */ 20 20 function aicc_load_plugin_textdomain() { 21 load_plugin_textdomain( 'ai-content-creator', false, basename( dirname( __FILE__ )) . '/languages' );21 load_plugin_textdomain( 'ai-content-creator', false, basename( __DIR__ ) . '/languages' ); 22 22 } 23 23 add_action( 'plugins_loaded', 'aicc_load_plugin_textdomain' ); … … 104 104 */ 105 105 function aicc_enqueue_admin_styles( $hook_suffix ) { 106 // // Reemplaza 'mi-plugin-page' con el slug de la página del plugin en el panel de administración 107 // if ( 'mi-plugin-page' === $hook_suffix ) { 106 if ( 'aicc_articles' === $hook_suffix ) { 108 107 wp_enqueue_style( 109 108 'aicc-pixabay', … … 112 111 '1.0.0' 113 112 ); 114 //}113 } 115 114 } 116 115 -
ai-content-creator/trunk/readme.txt
r3080807 r3080852 4 4 Requires at least: 4.2 5 5 Tested up to: 6.5 6 Stable tag: 1.1. 26 Stable tag: 1.1.3 7 7 Requires PHP: 5.5 8 8 License: GPLv2 … … 99 99 == Changelog == 100 100 101 = 1.1.3 = 102 *May 03 2024* 103 * Small performance improvements. 104 * Corrected fatal error. 105 101 106 = 1.1.2 = 102 107 *May 03 2024*
Note: See TracChangeset
for help on using the changeset viewer.