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


PHP is_lighttpd_before_150函数代码示例

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


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

示例1: media_upload_form


//.........这里部分代码省略.........
        echo wp_create_nonce('media-form');
        ?>
",
				"type" : "<?php 
        echo $type;
        ?>
",
				"tab" : "<?php 
        echo $tab;
        ?>
",
				"short" : "1"
			},
			file_size_limit : "<?php 
        echo wp_max_upload_size();
        ?>
b",
			file_dialog_start_handler : fileDialogStart,
			file_queued_handler : fileQueued,
			upload_start_handler : uploadStart,
			upload_progress_handler : uploadProgress,
			upload_error_handler : uploadError,
			upload_success_handler : uploadSuccess,
			upload_complete_handler : uploadComplete,
			file_queue_error_handler : fileQueueError,
			file_dialog_complete_handler : fileDialogComplete,
			swfupload_pre_load_handler: swfuploadPreLoad,
			swfupload_load_failed_handler: swfuploadLoadFailed,
			custom_settings : {
				degraded_element_id : "html-upload-ui", // id of the element displayed when swfupload is unavailable
				swfupload_element_id : "flash-upload-ui" // id of the element displayed when swfupload is available
			},
			debug: false
		};
		swfu = new SWFUpload(settings);
};
//]]>
</script>

<div id="flash-upload-ui">
<?php 
        do_action('pre-flash-upload-ui');
        ?>

	<div>
	<?php 
        _e('Choose files to upload');
        ?>
	<div id="flash-browse-button"></div>
	<span><input id="cancel-upload" disabled="disabled" onClick="cancelUpload()" type="button" value="<?php 
        esc_attr_e('Cancel Upload');
        ?>
" class="button" /></span>
	</div>
<?php 
        do_action('post-flash-upload-ui');
        ?>
	<p class="howto"><?php 
        _e('After a file has been uploaded, you can add titles and descriptions.');
        ?>
</p>
</div>
<?php 
    }
    // $flash
    ?>

<div id="html-upload-ui">
<?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" /> <input type="submit" class="button" name="html-upload" value="<?php 
    esc_attr_e('Upload');
    ?>
" /> <a href="#" onClick="return top.tb_remove();"><?php 
    _e('Cancel');
    ?>
</a>
	</p>
	<div class="clear"></div>
	<?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 upgrade to lighttpd 1.5.');
        ?>
</p>
	<?php 
    }
    do_action('post-html-upload-ui', $flash);
    ?>
</div>
<?php 
    do_action('post-upload-ui');
}
开发者ID:Alenjandro,项目名称:data-my-share,代码行数:101,代码来源:media.php

示例2: media_upload_form


//.........这里部分代码省略.........
			flash_url : "<?php 
        echo get_option('siteurl') . '/wp-includes/js/swfupload/swfupload_f9.swf';
        ?>
",
			file_post_name: "async-upload",
			file_types: "<?php 
        echo apply_filters('upload_file_glob', '*.*');
        ?>
",
			post_params : {
				"post_id" : "<?php 
        echo $post_id;
        ?>
",
				"auth_cookie" : "<?php 
        echo $_COOKIE[AUTH_COOKIE];
        ?>
",
				"_wpnonce" : "<?php 
        echo wp_create_nonce('media-form');
        ?>
",
				"type" : "<?php 
        echo $type;
        ?>
",
				"tab" : "<?php 
        echo $tab;
        ?>
",
				"short" : "1"
			},
			file_size_limit : "<?php 
        echo wp_max_upload_size();
        ?>
b",
			swfupload_element_id : "flash-upload-ui", // id of the element displayed when swfupload is available
			degraded_element_id : "html-upload-ui",   // when swfupload is unavailable
			file_dialog_start_handler : fileDialogStart,
			file_queued_handler : fileQueued,
			upload_start_handler : uploadStart,
			upload_progress_handler : uploadProgress,
			upload_error_handler : uploadError,
			upload_success_handler : uploadSuccess,
			upload_complete_handler : uploadComplete,
			file_queue_error_handler : fileQueueError,
			file_dialog_complete_handler : fileDialogComplete,

			debug: false
		});
	$("#flash-browse-button").bind( "click", function(){swfu.selectFiles();});
});
//-->
</script>


