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

PHP get_user_setting函数代码示例

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

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



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

示例1: fb_enqueue_wp_pointer

function fb_enqueue_wp_pointer($hook_suffix)
{
    // Don't run on WP < 3.3
    if (get_bloginfo('version') < '3.3') {
        return;
    }
    //Define Variables
    $screen = get_current_screen();
    $screen_id = $screen->id;
    $enqueue = FALSE;
    $admin_bar = get_user_setting('hndtst_email_pointer', 0);
    // check settings on user
    // check if admin bar is active and default filter for wp pointer is true
    if (!$admin_bar && apply_filters('show_wp_pointer_admin_bar', TRUE) && $screen_id == 'testimonial') {
        $enqueue = TRUE;
        add_action('admin_print_footer_scripts', 'hntst_email_pointer_content');
    }
    // in true, include the scripts
    if ($enqueue) {
        wp_enqueue_style('wp-pointer');
        wp_enqueue_script('wp-pointer');
        wp_enqueue_script('utils');
        // for user settings
    }
}
开发者ID:vicpril,项目名称:rep_bidqa,代码行数:25,代码来源:emailpointer.php


示例2: print_welcome_block

function print_welcome_block($block = true, $config = "", $side, $index)
{
    global $pgv_lang, $PGV_IMAGE_DIR, $PGV_IMAGES;
    $id = "user_welcome";
    $title = $pgv_lang["welcome"] . " " . getUserFullName(PGV_USER_ID);
    $content = "<table class=\"blockcontent\" cellspacing=\"0\" cellpadding=\"0\" style=\" width: 100%; direction:ltr;\"><tr>";
    $content .= "<td class=\"tab_active_bottom\" colspan=\"3\" ></td></tr><tr>";
    if (get_user_setting(PGV_USER_ID, 'editaccount') == 'Y') {
        $content .= "<td class=\"center details2\" style=\" width: 33%; clear: none; vertical-align: top; margin-top: 2px;\"><a href=\"edituser.php\"><img src=\"" . $PGV_IMAGE_DIR . "/" . $PGV_IMAGES["mygedview"]["small"] . "\" border=\"0\" alt=\"" . $pgv_lang["myuserdata"] . "\" title=\"" . $pgv_lang["myuserdata"] . "\" /><br />" . $pgv_lang["myuserdata"] . "</a></td>";
    }
    if (PGV_USER_GEDCOM_ID) {
        $content .= "<td class=\"center details2\" style=\" width: 34%; clear: none; vertical-align: top; margin-top: 2px;\"><a href=\"" . encode_url("pedigree.php?rootid=" . PGV_USER_GEDCOM_ID) . "\"><img src=\"" . $PGV_IMAGE_DIR . "/" . $PGV_IMAGES["pedigree"]["small"] . "\" border=\"0\" alt=\"" . $pgv_lang["my_pedigree"] . "\" title=\"" . $pgv_lang["my_pedigree"] . "\" /><br />" . $pgv_lang["my_pedigree"] . "</a></td>";
        $content .= "<td class=\"center details2\" style=\" width: 33%; clear: none; vertical-align: top; margin-top: 2px;\"><a href=\"" . encode_url("individual.php?pid=" . PGV_USER_GEDCOM_ID) . "\"><img src=\"" . $PGV_IMAGE_DIR . "/" . $PGV_IMAGES["indis"]["small"] . "\" border=\"0\" alt=\"" . $pgv_lang["my_indi"] . "\" title=\"" . $pgv_lang["my_indi"] . "\" /><br />" . $pgv_lang["my_indi"] . "</a></td>";
    }
    $content .= "</tr><tr><td class=\"center\" colspan=\"3\">";
    $content .= print_help_link("mygedview_customize_help", "qm", "", false, true);
    $content .= "<a href=\"javascript:;\" onclick=\"window.open('" . encode_url("index_edit.php?name=" . PGV_USER_NAME . "&ctype=user") . "', '_blank', 'top=50,left=10,width=600,height=350,scrollbars=1,resizable=1');\">" . $pgv_lang["customize_page"] . "</a>";
    $content .= "<br />" . format_timestamp(client_time());
    $content .= "</td>";
    $content .= "</tr></table>";
    global $THEME_DIR;
    if ($block) {
        require $THEME_DIR . 'templates/block_small_temp.php';
    } else {
        require $THEME_DIR . 'templates/block_main_temp.php';
    }
}
开发者ID:rathervague,项目名称:phpgedview,代码行数:27,代码来源:user_welcome.php


