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


PHP __return_false函数代码示例

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


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

示例1: insert_attachment

function insert_attachment($file_handler, $post_id, $setthumb = 'false')
{
    // check to make sure its a successful upload
    if ($_FILES[$file_handler]['error'] !== UPLOAD_ERR_OK) {
        __return_false();
    }
    require_once ABSPATH . "wp-admin" . '/includes/image.php';
    require_once ABSPATH . "wp-admin" . '/includes/file.php';
    require_once ABSPATH . "wp-admin" . '/includes/media.php';
    $attach_id = media_handle_upload($file_handler, $post_id);
    if ($setthumb) {
        update_post_meta($post_id, '_thumbnail_id', $attach_id);
    }
    return $attach_id;
}
开发者ID:freshbrewedweb,项目名称:asgard,代码行数:15,代码来源:functions.php

示例2: core_admin_bar

/**
 * Core admin bar include.
 *
 * @since 6.2.0
 */
function core_admin_bar()
{
    $app = \Liten\Liten::getInstance();
    $filename = APP_PATH . 'views/dashboard/core-admin-bar.php';
    if (!is_readable($filename)) {
        __return_false();
    }
    if (!$app->hook->has_filter('core_admin_bar')) {
        include $filename;
    }
    return $app->hook->apply_filter('core_admin_bar', $filename);
}
开发者ID:parkerj,项目名称:eduTrac-SIS,代码行数:17,代码来源:hook-function.php

示例3: register_all_scripts

 /**
  * Register all admin scripts
  *
  * @since 2.1
  */
 public function register_all_scripts()
 {
     /** Get the extension */
     $ext = apply_filters('easingsliderlite_debug_scripts', __return_false()) ? '.js' : '.min.js';
     /** Register scripts */
     wp_register_script('esl-admin', plugins_url(dirname(plugin_basename(self::get_file())) . DIRECTORY_SEPARATOR . 'js' . DIRECTORY_SEPARATOR . 'admin' . $ext), array('jquery', 'jquery-ui-sortable', 'backbone'), self::$version, true);
     wp_register_script('esl-customizer', plugins_url(dirname(plugin_basename(self::get_file())) . DIRECTORY_SEPARATOR . 'js' . DIRECTORY_SEPARATOR . 'customizer' . $ext), array('jquery', 'backbone'), self::$version);
     wp_register_script('esl-slideshow', plugins_url(dirname(plugin_basename(self::get_file())) . DIRECTORY_SEPARATOR . 'js' . DIRECTORY_SEPARATOR . 'slideshow' . $ext), false, self::$version);
 }
开发者ID:jym23,项目名称:firmdew,代码行数:14,代码来源:easingsliderlite.php

示例4: kv_handle_attachment

function kv_handle_attachment($file_handler, $post_id, $set_thu = false)
{
    // check to make sure its a successful upload
    if ($_FILES[$file_handler]['error'] !== UPLOAD_ERR_OK) {
        __return_false();
    }
    require_once ABSPATH . "wp-admin" . '/includes/image.php';
    require_once ABSPATH . "wp-admin" . '/includes/file.php';
    require_once ABSPATH . "wp-admin" . '/includes/media.php';
    $attach_id = media_handle_upload($file_handler, $post_id);
    // If you want to set a featured image frmo your uploads.
    if ($set_thu) {
        set_post_thumbnail($post_id, $attach_id);
    }
    return $attach_id;
}
开发者ID:iwan14102065,项目名称:yes_wptheme,代码行数:16,代码来源:functions.php

示例5: admin_url

    echo admin_url("admin.php?page=easingsliderlite_edit_slideshow");
    ?>
" style="position: absolute; top: -15px; left: -15px; z-index: 50;">
            <img src="<?php 
    echo plugins_url(dirname(plugin_basename(EasingSliderLite::get_file()))) . DIRECTORY_SEPARATOR . 'images' . DIRECTORY_SEPARATOR . 'edit_icon.png';
    ?>
