Plugin Directory

Changeset 2740004


Ignore:
Timestamp:
06/09/2022 03:33:43 PM (4 years ago)
Author:
eggemplo
Message:

Added AIDA

Location:
funnel
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • funnel/tags/1.1.4/funnel.php

    r2536118 r2740004  
    258258     */
    259259    public static function activate() {
     260        // necesitamos crearlas antes
     261        require_once 'core/class-funnel-tax.php';
     262       
     263        $states = get_terms( array(
     264            'taxonomy' => 'funnel_state',
     265            'hide_empty' => false,
     266        ) );
     267               
     268        if ( !$states || (sizeof($states)<= 0) ) {
     269            // If empty, we add AIDA states
     270            $res = wp_insert_term( 'Attention', 'funnel_state' );
     271            if ( isset($res['term_id']) ) {
     272                update_term_meta( $res['term_id'], 'color', '#e22720' );
     273            }
     274           
     275            $res = wp_insert_term( 'Interest', 'funnel_state' );
     276            if ( isset($res['term_id']) ) {
     277                update_term_meta( $res['term_id'], 'color', '#ffb423' );
     278            }
     279           
     280            $res = wp_insert_term( 'Desire', 'funnel_state' );
     281            if ( isset($res['term_id']) ) {
     282                update_term_meta( $res['term_id'], 'color', '#4e68a5' );
     283            }
     284           
     285            $res = wp_insert_term( 'Action', 'funnel_state' );
     286            if ( isset($res['term_id']) ) {
     287                update_term_meta( $res['term_id'], 'color', '#9ccb01' );
     288            }
     289           
     290        }           
    260291    }
    261292}
  • funnel/tags/1.1.4/readme.txt

    r2575396 r2740004  
    44Tags: funnel, leads, marketing, contacts
    55Requires at least: 5.1
    6 Tested up to: 5.8
     6Tested up to: 6.0
    77Stable tag: 1.1.4
    88License: GPLv2 or later
     
    3939== Changelog ==
    4040
     41= 1.1.4 =
     42* WordPress 6.0 compatible.
     43* Added AIDA states by default.
     44
     45
    4146= 1.1.3 =
    4247* WordPress 5.7 compatible.
  • funnel/trunk/funnel.php

    r2536118 r2740004  
    258258     */
    259259    public static function activate() {
     260        // necesitamos crearlas antes
     261        require_once 'core/class-funnel-tax.php';
     262       
     263        $states = get_terms( array(
     264            'taxonomy' => 'funnel_state',
     265            'hide_empty' => false,
     266        ) );
     267               
     268        if ( !$states || (sizeof($states)<= 0) ) {
     269            // If empty, we add AIDA states
     270            $res = wp_insert_term( 'Attention', 'funnel_state' );
     271            if ( isset($res['term_id']) ) {
     272                update_term_meta( $res['term_id'], 'color', '#e22720' );
     273            }
     274           
     275            $res = wp_insert_term( 'Interest', 'funnel_state' );
     276            if ( isset($res['term_id']) ) {
     277                update_term_meta( $res['term_id'], 'color', '#ffb423' );
     278            }
     279           
     280            $res = wp_insert_term( 'Desire', 'funnel_state' );
     281            if ( isset($res['term_id']) ) {
     282                update_term_meta( $res['term_id'], 'color', '#4e68a5' );
     283            }
     284           
     285            $res = wp_insert_term( 'Action', 'funnel_state' );
     286            if ( isset($res['term_id']) ) {
     287                update_term_meta( $res['term_id'], 'color', '#9ccb01' );
     288            }
     289           
     290        }           
    260291    }
    261292}
  • funnel/trunk/readme.txt

    r2575396 r2740004  
    44Tags: funnel, leads, marketing, contacts
    55Requires at least: 5.1
    6 Tested up to: 5.8
     6Tested up to: 6.0
    77Stable tag: 1.1.4
    88License: GPLv2 or later
     
    3939== Changelog ==
    4040
     41= 1.1.4 =
     42* WordPress 6.0 compatible.
     43* Added AIDA states by default.
     44
     45
    4146= 1.1.3 =
    4247* WordPress 5.7 compatible.
Note: See TracChangeset for help on using the changeset viewer.