Exemplo n.º 1
0
function wp_insert_syntax_highlighting_upgrade_from_1x($values)
{
    $val = wp_insert_read_and_destroy_old_option('wp_insert_sh_editor_enable_button');
    $values['editor']['status'] = $val == null ? $values['editor']['status'] : $val;
    $val = wp_insert_read_and_destroy_old_option('wp_insert_sh_posts_enable_button');
    $values['content']['status'] = $val == null ? $values['content']['status'] : $val;
    return $values;
}
Exemplo n.º 2
0
function wp_insert_legal_upgrade_from_1x($values)
{
    $val = wp_insert_read_and_destroy_old_option('wp_insert_privacy_policy_content');
    $values['privacy-policy']['content'] = $val == null ? $values['privacy-policy']['content'] : $val;
    $val = wp_insert_read_and_destroy_old_option('wp_insert_terms_conditions_content');
    $values['terms-and-conditions']['content'] = $val == null ? $values['terms-and-conditions']['content'] : $val;
    return $values;
}
Exemplo n.º 3
0
function wp_insert_tracking_codes_upgrade_from_1x($values)
{
    $val = wp_insert_read_and_destroy_old_option('smart_analytics_enabled');
    $values['analytics']['status'] = $val == null ? $values['analytics']['status'] : $val;
    $val = wp_insert_read_and_destroy_old_option('smart_analytics_id');
    $values['analytics']['code'] = $val == null ? $values['analytics']['code'] : $val;
    $val = wp_insert_read_and_destroy_old_option('smart_analytics_header_enabled');
    $values['header']['status'] = $val == null ? $values['header']['status'] : $val;
    $val = wp_insert_read_and_destroy_old_option('smart_analytics_header_code');
    $values['header']['code'] = $val == null ? $values['header']['code'] : $val;
    $val = wp_insert_read_and_destroy_old_option('smart_analytics_footer_enabled');
    $values['footer']['status'] = $val == null ? $values['footer']['status'] : $val;
    $val = wp_insert_read_and_destroy_old_option('smart_analytics_footer_code');
    $values['footer']['code'] = $val == null ? $values['footer']['code'] : $val;
    return $values;
}
Exemplo n.º 4
0
function wp_insert_multiple_network_upgrade_from_1x($value)
{
    $val = wp_insert_read_and_destroy_old_option('wp_insert_multiple_ad_network_type');
    if ($val != null) {
        switch ($val) {
            case 'Primary Ad Network Only':
                $value = '1';
                break;
            case 'Primary and Alternate Ad Network 1':
                $value = '2';
                break;
            case 'All Ad Networks':
                $value = '3';
                break;
        }
    }
    return $value;
}
Exemplo n.º 5
0
function wp_insert_templateads_upgrade_from_1x($values, $group)
{
    for ($i = $group; $i < $group + 10; $i++) {
        $val = wp_insert_read_and_destroy_old_option('wp_insert_template_ad_' . $i . '_enable');
        $values['templateads-' . $i]['status'] = $val == null ? $values['templateads-' . $i]['status'] : $val;
        $val = wp_insert_read_and_destroy_old_option('wp_insert_template_ad_' . $i . '_content');
        $values['templateads-' . $i]['ad_code_1'] = $val == null ? $values['templateads-' . $i]['ad_code_1'] : $val;
        $val = wp_insert_read_and_destroy_old_option('wp_insert_template_ad_' . $i . '_content_1');
        $values['templateads-' . $i]['ad_code_2'] = $val == null ? $values['templateads-' . $i]['ad_code_2'] : $val;
        $val = wp_insert_read_and_destroy_old_option('wp_insert_template_ad_' . $i . '_content_2');
        $values['templateads-' . $i]['ad_code_3'] = $val == null ? $values['templateads-' . $i]['ad_code_3'] : $val;
        $val = wp_insert_read_and_destroy_old_option('wp_insert_template_ad_' . $i . '_exclude_ids');
        $values['templateads-' . $i]['rules_exclude_page'] = $val == null ? $values['templateads-' . $i]['rules_exclude_page'] : $val;
        $values['templateads-' . $i]['rules_exclude_page'] = $val == null ? $values['templateads-' . $i]['rules_exclude_page'] : $val;
        $val = wp_insert_read_and_destroy_old_option('wp_insert_template_ad_' . $i . '_exclude_home');
        $values['templateads-' . $i]['rules_exclude_home'] = $val == null ? $values['templateads-' . $i]['rules_exclude_home'] : $val;
        $val = wp_insert_read_and_destroy_old_option('wp_insert_template_ad_' . $i . '_exclude_archives');
        $values['templateads-' . $i]['rules_exclude_archives'] = $val == null ? $values['templateads-' . $i]['rules_exclude_archives'] : $val;
        $val = wp_insert_read_and_destroy_old_option('wp_insert_template_ad_' . $i . '_style');
        $values['templateads-' . $i]['styles'] = $val == null ? $values['templateads-' . $i]['styles'] : $val;
    }
    return $values;
}
Exemplo n.º 6
0
function wp_insert_adwidgets_upgrade_from_1x($values)
{
    for ($i = 1; $i <= 10; $i++) {
        wp_insert_read_and_destroy_old_option('wp_insert_ad_widget_' . $i . '_title');
        $val = wp_insert_read_and_destroy_old_option('wp_insert_ad_widget_' . $i . '_enable');
        $values['adwidgets-' . $i]['status'] = $val == null ? $values['adwidgets-' . $i]['status'] : $val;
        $val = wp_insert_read_and_destroy_old_option('wp_insert_ad_widget_' . $i . '_content');
        $values['adwidgets-' . $i]['ad_code_1'] = $val == null ? $values['adwidgets-' . $i]['ad_code_1'] : $val;
        $val = wp_insert_read_and_destroy_old_option('wp_insert_ad_widget_' . $i . '_content_1');
        $values['adwidgets-' . $i]['ad_code_2'] = $val == null ? $values['adwidgets-' . $i]['ad_code_2'] : $val;
        $val = wp_insert_read_and_destroy_old_option('wp_insert_ad_widget_' . $i . '_content_2');
        $values['adwidgets-' . $i]['ad_code_3'] = $val == null ? $values['adwidgets-' . $i]['ad_code_3'] : $val;
        $val = wp_insert_read_and_destroy_old_option('wp_insert_ad_widget_' . $i . '_exclude_ids');
        $values['adwidgets-' . $i]['rules_exclude_page'] = $val == null ? $values['adwidgets-' . $i]['rules_exclude_page'] : $val;
        $values['adwidgets-' . $i]['rules_exclude_page'] = $val == null ? $values['adwidgets-' . $i]['rules_exclude_page'] : $val;
        $val = wp_insert_read_and_destroy_old_option('wp_insert_ad_widget_' . $i . '_exclude_home');
        $values['adwidgets-' . $i]['rules_exclude_home'] = $val == null ? $values['adwidgets-' . $i]['rules_exclude_home'] : $val;
        $val = wp_insert_read_and_destroy_old_option('wp_insert_ad_widget_' . $i . '_exclude_archives');
        $values['adwidgets-' . $i]['rules_exclude_archives'] = $val == null ? $values['adwidgets-' . $i]['rules_exclude_archives'] : $val;
        $val = wp_insert_read_and_destroy_old_option('wp_insert_ad_widget_' . $i . '_style');
        $values['adwidgets-' . $i]['styles'] = $val == null ? $values['adwidgets-' . $i]['styles'] : $val;
    }
    return $values;
}
Exemplo n.º 7
0
function wp_insert_inpostads_upgrade_from_1x($values)
{
    $val = wp_insert_read_and_destroy_old_option('wp_insert_in_post_ad_top_1_enable');
    $values['above']['status'] = $val == null ? $values['above']['status'] : $val;
    $val = wp_insert_read_and_destroy_old_option('wp_insert_in_post_ad_top_1_content');
    $values['above']['ad_code_1'] = $val == null ? $values['above']['ad_code_1'] : $val;
    $val = wp_insert_read_and_destroy_old_option('wp_insert_in_post_ad_top_1_content_1');
    $values['above']['ad_code_2'] = $val == null ? $values['above']['ad_code_2'] : $val;
    $val = wp_insert_read_and_destroy_old_option('wp_insert_in_post_ad_top_1_content_2');
    $values['above']['ad_code_3'] = $val == null ? $values['above']['ad_code_3'] : $val;
    $val = wp_insert_read_and_destroy_old_option('wp_insert_in_post_ad_top_1_exclude_ids');
    $values['above']['rules_exclude_page'] = $val == null ? $values['above']['rules_exclude_page'] : $val;
    $values['above']['rules_exclude_page'] = $val == null ? $values['above']['rules_exclude_page'] : $val;
    $val = wp_insert_read_and_destroy_old_option('wp_insert_in_post_ad_top_1_exclude_home');
    $values['above']['rules_exclude_home'] = $val == null ? $values['above']['rules_exclude_home'] : $val;
    $val = wp_insert_read_and_destroy_old_option('wp_insert_in_post_ad_top_1_exclude_archives');
    $values['above']['rules_exclude_archives'] = $val == null ? $values['above']['rules_exclude_archives'] : $val;
    $val = wp_insert_read_and_destroy_old_option('wp_insert_in_post_ad_top_1_style');
    $values['above']['styles'] = $val == null ? $values['above']['styles'] : $val;
    $val = wp_insert_read_and_destroy_old_option('wp_insert_in_post_ad_middle_1_enable');
    $values['middle']['status'] = $val == null ? $values['middle']['status'] : $val;
    $val = wp_insert_read_and_destroy_old_option('wp_insert_in_post_ad_middle_1_content');
    $values['middle']['ad_code_1'] = $val == null ? $values['middle']['ad_code_1'] : $val;
    $val = wp_insert_read_and_destroy_old_option('wp_insert_in_post_ad_middle_1_content_1');
    $values['middle']['ad_code_2'] = $val == null ? $values['middle']['ad_code_2'] : $val;
    $val = wp_insert_read_and_destroy_old_option('wp_insert_in_post_ad_middle_1_content_2');
    $values['middle']['ad_code_3'] = $val == null ? $values['middle']['ad_code_3'] : $val;
    $val = wp_insert_read_and_destroy_old_option('wp_insert_in_post_ad_middle_1_exclude_ids');
    $values['middle']['rules_exclude_page'] = $val == null ? $values['middle']['rules_exclude_page'] : $val;
    $values['middle']['rules_exclude_page'] = $val == null ? $values['middle']['rules_exclude_page'] : $val;
    $val = wp_insert_read_and_destroy_old_option('wp_insert_in_post_ad_middle_1_exclude_home');
    $values['middle']['rules_exclude_home'] = $val == null ? $values['middle']['rules_exclude_home'] : $val;
    $val = wp_insert_read_and_destroy_old_option('wp_insert_in_post_ad_middle_1_exclude_archives');
    $values['middle']['rules_exclude_archives'] = $val == null ? $values['middle']['rules_exclude_archives'] : $val;
    $val = wp_insert_read_and_destroy_old_option('wp_insert_in_post_ad_middle_1_style');
    $values['middle']['styles'] = $val == null ? $values['middle']['styles'] : $val;
    $val = wp_insert_read_and_destroy_old_option('wp_insert_in_post_ad_bottom_1_enable');
    $values['below']['status'] = $val == null ? $values['below']['status'] : $val;
    $val = wp_insert_read_and_destroy_old_option('wp_insert_in_post_ad_bottom_1_content');
    $values['below']['ad_code_1'] = $val == null ? $values['below']['ad_code_1'] : $val;
    $val = wp_insert_read_and_destroy_old_option('wp_insert_in_post_ad_bottom_1_content_1');
    $values['below']['ad_code_2'] = $val == null ? $values['below']['ad_code_2'] : $val;
    $val = wp_insert_read_and_destroy_old_option('wp_insert_in_post_ad_bottom_1_content_2');
    $values['below']['ad_code_3'] = $val == null ? $values['below']['ad_code_3'] : $val;
    $val = wp_insert_read_and_destroy_old_option('wp_insert_in_post_ad_bottom_1_exclude_ids');
    $values['below']['rules_exclude_page'] = $val == null ? $values['below']['rules_exclude_page'] : $val;
    $values['below']['rules_exclude_page'] = $val == null ? $values['below']['rules_exclude_page'] : $val;
    $val = wp_insert_read_and_destroy_old_option('wp_insert_in_post_ad_bottom_1_exclude_home');
    $values['below']['rules_exclude_home'] = $val == null ? $values['below']['rules_exclude_home'] : $val;
    $val = wp_insert_read_and_destroy_old_option('wp_insert_in_post_ad_bottom_1_exclude_archives');
    $values['below']['rules_exclude_archives'] = $val == null ? $values['below']['rules_exclude_archives'] : $val;
    $val = wp_insert_read_and_destroy_old_option('wp_insert_in_post_ad_bottom_1_style');
    $values['below']['styles'] = $val == null ? $values['below']['styles'] : $val;
    $val = wp_insert_read_and_destroy_old_option('wp_insert_in_post_ad_left_1_enable');
    $values['left']['status'] = $val == null ? $values['left']['status'] : $val;
    $val = wp_insert_read_and_destroy_old_option('wp_insert_in_post_ad_left_1_content');
    $values['left']['ad_code_1'] = $val == null ? $values['left']['ad_code_1'] : $val;
    $val = wp_insert_read_and_destroy_old_option('wp_insert_in_post_ad_left_1_content_1');
    $values['left']['ad_code_2'] = $val == null ? $values['left']['ad_code_2'] : $val;
    $val = wp_insert_read_and_destroy_old_option('wp_insert_in_post_ad_left_1_content_2');
    $values['left']['ad_code_3'] = $val == null ? $values['left']['ad_code_3'] : $val;
    $val = wp_insert_read_and_destroy_old_option('wp_insert_in_post_ad_left_1_exclude_ids');
    $values['left']['rules_exclude_page'] = $val == null ? $values['left']['rules_exclude_page'] : $val;
    $values['left']['rules_exclude_page'] = $val == null ? $values['left']['rules_exclude_page'] : $val;
    $val = wp_insert_read_and_destroy_old_option('wp_insert_in_post_ad_left_1_exclude_home');
    $values['left']['rules_exclude_home'] = $val == null ? $values['left']['rules_exclude_home'] : $val;
    $val = wp_insert_read_and_destroy_old_option('wp_insert_in_post_ad_left_1_exclude_archives');
    $values['left']['rules_exclude_archives'] = $val == null ? $values['left']['rules_exclude_archives'] : $val;
    $val = wp_insert_read_and_destroy_old_option('wp_insert_in_post_ad_left_1_style');
    $values['left']['styles'] = $val == null ? $values['left']['styles'] : $val;
    $val = wp_insert_read_and_destroy_old_option('wp_insert_in_post_ad_right_1_enable');
    $values['right']['status'] = $val == null ? $values['right']['status'] : $val;
    $val = wp_insert_read_and_destroy_old_option('wp_insert_in_post_ad_right_1_content');
    $values['right']['ad_code_1'] = $val == null ? $values['right']['ad_code_1'] : $val;
    $val = wp_insert_read_and_destroy_old_option('wp_insert_in_post_ad_right_1_content_1');
    $values['right']['ad_code_2'] = $val == null ? $values['right']['ad_code_2'] : $val;
    $val = wp_insert_read_and_destroy_old_option('wp_insert_in_post_ad_right_1_content_2');
    $values['right']['ad_code_3'] = $val == null ? $values['right']['ad_code_3'] : $val;
    $val = wp_insert_read_and_destroy_old_option('wp_insert_in_post_ad_right_1_exclude_ids');
    $values['right']['rules_exclude_page'] = $val == null ? $values['right']['rules_exclude_page'] : $val;
    $values['right']['rules_exclude_page'] = $val == null ? $values['right']['rules_exclude_page'] : $val;
    $val = wp_insert_read_and_destroy_old_option('wp_insert_in_post_ad_right_1_exclude_home');
    $values['right']['rules_exclude_home'] = $val == null ? $values['right']['rules_exclude_home'] : $val;
    $val = wp_insert_read_and_destroy_old_option('wp_insert_in_post_ad_right_1_exclude_archives');
    $values['right']['rules_exclude_archives'] = $val == null ? $values['right']['rules_exclude_archives'] : $val;
    $val = wp_insert_read_and_destroy_old_option('wp_insert_in_post_ad_right_1_style');
    $values['right']['styles'] = $val == null ? $values['right']['styles'] : $val;
    return $values;
}