示例3: test_set_user_setting_strip_asterisks

 function test_set_user_setting_strip_asterisks()
 {
     $foo = get_user_setting('foo');
     $this->assertEmpty($foo);
     $this->set_user_setting('foo', 'foo*bar*baz');
     $this->assertEquals('foobarbaz', get_user_setting('foo'));
 }
开发者ID:boonebgorges,项目名称:develop.wordpress,代码行数:7,代码来源:userSettings.php


示例4: get_height

 /**
  * Get the editor size
  *
  * @return int
  */
 protected static function get_height()
 {
     $cookie = (int) get_user_setting('ed_size');
     // Upgrade an old TinyMCE cookie if it is still around, and the new one isn't.
     if (!$cookie && isset($_COOKIE['TinyMCE_content_size'])) {
         parse_str($_COOKIE['TinyMCE_content_size'], $cookie);
         $cookie = $cookie['ch'];
     }
     return $cookie;
 }
开发者ID:rmccue,项目名称:RotorMD,代码行数:15,代码来源:rotormd.php


示例5: bizz_admin_body_class

function bizz_admin_body_class()
{
    $admin_body_class = '';
    if (get_user_setting('bfold') == 'f') {
        $admin_body_class .= ' bfolded';
    }
    if (!get_user_setting('bunfold')) {
        $admin_body_class .= ' auto-bfold';
    }
    return isset($_REQUEST['tab']) ? $admin_body_class : '';
}
开发者ID:loevendahl,项目名称:flexbil,代码行数:11,代码来源:frame_layout.php


示例6: prepare_items

 /**
  *
  * @global string $usersearch
  * @global string $role
  * @global wpdb   $wpdb
  * @global string $mode
  */
 public function prepare_items()
 {
     global $usersearch, $role, $wpdb, $mode;
     $usersearch = isset($_REQUEST['s']) ? wp_unslash(trim($_REQUEST['s'])) : '';
     $users_per_page = $this->get_items_per_page('users_network_per_page');
     $role = isset($_REQUEST['role']) ? $_REQUEST['role'] : '';
     $paged = $this->get_pagenum();
     $args = array('number' => $users_per_page, 'offset' => ($paged - 1) * $users_per_page, 'search' => $usersearch, 'blog_id' => 0, 'fields' => 'all_with_meta');
     if (wp_is_large_network('users')) {
         $args['search'] = ltrim($args['search'], '*');
     } else {
         if ('' !== $args['search']) {
             $args['search'] = trim($args['search'], '*');
             $args['search'] = '*' . $args['search'] . '*';
         }
     }
     if ($role === 'super') {
         $logins = implode("', '", get_super_admins());
         $args['include'] = $wpdb->get_col("SELECT ID FROM {$wpdb->users} WHERE user_login IN ('{$logins}')");
     }
     /*
      * If the network is large and a search is not being performed,
      * show only the latest users with no paging in order to avoid
      * expensive count queries.
      */
     if (!$usersearch && wp_is_large_network('users')) {
         if (!isset($_REQUEST['orderby'])) {
             $_GET['orderby'] = $_REQUEST['orderby'] = 'id';
         }
         if (!isset($_REQUEST['order'])) {
             $_GET['order'] = $_REQUEST['order'] = 'DESC';
         }
         $args['count_total'] = false;
     }
     if (isset($_REQUEST['orderby'])) {
         $args['orderby'] = $_REQUEST['orderby'];
     }
     if (isset($_REQUEST['order'])) {
         $args['order'] = $_REQUEST['order'];
     }
     if (!empty($_REQUEST['mode'])) {
         $mode = $_REQUEST['mode'] === 'excerpt' ? 'excerpt' : 'list';
         set_user_setting('network_users_list_mode', $mode);
     } else {
         $mode = get_user_setting('network_users_list_mode', 'list');
     }
     /** This filter is documented in wp-admin/includes/class-wp-users-list-table.php */
     $args = apply_filters('users_list_table_query_args', $args);
     // Query the user IDs for this page
     $wp_user_search = new WP_User_Query($args);
     $this->items = $wp_user_search->get_results();
     $this->set_pagination_args(array('total_items' => $wp_user_search->get_total(), 'per_page' => $users_per_page));
 }
