当前位置: 首页>>代码示例>>PHP>>正文


PHP populate_roles_300函数代码示例

本文整理汇总了PHP中populate_roles_300函数的典型用法代码示例。如果您正苦于以下问题:PHP populate_roles_300函数的具体用法?PHP populate_roles_300怎么用?PHP populate_roles_300使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了populate_roles_300函数的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: populate_roles

/**
 * Execute WordPress role creation for the various WordPress versions.
 *
 * @since 2.0.0
 */
function populate_roles()
{
    populate_roles_160();
    populate_roles_210();
    populate_roles_230();
    populate_roles_250();
    populate_roles_260();
    populate_roles_270();
    populate_roles_280();
    populate_roles_300();
}
开发者ID:x3mgroup,项目名称:wordpress-mod,代码行数:16,代码来源:schema.php

示例2: upgrade_300

/**
 * Execute changes made in WordPress 3.0.
 *
 * @since 3.0.0
 */
function upgrade_300()
{
    global $wp_current_db_version, $wpdb;
    if ($wp_current_db_version < 12751) {
        populate_roles_300();
        if (is_multisite() && is_main_site() && !defined('MULTISITE') && get_site_option('siteurl') === false) {
            add_site_option('siteurl', '');
        }
    }
    // #11866 (Convert the taxonomy children cache into a transient) - Remove old cache.
    if ($wp_current_db_version < 14138) {
        foreach (get_taxonomies(array('hierarchical' => true)) as $taxonomy) {
            delete_option($taxonomy . '_children');
        }
    }
    // 3.0-alpha nav menu postmeta changes. can be removed before release. // r13802
    if ($wp_current_db_version >= 13226 && $wp_current_db_version < 13974) {
        $wpdb->query("DELETE FROM {$wpdb->postmeta} WHERE meta_key IN( 'menu_type', 'object_id', 'menu_new_window', 'menu_link', '_menu_item_append', 'menu_item_append', 'menu_item_type', 'menu_item_object_id', 'menu_item_target', 'menu_item_classes', 'menu_item_xfn', 'menu_item_url' )");
    }
    // 3.0-beta1 remove_user primitive->meta cap. can be removed before release. r13956
    if ($wp_current_db_version >= 12751 && $wp_current_db_version < 13974) {
        $role =& get_role('administrator');
        if (!empty($role)) {
            $role->remove_cap('remove_user');
        }
    }
    // 3.0-beta1 nav menu postmeta changes. can be removed before release. r13974
    if ($wp_current_db_version >= 13802 && $wp_current_db_version < 13974) {
        $wpdb->update($wpdb->postmeta, array('meta_value' => ''), array('meta_key' => '_menu_item_target', 'meta_value' => '_self'));
    }
}
开发者ID:beaucollins,项目名称:wp,代码行数:36,代码来源:upgrade.php

示例3: upgrade_300

/**
 * Execute changes made in WordPress 3.0.
 *
 * @since 3.0.0
 */
function upgrade_300()
{
    global $wp_current_db_version, $wpdb;
    if ($wp_current_db_version < 15093) {
        populate_roles_300();
    }
    if ($wp_current_db_version < 14139 && is_multisite() && is_main_site() && !defined('MULTISITE') && get_site_option('siteurl') === false) {
        add_site_option('siteurl', '');
    }
    // 3.0 screen options key name changes.
    if (is_main_site() && !defined('DO_NOT_UPGRADE_GLOBAL_TABLES')) {
        $prefix = like_escape($wpdb->base_prefix);
        $wpdb->query("DELETE FROM {$wpdb->usermeta} WHERE meta_key LIKE '{$prefix}%meta-box-hidden%' OR meta_key LIKE '{$prefix}%closedpostboxes%' OR meta_key LIKE '{$prefix}%manage-%-columns-hidden%' OR meta_key LIKE '{$prefix}%meta-box-order%' OR meta_key LIKE '{$prefix}%metaboxorder%' OR meta_key LIKE '{$prefix}%screen_layout%'\n\t\t\t\t\t OR meta_key = 'manageedittagscolumnshidden' OR meta_key='managecategoriescolumnshidden' OR meta_key = 'manageedit-tagscolumnshidden' OR meta_key = 'manageeditcolumnshidden' OR meta_key = 'categories_per_page' OR meta_key = 'edit_tags_per_page'");
    }
}
开发者ID:Telemedellin,项目名称:feriadelasfloresmedellin,代码行数:20,代码来源:upgrade.php

