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


PHP scb_admin_notice函数代码示例

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


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

示例1: appthemes_updated_version_notice

function appthemes_updated_version_notice()
{
    list($args) = get_theme_support('app-versions');
    if ($args['current_version'] != get_transient(APP_UPDATE_TRANSIENT)) {
        return;
    }
    update_option($args['option_key'], $args['current_version']);
    echo scb_admin_notice(sprintf(__('Successfully updated to version %s.', APP_TD), $args['current_version']));
    delete_transient(APP_UPDATE_TRANSIENT);
}
开发者ID:TopLineMediaTeam,项目名称:horseshow,代码行数:10,代码来源:versions.php

示例2: admin_tools

 public function admin_tools()
 {
     if (!empty($_POST['cp_tools']['flush_cache'])) {
         $message = cp_flush_all_cache();
         echo scb_admin_notice($message);
     }
     if (!empty($_POST['cp_tools']['delete_tables'])) {
         cp_delete_db_tables();
     }
     if (!empty($_POST['cp_tools']['delete_options'])) {
         cp_delete_all_options();
     }
 }
开发者ID:kalushta,项目名称:darom,代码行数:13,代码来源:system-info.php

示例3: admin_tools

 public function admin_tools()
 {
     if (isset($_GET['pruneads']) && $_GET['pruneads'] == 1) {
         cp_check_expired_cron();
         echo scb_admin_notice(__('Expired ads have been pruned.', APP_TD));
     }
     if (isset($_GET['resetstats']) && $_GET['resetstats'] == 1) {
         appthemes_reset_stats();
         echo scb_admin_notice(__('Statistics have been reseted.', APP_TD));
     }
     // flush out the cache so changes can be visible
     cp_flush_all_cache();
 }
开发者ID:kalushta,项目名称:darom,代码行数:13,代码来源:settings.php

示例4: import

 private function import()
 {
     check_admin_referer('import-upload');
     $file = wp_import_handle_upload();
     if (isset($file['error'])) {
         echo '<p><strong>' . __('Sorry, there has been an error.', 'appthemes') . '</strong><br />';
         echo esc_html($file['error']) . '</p>';
         return false;
     }
     $c = $this->process($file['file']);
     if (false === $c) {
         echo scb_admin_notice(__('The file could not be processed.', 'appthemes'), 'error');
     } else {
         echo scb_admin_notice(sprintf(__('Imported %s items.', 'appthemes'), number_format_i18n($c)));
     }
 }
开发者ID:ugurbastan,项目名称:swe-574-group4,代码行数:16,代码来源:importer.php

示例5: progress

 public function progress()
 {
     global $pagenow;
     if ($pagenow !== 'admin.php' || (empty($_GET['page']) || !in_array($_GET['page'], array('app-system-info', 'app-settings')))) {
         if (!isset($_GET['appthemes_build_search_index_progress_notice'])) {
             return;
         }
     }
     $total = count($this->get_items(array('nopaging' => true, 'fields' => 'ids')));
     $indexed = count($this->get_items(array('nopaging' => true, 'fields' => 'ids', 'app_search_index_is_empty' => 0)));
     if ($total - $indexed <= 0) {
         return $this->conclude_bulk_update();
     }
     $percent_complete = round($indexed / $total * 100, 2);
     echo scb_admin_notice(html('strong', sprintf(__('Search Index Update Progress: %g%s complete.', APP_TD), $percent_complete, '&#37;')));
 }
开发者ID:kalushta,项目名称:darom,代码行数:16,代码来源:search-index.php

示例6: maybe_display_jetpack_conflict

 protected static function maybe_display_jetpack_conflict()
 {
     if (!class_exists('Jetpack') or !current_user_can('manage_options')) {
         return;
     }
     if (self::is_dismissed(self::$jetpack_conflict_notice)) {
         return;
     }
     $check_modules = array('subscriptions', 'comments');
     $conflicting_modules = array_filter($check_modules, array('Jetpack', 'is_module_active'));
     if (!$conflicting_modules) {
         return;
     }
     $message = sprintf(__('Heads up: We noticed there is an active Jetpack module which is not compatible with Postmatic. You\'ll need to fix that. <a href="%s" target="_blank">Learn how to do so here</a>.', 'Postmatic'), Prompt_Enum_Urls::JETPACK_HOWTO);
     $message .= html('a', array('href' => esc_url(add_query_arg(self::$dismiss_query_param, self::$jetpack_conflict_notice)), 'class' => 'button postmatic-dismiss'), __('Dismiss'));
     echo scb_admin_notice($message, 'error');
 }
开发者ID:postmatic,项目名称:beta-dist,代码行数:17,代码来源:notice-handling.php

示例7: admin_tools

 public function admin_tools()
 {
     if (!empty($_POST['cp_tools']['flush_cache'])) {
         $message = cp_flush_all_cache();
         echo scb_admin_notice($message);
     }
     if (!empty($_POST['cp_tools']['delete_tables'])) {
         cp_delete_db_tables();
     }
     if (!empty($_POST['cp_tools']['delete_options'])) {
         cp_delete_all_options();
     }
     if (!empty($_POST['cp_tools']['rerun_migration'])) {
         update_option('cp_tools_run_convertToCustomPostType', 'no');
         $message = cp_convert_posts2Ads();
         echo scb_admin_notice($message);
     }
 }
