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

PHP nxt_redirect函数代码示例

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

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



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

示例1: redirect_post

/**
 * Redirect to previous page.
 *
 * @param int $post_id Optional. Post ID.
 */
function redirect_post($post_id = '')
{
    if (isset($_POST['save']) || isset($_POST['publish'])) {
        $status = get_post_status($post_id);
        if (isset($_POST['publish'])) {
            switch ($status) {
                case 'pending':
                    $message = 8;
                    break;
                case 'future':
                    $message = 9;
                    break;
                default:
                    $message = 6;
            }
        } else {
            $message = 'draft' == $status ? 10 : 1;
        }
        $location = add_query_arg('message', $message, get_edit_post_link($post_id, 'url'));
    } elseif (isset($_POST['addmeta']) && $_POST['addmeta']) {
        $location = add_query_arg('message', 2, nxt_get_referer());
        $location = explode('#', $location);
        $location = $location[0] . '#postcustom';
    } elseif (isset($_POST['deletemeta']) && $_POST['deletemeta']) {
        $location = add_query_arg('message', 3, nxt_get_referer());
        $location = explode('#', $location);
        $location = $location[0] . '#postcustom';
    } elseif ('post-quickpress-save-cont' == $_POST['action']) {
        $location = "post.php?action=edit&post={$post_id}&message=7";
    } else {
        $location = add_query_arg('message', 4, get_edit_post_link($post_id, 'url'));
    }
    nxt_redirect(apply_filters('redirect_post_location', $location, $post_id));
    exit;
}
开发者ID:nxtclass,项目名称:NXTClass,代码行数:40,代码来源:post.php


示例2: w3_network_activate_error

/**
 * W3 Network activation error
 *
 * @return void
 */
function w3_network_activate_error()
{
    w3_activation_cleanup();
    nxt_redirect(plugins_url('pub/network_activation.php', W3TC_FILE));
    echo '<p><strong>W3 Total Cache Error:</strong> plugin cannot be activated network-wide.</p>';
    echo '<p><a href="javascript:history.back(-1);">Back</a>';
    exit;
}
开发者ID:nxtclass,项目名称:NXTClass-Plugin,代码行数:13,代码来源:activation.php


示例3: wlcms_check_for_login

function wlcms_check_for_login()
{
    if (get_option('wlcms_o_enable_login_redirect')) {
        $segments = explode('/', $_SERVER['REQUEST_URI']);
        if ($segments[count($segments) - 1] == 'login') {
            nxt_redirect(get_bloginfo('url') . '/nxt-login.php');
            exit;
        }
    }
}
开发者ID:nxtclass,项目名称:NXTClass-Plugin,代码行数:10,代码来源:wlcms-plugin.php


示例4: openid_redirect

/**
 * Send the user to their OpenID provider to authenticate.
 *
 * @param Auth_OpenID_AuthRequest $auth_request OpenID authentication request object
 * @param string $trust_root OpenID trust root
 * @param string $return_to URL where the OpenID provider should return the user
 */
function openid_redirect($auth_request, $trust_root, $return_to)
{
    do_action('openid_redirect', $auth_request, $trust_root, $return_to);
    $message = $auth_request->getMessage($trust_root, $return_to, false);
    if (Auth_OpenID::isFailure($message)) {
        return openid_error('Could not redirect to server: ' . $message->message);
    }
    $_SESSION['openid_return_to'] = $message->getArg(Auth_OpenID_OPENID_NS, 'return_to');
    // send 302 redirect or POST
    if ($auth_request->shouldSendRedirect()) {
        $redirect_url = $auth_request->redirectURL($trust_root, $return_to);
        nxt_redirect($redirect_url);
    } else {
        openid_repost($auth_request->endpoint->server_url, $message->toPostArgs());
    }
}
开发者ID:nxtclass,项目名称:NXTClass-Plugin,代码行数:23,代码来源:consumer.php


示例5: nxt_redirect

<?php

/**
 * Multisite upgrade administration panel.
 *
 * @package NXTClass
 * @subpackage Multisite
 * @since 3.0.0
 */
