Plugin Directory

Changeset 3261754


Ignore:
Timestamp:
03/25/2025 07:06:38 PM (12 months ago)
Author:
dotes
Message:

Atualizado para a versão 1.0.4. Adicionada a funcionalidade de desabilitar o evento em posts específicos.

Location:
affiliate-boost
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • affiliate-boost/tags/1.0.3/readme.txt

    r3252106 r3261754  
    11=== Affiliate Boost  ===
    2 Contributors: luizjr, dotes
     2Contributors: luizjr, dotes, viajando-com-eles
    33Tags: affiliate, conversion, booking, travel, monetization
    44Requires at least: 4.7
  • affiliate-boost/trunk/admin-settings.php

    r3251683 r3261754  
    2020    }
    2121
     22     function abpdotes_sanitize_post_ids($value) {
     23        $post_ids = array_map('intval', explode(',', $value)); // Transforma os valores em um array de inteiros
     24        return implode(',', $post_ids); // Retorna os IDs separados por vírgula
     25    }
     26
    2227    // Registra as opções antigas com sanitização
    2328    add_option('abpdotes_delay', 10); // Tempo de espera padrão em s
     
    2530    add_option('abpdotes_event_trigger', 'click'); // Evento padrão: "Primeiro Clique"
    2631    add_option('abpdotes_onoff', 'active');
     32    add_option('abpdotes_exclude_posts', ''); // Adiciona a opção para armazenar os IDs dos posts a excluir
    2733
    2834    // Registra as opções no banco de dados com sanitização
     
    3137    register_setting('abpdotes_options_group', 'abpdotes_event_trigger', 'abpdotes_sanitize_event_trigger');
    3238    register_setting('abpdotes_options_group', 'abpdotes_onoff', 'abpdotes_sanitize_onoff');
     39        register_setting('abpdotes_options_group', 'abpdotes_exclude_posts', 'abpdotes_sanitize_post_ids');
    3340}
    3441
     
    7279            </select>
    7380            </p>
     81            <p>
     82                <label><?php esc_html_e('Excluir Evento de Afiliado nos Posts (IDs separados por vírgula):', 'affiliate-boost'); ?></label><br>
     83                <input type="text" name="abpdotes_exclude_posts" value="<?php echo esc_attr(get_option('abpdotes_exclude_posts')); ?>" /><br />
     84                <p class="description"><?php esc_html_e('Insira os IDs dos posts nos quais você não deseja que o link de afiliado seja aberto. Separe os IDs com vírgulas.', 'affiliate-boost'); ?></p>
     85            </p>
     86
    7487            <?php submit_button(); ?>
    7588        </form>
  • affiliate-boost/trunk/affiliate-boost.php

    r3251683 r3261754  
    33Plugin Name: Affiliate Boost
    44Description: Plugin para maximizar conversões redirecionando usuários para links de afiliados configuráveis, com integração fácil e opções de personalização.
    5 Version: 1.0.3
     5Version: 1.0.4
    66Author: Luiz Jr. Fernandes / Guilherme Tetamanti
    77License: GPLv2 or later
  • affiliate-boost/trunk/frontend-functions.php

    r3251683 r3261754  
    3838    }
    3939
     40
     41 // Verifica se o post atual está na lista de exclusão
     42    $exclude_posts = explode(',', get_option('abpdotes_exclude_posts', ''));
     43    if (is_single() && in_array(get_the_ID(), $exclude_posts)) {
     44        return; // Se o post está na lista de exclusão, não injeta o script
     45    }
     46
     47
    4048    wp_enqueue_script('affiliate-boost-js', plugins_url('assets/js/affiliate-boost.js', __FILE__), array('jquery'), '1.0', true);
    4149
  • affiliate-boost/trunk/languages/affiliate-boost.pot

    r3251683 r3261754  
    11# Copyright (C) 2025 Luiz Jr. Fernandes / Guilherme Tetamanti
    22# This file is distributed under the same license as the Affiliate Boost plugin.
     3#, fuzzy
    34msgid ""
    45msgstr ""
     
    1011"Content-Type: text/plain; charset=UTF-8\n"
    1112"Content-Transfer-Encoding: 8bit\n"
    12 "POT-Creation-Date: 2025-01-30T15:20:43+01:00\n"
     13"POT-Creation-Date: 2025-03-25 15:47-0300\n"
    1314"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    14 "X-Generator: WP-CLI 2.11.0\n"
     15"X-Generator: Poedit 2.4.2\n"
    1516"X-Domain: affiliate-boost\n"
    1617
  • affiliate-boost/trunk/readme.txt

    r3252106 r3261754  
    11=== Affiliate Boost  ===
    2 Contributors: luizjr, dotes
     2Contributors: luizjr, dotes, viajando-com-eles
    33Tags: affiliate, conversion, booking, travel, monetization
    44Requires at least: 4.7
    55Tested up to: 6.7
    6 Stable tag: 1.0.3
     6Stable tag: 1.0.4
    77Requires PHP: 7.0
    88License: GPLv2 or later
Note: See TracChangeset for help on using the changeset viewer.