示例4: upgrade_300

/**
 * Execute changes made in WordPress 3.0.
 *
 * @since 3.0.0
 */
function upgrade_300()
{
    global $wp_current_db_version, $wpdb;
    if ($wp_current_db_version < 15093) {
        populate_roles_300();
    }
    if ($wp_current_db_version < 14139 && is_multisite() && is_main_site() && !defined('MULTISITE') && get_site_option('siteurl') === false) {
        add_site_option('siteurl', '');
    }
    // 3.0-alpha nav menu postmeta changes. can be removed before release. // r13802
    if ($wp_current_db_version >= 13226 && $wp_current_db_version < 13974) {
        $wpdb->query("DELETE FROM {$wpdb->postmeta} WHERE meta_key IN( 'menu_type', 'object_id', 'menu_new_window', 'menu_link', '_menu_item_append', 'menu_item_append', 'menu_item_type', 'menu_item_object_id', 'menu_item_target', 'menu_item_classes', 'menu_item_xfn', 'menu_item_url' )");
    }
    // 3.0-beta1 remove_user primitive->meta cap. can be removed before release. r13956
    if ($wp_current_db_version >= 12751 && $wp_current_db_version < 13974) {
        $role =& get_role('administrator');
        if (!empty($role)) {
            $role->remove_cap('remove_user');
        }
    }
    // 3.0-beta1 nav menu postmeta changes. can be removed before release. r13974
    if ($wp_current_db_version >= 13802 && $wp_current_db_version < 13974) {
        $wpdb->update($wpdb->postmeta, array('meta_value' => ''), array('meta_key' => '_menu_item_target', 'meta_value' => '_self'));
    }
    // 3.0 screen options key name changes.
    if (is_main_site() && !defined('DO_NOT_UPGRADE_GLOBAL_TABLES')) {
        $prefix = like_escape($wpdb->base_prefix);
        $wpdb->query("DELETE FROM {$wpdb->usermeta} WHERE meta_key LIKE '{$prefix}%meta-box-hidden%' OR meta_key LIKE '{$prefix}%closedpostboxes%' OR meta_key LIKE '{$prefix}%manage-%-columns-hidden%' OR meta_key LIKE '{$prefix}%meta-box-order%' OR meta_key LIKE '{$prefix}%metaboxorder%' OR meta_key LIKE '{$prefix}%screen_layout%'\n\t\t\t\t\t OR meta_key = 'manageedittagscolumnshidden' OR meta_key='managecategoriescolumnshidden' OR meta_key = 'manageedit-tagscolumnshidden' OR meta_key = 'manageeditcolumnshidden' OR meta_key = 'categories_per_page' OR meta_key = 'edit_tags_per_page'");
    }
}
开发者ID:google-code-backups,项目名称:pumpmyvote,代码行数:35,代码来源:upgrade.php

示例5: upgrade_300

/**
 * Execute changes made in WordPress 3.0.
 *
 * @since 3.0.0
 */