开发者ID:idies,项目名称:escience-2016-wp,代码行数:60,代码来源:class-wp-ms-users-list-table.php


示例7: add_admin_bar_menu_entry

 function add_admin_bar_menu_entry(&$wp_admin_bar)
 {
     $wp_admin_bar->add_menu(array('id' => 'builder', 'title' => 'Builder', 'href' => admin_url('admin.php?page=ithemes-builder-theme')));
     if (!empty($this->_layout_id)) {
         $wp_admin_bar->add_menu(array('parent' => 'builder', 'id' => 'builder_edit_layout', 'title' => sprintf(__('Edit Layout (%s)', 'it-l10n-Builder-Cohen'), $this->_layout_description), 'href' => admin_url('admin.php?page=layout-editor&editor_tab=layouts&layout=' . $this->_layout_id)));
         if ('on' != get_user_setting('widgets_access')) {
             $wp_admin_bar->add_menu(array('parent' => 'builder', 'id' => 'builder_edit_widgets', 'title' => __('Manage Widgets for this Layout', 'it-l10n-Builder-Cohen'), 'href' => admin_url('widgets.php?builder_layout_id=' . $this->_layout_id)));
         }
     }
     $wp_admin_bar->add_menu(array('parent' => 'builder', 'id' => 'builder_edit_settings', 'title' => __('Modify Builder Settings', 'it-l10n-Builder-Cohen'), 'href' => admin_url('admin.php?page=theme-settings')));
     do_action_ref_array('builder_add_admin_bar_menu_entries', array(&$wp_admin_bar));
 }
开发者ID:jimrucinski,项目名称:Vine,代码行数:12,代码来源:class-builder-admin-bar.php


示例8: media_upload_gallery_form

 function media_upload_gallery_form($errors)
 {
     global $redir_tab, $type;
     $redir_tab = 'gallery';
     media_upload_header();
     $post_id = intval($_REQUEST['post_id']);
     $form_action_url = admin_url("media-upload.php?type={$type}&tab=gallery&post_id={$post_id}");
     $form_action_url = apply_filters('media_upload_form_url', $form_action_url, $type);
     $form_class = 'media-upload-form validate';
     if (get_user_setting('uploader')) {
         $form_class .= ' html-uploader';
     }
     require_once dirname(__FILE__) . '/view/gallery_form.php';
 }
开发者ID:par-orillonsoft,项目名称:creationOfSociety,代码行数:14,代码来源:init.php


