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

PHP nxt_die函数代码示例

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

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



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

示例1: register_post_types

 /**
  * register_post_types()
  *
  * Static function to register the assignments post types, taxonomies and capabilities.
  */
 function register_post_types()
 {
     $assignment_post_def = array('label' => __('Assignments', 'bpsp'), 'singular_label' => __('Assignment', 'bpsp'), 'description' => __('BuddyPress ScholarPress Courseware Assignments', 'bpsp'), 'public' => BPSP_DEBUG, 'publicly_queryable' => false, 'exclude_from_search' => true, 'show_ui' => BPSP_DEBUG, 'capability_type' => 'assignment', 'hierarchical' => false, 'rewrite' => false, 'query_var' => false, 'supports' => array('title', 'editor', 'author', 'custom-fields'), 'taxonomies' => array('course_id', 'group_id'));
     if (!register_post_type('assignment', $assignment_post_def)) {
         nxt_die(__('BuddyPress Courseware error while registering assignment post type.', 'bpsp'));
     }
 }
开发者ID:nxtclass,项目名称:NXTClass-Plugin,代码行数:12,代码来源:assignments.class.php


示例2: register_post_types

 /**
  * register_post_types()
  *
  * Static function to register the responses post types, taxonomies and capabilities.
  */
 function register_post_types()
 {
     $response_post_def = array('label' => __('Responses', 'bpsp'), 'singular_label' => __('Response', 'bpsp'), 'description' => __('BuddyPress ScholarPress Courseware Responses', 'bpsp'), 'public' => BPSP_DEBUG, 'publicly_queryable' => false, 'exclude_from_search' => true, 'show_ui' => BPSP_DEBUG, 'capability_type' => 'response', 'hierarchical' => false, 'rewrite' => false, 'query_var' => false, 'supports' => array('title', 'editor', 'author'));
     if (!register_post_type('response', $response_post_def)) {
         nxt_die(__('BuddyPress Courseware error while registering response post type.', 'bpsp'));
     }
 }
开发者ID:nxtclass,项目名称:NXTClass,代码行数:12,代码来源:responses.class.php


示例3: edit_comment

/**
 * Update a comment with values provided in $_POST.
 *
 * @since 2.0.0
 */
function edit_comment()
{
    if (!current_user_can('edit_comment', (int) $_POST['comment_ID'])) {
        nxt_die(__('You are not allowed to edit comments on this post.'));
    }
    $_POST['comment_author'] = $_POST['newcomment_author'];
    $_POST['comment_author_email'] = $_POST['newcomment_author_email'];
    $_POST['comment_author_url'] = $_POST['newcomment_author_url'];
    $_POST['comment_approved'] = $_POST['comment_status'];
    $_POST['comment_content'] = $_POST['content'];
    $_POST['comment_ID'] = (int) $_POST['comment_ID'];
    foreach (array('aa', 'mm', 'jj', 'hh', 'mn') as $timeunit) {
        if (!empty($_POST['hidden_' . $timeunit]) && $_POST['hidden_' . $timeunit] != $_POST[$timeunit]) {
            $_POST['edit_date'] = '1';
            break;
        }
    }
    if (!empty($_POST['edit_date'])) {
        $aa = $_POST['aa'];
        $mm = $_POST['mm'];
        $jj = $_POST['jj'];
        $hh = $_POST['hh'];
        $mn = $_POST['mn'];
        $ss = $_POST['ss'];
        $jj = $jj > 31 ? 31 : $jj;
        $hh = $hh > 23 ? $hh - 24 : $hh;
        $mn = $mn > 59 ? $mn - 60 : $mn;
        $ss = $ss > 59 ? $ss - 60 : $ss;
        $_POST['comment_date'] = "{$aa}-{$mm}-{$jj} {$hh}:{$mn}:{$ss}";
    }
    nxt_update_comment($_POST);
}
开发者ID:nxtclass,项目名称:NXTClass,代码行数:37,代码来源:comment.php


示例4: nxtmu_checkAvailableSpace

/**
 * Determines if the available space defined by the admin has been exceeded by the user.
 *
 * @deprecated 3.0.0
 * @see is_upload_space_available()
 */