require_once 'admin.php';
nxt_redirect(network_admin_url('upgrade.php'));
exit;
开发者ID:nxtclass,项目名称:NXTClass,代码行数:12,代码来源:ms-upgrade-network.php


示例6: bb_get_current_admin_menu

function bb_get_current_admin_menu()
{
    global $bb_menu, $bb_submenu, $bb_admin_page, $bb_current_menu, $bb_current_submenu;
    foreach ($bb_submenu as $m => $b) {
        foreach ($b as $s) {
            if ($s[2] == $bb_admin_page) {
                $bb_current_submenu = $s;
                $bb_current_menu = $m;
                break;
            }
        }
    }
    if (!isset($bb_current_menu)) {
        $bb_current_menu = $bb_menu[0];
        $bb_current_submenu = $bb_submenu['index.php'][5];
    } else {
        foreach ($bb_menu as $m) {
            if ($m[2] == $bb_current_menu) {
                $bb_current_menu = $m;
                break;
            }
        }
    }
    if ($bb_current_submenu && !bb_current_user_can($bb_current_submenu[1]) || !bb_current_user_can($bb_current_menu[1])) {
        nxt_redirect(bb_get_uri(null, null, BB_URI_CONTEXT_HEADER));
        exit;
    }
}
开发者ID:nxtclass,项目名称:NXTClass-Plugin,代码行数:28,代码来源:functions.bb-admin.php


示例7: bb_die

<?php

require_once 'admin.php';
if (!bb_current_user_can('manage_forums')) {
    bb_die(__("You don't have the authority to mess with the forums."));
}
if (!isset($_POST['action'])) {
    nxt_redirect(bb_get_uri('bb-admin/forums.php', null, BB_URI_CONTEXT_HEADER + BB_URI_CONTEXT_BB_ADMIN));
    exit;
}
$sent_from = nxt_get_referer();
switch ($_POST['action']) {
    case 'add':
        if (!isset($_POST['forum_name']) || '' === $_POST['forum_name']) {
            bb_die(__('Bad forum name.  Go back and try again.'));
        }
        bb_check_admin_referer('add-forum');
        if (false !== bb_new_forum($_POST)) {
            bb_safe_redirect($sent_from);
            exit;
        } else {
            bb_die(__('The forum was not added'));
        }
        break;
    case 'update':
        bb_check_admin_referer('update-forum');
        if (!($forums = bb_get_forums())) {
            bb_die(__('No forums to update!'));
        }
        if ((int) $_POST['forum_id'] && isset($_POST['forum_name']) && '' !== $_POST['forum_name']) {
            bb_update_forum($_POST);
开发者ID:nxtclass,项目名称:NXTClass-Plugin,代码行数:31,代码来源:bb-forum.php


示例8: elseif

                } elseif ('blocked' != $role && array_key_exists('blocked', $user->capabilities)) {
                    bb_fix_password($user->ID);
                }
            }
            foreach ($profile_admin_keys as $key => $label) {
                if (${$key} != '' || isset($user->{$key})) {
                    bb_update_usermeta($user->ID, $key, ${$key});
                }
            }
            foreach ($assignable_caps as $cap => $label) {
                if (!($already = array_key_exists($cap, $user->capabilities)) && ${$cap}) {
                    $user_obj->add_cap($cap);
                } elseif (!${$cap} && $already) {
                    $user_obj->remove_cap($cap);
                }
            }
        }
        if (bb_current_user_can('change_user_password', $user->ID) && !empty($_POST['pass1'])) {
            $_POST['pass1'] = addslashes($_POST['pass1']);
            bb_update_user_password($user->ID, $_POST['pass1']);
            if (bb_get_current_user_info('ID') == $user->ID) {
                bb_clear_auth_cookie();
                bb_set_auth_cookie($user->ID);
            }
        }
        do_action('profile_edited', $user->ID);
        nxt_redirect(add_query_arg('updated', 'true', get_user_profile_link($user->ID)));
        exit;
    }
}
bb_load_template('profile-edit.php', array('profile_info_keys', 'profile_admin_keys', 'assignable_caps', 'user_email', 'bb_roles', 'errors', 'self'));
开发者ID:nxtclass,项目名称:NXTClass,代码行数:31,代码来源:profile-edit.php