示例9: __construct

    /**
     * Private, since it is a singleton.
     * We directly initialize sidebar options when class is created.
     */
    private function __construct()
    {
        /**
         * ID of the WP-Pointer used to introduce the plugin upon activation
         *
         * ========== Pointer ==========
         *  Internal ID:  wpmudcs1 [WPMUDev CustomSidebars 1]
         *  Point at:     #menu-appearance (Appearance menu item)
         *  Title:        Custom Sidebars
         *  Description:  Create and edit custom sidebars in your widget screen!
         * -------------------------------------------------------------------------
         */
        WDev()->pointer('wpmudcs1', '#menu-appearance', __('Custom Sidebars', CSB_LANG), sprintf(__('Now you can create and edit custom sidebars in your ' . '<a href="%1$s">Widgets screen</a>!', CSB_LANG), admin_url('widgets.php')));
        // Find out if the page is loaded in accessibility mode.
        $flag = isset($_GET['widgets-access']) ? $_GET['widgets-access'] : get_user_setting('widgets_access');
        self::$accessibility_mode = 'on' == $flag;
        // We don't support accessibility mode. Display a note to the user.
        if (true === self::$accessibility_mode) {
            WDev()->message(sprintf(__('<strong>Accessibility mode is not supported by the
						%1$s plugin.</strong><br /><a href="%2$s">Click here</a>
						to disable accessibility mode and use the %1$s plugin!', CSB_LANG), 'Custom Sidebars', admin_url('widgets.php?widgets-access=off')), 'err', 'widgets');
        } else {
            // Load javascripts/css files
            WDev()->add_ui('core', 'widgets.php');
            WDev()->add_ui('scrollbar', 'widgets.php');
            WDev()->add_ui('select', 'widgets.php');
            WDev()->add_ui(CSB_JS_URL . 'cs.min.js', 'widgets.php');
            WDev()->add_ui(CSB_CSS_URL . 'cs.css', 'widgets.php');
            // AJAX actions
            add_action('wp_ajax_cs-ajax', array($this, 'ajax_handler'));
            // Extensions use this hook to initialize themselfs.
            do_action('cs_init');
            // Display a message after import.
            if (!empty($_GET['cs-msg'])) {
                $msg = base64_decode($_GET['cs-msg']);
                // Prevent XSS attacks...
                $kses_args = array('br' => array(), 'b' => array(), 'strong' => array(), 'i' => array(), 'em' => array());
                $msg = wp_kses($msg, $kses_args);
                if (!empty($msg)) {
                    WDev()->message($msg);
                }
            }
            // Free version only
            add_action('in_widget_form', array($this, 'in_widget_form'), 10, 1);
        }
    }
开发者ID:SayenkoDesign,项目名称:gogo-racing.com,代码行数:50,代码来源:class-custom-sidebars.php


示例10: begin_xml

 /**
  * Creates the root elements for the GRAMPS XML file.
  *
  * The methods adds all the root elements and appends them to a DOMDocument.
  */
 function begin_xml()
 {
     global $pgv_lang, $factarray;
     //, $eventsArray, $dom, $ePeople, $this->eFams, $eSources, $ePlaces, $eObject;
     $user = PGV_USER_NAME;
     $this->dom = new DomDocument("1.0", "UTF-8");
     $this->dom->formatOutput = true;
     $eRoot = $this->dom->createElementNS("http://gramps-project.org/xml/1.1.0/", "database");
     $eRoot = $this->dom->appendChild($eRoot);
     $eHeader = $this->dom->createElement("header");
     $eHeader = $eRoot->appendChild($eHeader);
     $eCreated = $this->dom->createElement("created");
     $eCreated = $eHeader->appendChild($eCreated);
     $eCreated->setAttribute("date", date("Y-m-d"));
     $eCreated->setAttribute("version", "1.1.2.6");
     $eResearcher = $this->dom->createElement("researcher");
     $eResname = $this->dom->createElement("resname");
     $etResname = $this->dom->createTextNode(getUserFullName($user));
     $etResname = $eResname->appendChild($etResname);
     $eResname = $eResearcher->appendChild($eResname);
     $eResemail = $this->dom->createElement("resemail");
     $etResemail = $this->dom->createTextNode(get_user_setting($user, 'email'));
     $etResemail = $eResemail->appendChild($etResemail);
     $eResemail = $eResearcher->appendChild($eResemail);
     $eResearcher = $eHeader->appendChild($eResearcher);
     $this->eEvents = $this->dom->createElement("events");
     $this->eEvents = $eRoot->appendChild($this->eEvents);
     $this->ePeople = $this->dom->createElement("people");
     $this->ePeople = $eRoot->appendChild($this->ePeople);
     $this->eFams = $this->dom->createElement("families");
     $this->eFams = $eRoot->appendChild($this->eFams);
     $this->eSources = $this->dom->createElement("sources");
     $this->eSources = $eRoot->appendChild($this->eSources);
     $this->ePlaces = $this->dom->createElement("places");
     $this->ePlaces = $eRoot->appendChild($this->ePlaces);
     $this->eObject = $this->dom->createElement("objects");
     $this->eObject = $eRoot->appendChild($this->eObject);
 }
开发者ID:bitweaver,项目名称:phpgedview,代码行数:43,代码来源:class_grampsexport.php


示例11: prepare_items

 /**
  *
  * @global array    $avail_post_stati
  * @global WP_Query $wp_query
  * @global int      $per_page
  * @global string   $mode
  */
 public function prepare_items()
 {
     global $avail_post_stati, $wp_query, $per_page, $mode;
     // is going to call wp()
     $avail_post_stati = wp_edit_posts_query();
     $this->set_hierarchical_display(is_post_type_hierarchical($this->screen->post_type) && 'menu_order title' === $wp_query->query['orderby']);
     $post_type = $this->screen->post_type;
     $per_page = $this->get_items_per_page('edit_' . $post_type . '_per_page');
     /** This filter is documented in wp-admin/includes/post.php */
     $per_page = apply_filters('edit_posts_per_page', $per_page, $post_type);
     if ($this->hierarchical_display) {
         $total_items = $wp_query->post_count;
     } elseif ($wp_query->found_posts || $this->get_pagenum() === 1) {
         $total_items = $wp_query->found_posts;
     } else {
         $post_counts = (array) wp_count_posts($post_type, 'readable');
         if (isset($_REQUEST['post_status']) && in_array($_REQUEST['post_status'], $avail_post_stati)) {
             $total_items = $post_counts[$_REQUEST['post_status']];
         } elseif (isset($_REQUEST['show_sticky']) && $_REQUEST['show_sticky']) {
             $total_items = $this->sticky_posts_count;
         } elseif (isset($_GET['author']) && $_GET['author'] == get_current_user_id()) {
             $total_items = $this->user_posts_count;
         } else {
             $total_items = array_sum($post_counts);
             // Subtract post types that are not included in the admin all list.
             foreach (get_post_stati(array('show_in_admin_all_list' => false)) as $state) {
                 $total_items -= $post_counts[$state];
             }
         }
     }
     if (!empty($_REQUEST['mode'])) {
         $mode = $_REQUEST['mode'] === 'excerpt' ? 'excerpt' : 'list';
         set_user_setting('posts_list_mode', $mode);
     } else {
         $mode = get_user_setting('posts_list_mode', 'list');
     }
     $this->is_trash = isset($_REQUEST['post_status']) && $_REQUEST['post_status'] === 'trash';
     $this->set_pagination_args(array('total_items' => $total_items, 'per_page' => $per_page));
 }
开发者ID:dd32,项目名称:wordpress.develop,代码行数:46,代码来源:class-wp-posts-list-table.php


示例12: dirname

<?php

/**
 * Widgets administration panel.
 *
 * @package WordPress
 * @subpackage Administration
 */
/** WordPress Administration Bootstrap */
require_once dirname(__FILE__) . '/admin.php';
/** WordPress Administration Widgets API */
require_once ABSPATH . 'wp-admin/includes/widgets.php';
if (!current_user_can('edit_theme_options')) {
    wp_die(__('Cheatin&#8217; uh?'), 403);
}
$widgets_access = get_user_setting('widgets_access');
if (isset($_GET['widgets-access'])) {
    $widgets_access = 'on' == $_GET['widgets-access'] ? 'on' : 'off';
    set_user_setting('widgets_access', $widgets_access);
}
function wp_widgets_access_body_class($classes)
{
    return "{$classes} widgets_access ";
}
if ('on' == $widgets_access) {
    add_filter('admin_body_class', 'wp_widgets_access_body_class');
} else {
    wp_enqueue_script('admin-widgets');
    if (wp_is_mobile()) {
        wp_enqueue_script('jquery-touch-punch');
    }
开发者ID:luskyj89,项目名称:mt-wordpress,代码行数:31,代码来源:widgets.php


示例13: prepare_items

 /**
  *
  * @global array    $avail_post_stati
  * @global WP_Query $wp_query
  * @global int      $per_page
  * @global string   $mode
  */
 public function prepare_items()
 {
     global $avail_post_stati, $wp_query, $per_page, $mode;
     $avail_post_stati = wp_edit_posts_query();
     $this->set_hierarchical_display(is_post_type_hierarchical($this->screen->post_type) && 'menu_order title' == $wp_query->query['orderby']);
     $total_items = $this->hierarchical_display ? $wp_query->post_count : $wp_query->found_posts;
     $post_type = $this->screen->post_type;
     $per_page = $this->get_items_per_page('edit_' . $post_type . '_per_page');
     /** This filter is documented in wp-admin/includes/post.php */
     $per_page = apply_filters('edit_posts_per_page', $per_page, $post_type);
     if ($this->hierarchical_display) {
         $total_pages = ceil($total_items / $per_page);
     } else {
         $total_pages = $wp_query->max_num_pages;
     }
     if (!empty($_REQUEST['mode'])) {
         $mode = $_REQUEST['mode'] == 'excerpt' ? 'excerpt' : 'list';
         set_user_setting('posts_list_mode', $mode);
     } else {
         $mode = get_user_setting('posts_list_mode', 'list');
     }
     $this->is_trash = isset($_REQUEST['post_status']) && $_REQUEST['post_status'] == 'trash';
     $this->set_pagination_args(array('total_items' => $total_items, 'total_pages' => $total_pages, 'per_page' => $per_page));
 }
开发者ID:rlgod,项目名称:WordPress,代码行数:31,代码来源:class-wp-posts-list-table.php


示例14: sizesInForm

 /**
  * Add the custom sizes to the image sizes in article edition
  * 
  * @access public
  * @param array $form_fields
  * @param object $post
  * @return void
  * @author Nicolas Juen
  * @author Additional Image Sizes (zui)
  */
 public function sizesInForm($form_fields, $post)
 {
     // Protect from being view in Media editor where there are no sizes
     if (isset($form_fields['image-size'])) {
         $out = NULL;
         $size_names = array();
         $sizes_custom = get_option(SIS_OPTION);
         if (is_array($sizes_custom)) {
             foreach ($sizes_custom as $key => $value) {
                 if (isset($value['s']) && $value['s'] == 1) {
                     $size_names[$key] = $this->_getThumbnailName($key);
                 }
             }
         }
         foreach ($size_names as $size => $label) {
             $downsize = image_downsize($post->ID, $size);
             // is this size selectable?
             $enabled = $downsize[3] || 'full' == $size;
             $css_id = "image-size-{$size}-{$post->ID}";
             // We must do a clumsy search of the existing html to determine is something has been checked yet
             if (FALSE === strpos('checked="checked"', $form_fields['image-size']['html'])) {
                 if (empty($check)) {
                     $check = get_user_setting('imgsize');
                 }
                 // See if they checked a custom size last time
                 $checked = '';
                 // if this size is the default but that's not available, don't select it
                 if ($size == $check || str_replace(" ", "", $size) == $check) {
                     if ($enabled) {
                         $checked = " checked='checked'";
                     } else {
                         $check = '';
                     }
                 } elseif (!$check && $enabled && 'thumbnail' != $size) {
                     // if $check is not enabled, default to the first available size that's bigger than a thumbnail
                     $check = $size;
                     $checked = " checked='checked'";
                 }
             }
             $html = "<div class='image-size-item' style='min-height: 50px; margin-top: 18px;'><input type='radio' " . disabled($enabled, false, false) . "name='attachments[{$post->ID}][image-size]' id='{$css_id}' value='{$size}'{$checked} />";
             $html .= "<label for='{$css_id}'>{$label}</label>";
             // only show the dimensions if that choice is available
             if ($enabled) {
                 $html .= " <label for='{$css_id}' class='help'>" . sprintf("(%d&nbsp;&times;&nbsp;%d)", $downsize[1], $downsize[2]) . "</label>";
             }
             $html .= '</div>';
             $out .= $html;
         }
         $form_fields['image-size']['html'] .= $out;
     }
     // End protect from Media editor
     return $form_fields;
 }
开发者ID:sriram911,项目名称:pls,代码行数:63,代码来源:class.admin.php


示例15: media_upload_max_image_resize

/**
 * Displays the checkbox to scale images.
 *
 * @since 3.3.0
 */
function media_upload_max_image_resize()
{
    $checked = get_user_setting('upload_resize') ? ' checked="true"' : '';
    $a = $end = '';
    if (current_user_can('manage_options')) {
        $a = '<a href="' . esc_url(admin_url('options-media.php')) . '" target="_blank">';
        $end = '</a>';
    }
    ?>
<p class="hide-if-no-js"><label>
<input name="image_resize" type="checkbox" id="image_resize" value="true"<?php 
    echo $checked;
    ?>
 />
<?php 
    /* translators: %1$s is link start tag, %2$s is link end tag, %3$d is width, %4$d is height*/
    printf(__('Scale images to match the large size selected in %1$simage options%2$s (%3$d &times; %4$d).'), $a, $end, (int) get_option('large_size_w', '1024'), (int) get_option('large_size_h', '1024'));
    ?>
</label></p>
<?php 
}
开发者ID:HaraShun,项目名称:WordPress,代码行数:26,代码来源:media.php


示例16: default_password_nag_handler

function default_password_nag_handler($errors = false)
{
    global $user_ID;
    if (!get_user_option('default_password_nag')) {
        //Short circuit it.
        return;
    }
    //get_user_setting = JS saved UI setting. else no-js-falback code.
    if ('hide' == get_user_setting('default_password_nag') || isset($_GET['default_password_nag']) && '0' == $_GET['default_password_nag']) {
        delete_user_setting('default_password_nag');
        update_user_option($user_ID, 'default_password_nag', false, true);
    }
}
开发者ID:laiello,项目名称:cartonbank,代码行数:13,代码来源:user.php


示例17: wp_default_editor

/**
 * Find out which editor should be displayed by default.
 *
 * Works out which of the two editors to display as the current editor for a
 * user. The 'html' setting is for the "Text" editor tab.
 *
 * @since 2.5.0
 *
 * @return string Either 'tinymce', or 'html', or 'test'
 */
function wp_default_editor()
{
    $r = user_can_richedit() ? 'tinymce' : 'html';
    // defaults
    if (wp_get_current_user()) {
        // look for cookie
        $ed = get_user_setting('editor', 'tinymce');
        $r = in_array($ed, array('tinymce', 'html', 'test')) ? $ed : $r;
    }
    /**
     * Filter which editor should be displayed by default.
     *
     * @since 2.5.0
     *
     * @param array $r An array of editors. Accepts 'tinymce', 'html', 'test'.
     */
    return apply_filters('wp_default_editor', $r);
}
开发者ID:jenoya,项目名称:final,代码行数:28,代码来源:general-template.php


示例18: show_screen_options

 public function show_screen_options()
 {
     global $wp_meta_boxes;
     if (is_bool($this->_show_screen_options)) {
         return $this->_show_screen_options;
     }
     $columns = get_column_headers($this);
     $show_screen = !empty($wp_meta_boxes[$this->id]) || $columns || $this->get_option('per_page');
     switch ($this->base) {
         case 'widgets':
             $this->_screen_settings = '<p><a id="access-on" href="widgets.php?widgets-access=on">' . __('Enable accessibility mode') . '</a><a id="access-off" href="widgets.php?widgets-access=off">' . __('Disable accessibility mode') . "</a></p>\n";
             break;
         case 'post':
             $expand = '<div class="editor-expand hidden"><label for="editor-expand-toggle">';
             $expand .= '<input type="checkbox" id="editor-expand-toggle"' . checked(get_user_setting('editor_expand', 'on'), 'on', false) . ' />';
             $expand .= __('Enable full-height editor and distraction-free functionality.') . '</label></div>';
             $this->_screen_settings = $expand;
             break;
         default:
             $this->_screen_settings = '';
             break;
     }
     /**
      * Filter the screen settings text displayed in the Screen Options tab.
      *
      * This filter is currently only used on the Widgets screen to enable
      * accessibility mode.
      *
      * @since 3.0.0
      *
      * @param string    $screen_settings Screen settings.
      * @param WP_Screen $this            WP_Screen object.
      */
     $this->_screen_settings = apply_filters('screen_settings', $this->_screen_settings, $this);
     if ($this->_screen_settings || $this->_options) {
         $show_screen = true;
     }
     /**
      * Filter whether to show the Screen Options tab.
      *
      * @since 3.2.0
      *
      * @param bool      $show_screen Whether to show Screen Options tab.
      *                               Default true.
      * @param WP_Screen $this        Current WP_Screen instance.
      */
     $this->_show_screen_options = apply_filters('screen_options_show_screen', $show_screen, $this);
     return $this->_show_screen_options;
 }
开发者ID:sb-xs,项目名称:que-pour-elle,代码行数:49,代码来源:screen.php


示例19: show_advanced_items

 /**
  * show_advanced_itesm function.
  * 
  * @access private
  * @return boolean
  */
 private function show_advanced_items()
 {
     $response = false;
     $setting = get_user_setting('beansidebarsshowadvanced', '0');
     if ($setting == '1') {
         $response = true;
     }
     return $response;
 }
开发者ID:kaitlynhova,项目名称:kaitlynhova-wp-adventures,代码行数:15,代码来源:bean-admin-class.beanconditions.php


示例20: wp_enqueue_script

global $post_type, $post_type_object, $post;
wp_enqueue_script('post');
$_wp_editor_expand = $_content_editor_dfw = false;
/**
 * Filters whether to enable the 'expand' functionality in the post editor.
 *
 * @since 4.0.0
 * @since 4.1.0 Added the `$post_type` parameter.
 *
 * @param bool   $expand    Whether to enable the 'expand' functionality. Default true.
 * @param string $post_type Post type.
 */
if (post_type_supports($post_type, 'editor') && !wp_is_mobile() && !($is_IE && preg_match('/MSIE [5678]/', $_SERVER['HTTP_USER_AGENT'])) && apply_filters('wp_editor_expand', true, $post_type)) {
    wp_enqueue_script('editor-expand');
    $_content_editor_dfw = true;
    $_wp_editor_expand = get_user_setting('editor_expand', 'on') === 'on';
}
if (wp_is_mobile()) {
    wp_enqueue_script('jquery-touch-punch');
}
/**
 * Post ID global
 * @name $post_ID
 * @var int
 */
$post_ID = isset($post_ID) ? (int) $post_ID : 0;
$user_ID = isset($user_ID) ? (int) $user_ID : 0;
$action = isset($action) ? $action : '';
if ($post_ID == get_option('page_for_posts') && empty($post->post_content)) {
    add_action('edit_form_after_title', '_wp_posts_page_notice');
    remove_post_type_support($post_type, 'editor');
开发者ID:atimmer,项目名称:wordpress-develop-mirror,代码行数:31,代码来源:edit-form-advanced.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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