function nxtmu_checkAvailableSpace()
{
    _deprecated_function(__FUNCTION__, '3.0', 'is_upload_space_available()');
    if (!is_upload_space_available()) {
        nxt_die(__('Sorry, you must delete files before you can upload any more.'));
    }
}
开发者ID:nxtclass,项目名称:NXTClass,代码行数:13,代码来源:ms-deprecated.php


示例5: register_post_types

 /**
  * register_post_types()
  *
  * Static function to register the lecture post type, taxonomies and capabilities.
  */
 function register_post_types()
 {
     $lecture_post_def = array('label' => __('Lecture', 'bpsp'), 'singular_label' => __('Lecture', 'bpsp'), 'description' => __('BuddyPress ScholarPress Courseware Lectures', 'bpsp'), 'public' => BPSP_DEBUG, 'publicly_queryable' => false, 'exclude_from_search' => true, 'show_ui' => BPSP_DEBUG, 'capability_type' => 'lecture', 'hierarchical' => true, 'rewrite' => false, 'query_var' => false, 'supports' => array('title', 'editor', 'author', 'page-attributes'), 'taxonomies' => array('group_id'));
     if (!register_post_type('lecture', $lecture_post_def)) {
         nxt_die(__('BuddyPress Courseware error while registering lecture post type.', 'bpsp'));
     }
     $course_rel_def = array('public' => BPSP_DEBUG, 'show_ui' => BPSP_DEBUG, 'hierarchical' => false, 'label' => __('Course ID', 'bpsp'), 'query_var' => 'course_id', 'rewrite' => false, 'capabilities' => array('manage_terms' => 'manage_course_id', 'edit_terms' => 'manage_course_id', 'delete_terms' => 'manage_course_id', 'assign_terms' => 'edit_courses'));
     register_taxonomy('course_id', array('lecture'), $course_rel_def);
     if (!get_taxonomy('course_id')) {
         nxt_die(__('BuddyPress Courseware error while registering course taxonomy.', 'bpsp'));
     }
 }
开发者ID:nxtclass,项目名称:NXTClass-Plugin,代码行数:17,代码来源:lectures.class.php


示例6: register_post_types

 /**
  * register_post_types()
  *
  * Static function to register the assignments post types, taxonomies and capabilities.
  */
 function register_post_types()
 {
     $grade_post_def = array('label' => __('Gradebooks', 'bpsp'), 'singular_label' => __('Gradebook', 'bpsp'), 'description' => __('BuddyPress ScholarPress Courseware Gradebook', 'bpsp'), 'public' => BPSP_DEBUG, 'publicly_queryable' => false, 'exclude_from_search' => true, 'show_ui' => BPSP_DEBUG, 'capability_type' => 'gradebook', 'hierarchical' => false, 'rewrite' => false, 'query_var' => false, 'supports' => array('author', 'custom-fields'), 'taxonomies' => array('group_id'));
     if (!register_post_type('gradebook', $grade_post_def)) {
         nxt_die(__('BuddyPress Courseware error while registering grade post type.', 'bpsp'));
     }
     $assignment_rel_def = array('public' => BPSP_DEBUG, 'show_ui' => BPSP_DEBUG, 'hierarchical' => false, 'label' => __('Assignment ID', 'bpsp'), 'query_var' => 'assignment_id', 'rewrite' => false, 'capabilities' => array('manage_terms' => 'manage_assignment_id', 'edit_terms' => 'manage_assignment_id', 'delete_terms' => 'manage_assignment_id', 'assign_terms' => 'edit_gradebooks'));
     register_taxonomy('assignment_id', array('gradebook'), $assignment_rel_def);
     if (!get_taxonomy('assignment_id')) {
         nxt_die(__('BuddyPress Courseware error while registering assignment taxonomy.', 'bpsp'));
     }
 }
开发者ID:nxtclass,项目名称:NXTClass-Plugin,代码行数:17,代码来源:gradebook.class.php