" style="box-shadow: none; border-radius: none;" />
        </a>
    <?php 
}
?>
</div>

<?php 
/** Display the slideshow shadow */
if (!apply_filters('easingsliderlite_disable_shadow', __return_false())) {
    /** Get the inline styling */
    $styles = $c->shadow->enable ? 'display: block; ' : 'display: none; ';
    $styles .= $s->dimensions->responsive ? "max-width: {$s->dimensions->width}px; " : "width: {$s->dimensions->width}px; ";
    $styles .= $c->border->width !== 0 ? "margin-left: {$c->border->width}px;" : '';
    /** Print the shadow */
    if (!has_action('easingsliderlite_shadow')) {
        echo "<div class='easingsliderlite-shadow' style='{$styles}'>";
        if ($c->shadow->enable) {
            echo "<img src='{$c->shadow->image}' alt='' />";
        }
        echo "</div>";
    } else {
        do_action('easingsliderlite_shadow', $s, $c);
    }
}
开发者ID:jym23,项目名称:firmdew,代码行数:31,代码来源:slideshow.php

示例6: sight

 function sight($file_handler, $post_id, $set_thu = false)
 {
     // check to make sure its a successful upload
     if ($_FILES[$file_handler]['error'] !== UPLOAD_ERR_OK) {
         __return_false();
     }
     require_once ABSPATH . "wp-admin" . '/includes/image.php';
     require_once ABSPATH . "wp-admin" . '/includes/file.php';
     require_once ABSPATH . "wp-admin" . '/includes/media.php';
     $attach_id = media_handle_upload($file_handler, $post_id);
     return $attach_id;
 }
开发者ID:AbleLincoln,项目名称:Avaant_Real-Spaces_wp_theme,代码行数:12,代码来源:imic-theme-functions.php

示例7: insert_avatar_attachment

 public function insert_avatar_attachment($file_avt, $user_id, $avtar_type, $setthumb = 'false')
 {
     global $wpdb;
     // check to make sure its a successful upload
     if ($_FILES[$file_avt]['error'] !== UPLOAD_ERR_OK) {
         __return_false();
     }
     require_once ABSPATH . "wp-admin" . '/includes/image.php';
     require_once ABSPATH . "wp-admin" . '/includes/file.php';
     require_once ABSPATH . "wp-admin" . '/includes/media.php';
     $attach_id = media_handle_upload($file_avt, $user_id);
     $profile_image = $this->get_user_avatar($user_id, $avtar_type);
     if (!empty($profile_image[0]->meta_value)) {
         $del = $this->update_user_new_avtar($user_id, $profile_image[0]->meta_value, $avtar_type);
         if ($del) {
             update_user_meta($user_id, '_thumbnail_id_' . $avtar_type, $attach_id);
         }
     } else {
         $data_usermeta = array('user_id' => $user_id, 'meta_key' => '_thumbnail_id_' . $avtar_type, 'meta_value' => $attach_id);
         $wpdb->insert("{$wpdb->usermeta}", $data_usermeta);
     }
     return $attach_id;
 }
开发者ID:pcuervo,项目名称:mobbily-wordpress,代码行数:23,代码来源:class-mp-form-handler.php

示例8: insert_attachment

function insert_attachment($file_handler, $post_id, $meta_name)
{
    if ($_FILES[$file_handler]['error'] !== UPLOAD_ERR_OK) {
        __return_false();
    }
    require_once ABSPATH . "wp-admin" . '/includes/image.php';
    require_once ABSPATH . "wp-admin" . '/includes/file.php';
    require_once ABSPATH . "wp-admin" . '/includes/media.php';
    $attach_id = media_handle_upload($file_handler, $post_id);
    $attach_url = wp_get_attachment_url($attach_id);
    update_post_meta($post_id, $meta_name, $attach_url);
}
开发者ID:eellak,项目名称:opengov_website,代码行数:12,代码来源:functions.php

示例9: addthis_plugin_options_php4

function addthis_plugin_options_php4()
{
    require_once 'addthis_settings_functions.php';
    global $addthis_styles;
    global $addthis_languages;
    global $addthis_settings;
    global $addthis_menu_types;
    global $addthis_new_styles;
    global $addthis_default_options;
    global $addthis_addjs;
    global $current_user;
    $user_id = $current_user->ID;
    if (get_user_meta($user_id, 'addthis_nag_updated_options')) {
        delete_user_meta($user_id, 'addthis_nag_updated_options', 'true');
    }
    ?>
    <div class="wrap">
    <h2 class='placeholder'>&nbsp;</h2>
    
    <form  id="addthis_settings" method="post" action="options.php">
    <?php 
    // use the old-school settings style in older versions of wordpress
    if (addthis_get_wp_version() >= 2.7 || apply_filters('at_assume_latest', __return_false()) || apply_filters('addthis_assume_latest', __return_false())) {
        settings_fields('addthis');
    } else {
        wp_nonce_field('update-options');
    }
    $addthis_options = get_option('addthis_settings');
    if ($addthis_options == false) {
        add_option('addthis_settings', array());
    }
    foreach (array('addthis_show_stats', 'addthis_append_data', 'addthis_showonhome', 'addthis_showonpages', 'addthis_showonarchives', 'addthis_showoncats') as $option) {
        if ($addthis_options && !isset($addthis_options[$option])) {
            $addthis_options[$option] = false;
        }
    }
    $options = wp_parse_args($addthis_options, $addthis_default_options);
    extract($options);
    ?>

    <p><?php 
    echo $addthis_addjs->getAtPluginPromoText();
    ?>
</p>
    <img alt='addthis' src="//cache.addthis.com/icons/v1/thumbs/32x32/more.png" class="header-img"/>
    <span class="addthis-title">AddThis</span> <span class="addthis-plugin-name">Share</span>
    <div class="page-header" id="tabs">
        <ul class="nav-tab-wrapper">
            <li><h2 class="nav-tab-wrapper"><a href="#tabs-1">Basic</a></h2></li>
            <li><h2 class="nav-tab-wrapper"><a href="#tabs-2">Advanced</a></h2></li>
            <li style="float: right; border: none;padding-right:0px;"> 
            <strong><?php 
    _e("AddThis Profile ID:", 'addthis_trans_domain');
    ?>
</strong>
            <input id="addthis_profile"  type="text" name="addthis_settings[addthis_profile]" value="<?php 
    echo $profile;
    ?>
" autofill='off' autocomplete='off'  />
            <br />
            <span id="addthis-profile-validation-message" style="float: right;color:red;font-size:10px"></span>
                                                <?php 
    if ($credential_validation_status == 1) {
        echo '<span style="float: right;color:green;font-size:10px;">&#10004; Valid AddThis Profile ID</span>';
    }
    ?>
            </li>
        </ul>
        <div class='clear'>&nbsp;</div> 
        
        <div id="tabs-1">
        	<div style="float: left;width: 620px; margin-right: 10px;">
                        <?php 
    echo $version_notification_content = _addthis_version_notification($atversion_update_status, $atversion);
    ?>
                        <input type="hidden" value="<?php 
    echo $atversion;
    ?>
"  name="addthis_settings[atversion]" id="addthis_atversion_hidden" />
                        <input type="hidden" value="<?php 
    echo $atversion_update_status;
    ?>
"  name="addthis_settings[atversion_update_status]" id="addthis_atversion_update_status" />
                        <input type="hidden" value="<?php 
    echo $credential_validation_status;
    ?>
"  name="addthis_settings[credential_validation_status]" id="addthis_credential_validation_status" />
			<table class="form-table">
				<tbody>
				<?php 
    _addthis_choose_icons('above', $options);
    ?>
				<?php 
    _addthis_choose_icons('below', $options);
    ?>
				</tbody>
			</table>
			
			<br/>
			
//.........这里部分代码省略.........
开发者ID:palimadra,项目名称:bubblegraphics-wpsite,代码行数:101,代码来源:addthis_social_widget.php

示例10: do_action

do_action('admin_print_styles');
?>
	<?php 
wp_print_scripts('jquery');
?>
	<script type="text/javascript" src="<?php 
echo get_option('siteurl');
?>
/wp-includes/js/tinymce/tiny_mce_popup.js"></script>
</head>
<body style="min-width:90%!important;width:90%;height:90%">
	<?php 
if (!empty($_POST['bpci-img-send']) && $_FILES["bpci_upload_image"]["name"] && preg_match('!^image/!', $_FILES["bpci_upload_image"]["type"]) && $_FILES["bpci_upload_image"]["size"] <= $max_upload_image) {
    // check to make sure its a successful upload
    if ($_FILES['bpci_upload_image']['error'] !== UPLOAD_ERR_OK) {
        __return_false();
    }
    require_once ABSPATH . "wp-admin" . '/includes/image.php';
    require_once ABSPATH . "wp-admin" . '/includes/file.php';
    require_once ABSPATH . "wp-admin" . '/includes/media.php';
    $attach_id = media_handle_upload('bpci_upload_image', 0);
    $upload_dir = wp_upload_dir();
    $img_data = wp_get_attachment_metadata($attach_id);
    $img_dir_array = explode('/', $img_data["file"]);
    $img_dir = $upload_dir['baseurl'] . '/' . $img_dir_array[0] . '/' . $img_dir_array[1];
    //if too small
    if (!$img_data["sizes"]["thumbnail"]["file"]) {
        $img_preview = $upload_dir['baseurl'] . '/' . $img_data["file"];
    } else {
        $img_preview = $img_dir . '/' . $img_data["sizes"]["thumbnail"]["file"];
    }
开发者ID:socialray,项目名称:surfied-2-0,代码行数:31,代码来源:box.php

示例11: save_form_submissions


//.........这里部分代码省略.........
                     $this->create_custom_fields($created_event_id, $__var_name, $value);
                 }
                 // custom meta field that is a button
                 if ($fn[2] == 'button' && !empty($_POST[$__var_name . 'L'])) {
                     $this->create_custom_fields($created_event_id, $__var_name . 'L', $_POST[$__var_name . 'L']);
                 }
             }
             // end if var not set
             // create new tax term
             if ($fn[2] == 'tax' && !empty($_POST[$__var_name . '_new'])) {
                 $terms = $_POST[$__var_name . '_new'];
                 $terms = explode(',', $terms);
                 foreach ($terms as $term) {
                     $this->set_new_term($term, $__var_name, $created_event_id);
                 }
             }
             // Assign tax terms if activated but NOT visible on the form
             if ($field == 'event_type_2' || $field == 'event_type') {
                 $ab = $field == 'event_type' ? '' : '_2';
                 // append default tax terms if activated in options
                 if (!empty($this->evoau_opt['evoau_set_def_ett' . $ab]) && !empty($this->evoau_opt['evoau_def_ett_v' . $ab]) && $this->evoau_opt['evoau_def_ett_v' . $ab] != '-' && $this->evoau_opt['evoau_set_def_ett' . $ab] == 'yes') {
                     $terms[] = $this->evoau_opt['evoau_def_ett_v' . $ab];
                     wp_set_post_terms($created_event_id, $terms, $field);
                 }
             }
             // image
             if ($field == 'event_image') {
                 // on edit form if image already set
                 if (isset($_POST['event_image_exists']) && $_POST['event_image_exists'] == 'yes') {
                     continue;
                 }
                 if (!empty($_FILES) && 'POST' == $_SERVER['REQUEST_METHOD']) {
                     if ($_FILES[$__var_name]['error'] !== UPLOAD_ERR_OK) {
                         __return_false();
                     }
                     require_once ABSPATH . '/wp-admin/includes/media.php';
                     require_once ABSPATH . '/wp-admin/includes/file.php';
                     require_once ABSPATH . '/wp-admin/includes/image.php';
                     $attachmentId = media_handle_upload($__var_name, $created_event_id);
                     unset($_FILES);
                     set_post_thumbnail($created_event_id, $attachmentId);
                     $this->create_custom_fields($created_event_id, 'ftimg', $attachmentId);
                 }
             }
         }
         // end foreach
         // event color
         $COLOR = !empty($_POST['evcal_event_color']) ? $_POST['evcal_event_color'] : (!empty($this->options['evcal_hexcode']) ? $this->options['evcal_hexcode'] : '206177');
         $this->create_custom_fields($created_event_id, 'evcal_event_color', $COLOR);
         if (isset($_POST['evcal_event_color_n'])) {
             $this->create_custom_fields($created_event_id, 'evcal_event_color_n', $_POST['evcal_event_color_n']);
         }
         // current user
         $current_user = wp_get_current_user();
         // if user is logged in
         if (!empty($current_user)) {
             // get the user email if the user is logged in and has email
             $cu_email = $current_user->user_email;
         }
         // assign author is set to do so
         if ($this->formtype == 'new' && is_user_logged_in() && !empty($this->evoau_opt['evoau_assignu']) && $this->evoau_opt['evoau_assignu'] == 'yes') {
             // if user is logged in
             if (!empty($current_user)) {
                 $user_id = (string) $current_user->ID;
                 wp_set_object_terms($created_event_id, array($user_id), 'event_users');
             }
开发者ID:sabdev1,项目名称:ljcdevsab,代码行数:67,代码来源:class-frontend.php

示例12: show

 /**
  * Prints the tweets
  *
  * @since 1.0
  */
 public function show()
 {
     /** Get the tweets */
     $tweets = $this->get();
     /** Bail if there are no tweets */
     if (!$tweets) {
         if (current_user_can('edit_plugins')) {
             echo '<p style="color: red;">' . __('No tweets found. Please make sure your settings are correct.', 'displaytweets') . '</p>';
         }
         return;
     }
     echo '<div class="as_display_tweet_wrapper">';
     /** Print the tweets */
     foreach ($tweets as $tweet) {
         if (has_action('displaytweets_tweet_template')) {
             /** Execute action that should print the tweet template */
             do_action('displaytweets_tweet_template', $tweet);
         } else {
             /** Set the date and time format */
             $datetime_format = apply_filters('displaytweets_datetime_format', "l M j \\- g:ia");
             /** Get the date and time posted as a nice string */
             $posted_since = apply_filters('displaytweets_posted_since', date_i18n($datetime_format, strtotime($tweet->created_at)));
             /** Filter for linking dates to the tweet itself */
             $link_date = apply_filters('displaytweets_link_date_to_tweet', __return_false());
             if ($link_date) {
                 $posted_since = "<a href=\"https://twitter.com/{$tweet->user->screen_name}/status/{$tweet->id_str}\">{$posted_since}</a>";
             }
             /** Print tweet */
             echo "<div class='as_display_tweet'><span class='dslc-icon dslc-icon-twitter'></span><p>{$this->format_tweet($tweet->text)}<br /><small class=\"muted\">- {$posted_since}</small></p><div class='clearfix'></div></div>";
         }
     }
     echo '</div>';
 }
开发者ID:bibiangel1989,项目名称:vespatour,代码行数:38,代码来源:displaytweets.php

示例13: shoestrap_return_false

/**
 * Alias of __return_false
 */
function shoestrap_return_false()
{
    _shoestrap_deprecated_function(__FUNCTION__, '3.2', '__return_false()');
    return __return_false();
}
开发者ID:MinecraftServernet,项目名称:shoestrap-3,代码行数:8,代码来源:deprecated.php

示例14: settings_init

 /**
  * Initialises The Options Via The Settings API
  *
  * @since 0.1
  */
 public function settings_init()
 {
     /**
      * Add The Settings Sections
      */
     add_settings_section('tb_general_options', __('Post Type / Taxonomy Archive Titles', 'totally-booked'), __return_false(), 'tb_general');
     add_settings_section('tb_rewrite_options', __('Rewrite Options', 'totally-booked'), array($this, 'rewrite_intro_text'), 'tb_advanced');
     add_settings_section('tb_cssjs_options', __('CSS And Javascript Options', 'totally-booked'), __return_false(), 'tb_advanced');
     add_settings_section('tb_archive_options', __('Archive Display Options', 'totally-booked'), __return_false(), 'tb_advanced');
     add_settings_section('tb_popup_options', __('Popup Display Options', 'totally-booked'), __return_false(), 'tb_advanced');
     add_settings_section('tb_theme_compat_options', __('Theme Compatibility Options', 'totally-booked'), array($this, 'theme_compat_intro_text'), 'tb_theme_compat');
     /**
      * Register The Settings
      */
     register_setting('tb_general_options', 'author_archive_title');
     register_setting('tb_general_options', 'genre_archive_title');
     register_setting('tb_general_options', 'series_archive_title');
     register_setting('tb_general_options', 'book_archive_title');
     register_setting('tb_advanced', 'book_archive_slug');
     register_setting('tb_advanced', 'book_author_slug');
     register_setting('tb_advanced', 'book_genre_slug');
     register_setting('tb_advanced', 'book_series_slug');
     register_setting('tb_advanced', 'tb_output_js');
     register_setting('tb_advanced', 'tb_output_css');
     register_setting('tb_advanced', 'tb_archive_posts_per_page');
     register_setting('tb_advanced', 'tb_hide_local_bookstore');
     register_setting('tb_theme_compat', 'tb_wrapper_start');
     register_setting('tb_theme_compat', 'tb_wrapper_end');
     /**
      * General Options
      */
     $args = array('name' => 'author_archive_title', 'description' => __('Enter the title for the author archive, Leave this blank to default to the authors name', 'totally-booked'));
     add_settings_field('author_archive_title', __('Author Archive Title', 'totally-booked'), array($this, 'option_textfield'), 'tb_general', 'tb_general_options', $args);
     $args = array('name' => 'genre_archive_title', 'description' => __('Enter the title for the genre archive, Leave this blank to default to the genre name', 'totally-booked'));
     add_settings_field('genre_archive_title', __('Genre Archive Title', 'totally-booked'), array($this, 'option_textfield'), 'tb_general', 'tb_general_options', $args);
     $args = array('name' => 'series_archive_title', 'description' => __('Enter the title for the series archive, Leave this blank to default series name', 'totally-booked'));
     add_settings_field('series_archive_title', __('Series Archive Title', 'totally-booked'), array($this, 'option_textfield'), 'tb_general', 'tb_general_options', $args);
     $args = array('name' => 'book_archive_title', 'description' => __('Enter the title for the book archive, Leave this blank to default to "Book Archives"', 'totally-booked'));
     add_settings_field('book_archive_title', __('Books Archive Title', 'totally-booked'), array($this, 'option_textfield'), 'tb_general', 'tb_general_options', $args);
     /**
      * Rewrite Options
      */
     $args = array('name' => 'book_archive_slug', 'description' => __('Slug for the books archive page', 'totally-booked'));
     add_settings_field('book_archive_slug', __('Books Archive Slug', 'totally-booked'), array($this, 'option_textfield'), 'tb_advanced', 'tb_rewrite_options', $args);
     $args = array('name' => 'book_author_slug', 'description' => __('Slug for the author archives', 'totally-booked'));
     add_settings_field('book_author_slug', __('Author Archive Slug', 'totally-booked'), array($this, 'option_textfield'), 'tb_advanced', 'tb_rewrite_options', $args);
     $args = array('name' => 'book_genre_slug', 'description' => __('Slug for the genre archive', 'totally-booked'));
     add_settings_field('book_genre_slug', __('Genre Archive Slug', 'totally-booked'), array($this, 'option_textfield'), 'tb_advanced', 'tb_rewrite_options', $args);
     $args = array('name' => 'book_series_slug', 'description' => __('Slug for the series archives', 'totally-booked'));
     add_settings_field('book_series_slug', __('Series Archive Slug', 'totally-booked'), array($this, 'option_textfield'), 'tb_advanced', 'tb_rewrite_options', $args);
     /**
      * CSS / JS Options
      */
     $args = array('name' => 'tb_output_js', 'description' => __('Uncheck this option to disable javascript output (Not recommended unless you know what you are doing)', 'totally-booked'));
     add_settings_field('tb_output_js', __('Output Javascript', 'totally-booked'), array($this, 'option_checkbox'), 'tb_advanced', 'tb_cssjs_options', $args);
     $args = array('name' => 'tb_output_css', 'description' => __('Uncheck this option to disable CSS output (Not recommended unless you know what you are doing)', 'totally-booked'));
     add_settings_field('tb_output_css', __('Output CSS', 'totally-booked'), array($this, 'option_checkbox'), 'tb_advanced', 'tb_cssjs_options', $args);
     /**
      * Archive Settings
      */
     $args = array('name' => 'tb_archive_posts_per_page', 'description' => __('Please enter the maximum number of posts to display per page on the Totally Booked archive pages. Leave this blank to revert to the WordPress default.', 'totally-booked'));
     add_settings_field('tb_archive_posts_per_page', __('Archive Maximum Posts', 'totally-booked'), array($this, 'option_textfield'), 'tb_advanced', 'tb_archive_options', $args);
     /**
      * Popup Display Settings
      */
     $args = array('name' => 'tb_hide_local_bookstore', 'description' => __('Check this to remove the local bookstore finder from the Buy Now popup.', 'totally-booked'));
     add_settings_field('tb_hide_local_bookstore', __('Hide the local bookstore finder in the popup?', 'totally-booked'), array($this, 'option_checkbox'), 'tb_advanced', 'tb_popup_options', $args);
     /**
      * Theme Compat Options
      */
     $args = array('name' => 'tb_wrapper_start', 'description' => __('Enter the HTML snippet to output before the start of the Totally Booked content.', 'totally-booked'));
     add_settings_field('tb_wrapper_start', __('Wrapper Start HTML', 'totally-booked'), array($this, 'option_textarea'), 'tb_theme_compat', 'tb_theme_compat_options', $args);
     $args = array('name' => 'tb_wrapper_end', 'description' => __('Enter the HTML snippet to output after the Totally Booked content.', 'totally-booked'));
     add_settings_field('tb_wrapper_end', __('Wrapper End HTML', 'totally-booked'), array($this, 'option_textarea'), 'tb_theme_compat', 'tb_theme_compat_options', $args);
 }
开发者ID:tigerstrikemedia,项目名称:totally-booked,代码行数:80,代码来源:admin.php

示例15: insert_attachment

 /**
  * Add attachment to media library
  *
  * @param   int $postId
  * @param   string $fileHandler
  *
  * @return  void
  *
  * @since  1.0
  * @author Lorenzo giuffrida
  */
 public function insert_attachment($fileHandler, $postId)
 {
     if ($_FILES[$fileHandler]['error'] !== UPLOAD_ERR_OK) {
         __return_false();
     }
     require_once ABSPATH . "wp-admin" . '/includes/image.php';
     require_once ABSPATH . "wp-admin" . '/includes/file.php';
     require_once ABSPATH . "wp-admin" . '/includes/media.php';
     return media_handle_upload($fileHandler, $postId);
 }
开发者ID:allyeastman,项目名称:studio-sapphire,代码行数:21,代码来源:class.yith-woocommerce-advanced-reviews.php


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