<div id="flash-upload-ui">
	<p><input id="flash-browse-button" type="button" value="<?php 
        echo attribute_escape(__('Choose files to upload'));
        ?>
" class="button" /></p>
	<p><?php 
        _e('After a file has been uploaded, you can add titles and descriptions.');
        ?>
</p>
</div>

<?php 
    }
    // $flash
    ?>

<div id="html-upload-ui">
	<p>
	<input type="file" name="async-upload" id="async-upload" /> <input type="submit" class="button" name="html-upload" value="<?php 
    echo attribute_escape(__('Upload'));
    ?>
" /> <a href="#" onClick="return top.tb_remove();"><?php 
    _e('Cancel');
    ?>
</a>
	</p>
	<input type="hidden" name="post_id" id="post_id" value="<?php 
    echo (int) $post_id;
    ?>
" />
	<br class="clear" />
	<?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 upgrade to lighttpd 1.5.');
        ?>
</p>
	<?php 
    }
    ?>
</div>
<?php 
}
开发者ID:staylor,项目名称:develop.svn.wordpress.org,代码行数:101,代码来源:media.php

示例3: media_upload_form


//.........这里部分代码省略.........
//]]>
</script>
<div id="media-upload-notice">
<?php if (isset($errors['upload_notice']) ) { ?>
	<?php echo $errors['upload_notice']; ?>
<?php } ?>
</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(); ?>
<?php } ?>
</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');

if ( $flash ) : ?>
<script type="text/javascript">
//<![CDATA[
var swfu;
SWFUpload.onload = function() {
	var settings = {
			button_text: '<span class="button"><?php _e('Select Files'); ?><\/span>',
			button_text_style: '.button { text-align: center; font-weight: bold; font-family:"Lucida Grande",Verdana,Arial,"Bitstream Vera Sans",sans-serif; font-size: 11px; text-shadow: 0 1px 0 #FFFFFF; color:#464646; }',
			button_height: "23",
			button_width: "132",
			button_text_top_padding: 3,
			button_image_url: '<?php echo includes_url('images/upload.png?ver=20100531'); ?>',
			button_placeholder_id: "flash-browse-button",
			upload_url : "<?php echo esc_attr( $flash_action_url ); ?>",
			flash_url : "<?php echo includes_url('js/swfupload/swfupload.swf'); ?>",
			file_post_name: "async-upload",
			file_types: "<?php echo apply_filters('upload_file_glob', '*.*'); ?>",
			post_params : {
				"post_id" : "<?php echo $post_id; ?>",
				"auth_cookie" : "<?php echo (is_ssl() ? $_COOKIE[SECURE_AUTH_COOKIE] : $_COOKIE[AUTH_COOKIE]); ?>",
				"logged_in_cookie": "<?php echo $_COOKIE[LOGGED_IN_COOKIE]; ?>",
				"_wpnonce" : "<?php echo wp_create_nonce('media-form'); ?>",
				"type" : "<?php echo $type; ?>",
				"tab" : "<?php echo $tab; ?>",
				"short" : "1"
			},
			file_size_limit : "<?php echo $max_upload_size; ?>b",
			file_dialog_start_handler : fileDialogStart,
			file_queued_handler : fileQueued,
			upload_start_handler : uploadStart,
			upload_progress_handler : uploadProgress,
			upload_error_handler : uploadError,
			upload_success_handler : uploadSuccess,
			upload_complete_handler : uploadComplete,
			file_queue_error_handler : fileQueueError,
			file_dialog_complete_handler : fileDialogComplete,
			swfupload_pre_load_handler: swfuploadPreLoad,
			swfupload_load_failed_handler: swfuploadLoadFailed,
			custom_settings : {
				degraded_element_id : "html-upload-ui", // id of the element displayed when swfupload is unavailable
				swfupload_element_id : "flash-upload-ui" // id of the element displayed when swfupload is available
			},
			debug: false
		};
		swfu = new SWFUpload(settings);
};
//]]>
</script>