示例7: __construct

 function __construct()
 {
     global $post_type, $taxonomy, $tax;
     nxt_reset_vars(array('action', 'taxonomy', 'post_type'));
     if (empty($taxonomy)) {
         $taxonomy = 'post_tag';
     }
     if (!taxonomy_exists($taxonomy)) {
         nxt_die(__('Invalid taxonomy'));
     }
     $tax = get_taxonomy($taxonomy);
     if (empty($post_type) || !in_array($post_type, get_post_types(array('show_ui' => true)))) {
         $post_type = 'post';
     }
     parent::__construct(array('plural' => 'tags', 'singular' => 'tag'));
 }
开发者ID:nxtclass,项目名称:NXTClass,代码行数:16,代码来源:class-nxt-terms-list-table.php


示例8: register_post_types

 /**
  * register_post_types()
  *
  * Static function to register the bibliography post types and capabilities.
  */
 function register_post_types()
 {
     $bib_post_def = array('label' => __('Bibliography', 'bpsp'), 'singular_label' => __('Bibliography', 'bpsp'), 'description' => __('BuddyPress ScholarPress Courseware Bibliography', 'bpsp'), 'public' => BPSP_DEBUG, 'publicly_queryable' => false, 'exclude_from_search' => true, 'show_ui' => BPSP_DEBUG, 'capability_type' => 'bib', 'hierarchical' => false, 'rewrite' => false, 'query_var' => false, 'supports' => array('title', 'custom-fields'));
     if (!register_post_type('bib', $bib_post_def)) {
         nxt_die(__('BuddyPress Courseware error while registering bibliography post type.', 'bpsp'));
     }
     /**
      * Dummy post definition for storing the bibs entries as custom-fields
      */
     $bibdb_def = array('post_title' => 'BIBSDB', 'post_status' => 'draft', 'post_type' => 'bib');
     if (!get_posts($bibdb_def)) {
         $bibs_id = nxt_insert_post($bibdb_def);
         if (!$bibs_id) {
             nxt_die('BuddyPress Courseware error while creating bibliography database.', 'bpsp');
         }
     }
 }
开发者ID:nxtclass,项目名称:NXTClass,代码行数:22,代码来源:bibliography.class.php


示例9: edit_link

/**
 * Update or insert a link using values provided in $_POST.
 *
 * @since 2.0.0
 *
 * @param int $link_id Optional. ID of the link to edit.
 * @return int|nxt_Error Value 0 or nxt_Error on failure. The link ID on success.
 */
function edit_link($link_id = 0)
{
    if (!current_user_can('manage_links')) {
        nxt_die(__('Cheatin’ uh?'));
    }
    $_POST['link_url'] = esc_html($_POST['link_url']);
    $_POST['link_url'] = esc_url($_POST['link_url']);
    $_POST['link_name'] = esc_html($_POST['link_name']);
    $_POST['link_image'] = esc_html($_POST['link_image']);
    $_POST['link_rss'] = esc_url($_POST['link_rss']);
    if (!isset($_POST['link_visible']) || 'N' != $_POST['link_visible']) {
        $_POST['link_visible'] = 'Y';
    }
    if (!empty($link_id)) {
        $_POST['link_id'] = $link_id;
        return nxt_update_link($_POST);
    } else {
        return nxt_insert_link($_POST);
    }
}
开发者ID:nxtclass,项目名称:NXTClass,代码行数:28,代码来源:bookmark.php


示例10: __

            }
            $help = '<p><strong>' . __('For more information:') . '</strong></p>';
            if ('category' == $taxonomy) {
                $help .= '<p>' . __('<a href="http://codex.nxtclass.org/Posts_Categories_Screen" target="_blank">Documentation on Categories</a>') . '</p>';
            } elseif ('link_category' == $taxonomy) {
                $help .= '<p>' . __('<a href="http://codex.nxtclass.org/Links_Link_Categories_Screen" target="_blank">Documentation on Link Categories</a>') . '</p>';
            } else {
                $help .= '<p>' . __('<a href="http://codex.nxtclass.org/Posts_Tags_Screen" target="_blank">Documentation on Tags</a>') . '</p>';
            }
            $help .= '<p>' . __('<a href="http://nxtclass.org/support/" target="_blank">Support Forums</a>') . '</p>';
            get_current_screen()->set_help_sidebar($help);
            unset($help);
        }
        require_once 'admin-header.php';
        if (!current_user_can($tax->cap->edit_terms)) {
            nxt_die(__('You are not allowed to edit this item.'));
        }
        $messages[1] = __('Item added.');
        $messages[2] = __('Item deleted.');
        $messages[3] = __('Item updated.');
        $messages[4] = __('Item not added.');
        $messages[5] = __('Item not updated.');
        $messages[6] = __('Items deleted.');
        ?>

