Plugin Directory

Changeset 3080852


Ignore:
Timestamp:
05/03/2024 10:25:16 AM (2 years ago)
Author:
ABCdatos
Message:

1.1.3 version

Location:
ai-content-creator
Files:
6 edited
1 copied

Legend:

Unmodified
Added
Removed
  • ai-content-creator/tags/1.1.3/admin/posproduccion.php

    r3080807 r3080852  
    172172    // siendo el contenido de la sección <body> con algunos arreglos.
    173173
    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();
    184177
    185178    $respuesta_mensaje = aicc_contenido_mensaje_respuesta( $modelo, $response_body );
     
    210203            $causa_fin_respuesta = $response_body['choices'][0]['finish_reason'];
    211204        }
    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'];
    216207    }
    217208    return $causa_fin_respuesta;
     
    230221            $respuesta_mensaje = $respuesta_body['choices'][0]['message']['content'];
    231222        }
    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'];
    236225    }
    237226    return $respuesta_mensaje;
  • ai-content-creator/tags/1.1.3/ai-content-creator.php

    r3080807 r3080852  
    44 * Plugin URI:  https://taller.abcdatos.net/ai-content-creator-wordpress/
    55 * Description: Creates new posts content using AI API
    6  * Version:     1.1.2
     6 * Version:     1.1.3-dev
    77 * Author:      ABCdatos
    88 * Author URI:  https://taller.abcdatos.net/
     
    1919/** Requerido o se obtiene error Plugin is not compatible with language packs: Missing load_plugin_textdomain(). en el canal de Slack #meta-language-packs. */
    2020function 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' );
    2222}
    2323add_action( 'plugins_loaded', 'aicc_load_plugin_textdomain' );
     
    104104 */
    105105function 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 ) {
    108107        wp_enqueue_style(
    109108            'aicc-pixabay',
     
    112111            '1.0.0'
    113112        );
    114     // }
     113    }
    115114}
    116115
  • ai-content-creator/tags/1.1.3/readme.txt

    r3080807 r3080852  
    44Requires at least: 4.2
    55Tested up to: 6.5
    6 Stable tag: 1.1.2
     6Stable tag: 1.1.3
    77Requires PHP: 5.5
    88License: GPLv2
     
    9999== Changelog ==
    100100
     101= 1.1.3 =
     102*May 03 2024*
     103* Small performance improvements.
     104* Corrected fatal error.
     105
    101106= 1.1.2 =
    102107*May 03 2024*
  • ai-content-creator/trunk/admin/posproduccion.php

    r3080807 r3080852  
    172172    // siendo el contenido de la sección <body> con algunos arreglos.
    173173
    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();
    184177
    185178    $respuesta_mensaje = aicc_contenido_mensaje_respuesta( $modelo, $response_body );
     
    210203            $causa_fin_respuesta = $response_body['choices'][0]['finish_reason'];
    211204        }
    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'];
    216207    }
    217208    return $causa_fin_respuesta;
     
    230221            $respuesta_mensaje = $respuesta_body['choices'][0]['message']['content'];
    231222        }
    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'];
    236225    }
    237226    return $respuesta_mensaje;
  • ai-content-creator/trunk/ai-content-creator.php

    r3080807 r3080852  
    44 * Plugin URI:  https://taller.abcdatos.net/ai-content-creator-wordpress/
    55 * Description: Creates new posts content using AI API
    6  * Version:     1.1.2
     6 * Version:     1.1.3-dev
    77 * Author:      ABCdatos
    88 * Author URI:  https://taller.abcdatos.net/
     
    1919/** Requerido o se obtiene error Plugin is not compatible with language packs: Missing load_plugin_textdomain(). en el canal de Slack #meta-language-packs. */
    2020function 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' );
    2222}
    2323add_action( 'plugins_loaded', 'aicc_load_plugin_textdomain' );
     
    104104 */
    105105function 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 ) {
    108107        wp_enqueue_style(
    109108            'aicc-pixabay',
     
    112111            '1.0.0'
    113112        );
    114     // }
     113    }
    115114}
    116115
  • ai-content-creator/trunk/readme.txt

    r3080807 r3080852  
    44Requires at least: 4.2
    55Tested up to: 6.5
    6 Stable tag: 1.1.2
     6Stable tag: 1.1.3
    77Requires PHP: 5.5
    88License: GPLv2
     
    9999== Changelog ==
    100100
     101= 1.1.3 =
     102*May 03 2024*
     103* Small performance improvements.
     104* Corrected fatal error.
     105
    101106= 1.1.2 =
    102107*May 03 2024*
Note: See TracChangeset for help on using the changeset viewer.