function upgrade_300()
{
    global $wp_current_db_version, $wpdb;
    if ($wp_current_db_version < 15093) {
        populate_roles_300();
    }
    if ($wp_current_db_version < 14139 && is_multisite() && is_main_site() && !defined('MULTISITE') && get_site_option('siteurl') === false) {
        add_site_option('siteurl', '');
    }
    // 3.0 screen options key name changes.
    if (is_main_site() && !defined('DO_NOT_UPGRADE_GLOBAL_TABLES')) {
        $sql = "DELETE FROM {$wpdb->usermeta}\n\t\t\tWHERE meta_key LIKE %s\n\t\t\tOR meta_key LIKE %s\n\t\t\tOR meta_key LIKE %s\n\t\t\tOR meta_key LIKE %s\n\t\t\tOR meta_key LIKE %s\n\t\t\tOR meta_key LIKE %s\n\t\t\tOR meta_key = 'manageedittagscolumnshidden'\n\t\t\tOR meta_key = 'managecategoriescolumnshidden'\n\t\t\tOR meta_key = 'manageedit-tagscolumnshidden'\n\t\t\tOR meta_key = 'manageeditcolumnshidden'\n\t\t\tOR meta_key = 'categories_per_page'\n\t\t\tOR meta_key = 'edit_tags_per_page'";
        $prefix = $wpdb->esc_like($wpdb->base_prefix);
        $wpdb->query($wpdb->prepare($sql, $prefix . '%' . $wpdb->esc_like('meta-box-hidden') . '%', $prefix . '%' . $wpdb->esc_like('closedpostboxes') . '%', $prefix . '%' . $wpdb->esc_like('manage-') . '%' . $wpdb->esc_like('-columns-hidden') . '%', $prefix . '%' . $wpdb->esc_like('meta-box-order') . '%', $prefix . '%' . $wpdb->esc_like('metaboxorder') . '%', $prefix . '%' . $wpdb->esc_like('screen_layout') . '%'));
    }
}
开发者ID:sdh100shaun,项目名称:pantheon,代码行数:21,代码来源:upgrade.php

示例6: upgrade_300

/**
 * Execute changes made in WordPress 3.0.
 *
 * @ignore
 * @since 3.0.0
 *
 * @global int  $wp_current_db_version
 * @global wpdb $wpdb WordPress database abstraction object.
 */
function upgrade_300()
{
    global $wp_current_db_version, $wpdb;
    if ($wp_current_db_version < 15093) {
        populate_roles_300();
    }
    // 3.0 screen options key name changes.
    if (wp_should_upgrade_global_tables()) {
        $sql = "DELETE FROM {$wpdb->usermeta}\n\t\t\tWHERE meta_key LIKE %s\n\t\t\tOR meta_key LIKE %s\n\t\t\tOR meta_key LIKE %s\n\t\t\tOR meta_key LIKE %s\n\t\t\tOR meta_key LIKE %s\n\t\t\tOR meta_key LIKE %s\n\t\t\tOR meta_key = 'manageedittagscolumnshidden'\n\t\t\tOR meta_key = 'managecategoriescolumnshidden'\n\t\t\tOR meta_key = 'manageedit-tagscolumnshidden'\n\t\t\tOR meta_key = 'manageeditcolumnshidden'\n\t\t\tOR meta_key = 'categories_per_page'\n\t\t\tOR meta_key = 'edit_tags_per_page'";
        $prefix = $wpdb->esc_like($wpdb->base_prefix);
        $wpdb->query($wpdb->prepare($sql, $prefix . '%' . $wpdb->esc_like('meta-box-hidden') . '%', $prefix . '%' . $wpdb->esc_like('closedpostboxes') . '%', $prefix . '%' . $wpdb->esc_like('manage-') . '%' . $wpdb->esc_like('-columns-hidden') . '%', $prefix . '%' . $wpdb->esc_like('meta-box-order') . '%', $prefix . '%' . $wpdb->esc_like('metaboxorder') . '%', $prefix . '%' . $wpdb->esc_like('screen_layout') . '%'));
    }
}
开发者ID:7press,项目名称:7press,代码行数:22,代码来源:upgrade.php


注:本文中的populate_roles_300函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。