<div class="wrap nosubsub">
<?php 
        screen_icon();
        ?>
<h2><?php 
        echo esc_html($title);
开发者ID:nxtclass,项目名称:NXTClass,代码行数:31,代码来源:edit-tags.php


示例11: _show_post_preview

function _show_post_preview()
{
    if (isset($_GET['preview_id']) && isset($_GET['preview_nonce'])) {
        $id = (int) $_GET['preview_id'];
        if (false == nxt_verify_nonce($_GET['preview_nonce'], 'post_preview_' . $id)) {
            nxt_die(__('You do not have permission to preview drafts.'));
        }
        add_filter('the_preview', '_set_preview');
    }
}
开发者ID:nxtclass,项目名称:NXTClass,代码行数:10,代码来源:post.php


示例12: bail

 /**
  * Wraps errors in a nice header and footer and dies.
  *
  * Will not die if nxtdb::$show_errors is true
  *
  * @since 1.5.0
  *
  * @param string $message The Error message
  * @param string $error_code Optional. A Computer readable string to identify the error.
  * @return false|void
  */
 function bail($message, $error_code = '500')
 {
     if (!$this->show_errors) {
         if (class_exists('nxt_Error')) {
             $this->error = new nxt_Error($error_code, $message);
         } else {
             $this->error = $message;
         }
         return false;
     }
     nxt_die($message);
 }
开发者ID:nxtclass,项目名称:NXTClass-Plugin,代码行数:23,代码来源:mssql.php


示例13: install_theme_information

/**
 * Display theme information in dialog box form.
 *
 * @since 2.8.0
 */