<div id="flash-upload-ui" class="hide-if-no-js">
<?php do_action('pre-flash-upload-ui'); ?>

	<div>
	<?php _e( 'Choose files to upload' ); ?>
	<div id="flash-browse-button"></div>
	<span><input id="cancel-upload" disabled="disabled" onclick="cancelUpload()" type="button" value="<?php esc_attr_e('Cancel Upload'); ?>" class="button" /></span>
	</div>
	<p class="media-upload-size"><?php printf( __( 'Maximum upload file size: %d%s' ), $upload_size_unit, $sizes[$u] ); ?></p>
<?php do_action('post-flash-upload-ui'); ?>
	<p class="howto"><?php _e('After a file has been uploaded, you can add titles and descriptions.'); ?></p>
</div>
<?php endif; // $flash ?>

<div id="html-upload-ui">
<?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" /> <input type="submit" class="button" name="html-upload" value="<?php esc_attr_e('Upload'); ?>" /> <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 upgrade to lighttpd 1.5.'); ?></p>
	<?php endif;?>
<?php do_action('post-html-upload-ui', $flash); ?>
</div>
<?php do_action('post-upload-ui'); ?>
<?php
}
开发者ID:realfluid,项目名称:umbaugh,代码行数:101,代码来源:media.php

示例4: anno_media_upload_form


//.........这里部分代码省略.........
        ?>
",
				file_post_name: "async-upload",
				post_params : {
					<?php 
        echo $post_params_str;
        ?>
				},
				file_size_limit : "<?php 
        echo $max_upload_size;
        ?>
b",
				file_dialog_start_handler : fileDialogStart,
				file_queued_handler : annoFileQueued,
				upload_start_handler : uploadStart,
				upload_progress_handler : uploadProgress,
				upload_error_handler : uploadError,
				upload_success_handler : <?php 
        echo apply_filters('swfupload_success_handler', 'uploadSuccess');
        ?>
,
				upload_complete_handler : uploadComplete,
				file_queue_error_handler : fileQueueError,
				file_dialog_complete_handler : fileDialogComplete,
				swfupload_pre_load_handler: swfuploadPreLoad,
				swfupload_load_failed_handler: swfuploadLoadFailed,
				custom_settings : {
					degraded_element_id : "html-upload-ui", // id of the element displayed when swfupload is unavailable
					swfupload_element_id : "flash-upload-ui" // id of the element displayed when swfupload is available
				},
				file_types : "*.jpg;*.gif;*.png;*.jpeg;*.bmp;",
				debug: false
			};
			swfu = new SWFUpload(settings);
	};
	//]]>
	</script>

	<div id="flash-upload-ui" class="tinymce-uploader hide-if-no-js">
	<?php 
        do_action('pre-flash-upload-ui');
        ?>
		<div>
		<?php 
        _ex('Choose files to upload', 'Media upload dialog', 'anno');
        ?>
		<div id="flash-browse-button"></div>
		<span><input id="cancel-upload" disabled="disabled" onclick="cancelUpload()" type="button" value="<?php 
        _ex('Cancel Upload', 'Media cancel button text', 'anno');
        ?>
" class="button" /></span>
		</div>
	<?php 
        do_action('post-plupload-upload-ui');
        ?>
	</div>
	<?php 
    }
    // $flash
    ?>

	<div id="html-upload-ui" class="tinymce-uploader<?php 
    if ($flash) {
        echo ' hide-if-js';
    }
    ?>
">
	<?php 
    do_action('pre-html-upload-ui');
    ?>
		<p id="async-upload-wrap">
			<label class="screen-reader-text" for="async-upload"><?php 
    _ex('Upload', 'Media upload text', 'anno');
    ?>
