WordPress 内核自带的一些 JavaScript 库


WordPress默认包含了很多Web开发人员常用的js脚本库,这意味着我们开发主题的时候可以直接引用这些库,而不用再一个一个查找,然后写代码引用了.

既然包含在WordPress中了调用起来也是相当方便的,我们可以通过以下代码引入WordPress内置的这些js库.

function my_scripts_method() {
    wp_enqueue_script( 'scriptaculous' ); //库的句柄
}

add_action( 'wp_enqueue_scripts', 'my_scripts_method' );

以下是一部分WordPress自带的js库,可是说是相当实用了.

脚本名称句柄依赖脚本 *
Image CropperImage cropper (not used in core, see jcrop)
Jcropjcrop
SWFObjectswfobject
SWFUploadswfupload
SWFUpload Degradeswfupload-degrade
SWFUpload Queueswfupload-queue
SWFUpload Handlersswfupload-handlers
jQueryjqueryjson2 (for AJAX calls)
jQuery Formjquery-formjquery
jQuery Colorjquery-colorjquery
jQuery Masonryjquery-masonryjquery
jQuery UI Corejquery-ui-corejquery
jQuery UI Widgetjquery-ui-widgetjquery
jQuery UI Mousejquery-ui-mousejquery
jQuery UI Accordionjquery-ui-accordionjquery
jQuery UI Autocompletejquery-ui-autocompletejquery
jQuery UI Sliderjquery-ui-sliderjquery
jQuery UI Progressbarjquery-ui-progressbarjquery
jQuery UI Tabsjquery-ui-tabsjquery
jQuery UI Sortablejquery-ui-sortablejquery
jQuery UI Draggablejquery-ui-draggablejquery
jQuery UI Droppablejquery-ui-droppablejquery
jQuery UI Selectablejquery-ui-selectablejquery
jQuery UI Positionjquery-ui-positionjquery
jQuery UI Datepickerjquery-ui-datepickerjquery
jQuery UI Tooltipsjquery-ui-tooltipjquery
jQuery UI Resizablejquery-ui-resizablejquery
jQuery UI Dialogjquery-ui-dialogjquery
jQuery UI Buttonjquery-ui-buttonjquery
jQuery UI Effectsjquery-effects-corejquery
jQuery UI Effects – Blindjquery-effects-blindjquery-effects-core
jQuery UI Effects – Bouncejquery-effects-bouncejquery-effects-core
jQuery UI Effects – Clipjquery-effects-clipjquery-effects-core
jQuery UI Effects – Dropjquery-effects-dropjquery-effects-core
jQuery UI Effects – Explodejquery-effects-explodejquery-effects-core
jQuery UI Effects – Fadejquery-effects-fadejquery-effects-core
jQuery UI Effects – Foldjquery-effects-foldjquery-effects-core
jQuery UI Effects – Highlightjquery-effects-highlightjquery-effects-core
jQuery UI Effects – Pulsatejquery-effects-pulsatejquery-effects-core
jQuery UI Effects – Scalejquery-effects-scalejquery-effects-core
jQuery UI Effects – Shakejquery-effects-shakejquery-effects-core
jQuery UI Effects – Slidejquery-effects-slidejquery-effects-core
jQuery UI Effects – Transferjquery-effects-transferjquery-effects-core
MediaElement.js (WP 3.6+)wp-mediaelementjquery
jQuery Scheduleschedulejquery
jQuery Suggestsuggestjquery
ThickBoxthickbox
jQuery HoverIntenthoverIntentjquery
jQuery Hotkeysjquery-hotkeysjquery
Simple AJAX Code-Kitsack
QuickTagsquicktags
Iris (Colour picker)irisjquery
Farbtastic (deprecated)farbtasticjquery
ColorPicker (deprecated)colorpickerjquery
Tiny MCEtiny_mce
Autosaveautosave
WordPress AJAX Responsewp-ajax-response
List Manipulationwp-lists
WP Commoncommon
WP Editoreditorremov
WP Editor Functionseditor-functions
AJAX Catajaxcat
Admin Categoriesadmin-categories
Admin Tagsadmin-tags
Admin custom fieldsadmin-custom-fields
Password Strength Meterpassword-strength-meter
Admin Commentsadmin-comments
Admin Usersadmin-users
Admin Formsadmin-forms
XFNxfn
Uploadupload
PostBoxpostbox
Slugslug
Postpost
Pagepage
Linklink
Commentcomment
Threaded Commentscomment-reply
Admin Galleryadmin-gallery
Media Uploadmedia-upload
Admin widgetsadmin-widgets
Word Countword-count
Theme Previewtheme-preview
JSON for JSjson2
Plupload Coreplupload
Plupload All Runtimesplupload-all
Plupload HTML4plupload-html4
Plupload HTML5plupload-html5
Plupload Flashplupload-flash
Plupload Silverlightplupload-silverlight
Underscore jsunderscore
Backbone jsbackbone
  • 分享:
评论
还没有评论
    发表评论 说点什么