function install_theme_information()
{
    //TODO: This function needs a LOT of UI work :)
    global $tab, $themes_allowedtags;
    $api = themes_api('theme_information', array('slug' => stripslashes($_REQUEST['theme'])));
    if (is_nxt_error($api)) {
        nxt_die($api);
    }
    // Sanitize HTML
    foreach ((array) $api->sections as $section_name => $content) {
        $api->sections[$section_name] = nxt_kses($content, $themes_allowedtags);
    }
    foreach (array('version', 'author', 'requires', 'tested', 'homepage', 'downloaded', 'slug') as $key) {
        if (isset($api->{$key})) {
            $api->{$key} = nxt_kses($api->{$key}, $themes_allowedtags);
        }
    }
    iframe_header(__('Theme Install'));
    if (empty($api->download_link)) {
        echo '<div id="message" class="error"><p>' . __('<strong>ERROR:</strong> This theme is currently not available. Please try again later.') . '</p></div>';
        iframe_footer();
        exit;
    }
    if (!empty($api->tested) && version_compare($GLOBALS['nxt_version'], $api->tested, '>')) {
        echo '<div class="updated"><p>' . __('<strong>Warning:</strong> This theme has <strong>not been tested</strong> with your current version of NXTClass.') . '</p></div>';
    } else {
        if (!empty($api->requires) && version_compare($GLOBALS['nxt_version'], $api->requires, '<')) {
            echo '<div class="updated"><p>' . __('<strong>Warning:</strong> This theme has not been marked as <strong>compatible</strong> with your version of NXTClass.') . '</p></div>';
        }
    }
    // Default to a "new" theme
    $type = 'install';
    // Check to see if this theme is known to be installed, and has an update awaiting it.
    $update_themes = get_site_transient('update_themes');
    if (is_object($update_themes) && isset($update_themes->response)) {
        foreach ((array) $update_themes->response as $theme_slug => $theme_info) {
            if ($theme_slug === $api->slug) {
                $type = 'update_available';
                $update_file = $theme_slug;
                break;
            }
        }
    }
    $themes = get_themes();
    foreach ((array) $themes as $this_theme) {
        if (is_array($this_theme) && $this_theme['Stylesheet'] == $api->slug) {
            if ($this_theme['Version'] == $api->version) {
                $type = 'latest_installed';
            } elseif ($this_theme['Version'] > $api->version) {
                $type = 'newer_installed';
                $newer_version = $this_theme['Version'];
            }
            break;
        }
    }
    ?>

<div class='available-theme'>
<img src='<?php 
    echo esc_url($api->screenshot_url);
    ?>
' width='300' class="theme-preview-img" />
<h3><?php 
    echo $api->name;
    ?>
</h3>
<p><?php 
    printf(__('by %s'), $api->author);
    ?>
</p>
<p><?php 
    printf(__('Version: %s'), $api->version);
    ?>
</p>

<?php 
    $buttons = '<a class="button" id="cancel" href="#" onclick="tb_close();return false;">' . __('Cancel') . '</a> ';
    switch ($type) {
        default:
        case 'install':
            if (current_user_can('install_themes')) {
                $buttons .= '<a class="button-primary" id="install" href="' . nxt_nonce_url(self_admin_url('update.php?action=install-theme&theme=' . $api->slug), 'install-theme_' . $api->slug) . '" target="_parent">' . __('Install Now') . '</a>';
            }
            break;
        case 'update_available':
            if (current_user_can('update_themes')) {
                $buttons .= '<a class="button-primary" id="install"	href="' . nxt_nonce_url(self_admin_url('update.php?action=upgrade-theme&theme=' . $update_file), 'upgrade-theme_' . $update_file) . '" target="_parent">' . __('Install Update Now') . '</a>';
            }
            break;
        case 'newer_installed':
            if (current_user_can('install_themes') || current_user_can('update_themes')) {
                ?>
<p><?php 
                printf(__('Newer version (%s) is installed.'), $newer_version);
                ?>
//.........这里部分代码省略.........
开发者ID:nxtclass,项目名称:NXTClass,代码行数:101,代码来源:theme-install.php


示例14: edit_user

/**
 * Edit user settings based on contents of $_POST
 *
 * Used on user-edit.php and profile.php to manage and process user options, passwords etc.
 *
 * @since 2.0
 *
 * @param int $user_id Optional. User ID.
 * @return int user id of the updated user
 */
function edit_user($user_id = 0)
{
    global $nxt_roles, $nxtdb;
    $user = new stdClass();
    if ($user_id) {
        $update = true;
        $user->ID = (int) $user_id;
        $userdata = get_userdata($user_id);
        $user->user_login = $nxtdb->escape($userdata->user_login);
    } else {
        $update = false;
    }
    if (!$update && isset($_POST['user_login'])) {
        $user->user_login = sanitize_user($_POST['user_login'], true);
    }
    $pass1 = $pass2 = '';
    if (isset($_POST['pass1'])) {
        $pass1 = $_POST['pass1'];
    }
    if (isset($_POST['pass2'])) {
        $pass2 = $_POST['pass2'];
    }
    if (isset($_POST['role']) && current_user_can('edit_users')) {
        $new_role = sanitize_text_field($_POST['role']);
        $potential_role = isset($nxt_roles->role_objects[$new_role]) ? $nxt_roles->role_objects[$new_role] : false;
        // Don't let anyone with 'edit_users' (admins) edit their own role to something without it.
        // Multisite super admins can freely edit their blog roles -- they possess all caps.
        if (is_multisite() && current_user_can('manage_sites') || $user_id != get_current_user_id() || $potential_role && $potential_role->has_cap('edit_users')) {
            $user->role = $new_role;
        }
        // If the new role isn't editable by the logged-in user die with error
        $editable_roles = get_editable_roles();
        if (!empty($new_role) && empty($editable_roles[$new_role])) {
            nxt_die(__('You can&#8217;t give users that role.'));
        }
    }
    if (isset($_POST['email'])) {
        $user->user_email = sanitize_text_field($_POST['email']);
    }
    if (isset($_POST['url'])) {
        if (empty($_POST['url']) || $_POST['url'] == 'http://') {
            $user->user_url = '';
        } else {
            $user->user_url = esc_url_raw($_POST['url']);
            $user->user_url = preg_match('/^(https?|ftps?|mailto|news|irc|gopher|nntp|feed|telnet):/is', $user->user_url) ? $user->user_url : 'http://' . $user->user_url;
        }
    }
    if (isset($_POST['first_name'])) {
        $user->first_name = sanitize_text_field($_POST['first_name']);
    }
    if (isset($_POST['last_name'])) {
        $user->last_name = sanitize_text_field($_POST['last_name']);
    }
    if (isset($_POST['nickname'])) {
        $user->nickname = sanitize_text_field($_POST['nickname']);
    }
    if (isset($_POST['display_name'])) {
        $user->display_name = sanitize_text_field($_POST['display_name']);
    }
    if (isset($_POST['description'])) {
        $user->description = trim($_POST['description']);
    }
    foreach (_nxt_get_user_contactmethods($user) as $method => $name) {
        if (isset($_POST[$method])) {
            $user->{$method} = sanitize_text_field($_POST[$method]);
        }
    }
    if ($update) {
        $user->rich_editing = isset($_POST['rich_editing']) && 'false' == $_POST['rich_editing'] ? 'false' : 'true';
        $user->admin_color = isset($_POST['admin_color']) ? sanitize_text_field($_POST['admin_color']) : 'fresh';
        $user->show_admin_bar_front = isset($_POST['admin_bar_front']) ? 'true' : 'false';
    }
    $user->comment_shortcuts = isset($_POST['comment_shortcuts']) && 'true' == $_POST['comment_shortcuts'] ? 'true' : '';
    $user->use_ssl = 0;
    if (!empty($_POST['use_ssl'])) {
        $user->use_ssl = 1;
    }
    $errors = new nxt_Error();
    /* checking that username has been typed */
    if ($user->user_login == '') {
        $errors->add('user_login', __('<strong>ERROR</strong>: Please enter a username.'));
    }
    /* checking the password has been typed twice */
    do_action_ref_array('check_passwords', array($user->user_login, &$pass1, &$pass2));
    if ($update) {
        if (empty($pass1) && !empty($pass2)) {
            $errors->add('pass', __('<strong>ERROR</strong>: You entered your new password only once.'), array('form-field' => 'pass1'));
        } elseif (!empty($pass1) && empty($pass2)) {
            $errors->add('pass', __('<strong>ERROR</strong>: You entered your new password only once.'), array('form-field' => 'pass2'));
        }
//.........这里部分代码省略.........
开发者ID:nxtclass,项目名称:NXTClass,代码行数:101,代码来源:user.php


示例15: get_current_screen

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 {
    $theme = stripslashes($theme);
}
if (!isset($themes[$theme])) {
    nxt_die(__('The requested theme does not exist.'));
}
$allowed_files = array_merge($themes[$theme]['Stylesheet Files'], $themes[$theme]['Template Files']);
if (empty($file)) {
    if (false !== array_search($themes[$theme]['Stylesheet Dir'] . '/style.css', $allowed_files)) {
        $file = $themes[$theme]['Stylesheet Dir'] . '/style.css';
    } else {
        $file = $allowed_files[0];
    }
} else {
    $file = stripslashes($file);
    if ('theme' == $dir) {
        $file = dirname(dirname($themes[$theme]['Template Dir'])) . $file;
    } else {
        if ('style' == $dir) {
            $file = dirname(dirname($themes[$theme]['Stylesheet Dir'])) . $file;
开发者ID:nxtclass,项目名称:NXTClass,代码行数:31,代码来源:theme-editor.php


示例16: nxt_die

<?php

/**
 * Edit user network administration panel.
 *
 * @package NXTClass
 * @subpackage Multisite
 * @since 3.1.0
 */
/** Load NXTClass Administration Bootstrap */
require_once './admin.php';
if (!is_multisite()) {
    nxt_die(__('Multisite support is not enabled.'));
}
require '../user-edit.php';
开发者ID:nxtclass,项目名称:NXTClass,代码行数:15,代码来源:user-edit.php


示例17: nxt_die

                nxt_die(__('You do not have permission to access this page.'));
            }
            update_blog_status($id, 'mature', '1');
            nxt_safe_redirect(add_query_arg(array('updated' => 'true', 'action' => 'mature'), nxt_get_referer()));
            exit;
            break;
            // Common
        // Common
        case 'confirm':
            check_admin_referer('confirm');
            if (!headers_sent()) {
                nocache_headers();
                header('Content-Type: text/html; charset=utf-8');
            }
            if ($current_site->blog_id == $id) {
                nxt_die(__('You are not allowed to change the current site.'));
            }
            ?>
			<!DOCTYPE html>
			<html xmlns="http://www.w3.org/1999/xhtml" <?php 
            if (function_exists('language_attributes')) {
                language_attributes();
            }
            ?>
>
				<head>
					<title><?php 
            _e('NXTClass &rsaquo; Confirm your action');
            ?>
</title>
开发者ID:nxtclass,项目名称:NXTClass,代码行数:30,代码来源:sites.php


示例18: nxt_die

<?php

/**
 * Privacy Options Settings Administration Screen.
 *
 * @package NXTClass
 * @subpackage Administration
 */
/** Load NXTClass Administration Bootstrap */
require_once './admin.php';
if (!current_user_can('manage_options')) {
    nxt_die(__('You do not have sufficient permissions to manage options for this site.'));
}
$title = __('Privacy Settings');
$parent_file = 'options-general.php';
get_current_screen()->add_help_tab(array('id' => 'overview', 'title' => __('Overview'), 'content' => '<p>' . __('You can choose whether or not your site will be crawled by robots, ping services, and spiders. If you want those services to ignore your site, click the radio button next to &#8220;Ask search engines not to index this site&#8221; and click the Save Changes button at the bottom of the screen. Note that your privacy is not complete; your site is still visible on the web.') . '</p>' . '<p>' . __('When this setting is in effect a reminder is shown in the Right Now box of the Dashboard that says, &#8220;Search Engines Blocked,&#8221; to remind you that your site is not being crawled.') . '</p>'));
get_current_screen()->set_help_sidebar('<p><strong>' . __('For more information:') . '</strong></p>' . '<p>' . __('<a href="http://codex.nxtclass.org/Settings_Privacy_Screen" target="_blank">Documentation on Privacy Settings</a>') . '</p>' . '<p>' . __('<a href="http://nxtclass.org/support/" target="_blank">Support Forums</a>') . '</p>');
include './admin-header.php';
?>

<div class="wrap">
<?php 
screen_icon();
?>
<h2><?php 
echo esc_html($title);
?>
</h2>

<form method="post" action="options.php">
<?php 
开发者ID:nxtclass,项目名称:NXTClass,代码行数:31,代码来源:options-privacy.php


示例19: nxt_redirect

        nxt_redirect(add_query_arg('deleted', count($bulklinks), admin_url('link-manager.php')));
        exit;
    }
} elseif (!empty($_GET['_nxt_http_referer'])) {
    nxt_redirect(remove_query_arg(array('_nxt_http_referer', '_nxtnonce'), stripslashes($_SERVER['REQUEST_URI'])));
    exit;
}
$nxt_list_table->prepare_items();
$title = __('Links');
$this_file = $parent_file = 'link-manager.php';
get_current_screen()->add_help_tab(array('id' => 'overview', 'title' => __('Overview'), 'content' => '<p>' . sprintf(__('You can add links here to be displayed on your site, usually using <a href="%s">Widgets</a>. By default, links to several sites in the NXTClass community are included as examples.'), 'widgets.php') . '</p>' . '<p>' . __('Links may be separated into Link Categories; these are different than the categories used on your posts.') . '</p>' . '<p>' . __('You can customize the display of this screen using the Screen Options tab and/or the dropdown filters above the links table.') . '</p>'));
get_current_screen()->add_help_tab(array('id' => 'deleting-links', 'title' => __('Deleting Links'), 'content' => '<p>' . __('If you delete a link, it will be removed permanently, as Links do not have a Trash function yet.') . '</p>'));
get_current_screen()->set_help_sidebar('<p><strong>' . __('For more information:') . '</strong></p>' . '<p>' . __('<a href="http://codex.nxtclass.org/Links_Screen" target="_blank">Documentation on Managing Links</a>') . '</p>' . '<p>' . __('<a href="http://nxtclass.org/support/" target="_blank">Support Forums</a>') . '</p>');
include_once './admin-header.php';
if (!current_user_can('manage_links')) {
    nxt_die(__("You do not have sufficient permissions to edit the links for this site."));
}
?>

<div class="wrap nosubsub">
<?php 
screen_icon();
?>
<h2><?php 
echo esc_html($title);
?>
 <a href="link-add.php" class="add-new-h2"><?php 
echo esc_html_x('Add New', 'link');
?>
</a> <?php 
if (!empty($_REQUEST['s'])) {
开发者ID:nxtclass,项目名称:NXTClass,代码行数:31,代码来源:link-manager.php


示例20: define

<?php

/**
 * Import NXTClass Administration Screen
 *
 * @package NXTClass
 * @subpackage Administration
 */
define('nxt_LOAD_IMPORTERS', true);
/** Load NXTClass Bootstrap */
require_once 'admin.php';
if (!current_user_can('import')) {
    nxt_die(__('You do not have sufficient permissions to import content in this site.'));
}
$title = __('Import');
get_current_screen()->add_help_tab(array('id' => 'overview', 'title' => __('Overview'), 'content' => '<p>' . __('This screen lists links to plugins to import data from blogging/content management platforms. Choose the platform you want to import from, and click Install Now when you are prompted in the popup window. If your platform is not listed, click the link to search the plugin directory for other importer plugins to see if there is one for your platform.') . '</p>' . '<p>' . __('In previous versions of NXTClass, all importers were built-in.  They have been turned into plugins since most people only use them once or infrequently.') . '</p>'));
get_current_screen()->set_help_sidebar('<p><strong>' . __('For more information:') . '</strong></p>' . '<p>' . __('<a href="http://codex.nxtclass.org/Tools_Import_Screen" target="_blank">Documentation on Import</a>') . '</p>' . '<p>' . __('<a href="http://nxtclass.org/support/" target="_blank">Support Forums</a>') . '</p>');
$popular_importers = array();
if (current_user_can('install_plugins')) {
    $popular_importers = array('blogger' => array(__('Blogger'), __('Install the Blogger importer to import posts, comments, and users from a Blogger blog.'), 'install'), 'nxtcat2tag' => array(__('Categories and Tags Converter'), __('Install the category/tag converter to convert existing categories to tags or tags to categories, selectively.'), 'install', 'nxt-cat2tag'), 'livejournal' => array(__('LiveJournal'), __('Install the LiveJournal importer to import posts from LiveJournal using their API.'), 'install'), 'movabletype' => array(__('Movable Type and TypePad'), __('Install the Movable Type importer to import posts and comments from a Movable Type or TypePad blog.'), 'install', 'mt'), 'opml' => array(__('Blogroll'), __('Install the blogroll importer to import links in OPML format.'), 'install'), 'rss' => array(__('RSS'), __('Install the RSS importer to import posts from an RSS feed.'), 'install'), 'tumblr' => array(__('Tumblr'), __('Install the Tumblr importer to import posts &amp; media from Tumblr using their API.'), 'install'), 'nxtclass' => array('NXTClass', __('Install the NXTClass importer to import posts, pages, comments, custom fields, categories, and tags from a NXTClass export file.'), 'install'));
}
if (!empty($_GET['invalid']) && !empty($popular_importers[$_GET['invalid']][3])) {
    nxt_redirect(admin_url('import.php?import=' . $popular_importers[$_GET['invalid']][3]));
    exit;
}
add_thickbox();
nxt_enqueue_script('plugin-install');
require_once 'admin-header.php';
$parent_file = 'tools.php';
?>
开发者ID:nxtclass,项目名称:NXTClass,代码行数:30,代码来源:import.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP nxt_enqueue_script函数代码示例发布时间:2022-05-15
下一篇:
PHP nxt_create_nonce函数代码示例发布时间: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