</label>
			<input type="file" name="async-upload" id="async-upload" accept="image/gif, image/jpeg, image/jpg, image/png" />
			<?php 
    submit_button(_x('Upload', 'Media upload text', 'anno'), 'button', 'html-upload', false);
    ?>
		</p>
		<div class="clear"></div>
		<?php 
    if (is_lighttpd_before_150()) {
        ?>
		<p><?php 
        _ex('If you want to use all capabilities of the uploader, like uploading multiple files at once, please update to lighttpd 1.5.', 'Media upload error text', 'anno');
        ?>
</p>
		<?php 
    }
    ?>
	<?php 
    do_action('post-html-upload-ui', $flash);
    ?>
	</div>
	<?php 
    do_action('post-upload-ui');
    ?>
	<?php 
}
开发者ID:nameofname,项目名称:momo-wordpress-theme,代码行数:101,代码来源:tinymce-uploader.php

示例5: default_scripts

 function default_scripts()
 {
     $this->add('common', '/wp-admin/js/common.js', array('jquery'), '20080318');
     $this->add('sack', '/wp-includes/js/tw-sack.js', false, '1.6.1');
     $this->add('quicktags', '/wp-includes/js/quicktags.js', false, '3958');
     $this->localize('quicktags', 'quicktagsL10n', array('quickLinks' => __('(Quick Links)'), 'wordLookup' => __('Enter a word to look up:'), 'dictionaryLookup' => attribute_escape(__('Dictionary lookup')), 'lookup' => attribute_escape(__('lookup')), 'closeAllOpenTags' => attribute_escape(__('Close all open tags')), 'closeTags' => attribute_escape(__('close tags')), 'enterURL' => __('Enter the URL'), 'enterImageURL' => __('Enter the URL of the image'), 'enterImageDescription' => __('Enter a description of the image')));
     $this->add('colorpicker', '/wp-includes/js/colorpicker.js', array('prototype'), '3517');
     // Let a plugin replace the visual editor
     $visual_editor = apply_filters('visual_editor', array('tiny_mce'));
     $this->add('editor', false, $visual_editor, '20080321');
     $this->add('editor_functions', '/wp-admin/js/editor.js', false, '20080325');
     // Modify this version when tinyMCE plugins are changed.
     $mce_version = apply_filters('tiny_mce_version', '20080414');
     $this->add('tiny_mce', '/wp-includes/js/tinymce/tiny_mce_config.php', array('editor_functions'), $mce_version);
     $this->add('prototype', '/wp-includes/js/prototype.js', false, '1.6');
     $this->add('wp-ajax-response', '/wp-includes/js/wp-ajax-response.js', array('jquery'), '20080316');
     $this->localize('wp-ajax-response', 'wpAjax', array('noPerm' => __('You do not have permission to do that.'), 'broken' => __('An unidentified error has occurred.')));
     $this->add('autosave', '/wp-includes/js/autosave.js', array('schedule', 'wp-ajax-response'), '20080424');
     $this->add('wp-ajax', '/wp-includes/js/wp-ajax.js', array('prototype'), '20070306');
     $this->localize('wp-ajax', 'WPAjaxL10n', array('defaultUrl' => get_option('siteurl') . '/wp-admin/admin-ajax.php', 'permText' => __("You do not have permission to do that."), 'strangeText' => __("Something strange happened.  Try refreshing the page."), 'whoaText' => __("Slow down, I'm still sending your data!")));
     $this->add('wp-lists', '/wp-includes/js/wp-lists.js', array('wp-ajax-response'), '20080411');
     $this->localize('wp-lists', 'wpListL10n', array('url' => get_option('siteurl') . '/wp-admin/admin-ajax.php'));
     $this->add('scriptaculous-root', '/wp-includes/js/scriptaculous/scriptaculous.js', array('prototype'), '1.8.0');
     $this->add('scriptaculous-builder', '/wp-includes/js/scriptaculous/builder.js', array('scriptaculous-root'), '1.8.0');
     $this->add('scriptaculous-dragdrop', '/wp-includes/js/scriptaculous/dragdrop.js', array('scriptaculous-builder', 'scriptaculous-effects'), '1.8.0');
     $this->add('scriptaculous-effects', '/wp-includes/js/scriptaculous/effects.js', array('scriptaculous-root'), '1.8.0');
     $this->add('scriptaculous-slider', '/wp-includes/js/scriptaculous/slider.js', array('scriptaculous-effects'), '1.8.0');
     $this->add('scriptaculous-sound', '/wp-includes/js/scriptaculous/sound.js', array('scriptaculous-root'), '1.8.0');
     $this->add('scriptaculous-controls', '/wp-includes/js/scriptaculous/controls.js', array('scriptaculous-root'), '1.8.0');
     $this->add('scriptaculous', '', array('scriptaculous-dragdrop', 'scriptaculous-slider', 'scriptaculous-controls'), '1.8.0');
     $this->add('cropper', '/wp-includes/js/crop/cropper.js', array('scriptaculous-dragdrop'), '20070118');
     $this->add('jquery', '/wp-includes/js/jquery/jquery.js', false, '1.2.3');
     $this->add('jquery-form', '/wp-includes/js/jquery/jquery.form.js', array('jquery'), '2.02');
     $this->add('jquery-color', '/wp-includes/js/jquery/jquery.color.js', array('jquery'), '2.0-4561');
     $this->add('interface', '/wp-includes/js/jquery/interface.js', array('jquery'), '1.2');
     $this->add('dimensions', '/wp-includes/js/jquery/jquery.dimensions.min.js', array('jquery'), '1.1.2');
     $this->add('suggest', '/wp-includes/js/jquery/suggest.js', array('dimensions'), '1.1');
     $this->add('schedule', '/wp-includes/js/jquery/jquery.schedule.js', array('jquery'), '20');
     $this->add('thickbox', '/wp-includes/js/thickbox/thickbox.js', array('jquery'), '3.1-20080430');
     $this->add('swfupload', '/wp-includes/js/swfupload/swfupload.js', false, '2.0.2-20080430');
     $this->add('swfupload-degrade', '/wp-includes/js/swfupload/plugins/swfupload.graceful_degradation.js', array('swfupload'), '2.0.2');
     $this->localize('swfupload-degrade', 'uploadDegradeOptions', array('is_lighttpd_before_150' => is_lighttpd_before_150()));
     $this->add('swfupload-queue', '/wp-includes/js/swfupload/plugins/swfupload.queue.js', array('swfupload'), '2.0.2');
     $this->add('swfupload-handlers', '/wp-includes/js/swfupload/handlers.js', array('swfupload'), '2.0.2-20080407');
     // these error messages came from the sample swfupload js, they might need changing.
     $this->localize('swfupload-handlers', 'swfuploadL10n', array('queue_limit_exceeded' => __('You have attempted to queue too many files.'), 'file_exceeds_size_limit' => sprintf(__('This file is too big. Your php.ini upload_max_filesize is %s.'), @ini_get('upload_max_filesize')), 'zero_byte_file' => __('This file is empty. Please try another.'), 'invalid_filetype' => __('This file type is not allowed. Please try another.'), 'default_error' => __('An error occurred in the upload. Please try again later.'), 'missing_upload_url' => __('There was a configuration error. Please contact the server administrator.'), 'upload_limit_exceeded' => __('You may only upload 1 file.'), 'http_error' => __('HTTP error.'), 'upload_failed' => __('Upload failed.'), 'io_error' => __('IO error.'), 'security_error' => __('Security error.'), 'file_cancelled' => __('File cancelled.'), 'upload_stopped' => __('Upload stopped.'), 'dismiss' => __('Dismiss'), 'crunching' => __('Crunching&hellip;'), 'deleted' => __('Deleted')));
     $this->add('jquery-ui-tabs', '/wp-includes/js/jquery/ui.tabs.js', array('jquery'), '3');
     if (is_admin()) {
         $this->add('ajaxcat', '/wp-admin/js/cat.js', array('wp-lists'), '20071101');
         $this->localize('ajaxcat', 'catL10n', array('add' => attribute_escape(__('Add')), 'how' => __('Separate multiple categories with commas.')));
         $this->add('admin-categories', '/wp-admin/js/categories.js', array('wp-lists'), '20071031');
         $this->add('admin-tags', '/wp-admin/js/tags.js', array('wp-lists'), '20071031');
         $this->add('admin-custom-fields', '/wp-admin/js/custom-fields.js', array('wp-lists'), '20070823');
         $this->add('password-strength-meter', '/wp-admin/js/password-strength-meter.js', array('jquery'), '20070405');
         $this->localize('password-strength-meter', 'pwsL10n', array('short' => __('Too short'), 'bad' => __('Bad'), 'good' => __('Good'), 'strong' => __('Strong')));
         $this->add('admin-comments', '/wp-admin/js/edit-comments.js', array('wp-lists'), '20080311');
         $this->localize('admin-comments', 'adminCommentsL10n', array('pending' => __('%i% pending')));
         $this->add('admin-users', '/wp-admin/js/users.js', array('wp-lists'), '20070823');
         $this->add('admin-forms', '/wp-admin/js/forms.js', false, '20080317');
         $this->add('xfn', '/wp-admin/js/xfn.js', false, '3517');
         $this->add('upload', '/wp-admin/js/upload.js', array('jquery'), '20070518');
         $this->add('postbox', '/wp-admin/js/postbox.js', array('jquery'), '20080128');
         $this->localize('postbox', 'postboxL10n', array('requestFile' => get_option('siteurl') . '/wp-admin/admin-ajax.php'));
         $this->add('slug', '/wp-admin/js/slug.js', array('jquery'), '20080208');
         $this->localize('slug', 'slugL10n', array('requestFile' => get_option('siteurl') . '/wp-admin/admin-ajax.php', 'save' => __('Save'), 'cancel' => __('Cancel')));
         $this->add('post', '/wp-admin/js/post.js', array('suggest', 'jquery-ui-tabs', 'wp-lists', 'postbox', 'slug'), '20080422');
         $this->localize('post', 'postL10n', array('tagsUsed' => __('Tags used on this post:'), 'add' => attribute_escape(__('Add')), 'addTag' => attribute_escape(__('Add new tag')), 'separate' => __('Separate tags with commas'), 'cancel' => __('Cancel'), 'edit' => __('Edit')));
         $this->add('page', '/wp-admin/js/page.js', array('jquery', 'slug', 'postbox'), '20080318');
         $this->localize('page', 'postL10n', array('cancel' => __('Cancel'), 'edit' => __('Edit')));
         $this->add('link', '/wp-admin/js/link.js', array('jquery-ui-tabs', 'wp-lists', 'postbox'), '20080131');
         $this->add('comment', '/wp-admin/js/comment.js', array('postbox'), '20080219');
         $this->localize('comment', 'commentL10n', array('cancel' => __('Cancel'), 'edit' => __('Edit')));
         $this->add('media-upload', '/wp-admin/js/media-upload.js', false, '20080430');
         $this->localize('upload', 'uploadL10n', array('browseTitle' => attribute_escape(__('Browse your files')), 'back' => __('&laquo; Back'), 'directTitle' => attribute_escape(__('Direct link to file')), 'edit' => __('Edit'), 'thumb' => __('Thumbnail'), 'full' => __('Full size'), 'icon' => __('Icon'), 'title' => __('Title'), 'show' => __('Show:'), 'link' => __('Link to:'), 'file' => __('File'), 'page' => __('Page'), 'none' => __('None'), 'editorText' => attribute_escape(__('Send to editor &raquo;')), 'insert' => __('Insert'), 'urlText' => __('URL'), 'desc' => __('Description'), 'deleteText' => attribute_escape(__('Delete File')), 'saveText' => attribute_escape(__('Save &raquo;')), 'confirmText' => __("Are you sure you want to delete the file '%title%'?\nClick ok to delete or cancel to go back.")));
         $this->add('admin-widgets', '/wp-admin/js/widgets.js', array('interface'), '20080503');
         $this->localize('admin-widgets', 'widgetsL10n', array('add' => __('Add'), 'edit' => __('Edit'), 'cancel' => __('Cancel')));
         $this->add('editor', '/wp-admin/js/editor.js', array('tiny_mce'), '20080221');
     }
 }
