index.html 107 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>WordPress QUnit Test Suite</title>
  5. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  6. <!-- Dependencies -->
  7. <script src="../../build/wp-includes/js/jquery/jquery.js"></script>
  8. <script src="../../build/wp-includes/js/jquery/jquery-migrate.js"></script>
  9. <script src="../../build/wp-includes/js/jquery/ui/core.min.js"></script>
  10. <script src="../../build/wp-includes/js/underscore.min.js"></script>
  11. <script src="../../build/wp-includes/js/backbone.min.js"></script>
  12. <script src="../../build/wp-includes/js/wp-backbone.js"></script>
  13. <script src="../../build/wp-includes/js/zxcvbn.min.js"></script>
  14. <script>
  15. window._wpUtilSettings = {
  16. 'ajax': {
  17. 'url': '\/wp-admin\/admin-ajax.php'
  18. }
  19. };
  20. </script>
  21. <script>
  22. var wpApiSettings = {
  23. root: 'http://localhost/wp-json/',
  24. nonce: 'not_a_real_nonce'
  25. };
  26. </script>
  27. <script src="../../build/wp-includes/js/wp-util.js"></script>
  28. <script src="../../build/wp-includes/js/dist/vendor/wp-polyfill.js"></script>
  29. <script src="../../build/wp-includes/js/dist/dom-ready.js"></script>
  30. <script src="../../build/wp-includes/js/dist/hooks.js"></script>
  31. <script src="../../build/wp-includes/js/dist/i18n.js"></script>
  32. <script src="../../build/wp-includes/js/dist/a11y.js"></script>
  33. <script>
  34. window._wpMediaModelsL10n = {"settings":{"ajaxurl":"\/wp-admin\/admin-ajax.php","post":{"id":0}}};
  35. </script>
  36. <script src="../../build/wp-includes/js/media-models.js"></script>
  37. <script>
  38. window.userSettings = {"url":"\/","uid":"0","time":"1493325477","secure":""};
  39. </script>
  40. <script src="../../build/wp-includes/js/utils.js"></script>
  41. <script>
  42. window.pluploadL10n = {"queue_limit_exceeded":"You have attempted to queue too many files.","file_exceeds_size_limit":"%s exceeds the maximum upload size for this site.","zero_byte_file":"This file is empty. Please try another.","invalid_filetype":"Sorry, this file type is not permitted for security reasons.","not_an_image":"This file is not an image. Please try another.","image_memory_exceeded":"Memory exceeded. Please try another smaller file.","image_dimensions_exceeded":"This is larger than the maximum size. 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.","big_upload_failed":"Please try uploading this file with the %1$sbrowser uploader%2$s.","big_upload_queued":"%s exceeds the maximum upload size for the multi-file uploader when used in your browser.","io_error":"IO error.","security_error":"Security error.","file_cancelled":"File canceled.","upload_stopped":"Upload stopped.","dismiss":"Dismiss","crunching":"Crunching\u2026","deleted":"moved to the Trash.","error_uploading":"\u201c%s\u201d has failed to upload."};
  43. window._wpPluploadSettings = {"defaults":{"runtimes":"html5,flash,silverlight,html4","file_data_name":"async-upload","url":"\/wp-admin\/async-upload.php","flash_swf_url":"http:\/\/src.wordpress-develop.dev\/wp-includes\/js\/plupload\/plupload.flash.swf","silverlight_xap_url":"http:\/\/src.wordpress-develop.dev\/wp-includes\/js\/plupload\/plupload.silverlight.xap","filters":{"max_file_size":"2097152b","mime_types":[{"extensions":"jpg,jpeg,jpe,gif,png,bmp,tiff,tif,ico,asf,asx,wmv,wmx,wm,avi,divx,flv,mov,qt,mpeg,mpg,mpe,mp4,m4v,ogv,webm,mkv,3gp,3gpp,3g2,3gp2,txt,asc,c,cc,h,srt,csv,tsv,ics,rtx,css,vtt,dfxp,mp3,m4a,m4b,ra,ram,wav,ogg,oga,mid,midi,wma,wax,mka,rtf,js,pdf,class,tar,zip,gz,gzip,rar,7z,psd,xcf,doc,pot,pps,ppt,wri,xla,xls,xlt,xlw,mdb,mpp,docx,docm,dotx,dotm,xlsx,xlsm,xlsb,xltx,xltm,xlam,pptx,pptm,ppsx,ppsm,potx,potm,ppam,sldx,sldm,onetoc,onetoc2,onetmp,onepkg,oxps,xps,odt,odp,ods,odg,odc,odb,odf,wp,wpd,key,numbers,pages"}]},"multipart_params":{"action":"upload-attachment","_wpnonce":"87fa5740b8"}},"browser":{"mobile":false,"supported":true},"limitExceeded":false};
  44. </script>
  45. <script src="../../build/wp-includes/js/plupload/wp-plupload.js"></script>
  46. <script>
  47. window.mejsL10n = {"language":"en-US","strings":{"Close":"Close","Fullscreen":"Fullscreen","Turn off Fullscreen":"Turn off Fullscreen","Go Fullscreen":"Go Fullscreen","Download File":"Download File","Download Video":"Download Video","Play":"Play","Pause":"Pause","Captions\/Subtitles":"Captions\/Subtitles","None":"None","Time Slider":"Time Slider","Skip back %1 seconds":"Skip back %1 seconds","Video Player":"Video Player","Audio Player":"Audio Player","Volume Slider":"Volume Slider","Mute Toggle":"Mute Toggle","Unmute":"Unmute","Mute":"Mute","Use Up\/Down Arrow keys to increase or decrease volume.":"Use Up\/Down Arrow keys to increase or decrease volume.","Use Left\/Right Arrow keys to advance one second, Up\/Down arrows to advance ten seconds.":"Use Left\/Right Arrow keys to advance one second, Up\/Down arrows to advance ten seconds."}};
  48. window._wpmejsSettings = {"pluginPath":"\/wp-includes\/js\/mediaelement\/"};
  49. </script>
  50. <script src="../../build/wp-includes/js/mediaelement/mediaelement-and-player.min.js"></script>
  51. <script src="../../build/wp-includes/js/mediaelement/wp-mediaelement.js"></script>
  52. <script>
  53. window._wpMediaViewsL10n = {"mediaFrameDefaultTitle":"Media","url":"URL","addMedia":"Add Media","search":"Search","select":"Select","cancel":"Cancel","update":"Update","replace":"Replace","remove":"Remove","back":"Back","selected":"%d selected","dragInfo":"Drag and drop to reorder media files.","uploadFilesTitle":"Upload Files","uploadImagesTitle":"Upload Images","mediaLibraryTitle":"Media Library","insertMediaTitle":"Add Media","createNewGallery":"Create a new gallery","createNewPlaylist":"Create a new playlist","createNewVideoPlaylist":"Create a new video playlist","returnToLibrary":"\u2190 Return to library","allMediaItems":"All media items","allDates":"All dates","noItemsFound":"No items found.","insertIntoPost":"Insert into post","unattached":"Unattached","mine":"Mine","trash":"Trash","uploadedToThisPost":"Uploaded to this post","warnDelete":"You are about to permanently delete this item from your site.\nThis action cannot be undone.\n 'Cancel' to stop, 'OK' to delete.","warnBulkDelete":"You are about to permanently delete these items from your site.\nThis action cannot be undone.\n 'Cancel' to stop, 'OK' to delete.","warnBulkTrash":"You are about to trash these items.\n 'Cancel' to stop, 'OK' to delete.","bulkSelect":"Bulk Select","trashSelected":"Move to Trash","restoreSelected":"Restore from Trash","deletePermanently":"Delete Permanently","apply":"Apply","filterByDate":"Filter by date","filterByType":"Filter by type","searchMediaLabel":"Search Media","searchMediaPlaceholder":"Search media items...","mediaFound":"Number of media items found: %d","mediaFoundHasMoreResults":"Number of media items displayed: %d. Scroll the page for more results.","noMedia":"No media items found.","noMediaTryNewSearch":"No media items found. Try a different search.","attachmentDetails":"Attachment Details","insertFromUrlTitle":"Insert from URL","setFeaturedImageTitle":"Featured image","setFeaturedImage":"Set featured image","createGalleryTitle":"Create Gallery","editGalleryTitle":"Edit Gallery","cancelGalleryTitle":"\u2190 Cancel Gallery","insertGallery":"Insert gallery","updateGallery":"Update gallery","addToGallery":"Add to gallery","addToGalleryTitle":"Add to Gallery","reverseOrder":"Reverse order","imageDetailsTitle":"Image Details","imageReplaceTitle":"Replace Image","imageDetailsCancel":"Cancel Edit","editImage":"Edit Image","chooseImage":"Choose Image","selectAndCrop":"Select and Crop","skipCropping":"Skip Cropping","cropImage":"Crop Image","cropYourImage":"Crop your image","cropping":"Cropping\u2026","suggestedDimensions":"Suggested image dimensions: %1$s by %2$s pixels.","cropError":"There has been an error cropping your image.","audioDetailsTitle":"Audio Details","audioReplaceTitle":"Replace Audio","audioAddSourceTitle":"Add Audio Source","audioDetailsCancel":"Cancel Edit","videoDetailsTitle":"Video Details","videoReplaceTitle":"Replace Video","videoAddSourceTitle":"Add Video Source","videoDetailsCancel":"Cancel Edit","videoSelectPosterImageTitle":"Select Poster Image","videoAddTrackTitle":"Add Subtitles","playlistDragInfo":"Drag and drop to reorder tracks.","createPlaylistTitle":"Create Audio Playlist","editPlaylistTitle":"Edit Audio Playlist","cancelPlaylistTitle":"\u2190 Cancel Audio Playlist","insertPlaylist":"Insert audio playlist","updatePlaylist":"Update audio playlist","addToPlaylist":"Add to audio playlist","addToPlaylistTitle":"Add to Audio Playlist","videoPlaylistDragInfo":"Drag and drop to reorder videos.","createVideoPlaylistTitle":"Create Video Playlist","editVideoPlaylistTitle":"Edit Video Playlist","cancelVideoPlaylistTitle":"\u2190 Cancel Video Playlist","insertVideoPlaylist":"Insert video playlist","updateVideoPlaylist":"Update video playlist","addToVideoPlaylist":"Add to video playlist","addToVideoPlaylistTitle":"Add to Video Playlist","filterAttachments":"Filter Media","attachmentsList":"Media list","settings":{"tabs":[],"tabUrl":"http:\/\/build.wordpress-develop.test\/wp-admin\/media-upload.php?chromeless=1","mimeTypes":{"image":"Images","audio":"Audio","video":"Video","application\/msword,application\/vnd.openxmlformats-officedocument.wordprocessingml.document,application\/vnd.ms-word.document.macroEnabled.12,application\/vnd.ms-word.template.macroEnabled.12,application\/vnd.oasis.opendocument.text,application\/vnd.apple.pages,application\/pdf,application\/vnd.ms-xpsdocument,application\/oxps,application\/rtf,application\/wordperfect,application\/octet-stream":"Documents","application\/vnd.apple.numbers,application\/vnd.oasis.opendocument.spreadsheet,application\/vnd.ms-excel,application\/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application\/vnd.ms-excel.sheet.macroEnabled.12,application\/vnd.ms-excel.sheet.binary.macroEnabled.12":"Spreadsheets","application\/x-gzip,application\/rar,application\/x-tar,application\/zip,application\/x-7z-compressed":"Archives"},"captions":true,"nonce":{"sendToEditor":"078fccea44"},"post":{"id":7734,"nonce":"b81d45d05c","featuredImageId":-1},"defaultProps":{"link":"","align":"","size":""},"attachmentCounts":{"audio":1,"video":1},"oEmbedProxyUrl":"http:\/\/build.wordpress-develop.test\/wp-json\/oembed\/1.0\/proxy","embedExts":["mp3","ogg","flac","m4a","wav","mp4","m4v","webm","ogv","flv"],"embedMimes":{"mp3":"audio\/mpeg","ogg":"audio\/ogg","flac":"audio\/flac","m4a":"audio\/mpeg","wav":"audio\/wav","mp4":"video\/mp4","m4v":"video\/mp4","webm":"video\/webm","ogv":"video\/ogg","flv":"video\/x-flv"},"contentWidth":580,"months":[{"year":"2019","month":"10","text":"October 2019"},{"year":"2019","month":"9","text":"September 2019"},{"year":"2019","month":"7","text":"July 2019"},{"year":"2019","month":"6","text":"June 2019"},{"year":"2014","month":"1","text":"January 2014"},{"year":"2013","month":"12","text":"December 2013"},{"year":"2013","month":"9","text":"September 2013"},{"year":"2013","month":"4","text":"April 2013"},{"year":"2013","month":"3","text":"March 2013"},{"year":"2012","month":"7","text":"July 2012"},{"year":"2012","month":"6","text":"June 2012"},{"year":"2011","month":"7","text":"July 2011"},{"year":"2011","month":"1","text":"January 2011"}],"mediaTrash":0}};
  54. </script>
  55. <script src="../../build/wp-includes/js/media-views.js"></script>
  56. <script src="../../build/wp-includes/js/media-editor.js"></script>
  57. <script src="../../build/wp-includes/js/media-audiovideo.js"></script>
  58. <script src="../../build/wp-includes/js/mce-view.js"></script>
  59. <!-- QUnit -->
  60. <link rel="stylesheet" href="../../node_modules/qunit/qunit/qunit.css" type="text/css" media="screen" />
  61. <script src="../../node_modules/qunit/qunit/qunit.js"></script>
  62. <script src="../../node_modules/sinon/pkg/sinon.js"></script>
  63. <script src="../../node_modules/sinon-test/dist/sinon-test.js"></script>
  64. <script>
  65. var qTest = QUnit.test, sTest = sinonTest( sinon );
  66. QUnit.config.hidepassed = false;
  67. QUnit.test = function( testName, callback ) {
  68. return qTest( testName, sTest(callback) );
  69. };
  70. </script>
  71. </head>
  72. <body>
  73. <div id="qunit"></div>
  74. <div id="qunit-fixture">
  75. <script src="fixtures/customize-header.js"></script>
  76. <script src="fixtures/customize-settings.js"></script>
  77. <script src="fixtures/customize-menus.js"></script>
  78. <script src="fixtures/customize-widgets.js"></script>
  79. <script src="fixtures/wp-api-generated.js"></script>
  80. <script src="fixtures/js-widgets-endpoint.js"></script>
  81. <script src="fixtures/wp-api.js"></script>
  82. <script src="fixtures/common.js"></script>
  83. </div>
  84. <!-- Tested files -->
  85. <script src="../../build/wp-admin/js/dashboard.js"></script>
  86. <script src="../../build/wp-admin/js/password-strength-meter.js"></script>
  87. <script src="../../build/wp-admin/js/postbox.js"></script>
  88. <script src="../../build/wp-includes/js/dist/vendor/moment.js"></script>
  89. <script src="../../build/wp-includes/js/dist/date.js"></script>
  90. <script src="../../build/wp-includes/js/dist/i18n.js"></script>
  91. <script src="../../build/wp-includes/js/customize-base.js"></script>
  92. <script src="../../build/wp-includes/js/customize-models.js"></script>
  93. <script src="../../build/wp-includes/js/shortcode.js"></script>
  94. <script src="../../build/wp-includes/js/wp-sanitize.js"></script>
  95. <script src="../../build/wp-admin/js/customize-controls.js"></script>
  96. <script src="../../build/wp-includes/js/api-request.js"></script>
  97. <script src="../../build/wp-includes/js/wp-api.js"></script>
  98. <script type='text/javascript' src='../../build/wp-includes/js/jquery/ui/core.min.js'></script>
  99. <script type='text/javascript' src='../../build/wp-includes/js/jquery/ui/mouse.min.js'></script>
  100. <script type='text/javascript' src='../../build/wp-includes/js/jquery/ui/sortable.min.js'></script>
  101. <script type='text/javascript' src='../../build/wp-includes/js/jquery/ui/draggable.min.js'></script>
  102. <script type='text/javascript' src='../../build/wp-includes/js/jquery/ui/droppable.min.js'></script>
  103. <script src="../../build/wp-admin/js/nav-menu.js"></script>
  104. <script src="../../build/wp-admin/js/customize-nav-menus.js"></script>
  105. <script src="../../build/wp-admin/js/customize-widgets.js"></script>
  106. <script src="../../build/wp-admin/js/word-count.js"></script>
  107. <script src="../../build/wp-admin/js/widgets/media-widgets.js"></script>
  108. <script>
  109. wp.mediaWidgets.init();
  110. </script>
  111. <script src="../../build/wp-admin/js/widgets/media-image-widget.js"></script>
  112. <script>
  113. wp.mediaWidgets.modelConstructors[ "media_image" ].prototype.schema = {"attachment_id":{"type":"integer","default":0,"minimum":0,"media_prop":"id"},"url":{"type":"string","default":"","format":"uri"},"title":{"type":"string","default":"","should_preview_update":false},"size":{"type":"string","default":"medium","enum":["thumbnail","medium","medium_large","large","twentyseventeen-featured-image","twentyseventeen-thumbnail-avatar","full","custom"]},"width":{"type":"integer","default":0,"minimum":0},"height":{"type":"integer","default":0,"minimum":0},"caption":{"type":"string","default":"","should_preview_update":false},"alt":{"type":"string","default":""},"link_type":{"type":"string","default":"none","enum":["none","file","post","custom"],"media_prop":"link","should_preview_update":false},"link_url":{"type":"string","default":"","format":"uri","media_prop":"linkUrl","should_preview_update":false},"image_classes":{"type":"string","default":"","media_prop":"extraClasses","should_preview_update":false},"link_classes":{"type":"string","default":"","media_prop":"linkClassName","should_preview_update":false},"link_rel":{"type":"string","default":"","media_prop":"linkRel","should_preview_update":false},"link_target_blank":{"type":"boolean","default":false,"media_prop":"linkTargetBlank","should_preview_update":false},"image_title":{"type":"string","default":"","media_prop":"title","should_preview_update":false}};
  114. wp.mediaWidgets.controlConstructors[ "media_image" ].prototype.mime_type = "image";
  115. _.extend( wp.mediaWidgets.controlConstructors[ "media_image" ].prototype.l10n, {"no_media_selected":"No image selected","select_media":"Select Image","change_media":"Change Image","edit_media":"Edit Image","add_to_widget":"Add to Widget","missing_attachment":"We can&#8217;t find that image. Check your <a href=\"http:\/\/src.wordpress-develop.dev\/wp-admin\/upload.php\">media library<\/a> and make sure it wasn&#8217;t deleted.","media_library_state_multi":{"0":"Image Widget (%d)","1":"Image Widget (%d)","singular":"Image Widget (%d)","plural":"Image Widget (%d)","context":null,"domain":null},"media_library_state_single":"Image Widget"} );
  116. </script>
  117. <script src="../../build/wp-admin/js/widgets/media-video-widget.js"></script>
  118. <script>
  119. wp.mediaWidgets.modelConstructors[ "media_video" ].prototype.schema = {"attachment_id":{"type":"integer","default":0,"minimum":0,"media_prop":"id"},"url":{"type":"string","default":"","format":"uri"},"title":{"type":"string","default":""},"preload":{"type":"string","default":"metadata","enum":["none","auto","metadata"]},"loop":{"type":"boolean","default":false},"content":{"type":"string","default":""},"mp4":{"type":"string","default":"","format":"uri"},"m4v":{"type":"string","default":"","format":"uri"},"webm":{"type":"string","default":"","format":"uri"},"ogv":{"type":"string","default":"","format":"uri"},"wmv":{"type":"string","default":"","format":"uri"},"flv":{"type":"string","default":"","format":"uri"}};
  120. wp.mediaWidgets.controlConstructors[ "media_video" ].prototype.mime_type = "video";
  121. _.extend( wp.mediaWidgets.controlConstructors[ "media_video" ].prototype.l10n, {"no_media_selected":"No video selected","select_media":"Select Video","change_media":"Change Video","edit_media":"Edit Video","add_to_widget":"Add to Widget","missing_attachment":"We can&#8217;t find that video. Check your <a href=\"http:\/\/src.wordpress-develop.dev\/wp-admin\/upload.php\">media library<\/a> and make sure it wasn&#8217;t deleted.","media_library_state_multi":{"0":"Video Widget (%d)","1":"Video Widget (%d)","singular":"Video Widget (%d)","plural":"Video Widget (%d)","context":null,"domain":null},"media_library_state_single":"Video Widget"} );
  122. </script>
  123. <script src="../../build/wp-admin/js/widgets/media-audio-widget.js"></script>
  124. <script>
  125. wp.mediaWidgets.modelConstructors[ "media_audio" ].prototype.schema = {"attachment_id":{"type":"integer","default":0,"minimum":0,"media_prop":"id"},"url":{"type":"string","default":"","format":"uri"},"title":{"type":"string","default":""},"preload":{"type":"string","default":"none","enum":["none","auto","metadata"]},"loop":{"type":"boolean","default":false},"mp3":{"type":"string","default":"","format":"uri"},"ogg":{"type":"string","default":"","format":"uri"},"wma":{"type":"string","default":"","format":"uri"},"m4a":{"type":"string","default":"","format":"uri"},"wav":{"type":"string","default":"","format":"uri"}};
  126. wp.mediaWidgets.controlConstructors[ "media_audio" ].prototype.mime_type = "audio";
  127. _.extend( wp.mediaWidgets.controlConstructors[ "media_audio" ].prototype.l10n, {"no_media_selected":"No audio selected","select_media":"Select File","change_media":"Change Audio","edit_media":"Edit Audio","add_to_widget":"Add to Widget","missing_attachment":"We can&#8217;t find that audio file. Check your <a href=\"http:\/\/src.wordpress-develop.dev\/wp-admin\/upload.php\">media library<\/a> and make sure it wasn&#8217;t deleted.","media_library_state_multi":{"0":"Audio Widget (%d)","1":"Audio Widget (%d)","singular":"Audio Widget (%d)","plural":"Audio Widget (%d)","context":null,"domain":null},"media_library_state_single":"Audio Widget"} );
  128. </script>
  129. <script type='text/javascript' src='../../build/wp-admin/js/widgets/media-gallery-widget.js'></script>
  130. <script type='text/javascript'>
  131. wp.mediaWidgets.modelConstructors[ "media_gallery" ].prototype.schema = {"title":{"type":"string","default":"","should_preview_update":false},"ids":{"type":"string","default":""},"columns":{"type":"integer","default":3},"size":{"type":"string","default":"thumbnail","enum":["thumbnail","medium","medium_large","large","post-thumbnail","full","custom"]},"link_type":{"type":"string","default":"none","enum":["none","file","post"],"media_prop":"link","should_preview_update":false},"orderby_random":{"type":"boolean","default":false,"media_prop":"_orderbyRandom","should_preview_update":false},"attachments":{"type":"string","default":""}};
  132. wp.mediaWidgets.controlConstructors[ "media_gallery" ].prototype.mime_type = "image";
  133. _.extend( wp.mediaWidgets.controlConstructors[ "media_gallery" ].prototype.l10n, {"no_media_selected":"No images selected","add_media":"Add Media","replace_media":"Replace Media","edit_media":"Edit Gallery","add_to_widget":"Add to Widget","missing_attachment":"We can&#8217;t find that gallery. Check your <a href=\"http:\/\/src.wordpress-develop.dev\/wp-admin\/upload.php\">media library<\/a> and make sure it wasn&#8217;t deleted.","media_library_state_multi":"","media_library_state_single":"","unsupported_file_type":"Looks like this isn&#8217;t the correct kind of file. Please link to an appropriate file instead.","select_media":"Select Images","change_media":"Add Image"} );
  134. </script>
  135. <!-- Unit tests -->
  136. <script src="wp-admin/js/password-strength-meter.js"></script>
  137. <script src="wp-admin/js/customize-base.js"></script>
  138. <script src="wp-admin/js/customize-header.js"></script>
  139. <script src="wp-admin/js/dashboard.js"></script>
  140. <script src="wp-includes/js/shortcode.js"></script>
  141. <script src="wp-includes/js/api-request.js"></script>
  142. <script src="wp-includes/js/jquery.js"></script>
  143. <script src="wp-includes/js/wp-api.js"></script>
  144. <script src="wp-admin/js/customize-controls.js"></script>
  145. <script src="wp-admin/js/customize-controls-utils.js"></script>
  146. <script src="wp-admin/js/customize-nav-menus.js"></script>
  147. <script src="wp-admin/js/customize-widgets.js"></script>
  148. <script src="wp-admin/js/word-count.js"></script>
  149. <script src="wp-admin/js/nav-menu.js"></script>
  150. <script src="wp-admin/js/widgets/test-media-widgets.js"></script>
  151. <script src="wp-admin/js/widgets/test-media-image-widget.js"></script>
  152. <script src="wp-admin/js/widgets/test-media-gallery-widget.js"></script>
  153. <script src="wp-admin/js/widgets/test-media-video-widget.js"></script>
  154. <!-- Customizer templates for sections -->
  155. <script type="text/html" id="tmpl-customize-section-default">
  156. <li id="accordion-section-{{ data.id }}" class="accordion-section control-section control-section-{{ data.type }}">
  157. <h3 class="accordion-section-title" tabindex="0">
  158. {{ data.title }}
  159. <span class="screen-reader-text">Press return or enter to expand</span>
  160. </h3>
  161. <ul class="accordion-section-content">
  162. <# if ( data.description ) { #>
  163. <li class="customize-section-description-container">
  164. <p class="description customize-section-description">{{{ data.description }}}</p>
  165. </li>
  166. <# } #>
  167. </ul>
  168. </li>
  169. </script>
  170. <script type="text/html" id="tmpl-customize-section-titleless">
  171. <li id="accordion-section-{{ data.id }}" class="accordion-section control-section control-section-{{ data.type }}">
  172. <!-- Notice the lack of an h3 with title displayed inside. -->
  173. <ul class="accordion-section-content">
  174. <# if ( data.description ) { #>
  175. <li class="customize-section-description-container">
  176. <p class="description customize-section-description">{{{ data.description }}}</p>
  177. </li>
  178. <# } #>
  179. </ul>
  180. </li>
  181. </script>
  182. <!-- Customizer templates for panels -->
  183. <script type="text/html" id="tmpl-customize-panel-default">
  184. <li id="accordion-panel-{{ data.id }}" class="accordion-section control-section control-panel control-panel-{{ data.type }}">
  185. <h3 class="accordion-section-title" tabindex="0">
  186. {{ data.title }}
  187. <span class="screen-reader-text">Press return or enter to open this panel</span>
  188. </h3>
  189. <ul class="accordion-sub-container control-panel-content"></ul>
  190. </li>
  191. </script>
  192. <script type="text/html" id="tmpl-customize-panel-default-content">
  193. <li class="panel-meta accordion-section control-section<# if ( ! data.description ) { #> cannot-expand<# } #>">
  194. <div class="accordion-section-title" tabindex="0">
  195. <span class="preview-notice">You are customizing <strong class="panel-title">{{ data.title }}</strong></span>
  196. </div>
  197. <# if ( data.description ) { #>
  198. <div class="accordion-section-content description">
  199. {{{ data.description }}}
  200. </div>
  201. <# } #>
  202. </li>
  203. </script>
  204. <script type="text/html" id="tmpl-customize-panel-titleless">
  205. <li id="accordion-panel-{{ data.id }}" class="accordion-section control-section control-panel control-panel-{{ data.type }}">
  206. <!-- Notice the lack of an h3 with title displayed inside. -->
  207. <ul class="accordion-sub-container control-panel-content"></ul>
  208. </li>
  209. </script>
  210. <script type="text/html" id="tmpl-customize-panel-titleless-content">
  211. <li class="panel-meta accordion-section control-section<# if ( ! data.description ) { #> cannot-expand<# } #>">
  212. <!-- Notice lack of title containing preview notice -->
  213. <# if ( data.description ) { #>
  214. <div class="accordion-section-content description">
  215. {{{ data.description }}}
  216. </div>
  217. <# } #>
  218. </li>
  219. </script>
  220. <script type="text/html" id="tmpl-customize-control-notifications">
  221. <ul>
  222. <# _.each( data.notifications, function( notification ) { #>
  223. <li data-code="{{ notification.code }}" data-type="{{ notification.type }}">{{ notification.message || notification.code }}</li>
  224. <# } ); #>
  225. </ul>
  226. </script>
  227. <script type="text/html" id="tmpl-customize-notification">
  228. <li class="notice notice-{{ data.type || 'info' }} {{ data.altNotice ? 'notice-alt' : '' }} {{ data.dismissible ? 'is-dismissible' : '' }}" data-code="{{ data.code }}" data-type="{{ data.type }}">
  229. {{{ data.message || data.code }}}
  230. <# if ( data.dismissible ) { #>
  231. <button type="button" class="notice-dismiss"><span class="screen-reader-text"><?php _e( 'Dismiss' ); ?></span></button>
  232. <# } #>
  233. </li>
  234. </script>
  235. <!-- Templates for Customizer Menus -->
  236. <script type="text/html" id="tmpl-customize-control-nav_menu-content">
  237. <button type="button" class="button add-new-menu-item" aria-label="Add or remove menu items" aria-expanded="false" aria-controls="available-menu-items">
  238. Add Items </button>
  239. <button type="button" class="not-a-button reorder-toggle" aria-label="Reorder menu items" aria-describedby="reorder-items-desc-{{ data.menu_id }}">
  240. <span class="reorder">Reorder</span>
  241. <span class="reorder-done">Done</span>
  242. </button>
  243. <p class="screen-reader-text" id="reorder-items-desc-{{ data.menu_id }}">When in reorder mode, additional controls to reorder menu items will be available in the items list above.</p>
  244. <span class="add-menu-item-loading spinner"></span>
  245. <span class="menu-delete-item">
  246. <button type="button" class="not-a-button menu-delete">
  247. Delete menu <span class="screen-reader-text">{{ data.menu_name }}</span>
  248. </button>
  249. </span>
  250. <ul class="menu-settings">
  251. <li class="customize-control">
  252. <span class="customize-control-title">Menu locations</span>
  253. </li>
  254. <li class="customize-control customize-control-checkbox assigned-menu-location">
  255. <label>
  256. <input type="checkbox" data-menu-id="{{ data.menu_id }}" data-location-id="primary" class="menu-location" /> Primary Menu <span class="theme-location-set">(Current: <span class="current-menu-location-name-primary"></span>)</span>
  257. </label>
  258. </li>
  259. <li class="customize-control customize-control-checkbox assigned-menu-location">
  260. <label>
  261. <input type="checkbox" data-menu-id="{{ data.menu_id }}" data-location-id="social" class="menu-location" /> Social Links Menu <span class="theme-location-set">(Current: <span class="current-menu-location-name-social"></span>)</span>
  262. </label>
  263. </li>
  264. </ul>
  265. </script>
  266. <script type="text/html" id="tmpl-customize-control-nav_menu_name-content">
  267. <label>
  268. <# if ( data.label ) { #>
  269. <span class="customize-control-title screen-reader-text">{{ data.label }}</span>
  270. <# } #>
  271. <input type="text" class="menu-name-field live-update-section-title" />
  272. </label>
  273. </script>
  274. <script type="text/html" id="tmpl-customize-control-nav_menu_auto_add-content">
  275. <span class="customize-control-title">Menu options</span>
  276. <label>
  277. <input type="checkbox" class="auto_add" />
  278. Automatically add new top-level pages to this menu </label>
  279. </script>
  280. <script type="text/html" id="tmpl-customize-control-nav_menu_item-content">
  281. <div class="menu-item-bar">
  282. <div class="menu-item-handle">
  283. <span class="item-type" aria-hidden="true">{{ data.item_type_label }}</span>
  284. <span class="item-title" aria-hidden="true">
  285. <span class="spinner"></span>
  286. <span class="menu-item-title<# if ( ! data.title ) { #> no-title<# } #>">{{ data.title || wp.customize.Menus.data.l10n.untitled }}</span>
  287. </span>
  288. <span class="item-controls">
  289. <button type="button" class="not-a-button item-edit" aria-expanded="false"><span class="screen-reader-text">Edit menu item: {{ data.title || wp.customize.Menus.data.l10n.untitled }} ({{ data.item_type_label }})</span><span class="toggle-indicator" aria-hidden="true"></span></button>
  290. <button type="button" class="not-a-button item-delete submitdelete deletion"><span class="screen-reader-text">Remove Menu Item: {{ data.title || wp.customize.Menus.data.l10n.untitled }} ({{ data.item_type_label }})</span></button>
  291. </span>
  292. </div>
  293. </div>
  294. <div class="menu-item-settings" id="menu-item-settings-{{ data.menu_item_id }}">
  295. <# if ( 'custom' === data.item_type ) { #>
  296. <p class="field-url description description-thin">
  297. <label for="edit-menu-item-url-{{ data.menu_item_id }}">
  298. URL<br />
  299. <input class="widefat code edit-menu-item-url" type="text" id="edit-menu-item-url-{{ data.menu_item_id }}" name="menu-item-url" />
  300. </label>
  301. </p>
  302. <# } #>
  303. <p class="description description-thin">
  304. <label for="edit-menu-item-title-{{ data.menu_item_id }}">
  305. Navigation Label<br />
  306. <input type="text" id="edit-menu-item-title-{{ data.menu_item_id }}" class="widefat edit-menu-item-title" name="menu-item-title" />
  307. </label>
  308. </p>
  309. <p class="field-link-target description description-thin">
  310. <label for="edit-menu-item-target-{{ data.menu_item_id }}">
  311. <input type="checkbox" id="edit-menu-item-target-{{ data.menu_item_id }}" class="edit-menu-item-target" value="_blank" name="menu-item-target" />
  312. Open link in a new tab </label>
  313. </p>
  314. <p class="field-attr-title description description-thin">
  315. <label for="edit-menu-item-attr-title-{{ data.menu_item_id }}">
  316. Title Attribute<br />
  317. <input type="text" id="edit-menu-item-attr-title-{{ data.menu_item_id }}" class="widefat edit-menu-item-attr-title" name="menu-item-attr-title" />
  318. </label>
  319. </p>
  320. <p class="field-css-classes description description-thin">
  321. <label for="edit-menu-item-classes-{{ data.menu_item_id }}">
  322. CSS Classes<br />
  323. <input type="text" id="edit-menu-item-classes-{{ data.menu_item_id }}" class="widefat code edit-menu-item-classes" name="menu-item-classes" />
  324. </label>
  325. </p>
  326. <p class="field-xfn description description-thin">
  327. <label for="edit-menu-item-xfn-{{ data.menu_item_id }}">
  328. Link Relationship (XFN)<br />
  329. <input type="text" id="edit-menu-item-xfn-{{ data.menu_item_id }}" class="widefat code edit-menu-item-xfn" name="menu-item-xfn" />
  330. </label>
  331. </p>
  332. <p class="field-description description description-thin">
  333. <label for="edit-menu-item-description-{{ data.menu_item_id }}">
  334. Description<br />
  335. <textarea id="edit-menu-item-description-{{ data.menu_item_id }}" class="widefat edit-menu-item-description" rows="3" cols="20" name="menu-item-description">{{ data.description }}</textarea>
  336. <span class="description">The description will be displayed in the menu if the current theme supports it.</span>
  337. </label>
  338. </p>
  339. <div class="menu-item-actions description-thin submitbox">
  340. <# if ( ( 'post_type' === data.item_type || 'taxonomy' === data.item_type ) && '' !== data.original_title ) { #>
  341. <p class="link-to-original">
  342. Original: <a class="original-link" href="{{ data.url }}">{{ data.original_title }}</a> </p>
  343. <# } #>
  344. <button type="button" class="not-a-button item-delete submitdelete deletion">Remove</button>
  345. <span class="spinner"></span>
  346. </div>
  347. <input type="hidden" name="menu-item-db-id[{{ data.menu_item_id }}]" class="menu-item-data-db-id" value="{{ data.menu_item_id }}" />
  348. <input type="hidden" name="menu-item-parent-id[{{ data.menu_item_id }}]" class="menu-item-data-parent-id" value="{{ data.parent }}" />
  349. </div><!-- .menu-item-settings-->
  350. <ul class="menu-item-transport"></ul>
  351. </script>
  352. <script type="text/html" id="tmpl-available-menu-item">
  353. <li id="menu-item-tpl-{{ data.id }}" class="menu-item-tpl" data-menu-item-id="{{ data.id }}">
  354. <div class="menu-item-bar">
  355. <div class="menu-item-handle">
  356. <span class="item-type" aria-hidden="true">{{ data.type_label }}</span>
  357. <span class="item-title" aria-hidden="true">
  358. <span class="menu-item-title<# if ( ! data.title ) { #> no-title<# } #>">{{ data.title || wp.customize.Menus.data.l10n.untitled }}</span>
  359. </span>
  360. <button type="button" class="not-a-button item-add">
  361. <span class="screen-reader-text">Add to menu: {{ data.title || wp.customize.Menus.data.l10n.untitled }} ({{ data.type_label }})</span>
  362. </button>
  363. </div>
  364. </div>
  365. </li>
  366. </script>
  367. <script type="text/html" id="tmpl-menu-item-reorder-nav">
  368. <div class="menu-item-reorder-nav">
  369. <button type="button" class="menus-move-up">Move up</button><button type="button" class="menus-move-down">Move down</button><button type="button" class="menus-move-left">Move one level up</button><button type="button" class="menus-move-right">Move one level down</button> </div>
  370. </script>
  371. <script type="text/html" id="tmpl-nav-menu-locations-header">
  372. <span class="customize-control-title customize-section-title-menu_locations-heading"><?php _e( 'Menu Locations' ); ?></span>
  373. <p class="customize-control-description customize-section-title-menu_locations-description">Something</p>
  374. </script>
  375. <script type="text/html" id="tmpl-nav-menu-create-menu-section-title">
  376. <h3>
  377. <button type="button" class="button customize-add-menu-button">
  378. <?php _e( 'Create New Menu' ); ?>
  379. </button>
  380. </h3>
  381. </script>
  382. <script type="text/html" id="tmpl-customize-section-sidebar">
  383. <li id="accordion-section-{{ data.id }}" class="accordion-section control-section control-section-{{ data.type }}">
  384. <h3 class="accordion-section-title" tabindex="0">
  385. {{ data.title }}
  386. <span class="screen-reader-text">Press return or enter to open</span>
  387. </h3>
  388. <ul class="accordion-section-content">
  389. <li class="customize-section-description-container">
  390. <div class="customize-section-title">
  391. <button class="customize-section-back" tabindex="-1">
  392. <span class="screen-reader-text">Back</span>
  393. </button>
  394. <h3>
  395. <span class="customize-action">
  396. {{{ data.customizeAction }}}
  397. </span>
  398. {{ data.title }}
  399. </h3>
  400. </div>
  401. <# if ( data.description ) { #>
  402. <div class="description customize-section-description">
  403. {{{ data.description }}}
  404. </div>
  405. <# } #>
  406. </li>
  407. </ul>
  408. </li>
  409. </script>
  410. <div hidden>
  411. <div id="customize-preview"></div>
  412. <div id="customize-notifications-test"><ul></ul></div>
  413. </div>
  414. <div hidden>
  415. <div id="available-menu-items" class="accordion-container">
  416. <div class="customize-section-title">
  417. <button type="button" class="customize-section-back" tabindex="-1">
  418. <span class="screen-reader-text">Back</span>
  419. </button>
  420. <h3>
  421. <span class="customize-action">
  422. Customizing &#9656; Menus </span>
  423. Add Menu Items </h3>
  424. </div>
  425. <div id="available-menu-items-search" class="accordion-section cannot-expand">
  426. <div class="accordion-section-title">
  427. <label class="screen-reader-text" for="menu-items-search">Search Menu Items</label>
  428. <input type="text" id="menu-items-search" placeholder="Search menu items&hellip;" aria-describedby="menu-items-search-desc" />
  429. <p class="screen-reader-text" id="menu-items-search-desc">The search results will be updated as you type.</p>
  430. <span class="spinner"></span>
  431. <span class="clear-results"><span class="screen-reader-text">Clear Results</span></span>
  432. </div>
  433. <ul class="accordion-section-content" data-type="search"></ul>
  434. </div>
  435. <div id="new-custom-menu-item" class="accordion-section">
  436. <h4 class="accordion-section-title" role="presentation">
  437. Custom Links <button type="button" class="not-a-button" aria-expanded="false">
  438. <span class="screen-reader-text">Toggle section: Custom Links</span>
  439. <span class="toggle-indicator" aria-hidden="true"></span>
  440. </button>
  441. </h4>
  442. <div class="accordion-section-content">
  443. <input type="hidden" value="custom" id="custom-menu-item-type" name="menu-item[-1][menu-item-type]" />
  444. <p id="menu-item-url-wrap">
  445. <label class="howto" for="custom-menu-item-url">
  446. <span>URL</span>
  447. <input id="custom-menu-item-url" name="menu-item[-1][menu-item-url]" type="text" class="code menu-item-textbox" value="http://">
  448. </label>
  449. </p>
  450. <p id="menu-item-name-wrap">
  451. <label class="howto" for="custom-menu-item-name">
  452. <span>Link Text</span>
  453. <input id="custom-menu-item-name" name="menu-item[-1][menu-item-title]" type="text" class="regular-text menu-item-textbox">
  454. </label>
  455. </p>
  456. <p class="button-controls">
  457. <span class="add-to-menu">
  458. <input type="submit" class="button submit-add-to-menu right" value="Add to Menu" name="add-custom-menu-item" id="custom-menu-item-submit">
  459. <span class="spinner"></span>
  460. </span>
  461. </p>
  462. </div>
  463. </div>
  464. <div id="available-menu-items-post_type-post" class="accordion-section">
  465. <h4 class="accordion-section-title" role="presentation">
  466. Post <span class="spinner"></span>
  467. <span class="no-items">No items</span>
  468. <button type="button" class="not-a-button" aria-expanded="false">
  469. <span class="screen-reader-text">Toggle section: Post</span>
  470. <span class="toggle-indicator" aria-hidden="true"></span>
  471. </button>
  472. </h4>
  473. <ul class="accordion-section-content" data-type="post_type" data-object="post"></ul>
  474. </div>
  475. <div id="available-menu-items-post_type-page" class="accordion-section">
  476. <h4 class="accordion-section-title" role="presentation">
  477. Page <span class="spinner"></span>
  478. <span class="no-items">No items</span>
  479. <button type="button" class="not-a-button" aria-expanded="false">
  480. <span class="screen-reader-text">Toggle section: Page</span>
  481. <span class="toggle-indicator" aria-hidden="true"></span>
  482. </button>
  483. </h4>
  484. <ul class="accordion-section-content" data-type="post_type" data-object="page"></ul>
  485. </div>
  486. <div id="available-menu-items-taxonomy-category" class="accordion-section">
  487. <h4 class="accordion-section-title" role="presentation">
  488. Category <span class="spinner"></span>
  489. <span class="no-items">No items</span>
  490. <button type="button" class="not-a-button" aria-expanded="false">
  491. <span class="screen-reader-text">Toggle section: Category</span>
  492. <span class="toggle-indicator" aria-hidden="true"></span>
  493. </button>
  494. </h4>
  495. <ul class="accordion-section-content" data-type="taxonomy" data-object="category"></ul>
  496. </div>
  497. <div id="available-menu-items-taxonomy-post_tag" class="accordion-section">
  498. <h4 class="accordion-section-title" role="presentation">
  499. Tag <span class="spinner"></span>
  500. <span class="no-items">No items</span>
  501. <button type="button" class="not-a-button" aria-expanded="false">
  502. <span class="screen-reader-text">Toggle section: Tag</span>
  503. <span class="toggle-indicator" aria-hidden="true"></span>
  504. </button>
  505. </h4>
  506. <ul class="accordion-section-content" data-type="taxonomy" data-object="post_tag"></ul>
  507. </div>
  508. <div id="available-menu-items-taxonomy-post_format" class="accordion-section">
  509. <h4 class="accordion-section-title" role="presentation">
  510. Format <span class="spinner"></span>
  511. <span class="no-items">No items</span>
  512. <button type="button" class="not-a-button" aria-expanded="false">
  513. <span class="screen-reader-text">Toggle section: Format</span>
  514. <span class="toggle-indicator" aria-hidden="true"></span>
  515. </button>
  516. </h4>
  517. <ul class="accordion-section-content" data-type="taxonomy" data-object="post_format"></ul>
  518. </div>
  519. </div><!-- #available-menu-items -->
  520. </div><!-- end nav menu templates -->
  521. <div hidden>
  522. <div id="widgets-left"><!-- compatibility with JS which looks for widget templates here -->
  523. <div id="available-widgets">
  524. <div class="customize-section-title">
  525. <button class="customize-section-back" tabindex="-1">
  526. <span class="screen-reader-text">Back</span>
  527. </button>
  528. <h3>
  529. <span class="customize-action">Customizing &#9656; Widgets</span>
  530. Add a Widget </h3>
  531. </div>
  532. <div id="available-widgets-filter">
  533. <label class="screen-reader-text" for="widgets-search">Search Widgets</label>
  534. <input type="search" id="widgets-search" placeholder="Search widgets&hellip;" />
  535. </div>
  536. <div id="available-widgets-list">
  537. <div id="widget-tpl-search-2" data-widget-id="search-2" class="widget-tpl search-2" tabindex="0">
  538. <div id='widget-11_search-__i__' class='widget'> <div class="widget-top">
  539. <div class="widget-title-action">
  540. <a class="widget-action hide-if-no-js" href="#available-widgets"></a>
  541. <a class="widget-control-edit hide-if-js" href="/wp-admin/customize.php?editwidget=search-2&#038;addnew=1&#038;num=3&#038;base=search">
  542. <span class="edit">Edit</span>
  543. <span class="add">Add</span>
  544. <span class="screen-reader-text">Search</span>
  545. </a>
  546. </div>
  547. <div class="widget-title"><h4>Search<span class="in-widget-title"></span></h4></div>
  548. </div>
  549. <div class="widget-inside">
  550. <div class="form">
  551. <div class="widget-content">
  552. <p><label for="widget-search-__i__-title">Title: <input class="widefat" id="widget-search-__i__-title" name="widget-search[__i__][title]" type="text" value="" /></label></p>
  553. </div>
  554. <input type="hidden" name="widget-id" class="widget-id" value="search-__i__" />
  555. <input type="hidden" name="id_base" class="id_base" value="search" />
  556. <input type="hidden" name="widget-width" class="widget-width" value="250" />
  557. <input type="hidden" name="widget-height" class="widget-height" value="200" />
  558. <input type="hidden" name="widget_number" class="widget_number" value="2" />
  559. <input type="hidden" name="multi_number" class="multi_number" value="3" />
  560. <input type="hidden" name="add_new" class="add_new" value="multi" />
  561. <div class="widget-control-actions">
  562. <div class="alignleft">
  563. <a class="widget-control-remove" href="#remove">Delete</a> |
  564. <a class="widget-control-close" href="#close">Close</a>
  565. </div>
  566. <div class="alignright">
  567. <input type="submit" name="savewidget" id="widget-search-__i__-savewidget" class="button button-primary widget-control-save right" value="Save" /> <span class="spinner"></span>
  568. </div>
  569. <br class="clear" />
  570. </div>
  571. </div><!-- .form -->
  572. </div>
  573. <div class="widget-description">
  574. A search form for your site.
  575. </div>
  576. </div> </div>
  577. </div><!-- #available-widgets-list -->
  578. </div><!-- #available-widgets -->
  579. </div><!-- #widgets-left -->
  580. <script type="text/html" id="tmpl-widget-media-media_image-control">
  581. <# var elementIdPrefix = 'el' + String( Math.random() ) + '_' #>
  582. <p>
  583. <label for="{{ elementIdPrefix }}title">Title:</label>
  584. <input id="{{ elementIdPrefix }}title" type="text" class="widefat title">
  585. </p>
  586. <div class="media-widget-preview media_image">
  587. <div class="attachment-media-view">
  588. <button type="button" class="select-media button-add-media not-selected">
  589. Add Image </button>
  590. </div>
  591. </div>
  592. <p class="media-widget-buttons">
  593. <button type="button" class="button edit-media selected">
  594. Edit Image </button>
  595. <button type="button" class="button change-media select-media selected">
  596. Replace Image </button>
  597. </p>
  598. <div class="media-widget-fields">
  599. </div>
  600. </script>
  601. <script type="text/html" id="tmpl-wp-media-widget-image-preview">
  602. <# if ( data.error && 'missing_attachment' === data.error ) { #>
  603. <div class="notice notice-error notice-alt notice-missing-attachment">
  604. <p>We can&#8217;t find that image. Check your <a href="http://src.wordpress-develop.test/wp-admin/upload.php">media library</a> and make sure it wasn&#8217;t deleted.</p>
  605. </div>
  606. <# } else if ( data.error ) { #>
  607. <div class="notice notice-error notice-alt">
  608. <p>Unable to preview media due to an unknown error.</p>
  609. </div>
  610. <# } else if ( data.url ) { #>
  611. <img class="attachment-thumb" src="{{ data.url }}" draggable="false" alt="{{ data.alt }}"
  612. <# if ( ! data.alt && data.currentFilename ) { #>
  613. aria-label="
  614. The current image has no alternative text. The file name is: {{ data.currentFilename }} "
  615. <# } #>
  616. />
  617. <# } #>
  618. </script>
  619. <script type="text/html" id="tmpl-widget-media-media_video-control">
  620. <# var elementIdPrefix = 'el' + String( Math.random() ) + '_' #>
  621. <p>
  622. <label for="{{ elementIdPrefix }}title">Title:</label>
  623. <input id="{{ elementIdPrefix }}title" type="text" class="widefat title">
  624. </p>
  625. <div class="media-widget-preview media_video">
  626. <div class="attachment-media-view">
  627. <button type="button" class="select-media button-add-media not-selected">
  628. Add Video </button>
  629. </div>
  630. </div>
  631. <p class="media-widget-buttons">
  632. <button type="button" class="button edit-media selected">
  633. Edit Video </button>
  634. <button type="button" class="button change-media select-media selected">
  635. Replace Video </button>
  636. </p>
  637. <div class="media-widget-fields">
  638. </div>
  639. </script>
  640. <script type="text/html" id="tmpl-wp-media-widget-video-preview">
  641. <# if ( data.error && 'missing_attachment' === data.error ) { #>
  642. <div class="notice notice-error notice-alt notice-missing-attachment">
  643. <p>We can&#8217;t find that video. Check your <a href="http://src.wordpress-develop.test/wp-admin/upload.php">media library</a> and make sure it wasn&#8217;t deleted.</p>
  644. </div>
  645. <# } else if ( data.error && 'unsupported_file_type' === data.error ) { #>
  646. <div class="notice notice-error notice-alt notice-missing-attachment">
  647. <p>Sorry, we can&#8217;t load the video at the supplied URL. Please check that the URL is for a supported video file (<code>.mp4</code>, <code>.m4v</code>, <code>.webm</code>, <code>.ogv</code>, <code>.flv</code>) or stream (e.g. YouTube and Vimeo).</p>
  648. </div>
  649. <# } else if ( data.error ) { #>
  650. <div class="notice notice-error notice-alt">
  651. <p>Unable to preview media due to an unknown error.</p>
  652. </div>
  653. <# } else if ( data.is_oembed && data.model.poster ) { #>
  654. <a href="{{ data.model.src }}" target="_blank" class="media-widget-video-link">
  655. <img src="{{ data.model.poster }}" />
  656. </a>
  657. <# } else if ( data.is_oembed ) { #>
  658. <a href="{{ data.model.src }}" target="_blank" class="media-widget-video-link no-poster">
  659. <span class="dashicons dashicons-format-video"></span>
  660. </a>
  661. <# } else if ( data.model.src ) { #>
  662. <# var w_rule = '', classes = [],
  663. w, h, settings = wp.media.view.settings,
  664. isYouTube = isVimeo = false;
  665. if ( ! _.isEmpty( data.model.src ) ) {
  666. isYouTube = data.model.src.match(/youtube|youtu\.be/);
  667. isVimeo = -1 !== data.model.src.indexOf('vimeo');
  668. }
  669. if ( settings.contentWidth && data.model.width >= settings.contentWidth ) {
  670. w = settings.contentWidth;
  671. } else {
  672. w = data.model.width;
  673. }
  674. if ( w !== data.model.width ) {
  675. h = Math.ceil( ( data.model.height * w ) / data.model.width );
  676. } else {
  677. h = data.model.height;
  678. }
  679. if ( w ) {
  680. w_rule = 'width: ' + w + 'px; ';
  681. }
  682. if ( isYouTube ) {
  683. classes.push( 'youtube-video' );
  684. }
  685. if ( isVimeo ) {
  686. classes.push( 'vimeo-video' );
  687. }
  688. #>
  689. <div style="{{ w_rule }}" class="wp-video">
  690. <video controls
  691. class="wp-video-shortcode {{ classes.join( ' ' ) }}"
  692. <# if ( w ) { #>width="{{ w }}"<# } #>
  693. <# if ( h ) { #>height="{{ h }}"<# } #>
  694. <#
  695. if ( ! _.isUndefined( data.model.poster ) && data.model.poster ) {
  696. #> poster="{{ data.model.poster }}"<#
  697. } #>
  698. preload ="{{ _.isUndefined( data.model.preload ) ? 'metadata' : data.model.preload }}"
  699. <#
  700. if ( ! _.isUndefined( data.model.autoplay ) && data.model.autoplay ) {
  701. #> autoplay<#
  702. }
  703. if ( ! _.isUndefined( data.model.loop ) && data.model.loop ) {
  704. #> loop<#
  705. }
  706. #>
  707. >
  708. <# if ( ! _.isEmpty( data.model.src ) ) {
  709. if ( isYouTube ) { #>
  710. <source src="{{ data.model.src }}" type="video/youtube" />
  711. <# } else if ( isVimeo ) { #>
  712. <source src="{{ data.model.src }}" type="video/vimeo" />
  713. <# } else { #>
  714. <source src="{{ data.model.src }}" type="{{ settings.embedMimes[ data.model.src.split('.').pop() ] }}" />
  715. <# }
  716. } #>
  717. <# if ( data.model.mp4 ) { #>
  718. <source src="{{ data.model.mp4 }}" type="{{ settings.embedMimes[ 'mp4' ] }}" />
  719. <# } #>
  720. <# if ( data.model.m4v ) { #>
  721. <source src="{{ data.model.m4v }}" type="{{ settings.embedMimes[ 'm4v' ] }}" />
  722. <# } #>
  723. <# if ( data.model.webm ) { #>
  724. <source src="{{ data.model.webm }}" type="{{ settings.embedMimes[ 'webm' ] }}" />
  725. <# } #>
  726. <# if ( data.model.ogv ) { #>
  727. <source src="{{ data.model.ogv }}" type="{{ settings.embedMimes[ 'ogv' ] }}" />
  728. <# } #>
  729. <# if ( data.model.flv ) { #>
  730. <source src="{{ data.model.flv }}" type="{{ settings.embedMimes[ 'flv' ] }}" />
  731. <# } #>
  732. {{{ data.model.content }}}
  733. </video>
  734. </div>
  735. <# } #>
  736. </script>
  737. <script type="text/html" id="tmpl-widget-media-media_audio-control">
  738. <# var elementIdPrefix = 'el' + String( Math.random() ) + '_' #>
  739. <p>
  740. <label for="{{ elementIdPrefix }}title">Title:</label>
  741. <input id="{{ elementIdPrefix }}title" type="text" class="widefat title">
  742. </p>
  743. <div class="media-widget-preview media_audio">
  744. <div class="attachment-media-view">
  745. <button type="button" class="select-media button-add-media not-selected">
  746. Add Audio </button>
  747. </div>
  748. </div>
  749. <p class="media-widget-buttons">
  750. <button type="button" class="button edit-media selected">
  751. Edit Audio </button>
  752. <button type="button" class="button change-media select-media selected">
  753. Replace Audio </button>
  754. </p>
  755. <div class="media-widget-fields">
  756. </div>
  757. </script>
  758. <script type="text/html" id="tmpl-wp-media-widget-audio-preview">
  759. <# if ( data.error && 'missing_attachment' === data.error ) { #>
  760. <div class="notice notice-error notice-alt notice-missing-attachment">
  761. <p>We can&#8217;t find that audio file. Check your <a href="http://src.wordpress-develop.test/wp-admin/upload.php">media library</a> and make sure it wasn&#8217;t deleted.</p>
  762. </div>
  763. <# } else if ( data.error ) { #>
  764. <div class="notice notice-error notice-alt">
  765. <p>Unable to preview media due to an unknown error.</p>
  766. </div>
  767. <# } else if ( data.model && data.model.src ) { #>
  768. <audio style="visibility: hidden"
  769. controls
  770. class="wp-audio-shortcode"
  771. width="{{ _.isUndefined( data.model.width ) ? 400 : data.model.width }}"
  772. preload="{{ _.isUndefined( data.model.preload ) ? 'none' : data.model.preload }}"
  773. <#
  774. if ( ! _.isUndefined( data.model.autoplay ) && data.model.autoplay ) {
  775. #> autoplay<#
  776. }
  777. if ( ! _.isUndefined( data.model.loop ) && data.model.loop ) {
  778. #> loop<#
  779. }
  780. #>
  781. >
  782. <# if ( ! _.isEmpty( data.model.src ) ) { #>
  783. <source src="{{ data.model.src }}" type="{{ wp.media.view.settings.embedMimes[ data.model.src.split('.').pop() ] }}" />
  784. <# } #>
  785. <# if ( ! _.isEmpty( data.model.mp3 ) ) { #>
  786. <source src="{{ data.model.mp3 }}" type="{{ wp.media.view.settings.embedMimes[ 'mp3' ] }}" />
  787. <# } #>
  788. <# if ( ! _.isEmpty( data.model.ogg ) ) { #>
  789. <source src="{{ data.model.ogg }}" type="{{ wp.media.view.settings.embedMimes[ 'ogg' ] }}" />
  790. <# } #>
  791. <# if ( ! _.isEmpty( data.model.flac ) ) { #>
  792. <source src="{{ data.model.flac }}" type="{{ wp.media.view.settings.embedMimes[ 'flac' ] }}" />
  793. <# } #>
  794. <# if ( ! _.isEmpty( data.model.m4a ) ) { #>
  795. <source src="{{ data.model.m4a }}" type="{{ wp.media.view.settings.embedMimes[ 'm4a' ] }}" />
  796. <# } #>
  797. <# if ( ! _.isEmpty( data.model.wav ) ) { #>
  798. <source src="{{ data.model.wav }}" type="{{ wp.media.view.settings.embedMimes[ 'wav' ] }}" />
  799. <# } #>
  800. </audio>
  801. <# } #>
  802. </script>
  803. <script type="text/html" id="tmpl-media-frame">
  804. <div class="media-frame-menu"></div>
  805. <div class="media-frame-title"></div>
  806. <div class="media-frame-router"></div>
  807. <div class="media-frame-content"></div>
  808. <div class="media-frame-toolbar"></div>
  809. <div class="media-frame-uploader"></div>
  810. </script>
  811. <script type="text/html" id="tmpl-widget-media-media_gallery-control">
  812. <# var elementIdPrefix = 'el' + String( Math.random() ) + '_' #>
  813. <p>
  814. <label for="{{ elementIdPrefix }}title">Title:</label>
  815. <input id="{{ elementIdPrefix }}title" type="text" class="widefat title">
  816. </p>
  817. <div class="media-widget-preview media_gallery">
  818. <div class="attachment-media-view">
  819. <button type="button" class="select-media button-add-media not-selected">
  820. Add Images </button>
  821. </div>
  822. </div>
  823. <p class="media-widget-buttons">
  824. <button type="button" class="button edit-media selected">
  825. Edit Gallery </button>
  826. </p>
  827. <div class="media-widget-fields">
  828. </div>
  829. </script>
  830. <script type="text/html" id="tmpl-wp-media-widget-gallery-preview">
  831. <#
  832. var ids = _.filter( data.ids, function( id ) {
  833. return ( id in data.attachments );
  834. } );
  835. #>
  836. <# if ( ids.length ) { #>
  837. <ul class="gallery media-widget-gallery-preview" role="list">
  838. <# _.each( ids, function( id, index ) { #>
  839. <# var attachment = data.attachments[ id ]; #>
  840. <# if ( index < 6 ) { #>
  841. <li class="gallery-item">
  842. <div class="gallery-icon">
  843. <img alt="{{ attachment.alt }}"
  844. <# if ( index === 5 && data.ids.length > 6 ) { #> aria-hidden="true" <# } #>
  845. <# if ( attachment.sizes.thumbnail ) { #>
  846. src="{{ attachment.sizes.thumbnail.url }}" width="{{ attachment.sizes.thumbnail.width }}" height="{{ attachment.sizes.thumbnail.height }}"
  847. <# } else { #>
  848. src="{{ attachment.url }}"
  849. <# } #>
  850. <# if ( ! attachment.alt && attachment.filename ) { #>
  851. aria-label="
  852. The current image has no alternative text. The file name is: {{ attachment.filename }} "
  853. <# } #>
  854. />
  855. <# if ( index === 5 && data.ids.length > 6 ) { #>
  856. <div class="gallery-icon-placeholder">
  857. <p class="gallery-icon-placeholder-text" aria-label="
  858. Additional images added to this gallery: {{ data.ids.length - 5 }} ">+{{ data.ids.length - 5 }}</p>
  859. </div>
  860. <# } #>
  861. </div>
  862. </li>
  863. <# } #>
  864. <# } ); #>
  865. </ul>
  866. <# } else { #>
  867. <div class="attachment-media-view">
  868. <button type="button" class="placeholder button-add-media">Add Images</button>
  869. </div>
  870. <# } #>
  871. </script>
  872. <script type="text/html" id="tmpl-customize-control-date_time-content">
  873. <# _.defaults( data, {"settings":[],"type":"date_time","priority":10,"active":true,"section":"","content":"<li id=\"customize-control-temp\" class=\"customize-control customize-control-date_time\">\n\t\t\t\t\t<\/li>","label":"","description":"","instanceNumber":73,"maxYear":9999,"minYear":1000,"allowPastDate":true,"twelveHourFormat":true,"includeTime":true,"defaultValue":null,"month_choices":{"1":{"text":"1-Jan","value":1},"2":{"text":"2-Feb","value":2},"3":{"text":"3-Mar","value":3},"4":{"text":"4-Apr","value":4},"5":{"text":"5-May","value":5},"6":{"text":"6-Jun","value":6},"7":{"text":"7-Jul","value":7},"8":{"text":"8-Aug","value":8},"9":{"text":"9-Sep","value":9},"10":{"text":"10-Oct","value":10},"11":{"text":"11-Nov","value":11},"12":{"text":"12-Dec","value":12}}} ); #>
  874. <# var idPrefix = _.uniqueId( 'el' ) + '-'; #>
  875. <span class="customize-control-title">
  876. {{ data.label }}
  877. </span>
  878. <div class="customize-control-notifications-container"></div>
  879. <span class="description customize-control-description">{{ data.description }}</span>
  880. <div class="date-time-fields">
  881. <fieldset class="day-row">
  882. <legend class="title-day">Date</legend>
  883. <div class="day-fields clear">
  884. <label for="{{ idPrefix }}date-time-month" class="screen-reader-text">Month</label>
  885. <select id="{{ idPrefix }}date-time-month" class="date-input month" data-component="month">
  886. <# _.each( data.month_choices, function( choice ) {
  887. if ( _.isObject( choice ) && ! _.isUndefined( choice.text ) && ! _.isUndefined( choice.value ) ) {
  888. text = choice.text;
  889. value = choice.value;
  890. }
  891. #>
  892. <option value="{{ value }}" >
  893. {{ text }}
  894. </option>
  895. <# } ); #>
  896. </select>
  897. <label for="{{ idPrefix }}date-time-day" class="screen-reader-text">Day</label>
  898. <input id="{{ idPrefix }}date-time-day" type="number" size="2" autocomplete="off" class="date-input day" data-component="day" min="1" max="31" />
  899. <span class="time-special-char date-time-separator">,</span>
  900. <label for="{{ idPrefix }}date-time-year" class="screen-reader-text">Year</label>
  901. <input id="{{ idPrefix }}date-time-year" type="number" size="4" autocomplete="off" class="date-input year" data-component="year" min="{{ data.minYear }}" max="{{ data.maxYear }}">
  902. </div>
  903. </fieldset>
  904. <# if ( data.includeTime ) { #>
  905. <fieldset class="time-row clear">
  906. <legend class="title-time">Time</legend>
  907. <div class="time-fields clear">
  908. <label for="{{ idPrefix }}date-time-hour" class="screen-reader-text">Hour</label>
  909. <# var maxHour = data.twelveHourFormat ? 12 : 24; #>
  910. <input id="{{ idPrefix }}date-time-hour" type="number" size="2" autocomplete="off" class="date-input hour" data-component="hour" min="1" max="{{ maxHour }}">
  911. <span class="time-special-char date-time-separator">:</span>
  912. <label for="{{ idPrefix }}date-time-minute" class="screen-reader-text">Minute</label>
  913. <input id="{{ idPrefix }}date-time-minute" type="number" size="2" autocomplete="off" class="date-input minute" data-component="minute" min="0" max="59">
  914. <# if ( data.twelveHourFormat ) { #>
  915. <label for="{{ idPrefix }}date-time-meridian" class="screen-reader-text">Meridian</label>
  916. <select id="{{ idPrefix }}date-time-meridian" class="date-input meridian" data-component="meridian">
  917. <option value="am">AM</option>
  918. <option value="pm">PM</option>
  919. </select>
  920. <# } #>
  921. <p>Your timezone is set to America/Los Angeles (<abbr>PDT</abbr>), currently <abbr>UTC</abbr>-7 (Coordinated Universal Time -7).</p>
  922. </div>
  923. </fieldset>
  924. <# } #>
  925. </div>
  926. </script>
  927. <script type="text/html" id="tmpl-customize-preview-link-control" >
  928. <# var elementPrefix = _.uniqueId( 'el' ) + '-' #>
  929. <p class="customize-control-title">
  930. Share Preview Link </p>
  931. <p class="description customize-control-description">See how changes would look live on your website, and share the preview with people who can&#039;t access the Customizer.</p>
  932. <div class="customize-control-notifications-container"></div>
  933. <div class="preview-link-wrapper">
  934. <label for="{{ elementPrefix }}customize-preview-link-input" class="screen-reader-text">Preview Link</label>
  935. <a href="" target="">
  936. <span class="preview-control-element" data-component="url"></span>
  937. <span class="screen-reader-text">(opens in a new tab)</span>
  938. </a>
  939. <input id="{{ elementPrefix }}customize-preview-link-input" readonly class="preview-control-element" data-component="input">
  940. <button class="customize-copy-preview-link preview-control-element button button-secondary" data-component="button" data-copy-text="Copy" data-copied-text="Copied" >Copy</button>
  941. </div>
  942. </script>
  943. <script type="text/html" id="tmpl-media-modal">
  944. <div class="media-modal wp-core-ui">
  945. <button type="button" class="media-modal-close"><span class="media-modal-icon"><span class="screen-reader-text">Close media panel</span></span></button>
  946. <div class="media-modal-content"></div>
  947. </div>
  948. <div class="media-modal-backdrop"></div>
  949. </script>
  950. <script type="text/html" id="tmpl-uploader-window">
  951. <div class="uploader-window-content">
  952. <h1>Drop files to upload</h1>
  953. </div>
  954. </script>
  955. <script type="text/html" id="tmpl-uploader-editor">
  956. <div class="uploader-editor-content">
  957. <div class="uploader-editor-title">Drop files to upload</div>
  958. </div>
  959. </script>
  960. <script type="text/html" id="tmpl-uploader-inline">
  961. <# var messageClass = data.message ? 'has-upload-message' : 'no-upload-message'; #>
  962. <# if ( data.canClose ) { #>
  963. <button class="close dashicons dashicons-no"><span class="screen-reader-text">Close uploader</span></button>
  964. <# } #>
  965. <div class="uploader-inline-content {{ messageClass }}">
  966. <# if ( data.message ) { #>
  967. <h2 class="upload-message">{{ data.message }}</h2>
  968. <# } #>
  969. <div class="upload-ui">
  970. <h2 class="upload-instructions drop-instructions">Drop files anywhere to upload</h2>
  971. <p class="upload-instructions drop-instructions">or</p>
  972. <button type="button" class="browser button button-hero">Select Files</button>
  973. </div>
  974. <div class="upload-inline-status"></div>
  975. <div class="post-upload-ui">
  976. <p class="max-upload-size">Maximum upload file size: 2 MB.</p>
  977. <# if ( data.suggestedWidth && data.suggestedHeight ) { #>
  978. <p class="suggested-dimensions">
  979. Suggested image dimensions: {{data.suggestedWidth}} &times; {{data.suggestedHeight}}
  980. </p>
  981. <# } #>
  982. </div>
  983. </div>
  984. </script>
  985. <script type="text/html" id="tmpl-media-library-view-switcher">
  986. <a href="?mode=list" class="view-list">
  987. <span class="screen-reader-text">List View</span>
  988. </a>
  989. <a href="?mode=grid" class="view-grid current">
  990. <span class="screen-reader-text">Grid View</span>
  991. </a>
  992. </script>
  993. <script type="text/html" id="tmpl-uploader-status">
  994. <h2>Uploading</h2>
  995. <button type="button" class="button-link upload-dismiss-errors"><span class="screen-reader-text">Dismiss Errors</span></button>
  996. <div class="media-progress-bar"><div></div></div>
  997. <div class="upload-details">
  998. <span class="upload-count">
  999. <span class="upload-index"></span> / <span class="upload-total"></span>
  1000. </span>
  1001. <span class="upload-detail-separator">&ndash;</span>
  1002. <span class="upload-filename"></span>
  1003. </div>
  1004. <div class="upload-errors"></div>
  1005. </script>
  1006. <script type="text/html" id="tmpl-uploader-status-error">
  1007. <span class="upload-error-filename">{{{ data.filename }}}</span>
  1008. <span class="upload-error-message">{{ data.message }}</span>
  1009. </script>
  1010. <script type="text/html" id="tmpl-edit-attachment-frame">
  1011. <div class="edit-media-header">
  1012. <button class="left dashicons <# if ( ! data.hasPrevious ) { #> disabled <# } #>"><span class="screen-reader-text">Edit previous media item</span></button>
  1013. <button class="right dashicons <# if ( ! data.hasNext ) { #> disabled <# } #>"><span class="screen-reader-text">Edit next media item</span></button>
  1014. </div>
  1015. <div class="media-frame-title"></div>
  1016. <div class="media-frame-content"></div>
  1017. </script>
  1018. <script type="text/html" id="tmpl-attachment-details-two-column">
  1019. <div class="attachment-media-view {{ data.orientation }}">
  1020. <div class="thumbnail thumbnail-{{ data.type }}">
  1021. <# if ( data.uploading ) { #>
  1022. <div class="media-progress-bar"><div></div></div>
  1023. <# } else if ( data.sizes && data.sizes.large ) { #>
  1024. <img class="details-image" src="{{ data.sizes.large.url }}" draggable="false" alt="" />
  1025. <# } else if ( data.sizes && data.sizes.full ) { #>
  1026. <img class="details-image" src="{{ data.sizes.full.url }}" draggable="false" alt="" />
  1027. <# } else if ( -1 === jQuery.inArray( data.type, [ 'audio', 'video' ] ) ) { #>
  1028. <img class="details-image icon" src="{{ data.icon }}" draggable="false" alt="" />
  1029. <# } #>
  1030. <# if ( 'audio' === data.type ) { #>
  1031. <div class="wp-media-wrapper">
  1032. <audio style="visibility: hidden" controls class="wp-audio-shortcode" width="100%" preload="none">
  1033. <source type="{{ data.mime }}" src="{{ data.url }}"/>
  1034. </audio>
  1035. </div>
  1036. <# } else if ( 'video' === data.type ) {
  1037. var w_rule = '';
  1038. if ( data.width ) {
  1039. w_rule = 'width: ' + data.width + 'px;';
  1040. } else if ( wp.media.view.settings.contentWidth ) {
  1041. w_rule = 'width: ' + wp.media.view.settings.contentWidth + 'px;';
  1042. }
  1043. #>
  1044. <div style="{{ w_rule }}" class="wp-media-wrapper wp-video">
  1045. <video controls="controls" class="wp-video-shortcode" preload="metadata"
  1046. <# if ( data.width ) { #>width="{{ data.width }}"<# } #>
  1047. <# if ( data.height ) { #>height="{{ data.height }}"<# } #>
  1048. <# if ( data.image && data.image.src !== data.icon ) { #>poster="{{ data.image.src }}"<# } #>>
  1049. <source type="{{ data.mime }}" src="{{ data.url }}"/>
  1050. </video>
  1051. </div>
  1052. <# } #>
  1053. <div class="attachment-actions">
  1054. <# if ( 'image' === data.type && ! data.uploading && data.sizes && data.can.save ) { #>
  1055. <button type="button" class="button edit-attachment">Edit Image</button>
  1056. <# } else if ( 'pdf' === data.subtype && data.sizes ) { #>
  1057. Document Preview <# } #>
  1058. </div>
  1059. </div>
  1060. </div>
  1061. <div class="attachment-info">
  1062. <span class="settings-save-status">
  1063. <span class="spinner"></span>
  1064. <span class="saved">Saved.</span>
  1065. </span>
  1066. <div class="details">
  1067. <div class="filename"><strong>File name:</strong> {{ data.filename }}</div>
  1068. <div class="filename"><strong>File type:</strong> {{ data.mime }}</div>
  1069. <div class="uploaded"><strong>Uploaded on:</strong> {{ data.dateFormatted }}</div>
  1070. <div class="file-size"><strong>File size:</strong> {{ data.filesizeHumanReadable }}</div>
  1071. <# if ( 'image' === data.type && ! data.uploading ) { #>
  1072. <# if ( data.width && data.height ) { #>
  1073. <div class="dimensions"><strong>Dimensions:</strong>
  1074. {{ data.width }} by {{ data.height }} pixels </div>
  1075. <# } #>
  1076. <# } #>
  1077. <# if ( data.fileLength && data.fileLengthHumanReadable ) { #>
  1078. <div class="file-length"><strong>Length:</strong>
  1079. <span aria-hidden="true">{{ data.fileLength }}</span>
  1080. <span class="screen-reader-text">{{ data.fileLengthHumanReadable }}</span>
  1081. </div>
  1082. <# } #>
  1083. <# if ( 'audio' === data.type && data.meta.bitrate ) { #>
  1084. <div class="bitrate">
  1085. <strong>Bitrate:</strong> {{ Math.round( data.meta.bitrate / 1000 ) }}kb/s
  1086. <# if ( data.meta.bitrate_mode ) { #>
  1087. {{ ' ' + data.meta.bitrate_mode.toUpperCase() }}
  1088. <# } #>
  1089. </div>
  1090. <# } #>
  1091. <div class="compat-meta">
  1092. <# if ( data.compat && data.compat.meta ) { #>
  1093. {{{ data.compat.meta }}}
  1094. <# } #>
  1095. </div>
  1096. </div>
  1097. <div class="settings">
  1098. <# var maybeReadOnly = data.can.save || data.allowLocalEdits ? '' : 'readonly'; #>
  1099. <# if ( 'image' === data.type ) { #>
  1100. <label class="setting" data-setting="alt">
  1101. <span class="name">Alternative Text</span>
  1102. <input type="text" value="{{ data.alt }}" aria-describedby="alt-text-description" {{ maybeReadOnly }} />
  1103. </label>
  1104. <p class="description" id="alt-text-description"><a href="https://www.w3.org/WAI/tutorials/images/decision-tree" target="_blank" rel="noopener">Describe the purpose of the image<span class="screen-reader-text"> (opens in a new tab)</span></a>. Leave empty if the image is purely decorative.</p>
  1105. <# } #>
  1106. <label class="setting" data-setting="title">
  1107. <span class="name">Title</span>
  1108. <input type="text" value="{{ data.title }}" {{ maybeReadOnly }} />
  1109. </label>
  1110. <# if ( 'audio' === data.type ) { #>
  1111. <label class="setting" data-setting="artist">
  1112. <span class="name">Artist</span>
  1113. <input type="text" value="{{ data.artist || data.meta.artist || '' }}" />
  1114. </label>
  1115. <label class="setting" data-setting="album">
  1116. <span class="name">Album</span>
  1117. <input type="text" value="{{ data.album || data.meta.album || '' }}" />
  1118. </label>
  1119. <# } #>
  1120. <label class="setting" data-setting="caption">
  1121. <span class="name">Caption</span>
  1122. <textarea {{ maybeReadOnly }}>{{ data.caption }}</textarea>
  1123. </label>
  1124. <label class="setting" data-setting="description">
  1125. <span class="name">Description</span>
  1126. <textarea {{ maybeReadOnly }}>{{ data.description }}</textarea>
  1127. </label>
  1128. <div class="setting">
  1129. <span class="name">Uploaded By</span>
  1130. <span class="value">{{ data.authorName }}</span>
  1131. </div>
  1132. <# if ( data.uploadedToTitle ) { #>
  1133. <div class="setting">
  1134. <span class="name">Uploaded To</span>
  1135. <# if ( data.uploadedToLink ) { #>
  1136. <span class="value"><a href="{{ data.uploadedToLink }}">{{ data.uploadedToTitle }}</a></span>
  1137. <# } else { #>
  1138. <span class="value">{{ data.uploadedToTitle }}</span>
  1139. <# } #>
  1140. </div>
  1141. <# } #>
  1142. <label class="setting" data-setting="url">
  1143. <span class="name">Copy Link</span>
  1144. <input type="text" value="{{ data.url }}" readonly />
  1145. </label>
  1146. <div class="attachment-compat"></div>
  1147. </div>
  1148. <div class="actions">
  1149. <a class="view-attachment" href="{{ data.link }}">View attachment page</a>
  1150. <# if ( data.can.save ) { #> |
  1151. <a href="{{ data.editLink }}">Edit more details</a>
  1152. <# } #>
  1153. <# if ( ! data.uploading && data.can.remove ) { #> |
  1154. <button type="button" class="button-link delete-attachment">Delete Permanently</button>
  1155. <# } #>
  1156. </div>
  1157. </div>
  1158. </script>
  1159. <script type="text/html" id="tmpl-attachment">
  1160. <div class="attachment-preview js--select-attachment type-{{ data.type }} subtype-{{ data.subtype }} {{ data.orientation }}">
  1161. <div class="thumbnail">
  1162. <# if ( data.uploading ) { #>
  1163. <div class="media-progress-bar"><div style="width: {{ data.percent }}%"></div></div>
  1164. <# } else if ( 'image' === data.type && data.sizes ) { #>
  1165. <div class="centered">
  1166. <img src="{{ data.size.url }}" draggable="false" alt="" />
  1167. </div>
  1168. <# } else { #>
  1169. <div class="centered">
  1170. <# if ( data.image && data.image.src && data.image.src !== data.icon ) { #>
  1171. <img src="{{ data.image.src }}" class="thumbnail" draggable="false" alt="" />
  1172. <# } else if ( data.sizes && data.sizes.medium ) { #>
  1173. <img src="{{ data.sizes.medium.url }}" class="thumbnail" draggable="false" alt="" />
  1174. <# } else { #>
  1175. <img src="{{ data.icon }}" class="icon" draggable="false" alt="" />
  1176. <# } #>
  1177. </div>
  1178. <div class="filename">
  1179. <div>{{ data.filename }}</div>
  1180. </div>
  1181. <# } #>
  1182. </div>
  1183. <# if ( data.buttons.close ) { #>
  1184. <button type="button" class="button-link attachment-close media-modal-icon"><span class="screen-reader-text">Remove</span></button>
  1185. <# } #>
  1186. </div>
  1187. <# if ( data.buttons.check ) { #>
  1188. <button type="button" class="check" tabindex="-1"><span class="media-modal-icon"></span><span class="screen-reader-text">Deselect</span></button>
  1189. <# } #>
  1190. <#
  1191. var maybeReadOnly = data.can.save || data.allowLocalEdits ? '' : 'readonly';
  1192. if ( data.describe ) {
  1193. if ( 'image' === data.type ) { #>
  1194. <input type="text" value="{{ data.caption }}" class="describe" data-setting="caption"
  1195. placeholder="Caption this image&hellip;" {{ maybeReadOnly }} />
  1196. <# } else { #>
  1197. <input type="text" value="{{ data.title }}" class="describe" data-setting="title"
  1198. <# if ( 'video' === data.type ) { #>
  1199. placeholder="Describe this video&hellip;"
  1200. <# } else if ( 'audio' === data.type ) { #>
  1201. placeholder="Describe this audio file&hellip;"
  1202. <# } else { #>
  1203. placeholder="Describe this media file&hellip;"
  1204. <# } #> {{ maybeReadOnly }} />
  1205. <# }
  1206. } #>
  1207. </script>
  1208. <script type="text/html" id="tmpl-attachment-details">
  1209. <h2>
  1210. Attachment Details <span class="settings-save-status">
  1211. <span class="spinner"></span>
  1212. <span class="saved">Saved.</span>
  1213. </span>
  1214. </h2>
  1215. <div class="attachment-info">
  1216. <div class="thumbnail thumbnail-{{ data.type }}">
  1217. <# if ( data.uploading ) { #>
  1218. <div class="media-progress-bar"><div></div></div>
  1219. <# } else if ( 'image' === data.type && data.sizes ) { #>
  1220. <img src="{{ data.size.url }}" draggable="false" alt="" />
  1221. <# } else { #>
  1222. <img src="{{ data.icon }}" class="icon" draggable="false" alt="" />
  1223. <# } #>
  1224. </div>
  1225. <div class="details">
  1226. <div class="filename">{{ data.filename }}</div>
  1227. <div class="uploaded">{{ data.dateFormatted }}</div>
  1228. <div class="file-size">{{ data.filesizeHumanReadable }}</div>
  1229. <# if ( 'image' === data.type && ! data.uploading ) { #>
  1230. <# if ( data.width && data.height ) { #>
  1231. <div class="dimensions">
  1232. {{ data.width }} by {{ data.height }} pixels </div>
  1233. <# } #>
  1234. <# if ( data.can.save && data.sizes ) { #>
  1235. <a class="edit-attachment" href="{{ data.editLink }}&amp;image-editor" target="_blank">Edit Image</a>
  1236. <# } #>
  1237. <# } #>
  1238. <# if ( data.fileLength && data.fileLengthHumanReadable ) { #>
  1239. <div class="file-length">Length: <span aria-hidden="true">{{ data.fileLength }}</span>
  1240. <span class="screen-reader-text">{{ data.fileLengthHumanReadable }}</span>
  1241. </div>
  1242. <# } #>
  1243. <# if ( ! data.uploading && data.can.remove ) { #>
  1244. <button type="button" class="button-link delete-attachment">Delete Permanently</button>
  1245. <# } #>
  1246. <div class="compat-meta">
  1247. <# if ( data.compat && data.compat.meta ) { #>
  1248. {{{ data.compat.meta }}}
  1249. <# } #>
  1250. </div>
  1251. </div>
  1252. </div>
  1253. <# var maybeReadOnly = data.can.save || data.allowLocalEdits ? '' : 'readonly'; #>
  1254. <# if ( 'image' === data.type ) { #>
  1255. <label class="setting" data-setting="alt">
  1256. <span class="name">Alt Text</span>
  1257. <input type="text" value="{{ data.alt }}" aria-describedby="alt-text-description" {{ maybeReadOnly }} />
  1258. </label>
  1259. <p class="description" id="alt-text-description"><a href="https://www.w3.org/WAI/tutorials/images/decision-tree" target="_blank" rel="noopener">Describe the purpose of the image<span class="screen-reader-text"> (opens in a new tab)</span></a>. Leave empty if the image is purely decorative.</p>
  1260. <# } #>
  1261. <label class="setting" data-setting="title">
  1262. <span class="name">Title</span>
  1263. <input type="text" value="{{ data.title }}" {{ maybeReadOnly }} />
  1264. </label>
  1265. <# if ( 'audio' === data.type ) { #>
  1266. <label class="setting" data-setting="artist">
  1267. <span class="name">Artist</span>
  1268. <input type="text" value="{{ data.artist || data.meta.artist || '' }}" />
  1269. </label>
  1270. <label class="setting" data-setting="album">
  1271. <span class="name">Album</span>
  1272. <input type="text" value="{{ data.album || data.meta.album || '' }}" />
  1273. </label>
  1274. <# } #>
  1275. <label class="setting" data-setting="caption">
  1276. <span class="name">Caption</span>
  1277. <textarea {{ maybeReadOnly }}>{{ data.caption }}</textarea>
  1278. </label>
  1279. <label class="setting" data-setting="description">
  1280. <span class="name">Description</span>
  1281. <textarea {{ maybeReadOnly }}>{{ data.description }}</textarea>
  1282. </label>
  1283. <label class="setting" data-setting="url">
  1284. <span class="name">Copy Link</span>
  1285. <input type="text" value="{{ data.url }}" readonly />
  1286. </label>
  1287. </script>
  1288. <script type="text/html" id="tmpl-media-selection">
  1289. <div class="selection-info">
  1290. <span class="count"></span>
  1291. <# if ( data.editable ) { #>
  1292. <button type="button" class="button-link edit-selection">Edit Selection</button>
  1293. <# } #>
  1294. <# if ( data.clearable ) { #>
  1295. <button type="button" class="button-link clear-selection">Clear</button>
  1296. <# } #>
  1297. </div>
  1298. <div class="selection-view"></div>
  1299. </script>
  1300. <script type="text/html" id="tmpl-attachment-display-settings">
  1301. <h2>Attachment Display Settings</h2>
  1302. <# if ( 'image' === data.type ) { #>
  1303. <label class="setting">
  1304. <span>Alignment</span>
  1305. <select class="alignment"
  1306. data-setting="align"
  1307. <# if ( data.userSettings ) { #>
  1308. data-user-setting="align"
  1309. <# } #>>
  1310. <option value="left">
  1311. Left </option>
  1312. <option value="center">
  1313. Center </option>
  1314. <option value="right">
  1315. Right </option>
  1316. <option value="none" selected>
  1317. None </option>
  1318. </select>
  1319. </label>
  1320. <# } #>
  1321. <div class="setting">
  1322. <label>
  1323. <# if ( data.model.canEmbed ) { #>
  1324. <span>Embed or Link</span>
  1325. <# } else { #>
  1326. <span>Link To</span>
  1327. <# } #>
  1328. <select class="link-to"
  1329. data-setting="link"
  1330. <# if ( data.userSettings && ! data.model.canEmbed ) { #>
  1331. data-user-setting="urlbutton"
  1332. <# } #>>
  1333. <# if ( data.model.canEmbed ) { #>
  1334. <option value="embed" selected>
  1335. Embed Media Player </option>
  1336. <option value="file">
  1337. <# } else { #>
  1338. <option value="none" selected>
  1339. None </option>
  1340. <option value="file">
  1341. <# } #>
  1342. <# if ( data.model.canEmbed ) { #>
  1343. Link to Media File <# } else { #>
  1344. Media File <# } #>
  1345. </option>
  1346. <option value="post">
  1347. <# if ( data.model.canEmbed ) { #>
  1348. Link to Attachment Page <# } else { #>
  1349. Attachment Page <# } #>
  1350. </option>
  1351. <# if ( 'image' === data.type ) { #>
  1352. <option value="custom">
  1353. Custom URL </option>
  1354. <# } #>
  1355. </select>
  1356. </label>
  1357. <input type="text" class="link-to-custom" data-setting="linkUrl" />
  1358. </div>
  1359. <# if ( 'undefined' !== typeof data.sizes ) { #>
  1360. <label class="setting">
  1361. <span>Size</span>
  1362. <select class="size" name="size"
  1363. data-setting="size"
  1364. <# if ( data.userSettings ) { #>
  1365. data-user-setting="imgsize"
  1366. <# } #>>
  1367. <#
  1368. var size = data.sizes['thumbnail'];
  1369. if ( size ) { #>
  1370. <option value="thumbnail" >
  1371. Thumbnail &ndash; {{ size.width }} &times; {{ size.height }}
  1372. </option>
  1373. <# } #>
  1374. <#
  1375. var size = data.sizes['medium'];
  1376. if ( size ) { #>
  1377. <option value="medium" >
  1378. Medium &ndash; {{ size.width }} &times; {{ size.height }}
  1379. </option>
  1380. <# } #>
  1381. <#
  1382. var size = data.sizes['large'];
  1383. if ( size ) { #>
  1384. <option value="large" >
  1385. Large &ndash; {{ size.width }} &times; {{ size.height }}
  1386. </option>
  1387. <# } #>
  1388. <#
  1389. var size = data.sizes['full'];
  1390. if ( size ) { #>
  1391. <option value="full" selected='selected'>
  1392. Full Size &ndash; {{ size.width }} &times; {{ size.height }}
  1393. </option>
  1394. <# } #>
  1395. </select>
  1396. </label>
  1397. <# } #>
  1398. </script>
  1399. <script type="text/html" id="tmpl-gallery-settings">
  1400. <h2>Gallery Settings</h2>
  1401. <label class="setting">
  1402. <span>Link To</span>
  1403. <select class="link-to"
  1404. data-setting="link"
  1405. <# if ( data.userSettings ) { #>
  1406. data-user-setting="urlbutton"
  1407. <# } #>>
  1408. <option value="post" <# if ( ! wp.media.galleryDefaults.link || 'post' == wp.media.galleryDefaults.link ) {
  1409. #>selected="selected"<# }
  1410. #>>
  1411. Attachment Page </option>
  1412. <option value="file" <# if ( 'file' == wp.media.galleryDefaults.link ) { #>selected="selected"<# } #>>
  1413. Media File </option>
  1414. <option value="none" <# if ( 'none' == wp.media.galleryDefaults.link ) { #>selected="selected"<# } #>>
  1415. None </option>
  1416. </select>
  1417. </label>
  1418. <label class="setting">
  1419. <span>Columns</span>
  1420. <select class="columns" name="columns"
  1421. data-setting="columns">
  1422. <option value="1" <#
  1423. if ( 1 == wp.media.galleryDefaults.columns ) { #>selected="selected"<# }
  1424. #>>
  1425. 1 </option>
  1426. <option value="2" <#
  1427. if ( 2 == wp.media.galleryDefaults.columns ) { #>selected="selected"<# }
  1428. #>>
  1429. 2 </option>
  1430. <option value="3" <#
  1431. if ( 3 == wp.media.galleryDefaults.columns ) { #>selected="selected"<# }
  1432. #>>
  1433. 3 </option>
  1434. <option value="4" <#
  1435. if ( 4 == wp.media.galleryDefaults.columns ) { #>selected="selected"<# }
  1436. #>>
  1437. 4 </option>
  1438. <option value="5" <#
  1439. if ( 5 == wp.media.galleryDefaults.columns ) { #>selected="selected"<# }
  1440. #>>
  1441. 5 </option>
  1442. <option value="6" <#
  1443. if ( 6 == wp.media.galleryDefaults.columns ) { #>selected="selected"<# }
  1444. #>>
  1445. 6 </option>
  1446. <option value="7" <#
  1447. if ( 7 == wp.media.galleryDefaults.columns ) { #>selected="selected"<# }
  1448. #>>
  1449. 7 </option>
  1450. <option value="8" <#
  1451. if ( 8 == wp.media.galleryDefaults.columns ) { #>selected="selected"<# }
  1452. #>>
  1453. 8 </option>
  1454. <option value="9" <#
  1455. if ( 9 == wp.media.galleryDefaults.columns ) { #>selected="selected"<# }
  1456. #>>
  1457. 9 </option>
  1458. </select>
  1459. </label>
  1460. <label class="setting">
  1461. <span>Random Order</span>
  1462. <input type="checkbox" data-setting="_orderbyRandom" />
  1463. </label>
  1464. <label class="setting size">
  1465. <span>Size</span>
  1466. <select class="size" name="size"
  1467. data-setting="size"
  1468. <# if ( data.userSettings ) { #>
  1469. data-user-setting="imgsize"
  1470. <# } #>
  1471. >
  1472. <option value="thumbnail">
  1473. Thumbnail </option>
  1474. <option value="medium">
  1475. Medium </option>
  1476. <option value="large">
  1477. Large </option>
  1478. <option value="full">
  1479. Full Size </option>
  1480. </select>
  1481. </label>
  1482. </script>
  1483. <script type="text/html" id="tmpl-playlist-settings">
  1484. <h2>Playlist Settings</h2>
  1485. <# var emptyModel = _.isEmpty( data.model ),
  1486. isVideo = 'video' === data.controller.get('library').props.get('type'); #>
  1487. <label class="setting">
  1488. <input type="checkbox" data-setting="tracklist" <# if ( emptyModel ) { #>
  1489. checked="checked"
  1490. <# } #> />
  1491. <# if ( isVideo ) { #>
  1492. <span>Show Video List</span>
  1493. <# } else { #>
  1494. <span>Show Tracklist</span>
  1495. <# } #>
  1496. </label>
  1497. <# if ( ! isVideo ) { #>
  1498. <label class="setting">
  1499. <input type="checkbox" data-setting="artists" <# if ( emptyModel ) { #>
  1500. checked="checked"
  1501. <# } #> />
  1502. <span>Show Artist Name in Tracklist</span>
  1503. </label>
  1504. <# } #>
  1505. <label class="setting">
  1506. <input type="checkbox" data-setting="images" <# if ( emptyModel ) { #>
  1507. checked="checked"
  1508. <# } #> />
  1509. <span>Show Images</span>
  1510. </label>
  1511. </script>
  1512. <script type="text/html" id="tmpl-embed-link-settings">
  1513. <label class="setting link-text">
  1514. <span>Link Text</span>
  1515. <input type="text" class="alignment" data-setting="linkText" />
  1516. </label>
  1517. <div class="embed-container" style="display: none;">
  1518. <div class="embed-preview"></div>
  1519. </div>
  1520. </script>
  1521. <script type="text/html" id="tmpl-embed-image-settings">
  1522. <div class="thumbnail">
  1523. <img src="{{ data.model.url }}" draggable="false" alt="" />
  1524. </div>
  1525. <label class="setting alt-text has-description">
  1526. <span>Alternative Text</span>
  1527. <input type="text" data-setting="alt" aria-describedby="alt-text-description" />
  1528. </label>
  1529. <p class="description" id="alt-text-description"><a href="https://www.w3.org/WAI/tutorials/images/decision-tree" target="_blank" rel="noopener">Describe the purpose of the image<span class="screen-reader-text"> (opens in a new tab)</span></a>. Leave empty if the image is purely decorative.</p>
  1530. <label class="setting caption">
  1531. <span>Caption</span>
  1532. <textarea data-setting="caption" />
  1533. </label>
  1534. <div class="setting align">
  1535. <span>Align</span>
  1536. <div class="button-group button-large" data-setting="align">
  1537. <button class="button" value="left">
  1538. Left </button>
  1539. <button class="button" value="center">
  1540. Center </button>
  1541. <button class="button" value="right">
  1542. Right </button>
  1543. <button class="button active" value="none">
  1544. None </button>
  1545. </div>
  1546. </div>
  1547. <div class="setting link-to">
  1548. <span>Link To</span>
  1549. <div class="button-group button-large" data-setting="link">
  1550. <button class="button" value="file">
  1551. Image URL </button>
  1552. <button class="button" value="custom">
  1553. Custom URL </button>
  1554. <button class="button active" value="none">
  1555. None </button>
  1556. </div>
  1557. <input type="text" class="link-to-custom" data-setting="linkUrl" />
  1558. </div>
  1559. </script>
  1560. <script type="text/html" id="tmpl-image-details">
  1561. <div class="media-embed">
  1562. <div class="embed-media-settings">
  1563. <div class="column-image">
  1564. <div class="image">
  1565. <img src="{{ data.model.url }}" draggable="false" alt="" />
  1566. <# if ( data.attachment && window.imageEdit ) { #>
  1567. <div class="actions">
  1568. <input type="button" class="edit-attachment button" value="Edit Original" />
  1569. <input type="button" class="replace-attachment button" value="Replace" />
  1570. </div>
  1571. <# } #>
  1572. </div>
  1573. </div>
  1574. <div class="column-settings">
  1575. <label class="setting alt-text has-description">
  1576. <span>Alternative Text</span>
  1577. <input type="text" data-setting="alt" value="{{ data.model.alt }}" aria-describedby="alt-text-description" />
  1578. </label>
  1579. <p class="description" id="alt-text-description"><a href="https://www.w3.org/WAI/tutorials/images/decision-tree" target="_blank" rel="noopener">Describe the purpose of the image<span class="screen-reader-text"> (opens in a new tab)</span></a>. Leave empty if the image is purely decorative.</p>
  1580. <label class="setting caption">
  1581. <span>Caption</span>
  1582. <textarea data-setting="caption">{{ data.model.caption }}</textarea>
  1583. </label>
  1584. <h2>Display Settings</h2>
  1585. <div class="setting align">
  1586. <span>Align</span>
  1587. <div class="button-group button-large" data-setting="align">
  1588. <button class="button" value="left">
  1589. Left </button>
  1590. <button class="button" value="center">
  1591. Center </button>
  1592. <button class="button" value="right">
  1593. Right </button>
  1594. <button class="button active" value="none">
  1595. None </button>
  1596. </div>
  1597. </div>
  1598. <# if ( data.attachment ) { #>
  1599. <# if ( 'undefined' !== typeof data.attachment.sizes ) { #>
  1600. <label class="setting size">
  1601. <span>Size</span>
  1602. <select class="size" name="size"
  1603. data-setting="size"
  1604. <# if ( data.userSettings ) { #>
  1605. data-user-setting="imgsize"
  1606. <# } #>>
  1607. <#
  1608. var size = data.sizes['thumbnail'];
  1609. if ( size ) { #>
  1610. <option value="thumbnail">
  1611. Thumbnail &ndash; {{ size.width }} &times; {{ size.height }}
  1612. </option>
  1613. <# } #>
  1614. <#
  1615. var size = data.sizes['medium'];
  1616. if ( size ) { #>
  1617. <option value="medium">
  1618. Medium &ndash; {{ size.width }} &times; {{ size.height }}
  1619. </option>
  1620. <# } #>
  1621. <#
  1622. var size = data.sizes['large'];
  1623. if ( size ) { #>
  1624. <option value="large">
  1625. Large &ndash; {{ size.width }} &times; {{ size.height }}
  1626. </option>
  1627. <# } #>
  1628. <#
  1629. var size = data.sizes['full'];
  1630. if ( size ) { #>
  1631. <option value="full">
  1632. Full Size &ndash; {{ size.width }} &times; {{ size.height }}
  1633. </option>
  1634. <# } #>
  1635. <option value="custom">
  1636. Custom Size </option>
  1637. </select>
  1638. </label>
  1639. <# } #>
  1640. <div class="custom-size<# if ( data.model.size !== 'custom' ) { #> hidden<# } #>">
  1641. <label><span>Width <small>(px)</small></span> <input data-setting="customWidth" type="number" step="1" value="{{ data.model.customWidth }}" /></label><span class="sep">&times;</span><label><span>Height <small>(px)</small></span><input data-setting="customHeight" type="number" step="1" value="{{ data.model.customHeight }}" /></label>
  1642. </div>
  1643. <# } #>
  1644. <div class="setting link-to">
  1645. <span>Link To</span>
  1646. <select data-setting="link">
  1647. <# if ( data.attachment ) { #>
  1648. <option value="file">
  1649. Media File </option>
  1650. <option value="post">
  1651. Attachment Page </option>
  1652. <# } else { #>
  1653. <option value="file">
  1654. Image URL </option>
  1655. <# } #>
  1656. <option value="custom">
  1657. Custom URL </option>
  1658. <option value="none">
  1659. None </option>
  1660. </select>
  1661. <input type="text" class="link-to-custom" data-setting="linkUrl" />
  1662. </div>
  1663. <div class="advanced-section">
  1664. <h2><button type="button" class="button-link advanced-toggle">Advanced Options</button></h2>
  1665. <div class="advanced-settings hidden">
  1666. <div class="advanced-image">
  1667. <label class="setting title-text">
  1668. <span>Image Title Attribute</span>
  1669. <input type="text" data-setting="title" value="{{ data.model.title }}" />
  1670. </label>
  1671. <label class="setting extra-classes">
  1672. <span>Image CSS Class</span>
  1673. <input type="text" data-setting="extraClasses" value="{{ data.model.extraClasses }}" />
  1674. </label>
  1675. </div>
  1676. <div class="advanced-link">
  1677. <div class="setting link-target">
  1678. <label><input type="checkbox" data-setting="linkTargetBlank" value="_blank" <# if ( data.model.linkTargetBlank ) { #>checked="checked"<# } #>>Open link in a new tab</label>
  1679. </div>
  1680. <label class="setting link-rel">
  1681. <span>Link Rel</span>
  1682. <input type="text" data-setting="linkRel" value="{{ data.model.linkRel }}" />
  1683. </label>
  1684. <label class="setting link-class-name">
  1685. <span>Link CSS Class</span>
  1686. <input type="text" data-setting="linkClassName" value="{{ data.model.linkClassName }}" />
  1687. </label>
  1688. </div>
  1689. </div>
  1690. </div>
  1691. </div>
  1692. </div>
  1693. </div>
  1694. </script>
  1695. <script type="text/html" id="tmpl-image-editor">
  1696. <div id="media-head-{{ data.id }}"></div>
  1697. <div id="image-editor-{{ data.id }}"></div>
  1698. </script>
  1699. <script type="text/html" id="tmpl-audio-details">
  1700. <# var ext, html5types = {
  1701. mp3: wp.media.view.settings.embedMimes.mp3,
  1702. ogg: wp.media.view.settings.embedMimes.ogg
  1703. }; #>
  1704. <div class="media-embed media-embed-details">
  1705. <div class="embed-media-settings embed-audio-settings">
  1706. <audio style="visibility: hidden"
  1707. controls
  1708. class="wp-audio-shortcode"
  1709. width="{{ _.isUndefined( data.model.width ) ? 400 : data.model.width }}"
  1710. preload="{{ _.isUndefined( data.model.preload ) ? 'none' : data.model.preload }}"
  1711. <#
  1712. if ( ! _.isUndefined( data.model.autoplay ) && data.model.autoplay ) {
  1713. #> autoplay<#
  1714. }
  1715. if ( ! _.isUndefined( data.model.loop ) && data.model.loop ) {
  1716. #> loop<#
  1717. }
  1718. #>
  1719. >
  1720. <# if ( ! _.isEmpty( data.model.src ) ) { #>
  1721. <source src="{{ data.model.src }}" type="{{ wp.media.view.settings.embedMimes[ data.model.src.split('.').pop() ] }}" />
  1722. <# } #>
  1723. <# if ( ! _.isEmpty( data.model.mp3 ) ) { #>
  1724. <source src="{{ data.model.mp3 }}" type="{{ wp.media.view.settings.embedMimes[ 'mp3' ] }}" />
  1725. <# } #>
  1726. <# if ( ! _.isEmpty( data.model.ogg ) ) { #>
  1727. <source src="{{ data.model.ogg }}" type="{{ wp.media.view.settings.embedMimes[ 'ogg' ] }}" />
  1728. <# } #>
  1729. <# if ( ! _.isEmpty( data.model.wma ) ) { #>
  1730. <source src="{{ data.model.wma }}" type="{{ wp.media.view.settings.embedMimes[ 'wma' ] }}" />
  1731. <# } #>
  1732. <# if ( ! _.isEmpty( data.model.m4a ) ) { #>
  1733. <source src="{{ data.model.m4a }}" type="{{ wp.media.view.settings.embedMimes[ 'm4a' ] }}" />
  1734. <# } #>
  1735. <# if ( ! _.isEmpty( data.model.wav ) ) { #>
  1736. <source src="{{ data.model.wav }}" type="{{ wp.media.view.settings.embedMimes[ 'wav' ] }}" />
  1737. <# } #>
  1738. </audio>
  1739. <# if ( ! _.isEmpty( data.model.src ) ) {
  1740. ext = data.model.src.split('.').pop();
  1741. if ( html5types[ ext ] ) {
  1742. delete html5types[ ext ];
  1743. }
  1744. #>
  1745. <label class="setting">
  1746. <span>SRC</span>
  1747. <input type="text" disabled="disabled" data-setting="src" value="{{ data.model.src }}" />
  1748. <button type="button" class="button-link remove-setting">Remove audio source</button>
  1749. </label>
  1750. <# } #>
  1751. <# if ( ! _.isEmpty( data.model.mp3 ) ) {
  1752. if ( ! _.isUndefined( html5types.mp3 ) ) {
  1753. delete html5types.mp3;
  1754. }
  1755. #>
  1756. <label class="setting">
  1757. <span>MP3</span>
  1758. <input type="text" disabled="disabled" data-setting="mp3" value="{{ data.model.mp3 }}" />
  1759. <button type="button" class="button-link remove-setting">Remove audio source</button>
  1760. </label>
  1761. <# } #>
  1762. <# if ( ! _.isEmpty( data.model.ogg ) ) {
  1763. if ( ! _.isUndefined( html5types.ogg ) ) {
  1764. delete html5types.ogg;
  1765. }
  1766. #>
  1767. <label class="setting">
  1768. <span>OGG</span>
  1769. <input type="text" disabled="disabled" data-setting="ogg" value="{{ data.model.ogg }}" />
  1770. <button type="button" class="button-link remove-setting">Remove audio source</button>
  1771. </label>
  1772. <# } #>
  1773. <# if ( ! _.isEmpty( data.model.wma ) ) {
  1774. if ( ! _.isUndefined( html5types.wma ) ) {
  1775. delete html5types.wma;
  1776. }
  1777. #>
  1778. <label class="setting">
  1779. <span>WMA</span>
  1780. <input type="text" disabled="disabled" data-setting="wma" value="{{ data.model.wma }}" />
  1781. <button type="button" class="button-link remove-setting">Remove audio source</button>
  1782. </label>
  1783. <# } #>
  1784. <# if ( ! _.isEmpty( data.model.m4a ) ) {
  1785. if ( ! _.isUndefined( html5types.m4a ) ) {
  1786. delete html5types.m4a;
  1787. }
  1788. #>
  1789. <label class="setting">
  1790. <span>M4A</span>
  1791. <input type="text" disabled="disabled" data-setting="m4a" value="{{ data.model.m4a }}" />
  1792. <button type="button" class="button-link remove-setting">Remove audio source</button>
  1793. </label>
  1794. <# } #>
  1795. <# if ( ! _.isEmpty( data.model.wav ) ) {
  1796. if ( ! _.isUndefined( html5types.wav ) ) {
  1797. delete html5types.wav;
  1798. }
  1799. #>
  1800. <label class="setting">
  1801. <span>WAV</span>
  1802. <input type="text" disabled="disabled" data-setting="wav" value="{{ data.model.wav }}" />
  1803. <button type="button" class="button-link remove-setting">Remove audio source</button>
  1804. </label>
  1805. <# } #>
  1806. <# if ( ! _.isEmpty( html5types ) ) { #>
  1807. <div class="setting">
  1808. <span>Add alternate sources for maximum HTML5 playback:</span>
  1809. <div class="button-large">
  1810. <# _.each( html5types, function (mime, type) { #>
  1811. <button class="button add-media-source" data-mime="{{ mime }}">{{ type }}</button>
  1812. <# } ) #>
  1813. </div>
  1814. </div>
  1815. <# } #>
  1816. <div class="setting preload">
  1817. <span>Preload</span>
  1818. <div class="button-group button-large" data-setting="preload">
  1819. <button class="button" value="auto">Auto</button>
  1820. <button class="button" value="metadata">Metadata</button>
  1821. <button class="button active" value="none">None</button>
  1822. </div>
  1823. </div>
  1824. <label class="setting checkbox-setting">
  1825. <input type="checkbox" data-setting="autoplay" />
  1826. <span>Autoplay</span>
  1827. </label>
  1828. <label class="setting checkbox-setting">
  1829. <input type="checkbox" data-setting="loop" />
  1830. <span>Loop</span>
  1831. </label>
  1832. </div>
  1833. </div>
  1834. </script>
  1835. <script type="text/html" id="tmpl-video-details">
  1836. <# var ext, html5types = {
  1837. mp4: wp.media.view.settings.embedMimes.mp4,
  1838. ogv: wp.media.view.settings.embedMimes.ogv,
  1839. webm: wp.media.view.settings.embedMimes.webm
  1840. }; #>
  1841. <div class="media-embed media-embed-details">
  1842. <div class="embed-media-settings embed-video-settings">
  1843. <div class="wp-video-holder">
  1844. <#
  1845. var w = ! data.model.width || data.model.width > 640 ? 640 : data.model.width,
  1846. h = ! data.model.height ? 360 : data.model.height;
  1847. if ( data.model.width && w !== data.model.width ) {
  1848. h = Math.ceil( ( h * w ) / data.model.width );
  1849. }
  1850. #>
  1851. <# var w_rule = '', classes = [],
  1852. w, h, settings = wp.media.view.settings,
  1853. isYouTube = isVimeo = false;
  1854. if ( ! _.isEmpty( data.model.src ) ) {
  1855. isYouTube = data.model.src.match(/youtube|youtu\.be/);
  1856. isVimeo = -1 !== data.model.src.indexOf('vimeo');
  1857. }
  1858. if ( settings.contentWidth && data.model.width >= settings.contentWidth ) {
  1859. w = settings.contentWidth;
  1860. } else {
  1861. w = data.model.width;
  1862. }
  1863. if ( w !== data.model.width ) {
  1864. h = Math.ceil( ( data.model.height * w ) / data.model.width );
  1865. } else {
  1866. h = data.model.height;
  1867. }
  1868. if ( w ) {
  1869. w_rule = 'width: ' + w + 'px; ';
  1870. }
  1871. if ( isYouTube ) {
  1872. classes.push( 'youtube-video' );
  1873. }
  1874. if ( isVimeo ) {
  1875. classes.push( 'vimeo-video' );
  1876. }
  1877. #>
  1878. <div style="{{ w_rule }}" class="wp-video">
  1879. <video controls
  1880. class="wp-video-shortcode {{ classes.join( ' ' ) }}"
  1881. <# if ( w ) { #>width="{{ w }}"<# } #>
  1882. <# if ( h ) { #>height="{{ h }}"<# } #>
  1883. <#
  1884. if ( ! _.isUndefined( data.model.poster ) && data.model.poster ) {
  1885. #> poster="{{ data.model.poster }}"<#
  1886. } #>
  1887. preload="{{ _.isUndefined( data.model.preload ) ? 'metadata' : data.model.preload }}"<#
  1888. if ( ! _.isUndefined( data.model.autoplay ) && data.model.autoplay ) {
  1889. #> autoplay<#
  1890. }
  1891. if ( ! _.isUndefined( data.model.loop ) && data.model.loop ) {
  1892. #> loop<#
  1893. }
  1894. #>
  1895. >
  1896. <# if ( ! _.isEmpty( data.model.src ) ) {
  1897. if ( isYouTube ) { #>
  1898. <source src="{{ data.model.src }}" type="video/youtube" />
  1899. <# } else if ( isVimeo ) { #>
  1900. <source src="{{ data.model.src }}" type="video/vimeo" />
  1901. <# } else { #>
  1902. <source src="{{ data.model.src }}" type="{{ settings.embedMimes[ data.model.src.split('.').pop() ] }}" />
  1903. <# }
  1904. } #>
  1905. <# if ( data.model.mp4 ) { #>
  1906. <source src="{{ data.model.mp4 }}" type="{{ settings.embedMimes[ 'mp4' ] }}" />
  1907. <# } #>
  1908. <# if ( data.model.m4v ) { #>
  1909. <source src="{{ data.model.m4v }}" type="{{ settings.embedMimes[ 'm4v' ] }}" />
  1910. <# } #>
  1911. <# if ( data.model.webm ) { #>
  1912. <source src="{{ data.model.webm }}" type="{{ settings.embedMimes[ 'webm' ] }}" />
  1913. <# } #>
  1914. <# if ( data.model.ogv ) { #>
  1915. <source src="{{ data.model.ogv }}" type="{{ settings.embedMimes[ 'ogv' ] }}" />
  1916. <# } #>
  1917. <# if ( data.model.wmv ) { #>
  1918. <source src="{{ data.model.wmv }}" type="{{ settings.embedMimes[ 'wmv' ] }}" />
  1919. <# } #>
  1920. <# if ( data.model.flv ) { #>
  1921. <source src="{{ data.model.flv }}" type="{{ settings.embedMimes[ 'flv' ] }}" />
  1922. <# } #>
  1923. {{{ data.model.content }}}
  1924. </video>
  1925. </div>
  1926. <# if ( ! _.isEmpty( data.model.src ) ) {
  1927. ext = data.model.src.split('.').pop();
  1928. if ( html5types[ ext ] ) {
  1929. delete html5types[ ext ];
  1930. }
  1931. #>
  1932. <label class="setting">
  1933. <span>SRC</span>
  1934. <input type="text" disabled="disabled" data-setting="src" value="{{ data.model.src }}" />
  1935. <button type="button" class="button-link remove-setting">Remove video source</button>
  1936. </label>
  1937. <# } #>
  1938. <# if ( ! _.isEmpty( data.model.mp4 ) ) {
  1939. if ( ! _.isUndefined( html5types.mp4 ) ) {
  1940. delete html5types.mp4;
  1941. }
  1942. #>
  1943. <label class="setting">
  1944. <span>MP4</span>
  1945. <input type="text" disabled="disabled" data-setting="mp4" value="{{ data.model.mp4 }}" />
  1946. <button type="button" class="button-link remove-setting">Remove video source</button>
  1947. </label>
  1948. <# } #>
  1949. <# if ( ! _.isEmpty( data.model.m4v ) ) {
  1950. if ( ! _.isUndefined( html5types.m4v ) ) {
  1951. delete html5types.m4v;
  1952. }
  1953. #>
  1954. <label class="setting">
  1955. <span>M4V</span>
  1956. <input type="text" disabled="disabled" data-setting="m4v" value="{{ data.model.m4v }}" />
  1957. <button type="button" class="button-link remove-setting">Remove video source</button>
  1958. </label>
  1959. <# } #>
  1960. <# if ( ! _.isEmpty( data.model.webm ) ) {
  1961. if ( ! _.isUndefined( html5types.webm ) ) {
  1962. delete html5types.webm;
  1963. }
  1964. #>
  1965. <label class="setting">
  1966. <span>WEBM</span>
  1967. <input type="text" disabled="disabled" data-setting="webm" value="{{ data.model.webm }}" />
  1968. <button type="button" class="button-link remove-setting">Remove video source</button>
  1969. </label>
  1970. <# } #>
  1971. <# if ( ! _.isEmpty( data.model.ogv ) ) {
  1972. if ( ! _.isUndefined( html5types.ogv ) ) {
  1973. delete html5types.ogv;
  1974. }
  1975. #>
  1976. <label class="setting">
  1977. <span>OGV</span>
  1978. <input type="text" disabled="disabled" data-setting="ogv" value="{{ data.model.ogv }}" />
  1979. <button type="button" class="button-link remove-setting">Remove video source</button>
  1980. </label>
  1981. <# } #>
  1982. <# if ( ! _.isEmpty( data.model.wmv ) ) {
  1983. if ( ! _.isUndefined( html5types.wmv ) ) {
  1984. delete html5types.wmv;
  1985. }
  1986. #>
  1987. <label class="setting">
  1988. <span>WMV</span>
  1989. <input type="text" disabled="disabled" data-setting="wmv" value="{{ data.model.wmv }}" />
  1990. <button type="button" class="button-link remove-setting">Remove video source</button>
  1991. </label>
  1992. <# } #>
  1993. <# if ( ! _.isEmpty( data.model.flv ) ) {
  1994. if ( ! _.isUndefined( html5types.flv ) ) {
  1995. delete html5types.flv;
  1996. }
  1997. #>
  1998. <label class="setting">
  1999. <span>FLV</span>
  2000. <input type="text" disabled="disabled" data-setting="flv" value="{{ data.model.flv }}" />
  2001. <button type="button" class="button-link remove-setting">Remove video source</button>
  2002. </label>
  2003. <# } #>
  2004. </div>
  2005. <# if ( ! _.isEmpty( html5types ) ) { #>
  2006. <div class="setting">
  2007. <span>Add alternate sources for maximum HTML5 playback:</span>
  2008. <div class="button-large">
  2009. <# _.each( html5types, function (mime, type) { #>
  2010. <button class="button add-media-source" data-mime="{{ mime }}">{{ type }}</button>
  2011. <# } ) #>
  2012. </div>
  2013. </div>
  2014. <# } #>
  2015. <# if ( ! _.isEmpty( data.model.poster ) ) { #>
  2016. <label class="setting">
  2017. <span>Poster Image</span>
  2018. <input type="text" disabled="disabled" data-setting="poster" value="{{ data.model.poster }}" />
  2019. <button type="button" class="button-link remove-setting">Remove poster image</button>
  2020. </label>
  2021. <# } #>
  2022. <div class="setting preload">
  2023. <span>Preload</span>
  2024. <div class="button-group button-large" data-setting="preload">
  2025. <button class="button" value="auto">Auto</button>
  2026. <button class="button" value="metadata">Metadata</button>
  2027. <button class="button active" value="none">None</button>
  2028. </div>
  2029. </div>
  2030. <label class="setting checkbox-setting">
  2031. <input type="checkbox" data-setting="autoplay" />
  2032. <span>Autoplay</span>
  2033. </label>
  2034. <label class="setting checkbox-setting">
  2035. <input type="checkbox" data-setting="loop" />
  2036. <span>Loop</span>
  2037. </label>
  2038. <label class="setting" data-setting="content">
  2039. <span>Tracks (subtitles, captions, descriptions, chapters, or metadata)</span>
  2040. <#
  2041. var content = '';
  2042. if ( ! _.isEmpty( data.model.content ) ) {
  2043. var tracks = jQuery( data.model.content ).filter( 'track' );
  2044. _.each( tracks.toArray(), function (track) {
  2045. content += track.outerHTML; #>
  2046. <p>
  2047. <input class="content-track" type="text" value="{{ track.outerHTML }}" />
  2048. <button type="button" class="button-link remove-setting remove-track">Remove video track</button>
  2049. </p>
  2050. <# } ); #>
  2051. <# } else { #>
  2052. <em>There are no associated subtitles.</em>
  2053. <# } #>
  2054. <textarea class="hidden content-setting">{{ content }}</textarea>
  2055. </label>
  2056. </div>
  2057. </div>
  2058. </script>
  2059. <script type="text/html" id="tmpl-editor-gallery">
  2060. <# if ( data.attachments.length ) { #>
  2061. <div class="gallery gallery-columns-{{ data.columns }}">
  2062. <# _.each( data.attachments, function( attachment, index ) { #>
  2063. <dl class="gallery-item">
  2064. <dt class="gallery-icon">
  2065. <# if ( attachment.thumbnail ) { #>
  2066. <img src="{{ attachment.thumbnail.url }}" width="{{ attachment.thumbnail.width }}" height="{{ attachment.thumbnail.height }}" alt="" />
  2067. <# } else { #>
  2068. <img src="{{ attachment.url }}" alt="" />
  2069. <# } #>
  2070. </dt>
  2071. <# if ( attachment.caption ) { #>
  2072. <dd class="wp-caption-text gallery-caption">
  2073. {{{ data.verifyHTML( attachment.caption ) }}}
  2074. </dd>
  2075. <# } #>
  2076. </dl>
  2077. <# if ( index % data.columns === data.columns - 1 ) { #>
  2078. <br style="clear: both;">
  2079. <# } #>
  2080. <# } ); #>
  2081. </div>
  2082. <# } else { #>
  2083. <div class="wpview-error">
  2084. <div class="dashicons dashicons-format-gallery"></div><p>No items found.</p>
  2085. </div>
  2086. <# } #>
  2087. </script>
  2088. <script type="text/html" id="tmpl-crop-content">
  2089. <img class="crop-image" src="{{ data.url }}" alt="Image crop area preview. Requires mouse interaction.">
  2090. <div class="upload-errors"></div>
  2091. </script>
  2092. <script type="text/html" id="tmpl-site-icon-preview">
  2093. <h2>Preview</h2>
  2094. <strong aria-hidden="true">As a browser icon</strong>
  2095. <div class="favicon-preview">
  2096. <img src="http://src.wordpress-develop.dev/wp-admin/images/browser.png" class="browser-preview" width="182" height="" alt="" />
  2097. <div class="favicon">
  2098. <img id="preview-favicon" src="{{ data.url }}" alt="Preview as a browser icon"/>
  2099. </div>
  2100. <span class="browser-title" aria-hidden="true">WordPress Develop</span>
  2101. </div>
  2102. <strong aria-hidden="true">As an app icon</strong>
  2103. <div class="app-icon-preview">
  2104. <img id="preview-app-icon" src="{{ data.url }}" alt="Preview as an app icon"/>
  2105. </div>
  2106. </script>
  2107. </div><!-- end widget templates -->
  2108. <script src="../../build/wp-includes/js/tinymce/tinymce.min.js"></script>
  2109. <script src="../../build/wp-includes/js/tinymce/plugins/wptextpattern/plugin.js"></script>
  2110. <script src="wp-includes/js/tinymce/plugins/wptextpattern/plugin.js"></script>
  2111. <script src="wp-includes/js/tinymce/tinymce-obsolete.js"></script>
  2112. <!-- Changeset locked notice template -->
  2113. <script type="text/html" id="tmpl-customize-changeset-locked-notice">
  2114. <div id="customize-changeset-lock-dialog" class="notification-dialog-wrap hidden">
  2115. <div class="notification-dialog-background"></div>
  2116. <div class="notification-dialog">
  2117. <div class="customize-changeset-locked-message">
  2118. <div class="customize-changeset-locked-avatar"></div>
  2119. <p class="currently-editing wp-tab-first" tabindex="0">
  2120. <span class="customize-notice-user-name"></span> <span class="customize-take-over-message">is already customizing this site. Do you want to take over?</span></p>
  2121. <p>
  2122. <a class="button customize-notice-go-back-button" href="/wp-admin/post.php?post=505&#038;action=edit">Go back</a>
  2123. <a class="button customize-notice-preview-button" href="http://example.org/?customize_changeset_uuid=7a796f7a-255c-49f5-9d25-cef0c315a4ba">Preview</a>
  2124. <a class="button button-primary wp-tab-last customize-notice-take-over-button" href="http://example.org/wp-admin/customize.php?changeset_uuid=7a796f7a-255c-49f5-9d25-cef0c315a4ba&action=customize_take_over_changeset&nonce=e3a1df16d2&return=/wp-admin/post.php?post=505&action=edit">Take over</a>
  2125. </p>
  2126. </div>
  2127. </div>
  2128. </div>
  2129. </script>
  2130. <!-- Updates templates and HTML fixtures -->
  2131. <script id="tmpl-wp-updates-admin-notice" type="text/html">
  2132. <div <# if ( data.id ) { #>id="{{ data.id }}"<# } #> class="notice {{ data.className }}"><p>{{{ data.message }}}</p></div>
  2133. </script>
  2134. <div hidden>
  2135. <ul>
  2136. <li id="wp-admin-bar-updates">
  2137. <a class="ab-item" href="wp-admin/update-core.php" title="2 Plugin Updates">
  2138. <span class="ab-icon"></span>
  2139. <span class="ab-label">2</span>
  2140. <span class="screen-reader-text">2 Plugin Updates</span>
  2141. </a>
  2142. </li>
  2143. <li class="wp-has-submenu wp-not-current-submenu menu-top menu-icon-plugins" id="menu-plugins">
  2144. <a href="plugins.php" class="wp-has-submenu wp-not-current-submenu menu-top menu-icon-plugins" aria-haspopup="true">
  2145. <div class="wp-menu-arrow"><div></div></div>
  2146. <div class="wp-menu-image dashicons-before dashicons-admin-plugins"><br></div>
  2147. <div class="wp-menu-name">Plugins
  2148. <span class="update-plugins count-2">
  2149. <span class="plugin-count">2</span>
  2150. </span>
  2151. </div>
  2152. </a>
  2153. <ul class="wp-submenu wp-submenu-wrap">
  2154. <li class="wp-submenu-head" aria-hidden="true">Plugins
  2155. <span class="update-plugins count-2">
  2156. <span class="plugin-count">2</span>
  2157. </span>
  2158. </li>
  2159. <li class="wp-first-item">
  2160. <a href="plugins.php" class="wp-first-item">Installed Plugins</a></li><li><a href="plugin-install.php">Add New</a>
  2161. </li><li>
  2162. <a href="plugin-editor.php">Editor</a>
  2163. </li>
  2164. </ul>
  2165. </li>
  2166. </ul>
  2167. </div>
  2168. </body>
  2169. </html>