示例9: bb_repermalink


//.........这里部分代码省略.........
                if (bb_get_option('mod_rewrite') === 'slugs') {
                    if (!($user = bb_get_user_by_nicename($id))) {
                        $user = bb_get_user($id);
                    }
                } else {
                    if (!($user = bb_get_user($id))) {
                        $user = bb_get_user_by_nicename($id);
                    }
                }
            }
            if (!$user || 1 == $user->user_status && !bb_current_user_can('moderate')) {
                bb_die(__('User not found.'), '', 404);
            }
            $user_id = $user->ID;
            bb_global_profile_menu_structure();
            $valid = false;
            if ($tab = isset($_GET['tab']) ? $_GET['tab'] : bb_get_path(2)) {
                foreach ($profile_hooks as $valid_tab => $valid_file) {
                    if ($tab == $valid_tab) {
                        $valid = true;
                        $self = $valid_file;
                    }
                }
            }
            if ($valid) {
                $permalink = get_profile_tab_link($user->ID, $tab, $page);
            } else {
                $permalink = get_user_profile_link($user->ID, $page);
                unset($self, $tab);
            }
            break;
        case 'favorites-page':
            $permalink = get_favorites_link();
            break;
        case 'tag-page':
            // It's not an integer and tags.php pulls double duty.
            $id = isset($_GET['tag']) ? $_GET['tag'] : false;
            if (!$id || !bb_get_tag((string) $id)) {
                $permalink = bb_get_tag_page_link();
            } else {
                global $tag, $tag_name;
                $tag_name = $id;
                $tag = bb_get_tag((string) $id);
                $permalink = bb_get_tag_link(0, $page);
                // 0 => grabs $tag from global.
            }
            break;
        case 'view-page':
            // Not an integer
            if (isset($_GET['view'])) {
                $id = $_GET['view'];
            } else {
                $id = bb_get_path();
            }
            $_original_id = $id;
            global $view;
            $view = $id;
            $permalink = get_view_link($view, $page);
            break;
        default:
            return;
            break;
    }
    nxt_parse_str($_SERVER['QUERY_STRING'], $args);
    $args = urlencode_deep($args);
    if ($args) {
        $permalink = add_query_arg($args, $permalink);
        if (bb_get_option('mod_rewrite')) {
            $pretty_args = array('id', 'page', 'tag', 'tab', 'username');
            // these are already specified in the path
            if ($location == 'view-page') {
                $pretty_args[] = 'view';
            }
            foreach ($pretty_args as $pretty_arg) {
                $permalink = remove_query_arg($pretty_arg, $permalink);
            }
        }
    }
    $permalink = apply_filters('bb_repermalink_result', $permalink, $location);
    $domain = bb_get_option('domain');
    $domain = preg_replace('/^https?/', '', $domain);
    $check = preg_replace('|^.*' . trim($domain, ' /') . '|', '', $permalink, 1);
    $uri = rtrim($uri, " \t\n\r\v?");
    $uri = str_replace('/index.php', '/', $uri);
    global $bb_log;
    $bb_log->debug($uri, 'bb_repermalink() ' . __('REQUEST_URI'));
    $bb_log->debug($check, 'bb_repermalink() ' . __('should be'));
    $bb_log->debug($permalink, 'bb_repermalink() ' . __('full permalink'));
    $bb_log->debug(isset($_SERVER['PATH_INFO']) ? $_SERVER['PATH_INFO'] : null, 'bb_repermalink() ' . __('PATH_INFO'));
    if ($check != $uri && $check != str_replace(urlencode($_original_id), $_original_id, $uri)) {
        if ($issue_404 && rtrim($check, " \t\n\r\v/") !== rtrim($uri, " \t\n\r\v/")) {
            status_header(404);
            bb_load_template('404.php');
        } else {
            nxt_redirect($permalink);
        }
        exit;
    }
    do_action('post_permalink', $permalink);
}
开发者ID:nxtclass,项目名称:NXTClass,代码行数:101,代码来源:functions.bb-core.php