开发者ID:staylor,项目名称:develop.svn.wordpress.org,代码行数:79,代码来源:script-loader.php

示例6: 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

示例7: wp_default_scripts

/**
 * Setup WordPress scripts to load by default for Administration Panels.
 *
 * Localizes a few of the scripts.
 *
 * @since 2.6.0
 *
 * @param object $scripts WP_Scripts object.
 */
function wp_default_scripts( &$scripts ) {
	if (!$guessurl = site_url())
		$guessurl = wp_guess_url();

	$scripts->base_url = $guessurl;
	$scripts->default_version = get_bloginfo( 'version' );

	$scripts->add( 'common', '/wp-admin/js/common.js', array('jquery', 'hoverIntent'), '20081210' );
	$scripts->add( 'sack', '/wp-includes/js/tw-sack.js', false, '1.6.1' );

	$scripts->add( 'quicktags', '/wp-includes/js/quicktags.js', false, '20081210' );
	$scripts->localize( 'quicktags', 'quicktagsL10n', array(
		'quickLinks' => __('(Quick Links)'),
		'wordLookup' => __('Enter a word to look up:'),
		'dictionaryLookup' => attribute_escape(__('Dictionary lookup')),
		'lookup' => attribute_escape(__('lookup')),
		'closeAllOpenTags' => attribute_escape(__('Close all open tags')),
		'closeTags' => attribute_escape(__('close tags')),
		'enterURL' => __('Enter the URL'),
		'enterImageURL' => __('Enter the URL of the image'),
		'enterImageDescription' => __('Enter a description of the image'),
		'l10n_print_after' => 'try{convertEntities(quicktagsL10n);}catch(e){};'
	) );

	$scripts->add( 'colorpicker', '/wp-includes/js/colorpicker.js', array('prototype'), '3517' );

	// Modify this version when tinyMCE plugins are changed.
	function mce_version() {
		return '20081129';
	}
	add_filter( 'tiny_mce_version', 'mce_version' );

	$scripts->add( 'editor', '/wp-admin/js/editor.js', false, mce_version() );

	$scripts->add( 'prototype', '/wp-includes/js/prototype.js', false, '1.6');

	$scripts->add( 'wp-ajax-response', '/wp-includes/js/wp-ajax-response.js', array('jquery'), '20081210' );
	$scripts->localize( 'wp-ajax-response', 'wpAjax', array(
		'noPerm' => __('You do not have permission to do that.'),
		'broken' => __('An unidentified error has occurred.'),
		'l10n_print_after' => 'try{convertEntities(wpAjax);}catch(e){};'
	) );

	$scripts->add( 'autosave', '/wp-includes/js/autosave.js', array('schedule', 'wp-ajax-response'), '20081210' );

	$scripts->add( 'wp-lists', '/wp-includes/js/wp-lists.js', array('wp-ajax-response'), '20081210' );
	$scripts->localize( 'wp-lists', 'wpListL10n', array(
		'url' => admin_url('admin-ajax.php')
	) );

	$scripts->add( 'scriptaculous-root', '/wp-includes/js/scriptaculous/wp-scriptaculous.js', array('prototype'), '1.8.0');
	$scripts->add( 'scriptaculous-builder', '/wp-includes/js/scriptaculous/builder.js', array('scriptaculous-root'), '1.8.0');
	$scripts->add( 'scriptaculous-dragdrop', '/wp-includes/js/scriptaculous/dragdrop.js', array('scriptaculous-builder', 'scriptaculous-effects'), '1.8.0');
	$scripts->add( 'scriptaculous-effects', '/wp-includes/js/scriptaculous/effects.js', array('scriptaculous-root'), '1.8.0');
	$scripts->add( 'scriptaculous-slider', '/wp-includes/js/scriptaculous/slider.js', array('scriptaculous-effects'), '1.8.0');
	$scripts->add( 'scriptaculous-sound', '/wp-includes/js/scriptaculous/sound.js', array( 'scriptaculous-root' ), '1.8.0' );
	$scripts->add( 'scriptaculous-controls', '/wp-includes/js/scriptaculous/controls.js', array('scriptaculous-root'), '1.8.0');
	$scripts->add( 'scriptaculous', '', array('scriptaculous-dragdrop', 'scriptaculous-slider', 'scriptaculous-controls'), '1.8.0');

	$scripts->add( 'cropper', '/wp-includes/js/crop/cropper.js', array('scriptaculous-dragdrop'), '20070118');

	$scripts->add( 'jquery', '/wp-includes/js/jquery/jquery.js', false, '1.2.6');
	$scripts->add( 'jquery-form', '/wp-includes/js/jquery/jquery.form.js', array('jquery'), '2.02');
	$scripts->add( 'jquery-color', '/wp-includes/js/jquery/jquery.color.js', array('jquery'), '2.0-4561');
	$scripts->add( 'interface', '/wp-includes/js/jquery/interface.js', array('jquery'), '1.2' );
	$scripts->add( 'suggest', '/wp-includes/js/jquery/suggest.js', array('jquery'), '1.1b');
	$scripts->add( 'schedule', '/wp-includes/js/jquery/jquery.schedule.js', array('jquery'), '20');
	$scripts->add( 'jquery-hotkeys', '/wp-includes/js/jquery/jquery.hotkeys.js', array('jquery'), '0.0.2' );
	$scripts->add( 'jquery-table-hotkeys', '/wp-includes/js/jquery/jquery.table-hotkeys.js', array('jquery', 'jquery-hotkeys'), '20081128' );
	$scripts->add( 'thickbox', '/wp-includes/js/thickbox/thickbox.js', array('jquery'), '3.1-20080430');
	$scripts->add( 'swfupload', '/wp-includes/js/swfupload/swfupload.js', false, '2.2.0-20081031');
	$scripts->add( 'swfupload-degrade', '/wp-includes/js/swfupload/plugins/swfupload.graceful_degradation.js', array('swfupload'), '2.2.0-20081031');
	$scripts->add( 'swfupload-swfobject', '/wp-includes/js/swfupload/plugins/swfupload.swfobject.js', array('swfupload'), '2.2.0-20081031');
	$scripts->localize( 'swfupload-degrade', 'uploadDegradeOptions', array(
		'is_lighttpd_before_150' => is_lighttpd_before_150(),
	) );
	$scripts->add( 'swfupload-queue', '/wp-includes/js/swfupload/plugins/swfupload.queue.js', array('swfupload'), '2.2.0-20081031');
	$scripts->add( 'swfupload-handlers', '/wp-includes/js/swfupload/handlers.js', array('swfupload'), '2.2.0-20081201');
	// these error messages came from the sample swfupload js, they might need changing.
	$scripts->localize( 'swfupload-handlers', 'swfuploadL10n', array(
			'queue_limit_exceeded' => __('You have attempted to queue too many files.'),
			'file_exceeds_size_limit' => sprintf(__('This file is too big. Your php.ini upload_max_filesize is %s.'), @ini_get('upload_max_filesize')),
			'zero_byte_file' => __('This file is empty. Please try another.'),
			'invalid_filetype' => __('This file type is not allowed. Please try another.'),
			'default_error' => __('An error occurred in the upload. Please try again later.'),
			'missing_upload_url' => __('There was a configuration error. Please contact the server administrator.'),
			'upload_limit_exceeded' => __('You may only upload 1 file.'),
			'http_error' => __('HTTP error.'),
			'upload_failed' => __('Upload failed.'),
			'io_error' => __('IO error.'),
			'security_error' => __('Security error.'),
//.........这里部分代码省略.........
开发者ID:staylor,项目名称:develop.svn.wordpress.org,代码行数:101,代码来源:script-loader.php


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