當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。