示例10: nxt_redirect

<?php

/**
 * Theme editor administration panel.
 *
 * @package NXTClass
 * @subpackage Administration
 */
/** NXTClass Administration Bootstrap */
require_once './admin.php';
if (is_multisite() && !is_network_admin()) {
    nxt_redirect(network_admin_url('theme-editor.php'));
    exit;
}
if (!current_user_can('edit_themes')) {
    nxt_die('<p>' . __('You do not have sufficient permissions to edit templates for this site.') . '</p>');
}
$title = __("Edit Themes");
$parent_file = 'themes.php';
get_current_screen()->add_help_tab(array('id' => 'overview', 'title' => __('Overview'), 'content' => '<p>' . __('You can use the Theme Editor to edit the individual CSS and PHP files which make up your theme.') . '</p>
	<p>' . __('Begin by choosing a theme to edit from the dropdown menu and clicking Select. A list then appears of all the template files. Clicking once on any file name causes the file to appear in the large Editor box.') . '</p>
	<p>' . __('For PHP files, you can use the Documentation dropdown to select from functions recognized in that file. Lookup takes you to a web page with reference material about that particular function.') . '</p>
	<p>' . __('After typing in your edits, click Update File.') . '</p>
	<p>' . __('<strong>Advice:</strong> think very carefully about your site crashing if you are live-editing the theme currently in use.') . '</p>
	<p>' . __('Upgrading to a newer version of the same theme will override changes made here. To avoid this, consider creating a <a href="http://codex.nxtclass.org/Child_Themes" target="_blank">child theme</a> instead.') . '</p>' . (is_network_admin() ? '<p>' . __('Any edits to files from this screen will be reflected on all sites in the network.') . '</p>' : '')));
get_current_screen()->set_help_sidebar('<p><strong>' . __('For more information:') . '</strong></p>' . '<p>' . __('<a href="http://codex.nxtclass.org/Theme_Development" target="_blank">Documentation on Theme Development</a>') . '</p>' . '<p>' . __('<a href="http://codex.nxtclass.org/Using_Themes" target="_blank">Documentation on Using Themes</a>') . '</p>' . '<p>' . __('<a href="http://codex.nxtclass.org/Editing_Files" target="_blank">Documentation on Editing Files</a>') . '</p>' . '<p>' . __('<a href="http://codex.nxtclass.org/Template_Tags" target="_blank">Documentation on Template Tags</a>') . '</p>' . '<p>' . __('<a href="http://nxtclass.org/support/" target="_blank">Support Forums</a>') . '</p>');
nxt_reset_vars(array('action', 'redirect', 'profile', 'error', 'warning', 'a', 'file', 'theme', 'dir'));
$themes = get_themes();
if (empty($theme)) {
    $theme = get_current_theme();
} else {
开发者ID:nxtclass,项目名称:NXTClass,代码行数:31,代码来源:theme-editor.php


示例11: create_new_and_redirect

 function create_new_and_redirect()
 {
     //echo 'workin?';
     if (isset($_GET['new_wiki_page']) && $_GET['new_wiki_page'] == 'true' && nxt_verify_nonce($_GET['nonce'], 'nxtw_new_page_nonce')) {
         global $nxt_version;
         global $nxtdb;
         $new_wiki = array();
         $title = strip_tags($_GET['title']);
         $pieces = explode(':', $title, 2);
         if (count($pieces) == 2) {
             list($namespace, $topic) = $pieces;
             $namespace = strtolower(preg_replace('/[ -]+/', '-', $namespace));
             $parent_id = $nxtdb->get_var('SELECT id FROM `' . $nxtdb->posts . '` WHERE post_name = "' . $namespace . '"');
             if ($parent_id) {
                 $new_wiki['post_parent'] = $parent_id;
             }
         } else {
             $namespace = '';
             $topic = $title;
         }
         $topic = strtolower(preg_replace('/[ -]+/', '-', $topic));
         $url = get_option('siteurl') . '/wiki/' . ($namespace ? $namespace . '/' : '') . $topic;
         $new_wiki['post_name'] = $topic;
         $new_wiki['post_title'] = $title;
         $new_wiki['post_content'] = 'Click the "Edit" tab to add content to this page.';
         $new_wiki['guid'] = $url;
         $new_wiki['post_status'] = 'publish';
         if ($nxt_version >= 3.0) {
             $new_wiki['post_type'] = 'wiki';
         }
         $new_wiki_id = nxt_insert_post($new_wiki);
         if ($nxt_version <= 3.0) {
             update_post_meta($new_wiki_id, '_wiki_page', 1);
         }
         nxt_redirect($url);
         exit;
     }
 }
开发者ID:nxtclass,项目名称:NXTClass-Plugin,代码行数:38,代码来源:wiki_pages.php


示例12: update_blog_status

                         update_blog_status($val, 'spam', '1');
                         set_time_limit(60);
                         break;
                     case 'notspam':
                         $blogfunction = 'all_notspam';
                         update_blog_status($val, 'spam', '0');
                         set_time_limit(60);
                         break;
                 }
             } else {
                 nxt_die(__('You are not allowed to change the current site.'));
             }
         }
         nxt_safe_redirect(add_query_arg(array('updated' => 'true', 'action' => $blogfunction), nxt_get_referer()));
     } else {
         nxt_redirect(network_admin_url('sites.php'));
     }
     exit;
     break;
 case 'archiveblog':
     check_admin_referer('archiveblog');
     if (!current_user_can('manage_sites')) {
         nxt_die(__('You do not have permission to access this page.'));
     }
     update_blog_status($id, 'archived', '1');
     nxt_safe_redirect(add_query_arg(array('updated' => 'true', 'action' => 'archive'), nxt_get_referer()));
     exit;
     break;
 case 'unarchiveblog':
     check_admin_referer('unarchiveblog');
     if (!current_user_can('manage_sites')) {
开发者ID:nxtclass,项目名称:NXTClass,代码行数:31,代码来源:sites.php


示例13: nxt_redirect

<?php

/**
 * Multisite users administration panel.
 *
 * @package NXTClass
 * @subpackage Multisite
 * @since 3.0.0
 */
require_once './admin.php';
nxt_redirect(network_admin_url('users.php'));
exit;
开发者ID:nxtclass,项目名称:NXTClass,代码行数:12,代码来源:ms-users.php


示例14: nxt_redirect

<?php

require 'admin-action.php';
nxt_redirect(bb_get_uri('bb-admin/options-permalinks.php', null, BB_URI_CONTEXT_BB_ADMIN + BB_URI_CONTEXT_HEADER));
开发者ID:nxtclass,项目名称:NXTClass-Plugin,代码行数:4,代码来源:rewrite-rules.php


示例15: bp_has_message_threads

function bp_has_message_threads($args = '')
{
    global $bp, $messages_template;
    $defaults = array('user_id' => $bp->loggedin_user->id, 'box' => 'inbox', 'per_page' => 10, 'max' => false, 'type' => 'all');
    $r = nxt_parse_args($args, $defaults);
    extract($r, EXTR_SKIP);
    if ('notices' == $bp->current_action && !is_super_admin()) {
        nxt_redirect($bp->displayed_user->id);
    } else {
        if ('inbox' == $bp->current_action) {
            bp_core_delete_notifications_by_type($bp->loggedin_user->id, $bp->messages->id, 'new_message');
        }
        if ('sentbox' == $bp->current_action) {
            $box = 'sentbox';
        }
        if ('notices' == $bp->current_action) {
            $box = 'notices';
        }
        $messages_template = new BP_Messages_Box_Template($user_id, $box, $per_page, $max, $type);
    }
    return apply_filters('bp_has_message_threads', $messages_template->has_threads(), $messages_template);
}
开发者ID:nxtclass,项目名称:NXTClass,代码行数:22,代码来源:bp-messages-template.php


示例16: export

 /**
  * export()
  *
  * Export settings to a backup file.
  *
  * @since 1.0.0
  * @uses global $nxtdb
  */
 function export()
 {
     global $nxtdb;
     check_admin_referer('woothemes-backup-export');
     // Security check.
     $export_options = array('all', 'theme', 'seo', 'sidebar', 'framework');
     if (!in_array(strip_tags($_POST['export-type']), $export_options)) {
         return;
     }
     // No invalid exports, please.
     $export_type = esc_attr(strip_tags($_POST['export-type']));
     $settings = array();
     $query = $this->construct_database_query($export_type);
     // Error trapping for the export.
     if ($query == '') {
         nxt_redirect(admin_url('admin.php?page=' . $this->token . '&error-export=true'));
         return;
     }
     // If we get to this stage, all is safe so run the query.
     $results = $nxtdb->get_results($query);
     foreach ($results as $result) {
         $settings[$result->option_name] = $result->option_value;
     }
     // End FOREACH Loop
     // Remove the "blogname" and "blogdescription" fields
     unset($settings['blogname']);
     unset($settings['blogdescription']);
     if (!$settings) {
         return;
     }
     // Add our custom marker, to ensure only valid files are imported successfully.
     $settings['woothemes-backup-validator'] = date('Y-m-d h:i:s');
     // Generate the export file.
     $output = json_encode((array) $settings);
     header('Content-Description: File Transfer');
     header('Cache-Control: public, must-revalidate');
     header('Pragma: hack');
     header('Content-Type: text/plain');
     header('Content-Disposition: attachment; filename="' . $this->token . '-' . date('Ymd-His') . '.json"');
     header('Content-Length: ' . strlen($output));
     echo $output;
     exit;
 }
开发者ID:nxtclass,项目名称:NXTClass-themes,代码行数:51,代码来源:admin-backup.php


示例17: remote_login_js

function remote_login_js()
{
    global $current_blog, $current_user, $nxtdb;
    if (0 == get_site_option('dm_remote_login')) {
        return false;
    }
    $nxtdb->dmtablelogins = $nxtdb->base_prefix . 'domain_mapping_logins';
    $hash = get_dm_hash();
    if (false == isset($_SERVER['HTTPS'])) {
        $_SERVER['HTTPS'] = 'Off';
    }
    $protocol = 'on' == strtolower($_SERVER['HTTPS']) ? 'https://' : 'http://';
    if ($_GET['dm'] == $hash) {
        if ($_GET['action'] == 'load') {
            if (!is_user_logged_in()) {
                exit;
            }
            $key = md5(time() . mt_rand());
            $nxtdb->query($nxtdb->prepare("INSERT INTO {$nxtdb->dmtablelogins} ( `id`, `user_id`, `blog_id`, `t` ) VALUES( %s, %d, %d, NOW() )", $key, $current_user->ID, $_GET['blogid']));
            $url = add_query_arg(array('action' => 'login', 'dm' => $hash, 'k' => $key, 't' => mt_rand()), $_GET['back']);
            echo "window.location = '{$url}'";
            exit;
        } elseif ($_GET['action'] == 'login') {
            if ($details = $nxtdb->get_row($nxtdb->prepare("SELECT * FROM {$nxtdb->dmtablelogins} WHERE id = %s AND blog_id = %d", $_GET['k'], $nxtdb->blogid))) {
                if ($details->blog_id == $nxtdb->blogid) {
                    $nxtdb->query($nxtdb->prepare("DELETE FROM {$nxtdb->dmtablelogins} WHERE id = %s", $_GET['k']));
                    $nxtdb->query($nxtdb->prepare("DELETE FROM {$nxtdb->dmtablelogins} WHERE t < %d", time() - 120));
                    // remote logins survive for only 2 minutes if not used.
                    nxt_set_auth_cookie($details->user_id);
                    nxt_redirect(remove_query_arg(array('dm', 'action', 'k', 't', $protocol . $current_blog->domain . $_SERVER['REQUEST_URI'])));
                    exit;
                } else {
                    nxt_die(__("Incorrect or out of date login key", 'nxtclass-mu-domain-mapping'));
                }
            } else {
                nxt_die(__("Unknown login key", 'nxtclass-mu-domain-mapping'));
            }
        } elseif ($_GET['action'] == 'logout') {
            if ($details = $nxtdb->get_row($nxtdb->prepare("SELECT * FROM {$nxtdb->dmtablelogins} WHERE id = %d AND blog_id = %d", $_GET['k'], $_GET['blogid']))) {
                $nxtdb->query($nxtdb->prepare("DELETE FROM {$nxtdb->dmtablelogins} WHERE id = %s", $_GET['k']));
                $blog = get_blog_details($_GET['blogid']);
                nxt_clear_auth_cookie();
                nxt_redirect(trailingslashit($blog->siteurl) . "nxt-login.php?loggedout=true");
                exit;
            } else {
                nxt_die(__("Unknown logout key", 'nxtclass-mu-domain-mapping'));
            }
        }
    }
}
开发者ID:nxtclass,项目名称:NXTClass,代码行数:50,代码来源:domain_mapping.php


示例18: do_undismiss_core_update

function do_undismiss_core_update()
{
    $version = isset($_POST['version']) ? $_POST['version'] : false;
    $locale = isset($_POST['locale']) ? $_POST['locale'] : 'en_US';
    $update = find_core_update($version, $locale);
    if (!$update) {
        return;
    }
    undismiss_core_update($version, $locale);
    nxt_redirect(nxt_nonce_url('update-core.php?action=upgrade-core', 'upgrade-core'));
    exit;
}
开发者ID:nxtclass,项目名称:NXTClass,代码行数:12,代码来源:update-core.php


示例19: bulk_edit_posts

            if (isset($_REQUEST['bulk_edit'])) {
                $done = bulk_edit_posts($_REQUEST);
                if (is_array($done)) {
                    $done['updated'] = count($done['updated']);
                    $done['skipped'] = count($done['skipped']);
                    $done['locked'] = count($done['locked']);
                    $sendback = add_query_arg($done, $sendback);
                }
            }
            break;
    }
    $sendback = remove_query_arg(array('action', 'action2', 'tags_input', 'post_author', 'comment_status', 'ping_status', '_status', 'post', 'bulk_edit', 'post_view'), $sendback);
    nxt_redirect($sendback);
    exit;
} elseif (!empty($_REQUEST['_nxt_http_referer'])) {
    nxt_redirect(remove_query_arg(array('_nxt_http_referer', '_nxtnonce'), stripslashes($_SERVER['REQUEST_URI'])));
    exit;
}
$nxt_list_table->prepare_items();
nxt_enqueue_script('inline-edit-post');
$title = $post_type_object->labels->name;
if ('post' == $post_type) {
    get_current_screen()->add_help_tab(array('id' => 'overview', 'title' => __('Overview'), 'content' => '<p>' . __('This screen provides access to all of your posts. You can customize the display of this screen to suit your workflow.') . '</p>'));
    get_current_screen()->add_help_tab(array('id' => 'screen-content', 'title' => __('Screen Content'), 'content' => '<p>' . __('You can customize the display of this screen&#8217;s contents in a number of ways:') . '</p>' . '<ul>' . '<li>' . __('You can hide/display columns based on your needs and decide how many posts to list per screen using the Screen Options tab.') . '</li>' . '<li>' . __('You can filter the list of posts by post status using the text links in the upper left to show All, Published, Draft, or Trashed posts. The default view is to show all posts.') . '</li>' . '<li>' . __('You can view posts in a simple title list or with an excerpt. Choose the view you prefer by clicking on the icons at the top of the list on the right.') . '</li>' . '<li>' . __('You can refine the list to show only posts in a specific category or from a specific month by using the dropdown menus above the posts list. Click the Filter button after making your selection. You also can refine the list by clicking on the post author, category or tag in the posts list.') . '</li>' . '</ul>'));
    get_current_screen()->add_help_tab(array('id' => 'action-links', 'title' => __('Available Actions'), 'content' => '<p>' . __('Hovering over a row in the posts list will display action links that allow you to manage your post. You can perform the following actions:') . '</p>' . '<ul>' . '<li>' . __('<strong>Edit</strong> takes you to the editing screen for that post. You can also reach that screen by clicking on the post title.') . '</li>' . '<li>' . __('<strong>Quick Edit</strong> provides inline access to the metadata of your post, allowing you to update post details without leaving this screen.') . '</li>' . '<li>' . __('<strong>Trash</strong> removes your post from this list and places it in the trash, from which you can permanently delete it.') . '</li>' . '<li>' . __('<strong>Preview</strong> will show you what your draft post will look like if you publish it. View will take you to your live site to view the post. Which link is available depends on your post&#8217;s status.') . '</li>' . '</ul>'));
    get_current_screen()->add_help_tab(array('id' => 'bulk-actions', 'title' => __('Bulk Actions'), 'content' => '<p>' . __('You can also edit or move multiple posts to the trash at once. Select the posts you want to act on using the checkboxes, then select the action you want to take from the Bulk Actions menu and click Apply.') . '</p>' . '<p>' . __('When using Bulk Edit, you can change the metadata (categories, author, etc.) for all selected posts at once. To remove a post from the grouping, just click the x next to its name in the Bulk Edit area that appears.') . '</p>'));
    get_current_screen()->set_help_sidebar('<p><strong>' . __('For more information:') . '</strong></p>' . '<p>' . __('<a href="http://codex.nxtclass.org/Posts_Screen" target="_blank">Documentation on Managing Posts</a>') . '</p>' . '<p>' . __('<a href="http://nxtclass.org/support/" target="_blank">Support Forums</a>') . '</p>');
} elseif ('page' == $post_type) {
    get_current_screen()->add_help_tab(array('id' => 'overview', 'title' => __('Overview'), 'content' => '<p>' . __('Pages are similar to posts in that they have a title, body text, and associated metadata, but they are different in that they are not part of the chronological blog stream, kind of like permanent posts. Pages are not categorized or tagged, but can have a hierarchy. You can nest pages under other pages by making one the &#8220;Parent&#8221; of the other, creating a group of pages.') . '</p>'));
    get_current_screen()->add_help_tab(array('id' => 'managing-pages', 'title' => __('Managing Pages'), 'content' => '<p>' . __('Managing pages is very similar to managing posts, and the screens can be customized in the same way.') . '</p>' . '<p>' . __('You can also perform the same types of actions, including narrowing the list by using the filters, acting on a page using the action links that appear when you hover over a row, or using the Bulk Actions menu to edit the metadata for multiple pages at once.') . '</p>'));
    get_current_screen()->set_help_sidebar('<p><strong>' . __('For more information:') . '</strong></p>' . '<p>' . __('<a href="http://codex.nxtclass.org/Pages_Screen" target="_blank">Documentation on Managing Pages</a>') . '</p>' . '<p>' . __('<a href="http://nxtclass.org/support/" target="_blank">Support Forums</a>') . '</p>');
开发者ID:nxtclass,项目名称:NXTClass,代码行数:31,代码来源:edit.php


示例20: nxt_not_installed

/**
 * Redirects to the installer if NXTClass is not installed.
 *
 * Dies with an error message when multisite is enabled.
 *
 * @access private
 * @since 3.0.0
 */
function nxt_not_installed()
{
    if (is_multisite()) {
        if (!is_blog_installed() && !defined('nxt_INSTALLING')) {
            nxt_die(__('The site you have requested is not installed properly. Please contact the system administrator.'));
        }
    } elseif (!is_blog_installed() && false === strpos($_SERVER['PHP_SELF'], 'install.php') && !defined('nxt_INSTALLING')) {
        $link = nxt_guess_url() . '/nxt-admin/install.php';
        require ABSPATH . nxtINC . '/kses.php';
        require ABSPATH . nxtINC . '/pluggable.php';
        require ABSPATH . nxtINC . '/formatting.php';
        nxt_redirect($link);
        die;
    }
}
开发者ID:nxtclass,项目名称:NXTClass,代码行数:23,代码来源:load.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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