Plugin Directory

Changeset 1459215


Ignore:
Timestamp:
07/22/2016 07:58:51 PM (10 years ago)
Author:
clickfunnels.com
Message:

Automatically upgrade old posts

File:
1 edited

Legend:

Unmodified
Added
Removed
  • clickfunnels/trunk/clickfunnels.php

    r1458488 r1459215  
    1313    public function __construct() {
    1414        add_action( "init", array( $this, "create_custom_post_type" ) );
     15        add_action( 'plugins_loaded', 'upgrade_existing_posts' );
    1516        add_action( 'add_meta_boxes', array( $this, 'add_meta_box' ) );
    1617        add_filter( 'manage_edit-clickfunnels_columns', array( $this, 'add_columns' ) );
     
    386387
    387388function upgrade_existing_posts() {
     389    if (get_option('clickfunnels_posts_upgraded_to_v3')) {
     390        return;
     391    }
    388392    $args = array(
    389393        'posts_per_page' => -1,
     
    460464        }
    461465    }
     466    add_option('clickfunnels_posts_upgraded_to_v3', true);
    462467}
    463468
Note: See TracChangeset for help on using the changeset viewer.