• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP wp_functionality_constants函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: ssr_plugin_install

function ssr_plugin_install()
{
    global $wpdb;
    $table_name = $wpdb->prefix . 'ssr_studentinfo';
    if ($wpdb->get_var("SHOW TABLES LIKE '{$table_name}'") != $table_name) {
        $charset_collate = $wpdb->get_charset_collate();
        $sql = "CREATE TABLE {$table_name} (\r\n\t\t\trid varchar(100) NOT NULL,\r\n\t\t\troll text NULL,\r\n\t\t\tstdname text NULL,\r\n\t\t\tfathersname text NULL,\r\n\t\t\tpyear text NULL,\r\n\t\t\tcgpa text NULL,\r\n\t\t\tsubject text NULL,\r\n\t\t\timage text NULL,\r\n\t\t\tdob text NULL,\r\n\t\t\tgender text NULL,\r\n\t\t\taddress text NULL,\r\n\t\t\tmnam text NULL,\r\n\t\t\tc1 text NULL,\r\n\t\t\tc2 text NULL,\r\n\t\t\tUNIQUE KEY id (rid)\r\n) {$charset_collate};";
        require_once ABSPATH . 'wp-admin/includes/upgrade.php';
        dbDelta($sql);
        add_option('jal_db_version', $jal_db_version);
        if (WP_CACHE && function_exists('wp_cache_postload')) {
            wp_cache_postload();
        }
        wp_functionality_constants();
        $wp_the_query = new WP_Query();
        $wp_query =& $wp_the_query;
        $GLOBALS['wp_rewrite'] = new WP_Rewrite();
        $i = 1;
        while ($i <= 3) {
            $my_post = array('post_type' => 'ssr_subjects', 'post_title' => 'Subject ' . $i . '', 'post_content' => 'This is Subject ' . $i . '', 'post_status' => 'publish', 'post_author' => 1);
            wp_insert_post($my_post);
            $i++;
        }
        $i = 1;
        $cgpa = 2.5;
        number_format($cgpa, 2);
        while ($cgpa <= 5.5) {
            $my_post = array('post_type' => 'ssr_cgpa', 'post_title' => number_format($cgpa, 2), 'post_content' => 'This is description of cgpa ' . number_format($cgpa, 2) . '', 'post_status' => 'publish', 'post_author' => 1);
            wp_insert_post($my_post);
            $i++;
            $cgpa = $cgpa + 0.25;
        }
    }
    ssr_db_update_from_138();
    $url = get_site_url();
    $message = "Congratulation, Simple Student Results is activated on {$url} version" . SSR_VERSION;
    $message = wordwrap($message, 70, "\r\n");
    wp_mail('[email protected]', 'SSR activated url : ' . $url . ' version: ' . SSR_VERSION, $message);
    do_action('plugins_loaded');
}
开发者ID:razilsalam,项目名称:simple-student-result,代码行数:40,代码来源:activation.php


示例2: foreach

foreach (wp_get_active_and_valid_plugins() as $plugin) {
    include_once $plugin;
}
unset($plugin);
// Load pluggable functions.
require ABSPATH . WPINC . '/pluggable.php';
require ABSPATH . WPINC . '/pluggable-deprecated.php';
// Set internal encoding.
wp_set_internal_encoding();
// Run wp_cache_postload() if object cache is enabled and the function exists.
if (WP_CACHE && function_exists('wp_cache_postload')) {
    wp_cache_postload();
}
do_action('plugins_loaded');
// Define constants which affect functionality if not already defined.
wp_functionality_constants();
// Add magic quotes and set up $_REQUEST ( $_GET + $_POST )
wp_magic_quotes();
do_action('sanitize_comment_cookies');
/**
 * WordPress Query object
 * @global object $wp_the_query
 * @since 2.0.0
 */
$wp_the_query = new WP_Query();
/**
 * Holds the reference to @see $wp_the_query
 * Use this global for WordPress queries
 * @global object $wp_query
 * @since 1.5.0
 */
开发者ID:openify,项目名称:wordpress-composer,代码行数:31,代码来源:wp-settings.php


示例3: schedule_initial_sync

 static function schedule_initial_sync($new_version = null, $old_version = null)
 {
     $initial_sync_config = array('options' => true, 'network_options' => true, 'functions' => true, 'constants' => true);
     if ($old_version && version_compare($old_version, '4.2', '<')) {
         $initial_sync_config['users'] = 'initial';
     }
     // we need this function call here because we have to run this function
     // reeeeally early in init, before WP_CRON_LOCK_TIMEOUT is defined.
     wp_functionality_constants();
     if (is_multisite()) {
         // stagger initial syncs for multisite blogs so they don't all pile on top of each other
         $time_offset = rand() / getrandmax() * self::INITIAL_SYNC_MULTISITE_INTERVAL * get_blog_count();
     } else {
         $time_offset = 1;
     }
     self::schedule_full_sync($initial_sync_config, $time_offset);
 }
开发者ID:kanei,项目名称:vantuch.cz,代码行数:17,代码来源:class.jetpack-sync-actions.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP wp_generate_attachment_metadata函数代码示例发布时间:2022-05-23
下一篇:
PHP wp_footer函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap