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

PHP get_space_allowed函数代码示例

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

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



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

示例1: test_get_space_allowed_filtered

 public function test_get_space_allowed_filtered()
 {
     update_option('blog_upload_space', 777);
     update_site_option('blog_upload_space', 888);
     add_filter('get_space_allowed', array($this, '_filter_space_allowed'));
     $space_allowed = get_space_allowed();
     remove_filter('get_space_allowed', array($this, '_filter_space_allowed'));
     $this->assertEquals(999, $space_allowed);
 }
开发者ID:boonebgorges,项目名称:develop.wordpress,代码行数:9,代码来源:getSpaceAllowed.php


示例2: setup_column

 /**
  * Output our custom quota column content.
  *
  * @param string $column_name The registered column name that the list table is currently on.
  * @param int $user_id The blog ID associated with the current blog row.
  */
 public function setup_column($column_name, $blog_id)
 {
     if ($this->column_name !== $column_name) {
         return;
     }
     switch_to_blog($blog_id);
     // You might recognize this from wp_dashboard_quota().
     $quota = get_space_allowed();
     $used = get_space_used();
     if ($used > $quota) {
         $percentused = '100';
     } else {
         $percentused = $used / $quota * 100;
     }
     $text = sprintf(__('%1$s MB / %2$s MB (%3$s%%)'), number_format_i18n(round($used, 2), 2), number_format_i18n($quota, 2), number_format($percentused));
     printf('<a href="%1$s" title="%2$s" class="musublink">%3$s</a>', esc_url(admin_url('upload.php')), __('Manage Uploads'), $text);
     restore_current_blog();
 }
开发者ID:hwdsbcommons,项目名称:wp-ms-disk-quota-column,代码行数:24,代码来源:wp-ms-site-quota.php


示例3: builder_import_file_ajaxify

    /**
     * Builder Import Lightbox
     * @return html
     */
    function builder_import_file_ajaxify()
    {
        check_ajax_referer('tfb_load_nonce', 'nonce');
        $output = '<div class="lightbox_inner themify-builder-import-file-inner">';
        $output .= sprintf('<h3>%s</h3>', __('Select a file to import', 'themify'));
        if (is_multisite() && !is_upload_space_available()) {
            $output .= sprintf(__('<p>Sorry, you have filled your %s MB storage quota so uploading has been disabled.</p>', 'themify'), get_space_allowed());
        } else {
            $output .= sprintf('<p><div class="themify-builder-plupload-upload-uic hide-if-no-js tf-upload-btn" id="%sthemify-builder-plupload-upload-ui">
										<input id="%sthemify-builder-plupload-browse-button" type="button" value="%s" class="builder_button" />
										<span class="ajaxnonceplu" id="ajaxnonceplu%s"></span>
								</div></p>', 'themify_builder_import_file', 'themify_builder_import_file', __('Upload', 'themify'), wp_create_nonce('themify_builder_import_filethemify-builder-plupload'));
            $max_upload_size = (int) wp_max_upload_size() / (1024 * 1024);
            $output .= sprintf(__('<p>Maximum upload file size: %d MB.</p>', 'themify'), $max_upload_size);
        }
        $output .= '</div>';
        echo $output;
        die;
    }
开发者ID:byronmisiva,项目名称:mrkpln-dev,代码行数:23,代码来源:class-themify-builder-import-export.php


示例4: getQuota

 function getQuota()
 {
     if (function_exists(get_space_allowed)) {
         $quota = get_space_allowed();
     } else {
         $quota = get_site_option("blog_upload_space");
     }
     return $quota;
 }
开发者ID:pravinhirmukhe,项目名称:flow1,代码行数:9,代码来源:overview.php


示例5: display_space_usage

function display_space_usage() {
	$space = get_space_allowed();
	$used = get_dirsize( BLOGUPLOADDIR ) / 1024 / 1024;

	$percentused = ( $used / $space ) * 100;

	if ( $space > 1000 ) {
		$space = number_format( $space / 1024 );
		/* translators: Gigabytes */
		$space .= __( 'GB' );
	} else {
		/* translators: Megabytes */
		$space .= __( 'MB' );
	}
	?>
	<strong><?php printf( __( 'Used: %1s%% of %2s' ), number_format( $percentused ), $space ); ?></strong>
	<?php
}
开发者ID:staylor,项目名称:develop.svn.wordpress.org,代码行数:18,代码来源:ms.php


示例6: wp_dashboard_quota

/**
 * Display file upload quota on dashboard.
 *
 * Runs on the activity_box_end hook in wp_dashboard_right_now().
 *
 * @since 3.0.0
 *
 * @return bool|null True if not multisite, user can't upload files, or the space check option is disabled.
*/
function wp_dashboard_quota()
{
    if (!is_multisite() || !current_user_can('upload_files') || get_network_option('upload_space_check_disabled')) {
        return true;
    }
    $quota = get_space_allowed();
    $used = get_space_used();
    if ($used > $quota) {
        $percentused = '100';
    } else {
        $percentused = $used / $quota * 100;
    }
    $used_class = $percentused >= 70 ? ' warning' : '';
    $used = round($used, 2);
    $percentused = number_format($percentused);
    ?>
	<h4 class="mu-storage"><?php 
    _e('Storage Space');
    ?>
</h4>
	<div class="mu-storage">
	<ul>
		<li class="storage-count">
			<?php 
    $text = sprintf(__('%s MB Space Allowed'), number_format_i18n($quota));
    printf('<a href="%1$s" title="%2$s">%3$s</a>', esc_url(admin_url('upload.php')), __('Manage Uploads'), $text);
    ?>
		</li><li class="storage-count <?php 
    echo $used_class;
    ?>
">
			<?php 
    $text = sprintf(__('%1$s MB (%2$s%%) Space Used'), number_format_i18n($used, 2), $percentused);
    printf('<a href="%1$s" title="%2$s" class="musublink">%3$s</a>', esc_url(admin_url('upload.php')), __('Manage Uploads'), $text);
    ?>
		</li>
	</ul>
	</div>
	<?php 
}
开发者ID:riasnelli,项目名称:WordPress,代码行数:49,代码来源:dashboard.php


示例7: get_upload_space_available

/**
 * Determines if there is any upload space left in the current blog's quota.
 *
 * @since 3.0.0
 *
 * @return int of upload space available in bytes
 */
function get_upload_space_available()
{
    $allowed = get_space_allowed();
    if ($allowed < 0) {
        $allowed = 0;
    }
    $space_allowed = $allowed * 1024 * 1024;
    if (get_site_option('upload_space_check_disabled')) {
        return $space_allowed;
    }
    $space_used = get_space_used() * 1024 * 1024;
    if ($space_allowed - $space_used <= 0) {
        return 0;
    }
    return $space_allowed - $space_used;
}
开发者ID:Jitsufreak,项目名称:PJ,代码行数:23,代码来源:ms-functions.php


示例8: test_upload_is_user_over_quota

	/**
	 * @ticket 18119
	 */
	function test_upload_is_user_over_quota() {
		$default_space_allowed = 100;
		$echo = false;

		$this->assertFalse( upload_is_user_over_quota( $echo ) );
		$this->assertTrue( is_upload_space_available() );

		update_site_option('upload_space_check_disabled', true);
		$this->assertFalse( upload_is_user_over_quota( $echo ) );
		$this->assertTrue( is_upload_space_available() );

		update_site_option( 'blog_upload_space', 0 );
		$this->assertFalse( upload_is_user_over_quota( $echo ) );
		$this->assertEquals( $default_space_allowed, get_space_allowed() );
		$this->assertTrue( is_upload_space_available() );

		update_site_option('upload_space_check_disabled', false);
		$this->assertFalse( upload_is_user_over_quota( $echo ) );
		$this->assertTrue( is_upload_space_available() );

		if ( defined( 'BLOGSUPLOADDIR' ) && ! file_exists( BLOGSUPLOADDIR ) )
			$this->markTestSkipped( 'This test is broken when blogs.dir does not exist. ');

		/*
		This is broken when blogs.dir does not exist, as get_upload_space_available()
		simply returns the value of blog_upload_space (converted to bytes), which would
		be negative but still not false. When blogs.dir does exist, < 0 is returned as 0.
		*/

		update_site_option( 'blog_upload_space', -1 );
		$this->assertTrue( upload_is_user_over_quota( $echo ) );
		$this->assertEquals( -1, get_space_allowed() );
		$this->assertFalse( is_upload_space_available() );

		update_option( 'blog_upload_space', 0 );
		$this->assertFalse( upload_is_user_over_quota( $echo ) );
		$this->assertEquals( $default_space_allowed, get_space_allowed() );
		$this->assertTrue( is_upload_space_available() );

		update_option( 'blog_upload_space', -1 );
		$this->assertTrue( upload_is_user_over_quota( $echo ) );
		$this->assertEquals( -1, get_space_allowed() );
		$this->assertFalse( is_upload_space_available() );
	}
开发者ID:staylor,项目名称:develop.svn.wordpress.org,代码行数:47,代码来源:ms.php


示例9: media_upload_form

/**
 * {@internal Missing Short Description}}
 *
 * @since 2.5.0
 *
 * @param unknown_type $errors
 */
function media_upload_form($errors = null)
{
    global $type, $tab, $pagenow, $is_IE, $is_opera, $is_iphone;
    if ($is_iphone) {
        return;
    }
    $upload_action_url = admin_url('async-upload.php');
    $post_id = isset($_REQUEST['post_id']) ? intval($_REQUEST['post_id']) : 0;
    $_type = isset($type) ? $type : '';
    $_tab = isset($tab) ? $tab : '';
    $upload_size_unit = $max_upload_size = nxt_max_upload_size();
    $sizes = array('KB', 'MB', 'GB');
    for ($u = -1; $upload_size_unit > 1024 && $u < count($sizes) - 1; $u++) {
        $upload_size_unit /= 1024;
    }
    if ($u < 0) {
        $upload_size_unit = 0;
        $u = 0;
    } else {
        $upload_size_unit = (int) $upload_size_unit;
    }
    ?>

<div id="media-upload-notice"><?php 
    if (isset($errors['upload_notice'])) {
        echo $errors['upload_notice'];
    }
    ?>
</div>
<div id="media-upload-error"><?php 
    if (isset($errors['upload_error']) && is_nxt_error($errors['upload_error'])) {
        echo $errors['upload_error']->get_error_message();
    }
    ?>
</div>
<?php 
    // Check quota for this blog if multisite
    if (is_multisite() && !is_upload_space_available()) {
        echo '<p>' . sprintf(__('Sorry, you have filled your storage quota (%s MB).'), get_space_allowed()) . '</p>';
        return;
    }
    do_action('pre-upload-ui');
    $post_params = array("post_id" => $post_id, "_nxtnonce" => nxt_create_nonce('media-form'), "type" => $_type, "tab" => $_tab, "short" => "1");
    $post_params = apply_filters('upload_post_params', $post_params);
    // hook change! old name: 'swfupload_post_params'
    $plupload_init = array('runtimes' => 'html5,silverlight,flash,html4', 'browse_button' => 'plupload-browse-button', 'container' => 'plupload-upload-ui', 'drop_element' => 'drag-drop-area', 'file_data_name' => 'async-upload', 'multiple_queues' => true, 'max_file_size' => $max_upload_size . 'b', 'url' => $upload_action_url, 'flash_swf_url' => includes_url('js/plupload/plupload.flash.swf'), 'silverlight_xap_url' => includes_url('js/plupload/plupload.silverlight.xap'), 'filters' => array(array('title' => __('Allowed Files'), 'extensions' => '*')), 'multipart' => true, 'urlstream_upload' => true, 'multipart_params' => $post_params);
    $plupload_init = apply_filters('plupload_init', $plupload_init);
    ?>

<script type="text/javascript">
<?php 
    // Verify size is an int. If not return default value.
    $large_size_h = absint(get_option('large_size_h'));
    if (!$large_size_h) {
        $large_size_h = 1024;
    }
    $large_size_w = absint(get_option('large_size_w'));
    if (!$large_size_w) {
        $large_size_w = 1024;
    }
    ?>
var resize_height = <?php 
    echo $large_size_h;
    ?>
, resize_width = <?php 
    echo $large_size_w;
    ?>
,
nxtUploaderInit = <?php 
    echo json_encode($plupload_init);
    ?>
;
</script>

<div id="plupload-upload-ui" class="hide-if-no-js">
<?php 
    do_action('pre-plupload-upload-ui');
    // hook change, old name: 'pre-flash-upload-ui'
    ?>
<div id="drag-drop-area">
	<div class="drag-drop-inside">
	<p class="drag-drop-info"><?php 
    _e('Drop files here');
    ?>
</p>
	<p><?php 
    _ex('or', 'Uploader: Drop files here - or - Select Files');
    ?>
</p>
	<p class="drag-drop-buttons"><input id="plupload-browse-button" type="button" value="<?php 
    esc_attr_e('Select Files');
    ?>
" class="button" /></p>
//.........这里部分代码省略.........
开发者ID:nxtclass,项目名称:NXTClass,代码行数:101,代码来源:media.php


示例10: test_get_space_allowed_negative_site_option

	function test_get_space_allowed_negative_site_option() {
		update_option( 'blog_upload_space', false );
		update_site_option( 'blog_upload_space', -1 );
		$this->assertEquals( -1, get_space_allowed() );
	}
开发者ID:staylor,项目名称:develop.svn.wordpress.org,代码行数:5,代码来源:site.php


示例11: s2sfu_media_upload_form

/**
 * Modified From media_upload_form in WordPress 3.2.1 Core
 *
 * {@internal Missing Short Description}}
 *
 * @since 2.5.0
 *
 * @return unknown
 */
function s2sfu_media_upload_form($errors)
{
    global $type, $tab, $pagenow;
    $post_id = isset($_REQUEST['post_id']) ? intval($_REQUEST['post_id']) : 0;
    $upload_size_unit = $max_upload_size = wp_max_upload_size();
    $sizes = array('KB', 'MB', 'GB');
    for ($u = -1; $upload_size_unit > 1024 && $u < count($sizes) - 1; $u++) {
        $upload_size_unit /= 1024;
    }
    if ($u < 0) {
        $upload_size_unit = 0;
        $u = 0;
    } else {
        $upload_size_unit = (int) $upload_size_unit;
    }
    ?>

<div id="media-upload-notice">
<?php 
    if (isset($errors['upload_notice'])) {
        ?>
	<?php 
        echo $errors['upload_notice'];
    }
    ?>
</div>
<div id="media-upload-error">
<?php 
    if (isset($errors['upload_error']) && is_wp_error($errors['upload_error'])) {
        ?>
	<?php 
        echo $errors['upload_error']->get_error_message();
    }
    ?>
</div>
<?php 
    // Check quota for this blog if multisite
    if (is_multisite() && !is_upload_space_available()) {
        echo '<p>' . sprintf(__('Sorry, you have filled your storage quota (%s MB).'), get_space_allowed()) . '</p>';
        return;
    }
    do_action('pre-upload-ui');
    ?>

<div id="html-upload-ui" <?php 
    if ($flash) {
        echo 'class="hide-if-js"';
    }
    ?>
>
<?php 
    do_action('pre-html-upload-ui');
    ?>
	<p id="async-upload-wrap">
		<label class="screen-reader-text" for="async-upload"><?php 
    _e('Upload');
    ?>
</label>
		<input type="file" name="async-upload" id="async-upload" />
		<?php 
    submit_button(__('Insert into Post'), 'button', 'html-upload', false);
    ?>
		<a href="#" onclick="try{top.tb_remove();}catch(e){}; return false;"><?php 
    _e('Cancel');
    ?>
</a>
	</p>
	<div class="clear"></div>
	<p class="media-upload-size"><?php 
    printf(__('Maximum upload file size: %d%s'), $upload_size_unit, $sizes[$u]);
    ?>
</p>
	<?php 
    if (is_lighttpd_before_150()) {
        ?>
	<p><?php 
        _e('If you want to use all capabilities of the uploader, like uploading multiple files at once, please update to lighttpd 1.5.');
        ?>
</p>
	<?php 
    }
    do_action('post-html-upload-ui', $flash);
    ?>
</div>
<?php 
    do_action('post-upload-ui');
}
开发者ID:hiryu85,项目名称:s2member-secure-file-uploader,代码行数:96,代码来源:s2member-secure-file-uploader.php


示例12: fix_import_form_size

function fix_import_form_size($size)
{
    if (upload_is_user_over_quota(false) == true) {
        return 0;
    }
    $spaceAllowed = 1024 * 1024 * get_space_allowed();
    $dirName = constant("ABSPATH") . constant("UPLOADS");
    $dirsize = get_dirsize($dirName);
    if ($size > $spaceAllowed - $dirsize) {
        return $spaceAllowed - $dirsize;
        // remaining space
    } else {
        return $size;
        // default
    }
}
开发者ID:alx,项目名称:blogsfera,代码行数:16,代码来源:wpmu-functions.php


示例13: dashboard_quota

function dashboard_quota() {
	if ( get_site_option( 'upload_space_check_disabled' ) )
		return true;

	$quota = get_space_allowed();
	$used = get_dirsize( BLOGUPLOADDIR ) / 1024 / 1024;

	if ( $used > $quota )
		$percentused = '100';
	else
		$percentused = ( $used / $quota ) * 100;
	$used_color = ( $percentused < 70 ) ? ( ( $percentused >= 40 ) ? 'waiting' : 'approved' ) : 'spam';
	$used = round( $used, 2 );
	$percentused = number_format( $percentused );

	?>
	<p class="sub musub"><?php _e( 'Storage Space' ); ?></p>
	<div class="table table_content musubtable">
	<table>
		<tr class="first">
			<td class="first b b-posts"><?php printf( __( '<a href="%1$s" title="Manage Uploads" class="musublink">%2$sMB</a>' ), esc_url( admin_url( 'upload.php' ) ), $quota ); ?></td>
			<td class="t posts"><?php _e( 'Space Allowed' ); ?></td>
		</tr>
	</table>
	</div>
	<div class="table table_discussion musubtable">
	<table>
		<tr class="first">
			<td class="b b-comments"><?php printf( __( '<a href="%1$s" title="Manage Uploads" class="musublink">%2$sMB (%3$s%%)</a>' ), esc_url( admin_url( 'upload.php' ) ), $used, $percentused ); ?></td>
			<td class="last t comments <?php echo $used_color;?>"><?php _e( 'Space Used' );?></td>
		</tr>
	</table>
	</div>
	<br class="clear" />
	<?php
}
开发者ID:realfluid,项目名称:umbaugh,代码行数:36,代码来源:ms.php


示例14: get_upload_space_available

/**
 * Determines if there is any upload space left in the current blog's quota.
 *
 * @since 3.0.0
 *
 * @return int of upload space available in bytes
 */
function get_upload_space_available() {
	$space_allowed = get_space_allowed() * 1024 * 1024;
	if ( get_site_option( 'upload_space_check_disabled' ) )
		return $space_allowed;

	$space_used = get_space_used() * 1024 * 1024;

	if ( ( $space_allowed - $space_used ) <= 0 )
		return 0;

	return $space_allowed - $space_used;
}
开发者ID:nasrulhazim,项目名称:WordPress,代码行数:19,代码来源:ms-functions.php


示例15: add_quota_to_library

    public function add_quota_to_library()
    {
        global $psts;
        $quota = get_space_allowed();
        $used = get_space_used();
        if ($used > $quota) {
            $percentused = '100';
        } else {
            $percentused = $used / $quota * 100;
        }
        $used_class = $percentused >= 70 ? 'class="warning"' : '';
        $used = round($used, 2);
        $percentused = number_format($percentused);
        $text = sprintf(__('%1$s MB (%2$s%%) of %3$s MB used.', 'psts'), number_format_i18n($used, 2), $percentused, number_format_i18n($quota, 2));
        ?>

		<div id="prosites-media-quota-display" style="display:none;" <?php 
        echo $used_class;
        ?>
><div class="size-text"><?php 
        echo $text;
        ?>
 </div><?php 
        echo $this->message(false, 'media-upload');
        ?>
</div><?php 
        global $psts;
        wp_enqueue_style('psts-quota-style', $psts->plugin_url . 'css/quota.css', $psts->version);
        wp_enqueue_script('psts-quota', $psts->plugin_url . 'js/quota.js', array('jquery'), $psts->version);
    }
开发者ID:vilmark,项目名称:vilmark_main,代码行数:30,代码来源:quota.php


示例16: themify_has_quota

/**
 * Check if user has available space in multisite installations
 * @param String $allowed Content to show if there is space available
 * @param Boolean $echo Flag establishing if content must be echoed or returned
 * @return String
 * @since 1.1.5 
 */
function themify_has_quota($allowed, $echo = false, $custom = '')
{
    if (is_multisite() && !is_upload_space_available()) {
        if ('' != $custom) {
            $message = $custom;
        } else {
            $message = '<small>' . sprintf(__('Sorry, you have filled your %s MB storage quota so uploading has been disabled.', 'themify'), get_space_allowed()) . '</small>';
        }
    } else {
        $message = $allowed;
    }
    if ($echo) {
        echo wp_kses_post($message);
    }
    return $message;
}
开发者ID:tchataigner,项目名称:palette,代码行数:23,代码来源:themify-utils.php


示例17: display_space_usage

/**
 * Displays the amount of disk space used by the current site. Not used in core.
 *
 * @since MU
 */
function display_space_usage()
{
    $space_allowed = get_space_allowed();
    $space_used = get_space_used();
    $percent_used = $space_used / $space_allowed * 100;
    if ($space_allowed > 1000) {
        $space = number_format($space_allowed / KB_IN_BYTES);
        /* translators: Gigabytes */
        $space .= __('GB');
    } else {
        $space = number_format($space_allowed);
        /* translators: Megabytes */
        $space .= __('MB');
    }
    ?>
	<strong><?php 
    printf(__('Used: %1$s%% of %2$s'), number_format($percent_used), $space);
    ?>
</strong>
	<?php 
}
开发者ID:atimmer,项目名称:wordpress-develop-mirror,代码行数:26,代码来源:ms.php


示例18: _e

	
	<?php 
$this->render_catablog_admin_message();
?>
	
	<p>
		<?php 
_e("CataBlog can't make a new entry because your site has run out of storage space.", 'catablog');
?>
	</p>
	<p>
		<?php 
$current_usage = round(get_dirsize(BLOGUPLOADDIR) / 1024 / 1024, 2);
?>
		<?php 
sprintf(_e('You are currently using %sMB of %sMB of storage space.', 'catablog'), $current_usage, get_space_allowed());
?>
	</p>
	<p>
		<?php 
_e('Please talk to your WordPress Administrator to have more space allocated to your site or delete some previous uploaded content.', 'catablog');
?>
	</p>
	<ul>
		<li><strong><?php 
_e('Go To:', 'catablog');
?>
</strong></li>
		<li><a href="index.php"><?php 
_e('Dashboard', 'catablog');
?>
开发者ID:ricasiano,项目名称:mca-site,代码行数:30,代码来源:admin-discfull.php


示例19: network_site_upload_space

 /**
  * File upload psace left per site in MB.
  *  -1 means NO LIMIT.
  * @return number
  */
 static function network_site_upload_space($option = null)
 {
     // value in MB
     return get_site_option('upload_space_check_disabled') ? -1 : get_space_allowed();
 }
开发者ID:jordankoschei,项目名称:jordankoschei-dot-com,代码行数:10,代码来源:class.jetpack.php


示例20: themify_builder_styling_field

    /**
     * Module Styling Fields
     * @param array $styling 
     * @return string
     */
    function themify_builder_styling_field($styling)
    {
        switch ($styling['type']) {
            case 'text':
                ?>
				<input id="<?php 
                echo esc_attr($styling['id']);
                ?>
" name="<?php 
                echo esc_attr($styling['id']);
                ?>
" type="text" value="" class="<?php 
                echo esc_attr($styling['class']);
                ?>
 tfb_lb_option">
				<?php 
                if (isset($styling['description'])) {
                    echo '<small>' . wp_kses_post($styling['description']) . '</small>';
                }
                ?>
				<?php 
                break;
            case 'textarea':
                ?>
				<textarea id="<?php 
                echo esc_attr($styling['id']);
                ?>
" name="<?php 
                echo esc_attr($styling['id']);
                ?>
" class="<?php 
                echo esc_attr($styling['class']);
                ?>
 tfb_lb_option"><?php 
                if (isset($styling['value'])) {
                    echo esc_textarea($styling['value']);
                }
                ?>
</textarea>
				<?php 
                if (isset($styling['description'])) {
                    echo '<small>' . wp_kses_post($styling['description']) . '</small>';
                }
                ?>
				<?php 
                break;
            case 'separator':
                echo isset($styling['meta']['html']) && '' != $styling['meta']['html'] ? $styling['meta']['html'] : '<hr class="meta_fields_separator" />';
                break;
            case 'image':
                ?>
				<input id="<?php 
                echo esc_attr($styling['id']);
                ?>
" name="<?php 
                echo esc_attr($styling['id']);
                ?>
" placeholder="<?php 
                if (isset($styling['value'])) {
                    echo esc_attr($styling['value']);
                }
                ?>
" class="<?php 
                echo esc_attr($styling['class']);
                ?>
 themify-builder-uploader-input tfb_lb_option" type="text" /><br />
								
				<div class="small">

					<?php 
                if (is_multisite() && !is_upload_space_available()) {
                    ?>
						<?php 
                    echo sprintf(__('Sorry, you have filled your %s MB storage quota so uploading has been disabled.', 'themify'), get_space_allowed());
                    ?>
					<?php 
                } else {
                    ?>
					<div class="themify-builder-plupload-upload-uic hide-if-no-js tf-upload-btn" id="<?php 
                    echo esc_attr($styling['id']);
                    ?>
themify-builder-plupload-upload-ui">
							<input id="<?php 
                    echo esc_attr($styling['id']);
                    ?>
themify-builder-plupload-browse-button" type="button" value="<?php 
                    esc_attr_e(__('Upload', 'themify'));
                    ?>
" class="builder_button" />
							<span class="ajaxnonceplu" id="ajaxnonceplu<?php 
                    echo wp_create_nonce($styling['id'] . 'themify-builder-plupload');
                    ?>
"></span>
					</div> <?php 
                    _e('or', 'themify');
//.........这里部分代码省略.........
开发者ID:rgrasiano,项目名称:viabasica-hering,代码行数:101,代码来源:themify-builder-options.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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