开发者ID:TopLineMediaTeam,项目名称:horseshow,代码行数:18,代码来源:system-info.php

示例8: appthemes_updated_version_notice

function appthemes_updated_version_notice()
{
    $args_sets = get_theme_support('app-versions');
    foreach ($args_sets as $args) {
        if ($args['current_version'] != get_transient(APP_UPDATE_TRANSIENT . '_' . $args['option_key'])) {
            continue;
        }
        $option_key = $args['option_key'];
        $new_version = $args['current_version'];
        $old_version = get_option($option_key);
        // add a hook here to avoid duplicated versions checks in upgrade procedures
        do_action("appthemes_upgrade_{$option_key}", $new_version, $old_version);
        update_option($option_key, $new_version);
        $app_name = isset($args['app_name']) ? $args['app_name'] : __('Theme', APP_TD);
        echo scb_admin_notice(sprintf(__('%1$s successfully updated to version %2$s.', APP_TD), $app_name, $new_version));
        delete_transient(APP_UPDATE_TRANSIENT . '_' . $option_key);
    }
}
开发者ID:kalushta,项目名称:darom,代码行数:18,代码来源:versions.php

示例9: maybe_install

 function maybe_install()
 {
     if (!current_user_can('manage_options')) {
         return;
     }
     $current_ver = get_option('p2p_storage');
     if ($current_ver == self::$version) {
         return;
     }
     self::install();
     if (isset($_GET['p2p-upgrade'])) {
         $n = self::upgrade();
         update_option('p2p_storage', P2P_Storage::$version);
         echo scb_admin_notice(sprintf(__('Upgraded %d connections.', P2P_TEXTDOMAIN), $n));
     } elseif ($current_ver) {
         echo scb_admin_notice(sprintf(__('The Posts 2 Posts connections need to be upgraded. <a href="%s">Proceed.</a>', P2P_TEXTDOMAIN), admin_url('tools.php?p2p-upgrade')));
     } else {
         update_option('p2p_storage', P2P_Storage::$version);
     }
 }
开发者ID:netconstructor,项目名称:wp-posts-to-posts,代码行数:20,代码来源:storage.php

示例10: admin_msg

 function admin_msg($msg = '', $class = "updated")
 {
     if (empty($msg)) {
         $msg = __('Settings <strong>saved</strong>.', WEBNUS_TEXT_DOMAIN);
     }
     echo scb_admin_notice($msg, $class);
 }
开发者ID:arkev,项目名称:IntelligentMode,代码行数:7,代码来源:AdminPage.php

示例11: cp_package_membership_list_page_notice

/**
 * Displays notices on admin membership package page.
 *
 * @return void
 */
function cp_package_membership_list_page_notice()
{
    global $pagenow, $typenow, $cp_options;
    if ($pagenow != 'edit.php' || $typenow != CP_PACKAGE_MEMBERSHIP_PTYPE) {
        return;
    }
    if (!$cp_options->enable_membership_packs) {
        echo scb_admin_notice(sprintf(__('Membership Packs are disabled. Enable the <a href="%1$s">membership packs</a> option.', APP_TD), 'admin.php?page=app-pricing&tab=membership'), 'error');
    }
    echo scb_admin_notice(__('Membership Packs allow you to setup subscription-based pricing packages.', APP_TD) . '<br />' . __('This enables your customers to post unlimited ads for a set period of time or until the membership becomes inactive.', APP_TD) . '<br />' . sprintf(__('These memberships affect pricing regardless of the ad packs or pricing model you have set as long as you have enabled the <a href="%1$s">membership packs</a> option.', APP_TD), 'admin.php?page=app-pricing&tab=membership'));
}
开发者ID:kalushta,项目名称:darom,代码行数:16,代码来源:package-list.php

示例12: cp_delete_all_options

/**
 * Deletes all the ClassiPress options.
 *
 * @return void
 */
function cp_delete_all_options()
{
    global $wpdb;
    $wpdb->query("DELETE FROM {$wpdb->options} WHERE option_name like 'cp_%'");
    echo scb_admin_notice(__('All ClassiPress options have been deleted from the WordPress options table.', APP_TD));
}
开发者ID:kalushta,项目名称:darom,代码行数:11,代码来源:options.php

示例13: notices

 /**
  * Display queued admin notices.
  */
 public function notices()
 {
     foreach ($this->notices as $notice) {
         echo scb_admin_notice($notice[0], $notice[1]);
     }
 }
开发者ID:postmatic,项目名称:beta-dist,代码行数:9,代码来源:options-tab.php

示例14: admin_msg

 function admin_msg($msg = '', $class = "updated")
 {
     if (empty($msg)) {
         $msg = __('Settings <strong>saved</strong>.', $this->textdomain);
     }
     echo scb_admin_notice($msg, $class);
 }
开发者ID:kristinakarnitskaya,项目名称:larkyonline,代码行数:7,代码来源:AdminPage.php

示例15: display_notices

 /**
  * Displays notices.
  *
  * @param array|string $notices
  * @param string $class (optional)
  *
  * @return void
  */
 public function display_notices($notices, $class = 'updated')
 {
     // add inline class so the notices stays in metabox
     $class .= ' inline';
     foreach ((array) $notices as $notice) {
         echo scb_admin_notice($notice, $class);
     }
 }
开发者ID:Didox,项目名称:beminfinito,代码行数:16,代码来源:PostMetabox.php


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