If you are not sure if the website you would like to visit is secure, you can verify it here. Enter the website address of the page and see parts of its content and the thumbnail images on this site. None (if any) dangerous scripts on the referenced page will be executed. Additionally, if the selected site contains subpages, you can verify it (review) in batches containing 5 pages.
favicon.ico: web.archive.org/web/20230127081347/https://developer.wordpress.org/plugins/javascript/enqueuing - WordPress.org.

site address: web.archive.org/web/20221209002836/https://developer.wordpress.org/plugins/javascript/enqueuing/ redirected to: web.archive.org/web/20230127081347/https://developer.wordpress.org/plugins/javascript/enqueuing

site title: WordPress.org

Our opinion (on Wednesday 16 September 2026 16:48:35 UTC):

GREEN status (no comments) - no comments
After content analysis of this website we propose the following hashtags:



Meta tags:
description=There are two parts to the server side PHP script that are needed to implement AJAX communication. First we need to enqueue the jQuery…;

Headings (most frequently used words):

enqueue, ajax, developer, resources, server, side, php, and, enqueuing, handbook, navigation, chapters, topics, script, action, nonce, localize, data, die, handler, summary, register, vs, xml, json, other,

Text of the page (most frequently used words):
the (123), ajax (34), script (34), for (33), and (27), you (26), wordpress (23), that (23), this (22), use (22), jquery (22), your (21), php (20), our (18), title (17), #enqueue (16), nonce (15), plugin (15), function (14), with (14), top (13), data (13), hook (13), not (12), can (12), page (11), array (11), are (11), request (11), action (10), will (10), value (10), used (10), handler (9), tag (9), code (8), get (8), using (8), example (8), response (8), any (8), one (8), which (8), from (8), all (7), die (7), like (7), server (7), user (7), post (7), scripts (7), need (7), developer (7), custom (7), api (6), title_example (6), _post (6), args (6), the_query (6), new (6), should (6), when (6), some (6), what (6), other (6), xml (6), but (6), values (6), pages (6), side (6), only (6), enqueuing (6), org (5), plugins (5), json (5), complete (5), functions (5), must (5), send (5), was (5), settings (5), section (5), form (5), needed (5), wp_enqueue_script (5), admin (5), object (5), register (5), cron (5), shortcodes (5), visit (4), account (4), about (4), check_ajax_referer (4), wp_unslash (4), update_user_meta (4), looks (4), wp_ajax_response (4), content (4), header (4), then (4), meta (4), first (4), parameter (4), true (4), since (4), same (4), handle (4), have (4), admin_enqueue_scripts (4), my_enqueue (4), plugins_url (4), global (4), called (4), url (4), web (4), hooks (4), working (4), metadata (4), learn (3), handbook (3), my_ajax_handler (3), get_current_user_id (3), title_preference (3), sanitize_post_title (3), wp_query (3), esc_html (3), post_count (3), wp_die (3), finished (3), wp_send_json (3), summary (3), has (3), its (3), needs (3), fail (3), actual (3), easy (3), provides (3), something (3), proper (3), there (3), order (3), sent (3), does (3), were (3), callback (3), anything (3), wp_create_nonce (3), add_action (3), here (3), logged (3), users (3), such (3), cookie (3), case (3), arbitrary (3), _request (3), note (3), localization (3), security (3), myjquery (3), __file__ (3), wp_localize_script (3), my_ajax_obj (3), how (3), named (3), localize (3), create (3), template (3), never (3), topics (3), javascript (3), types (3), menus (3), privacy (2), wordcamp (2), patterns (2), themes (2), showcase (2), developers (2), documentation (2), hosting (2), news (2), heartbeat (2), echo (2), handlers (2), simply (2), maybe (2), allow (2), way (2), delimited (2), may (2), also (2), appropriate (2), class (2), make (2), task (2), generate (2), output (2), back (2), options (2), deal (2), build (2), out (2), running (2), through (2), provided (2), check (2), good (2), would (2), nonces (2), verify (2), enqueued (2), wp_ajax_my_tag_count (2), exchange (2), recall (2), who (2), basic (2), instead (2), least (2), methods (2), bad (2), actor (2), browser (2), into (2), _cookie (2), _get (2), major (2), takes (2), depends (2), passed (2), remember (2), add (2), myplugin_settings (2), return (2), ajax_url (2), admin_url (2), creating (2), single (2), title_nonce (2), created (2), localizing (2), string (2), related (2), optional (2), file (2), linked (2), why (2), parts (2), loaded (2), closures (2), supported (2), always (2), version (2), where (2), front (2), end (2), tags (2), directly (2), administration (2), parameters (2), second (2), hardcode (2), links (2), two (2), requests (2), directory (2), internationalization (2), scheduling (2), http (2), capabilities (2), taxonomies (2), advanced (2), personal (2), securing (2), resources (2), linkedin, instagram, twitter, facebook, public, matt, com, bbpress, buddypress, involved, swag, donate, navigation, my_ajax_handler__json, tasks, automatically, handled, real, world, application, possibility, could, reason, instance, database, down, contingency, receiving, act, accordingly, perhaps, telling, try, again, later, transfer, long, sender, receiver, coordinated, text, formats, comma, tab, many, possibilities, small, amounts, sending, raw, stream, adequate, replacement, html, nothing, else, format, lightweight, encode, print, effectively, replacing, done, callbacks, fire, wp_send_json_error, wp_send_json_success, support, leaves, desired, fortunately, easier, formatted, set, correct, type, ensuring, finally, several, ways, transmit, let, look, before, specifics, query, count, selected, save, selection, contained, assign, variable, after, remove, unexpected, quotes, identical, dies, now, longer, next, twenty, four, hours, needn, earlier, thing, localized, handles, means, utilized, currently, wp_ajax_nopriv_my_tag_count, my_tag_count, probably, more, super, globals, retrieve, forms, cookies, prefer, seen, kind, cool, regardless, method, works, great, both, well, stop, shopping, therein, lies, tragic, flaw, name, conflict, override, thus, ridiculously, craft, counterfeit, their, overwrite, might, expecting, route, hackers, inject, extra, safe, stick, specific, variables, avoid, size, fits, part, receives, posted, sends, whether, display, someone, capability, role, current_user_can, assets, param, assigned, right, goes, though, particular, virtually, anywhere, combined, together, process, assigning, properties, uses, suggested, really, suits, validated, legitimate, potentially, nefarious, unknown, know, received, see, examples, tutorials, religiously, fine, properly, creates, useful, easily, reference, various, just, referencing, elsewhere, wp_register_script, anonymous, because, recently, them, quite, time, people, still, older, versions, maximum, compatibility, recent, developing, own, installation, ahead, passes, current, filename, information, pass, etc, ensure, is_single, is_home, cannot, few, sort, except, login, login_enqueue_scripts, wp_enqueue_scripts, three, refer, portability, besides, third, dependent, list, even, dependency, call, insert, link, ready, access, rule, bears, mentioning, anyway, covers, quirks, trip, experienced, coders, appear, correctly, head, implement, communication, handling, home, browse, credits, helper, debug, bar, ons, tools, faq, alerts, warnings, subversion, planning, detailed, guidelines, internationalize, testing, hooking, system, scheduler, events, understanding, roles, term, splitting, registering, rendering, boxes, managing, tinymce, enhanced, enclosing, sub, level, erasure, export, policy, filters, actions, escaping, sanitizing, input, validation, checking, determining, directories, best, practices, uninstall, activation, deactivation, including, software, license, requirements, basics, introduction, development, chapters, menu, search, enterprise, gutenberg, five, future, job, board, photo, meetups, community, forums, mobile, openverse, download, extend, log, skip, wayback, machine, archive, 20230127081347, https, timestamps, capture, success, 2024, 2023, 2022, feb, jan, dec, mar, 2015, sep, 2026, 280, captures,


Text of the page (random words):
server side php and enqueuing plugin developer handbook wordpress developer resources 280 captures 24 mar 2015 16 sep 2026 dec jan feb 27 2022 2023 2024 success fail about this capture timestamps the wayback machine http web archive org web 20230127081347 https developer wordpress org plugins javascript enqueuing skip to content log in register wordpress org news download extend get wordpress themes patterns plugins openverse mobile hosting learn learn wordpress documentation forums wordpress tv developers community make wordpress wordcamp meetups photo directory job board five for the future about about wordpress showcase gutenberg enterprise get wordpress search get wordpress menu developer resources chapters introduction to plugin development what is a plugin plugin basics header requirements including a software license activation deactivation hooks uninstall methods best practices determining plugin and content directories plugin security checking user capabilities data validation securing sanitizing input securing escaping output nonces hooks actions filters custom hooks advanced topics privacy policy content personal data export personal data erasure advanced topics administration menus top level menus sub menus shortcodes basic shortcodes enclosing shortcodes shortcodes with parameters tinymce enhanced shortcodes settings settings api using settings api options api custom settings page metadata managing post metadata custom meta boxes rendering post metadata custom post types registering custom post types working with custom post types taxonomies working with custom taxonomies term splitting wp 4 2 users working with users working with user metadata roles and capabilities http api javascript ajax jquery jquery ajax server side php and enqueuing heartbeat api summary cron understanding wp cron scheduling scheduling wp cron events hooking wp cron into the system task scheduler testing of wp cron internationalization localization how to internationalize your plugin internationalization security the plugin directory detailed plugin guidelines planning plugins using subversion alerts and warnings developer faq developer tools debug bar and add ons helper plugins credits browse home plugin handbook javascript server side php and enqueuing server side php and enqueuing topics enqueue script enqueue register vs enqueue nonce localize ajax action data xml json other die ajax handler summary there are two parts to the server side php script that are needed to implement ajax communication first we need to enqueue the jquery script on the web page and localize any php values that the jquery script needs second is the actual handling of the ajax request enqueue script this section covers the two major quirks of ajax in wordpress that trip up experienced coders new to wordpress one is the need to enqueue scripts in order to get meta links to appear correctly in the page s head section the other is that all ajax requests need to be sent through wp admin admin ajax php never send requests directly to your plugin pages top enqueue use the function wp_enqueue_script to get wordpress to insert a meta link to your script in the page s section never hardcode such links in the header template as a plugin developer you do not have ready access to the header template but this rule bears mentioning anyway the enqueue function takes three parameters the first is an arbitrary tag or handle that is used to refer to your script in other functions the second is the complete url to your script file for portability use plugins_url to build the proper url if you are enqueuing the script for something besides a plugin use some related function to create a proper url never hardcode it the third parameter is an array of any script tags that your script is dependent on since we are using jquery to send an ajax request you will at least need to list jquery in the array always use an array even if it is for a single dependency the enqueue call for our example looks like this wp_enqueue_script ajax script plugins_url js myjquery js __file__ array jquery 1 0 0 true you cannot enqueue scripts directly from your plugin code page when it is loaded scripts must be enqueued from one of a few action hooks which one depends on what sort of page the script needs to be linked to for administration pages use admin_enqueue_scripts for front end pages use wp_enqueue_scripts except for the login page in which case use login_enqueue_scripts the admin_enqueue_scripts hook passes the current page filename to your callback use this information to only enqueue your script on pages where it is needed the front end version does not pass anything in that case use template tags such as is_home is_single etc to ensure that you only enqueue your script where it is needed this is the complete enqueue code for our example add_action admin_enqueue_scripts my_enqueue function my_enqueue hook if myplugin_settings php hook return wp_enqueue_script ajax script plugins_url js myjquery js __file__ array jquery 1 0 0 true why do we use a named function here but use anonymous functions with jquery because closures are only recently supported by php jquery has supported them for quite some time since some people may still be running older versions of php we always use named functions for maximum compatibility if you have a recent php version and are developing only for your own installation go ahead and use closures if you like top register vs enqueue you will see examples in other tutorials that religiously use wp_register_script this is fine but its use is optional what is not optional is wp_enqueue_script this function must be called in order for your script file to be properly linked on the web page so why register scripts it creates a useful tag or handle with which you can easily reference the script in various parts of your code as needed if you just need your script loaded and are not referencing it elsewhere in your code there is no need to register it top nonce you need to create a nonce so that the jquery ajax request can be validated as a legitimate request instead of a potentially nefarious request from some unknown bad actor only your php script and your jquery script will know this value when the request is received you can verify it is the same value created here this is how to create a nonce for our example title_nonce wp_create_nonce title_example the parameter title_example can be any arbitrary string it s suggested the string be related to what the nonce is used for but it can really be anything that suits you top localize if you recall from the jquery section data created by php for use by jquery was passed in a global object named my_ajax_obj in our example this data was a nonce and the complete url to admin ajax php the process of assigning object properties and creating the global jquery object is called localizing this is the localizing code used in our example which uses wp_localize_script wp_localize_script ajax script my_ajax_obj array ajax_url admin_url admin ajax php nonce title_nonce note how our script handle ajax script is used so that the global object is assigned to the right script the object is global to our script not to all scripts localization can also be called from the same hook that is used to enqueue scripts the same goes for creating a nonce though that particular function can be called virtually anywhere all of that combined together in a single hook callback looks like this add_action admin_enqueue_scripts my_enqueue enqueue my scripts and assets param hook function my_enqueue hook if myplugin_settings php hook return wp_enqueue_script ajax script plugins_url js myjquery js __file__ array jquery 1 0 0 true wp_localize_script ajax script my_ajax_obj array ajax_url admin_url admin ajax php nonce wp_create_nonce title_example note remember to only add this nonce localization to the needed pages do not display a nonce to someone who should not use it and remember to use current_user_can with a capability or role to complete the security top ajax action the other major part of the server side php code is the actual ajax handler that receives the posted data does something with it then sends an appropriate response back to the browser this takes on the form of a wordpress action hook which hook tag you use depends on whether the user is logged in or not and what value your jquery script passed as the action value note _get _post and _cookie vs _request you ve probably used one or more of the php super globals such as _get or _post to retrieve values from forms or cookies using _cookie maybe you prefer _request instead or at least have seen it used it s kind of cool regardless of the request method post or get it will have the form values works great for pages that use both methods on top of that it has cookie values as well one stop shopping therein lies its tragic flaw in the case of a name conflict the cookie value will override any form values thus it is ridiculously easy for a bad actor to craft a counterfeit cookie on their browser which will overwrite any form value you might be expecting from the request _request is an easy route for hackers to inject arbitrary data into your form values to be extra safe stick to the specific variables and avoid the one size fits all since our ajax exchange is for the plugin s settings page the user must be logged in if you recall from the jquery section the action value is my_tag_count this means our action hook tag will be wp_ajax_my_tag_count if our ajax exchange were to be utilized by users who were not currently logged in the action hook tag would be wp_ajax_nopriv_my_tag_count the basic code used to hook the action looks like this add_action wp_ajax_my_tag_count my_ajax_handler handles my ajax request function my_ajax_handler handle the ajax request here wp_die all ajax handlers die when finished the first thing your ajax handler should do is verify the nonce sent by jquery with check_ajax_referer which should be the same value that was localized when the script was enqueued check_ajax_referer title_example the provided parameter must be identical to the parameter provided earlier to wp_create_nonce the function simply dies if the nonce does not check out if this were a true nonce now that it was used the value is no longer any good you would then generate a new one and send it to the callback script so that it can be used for the next request but since wordpress nonces are good for twenty four hours you needn t do anything but check it top data with the nonce out of the way our handler can deal with the data sent by the jquery script contained in _post title first we assign the value to a new variable after running it through wp_unslash to remove any unexpected quotes title wp_unslash _post title we can save the user s selection in user meta by using update_user_meta update_user_meta get_current_user_id title_preference sanitize_post_title title then we build a query in order to get the post count for the selected title tag args array tag title the_query new wp_query args finally we can send the response back to the jquery script there s several ways to transmit data let s look at some of the options before we deal with the specifics of our example top xml php support for xml leaves something to be desired fortunately wordpress provides the wp_ajax_response class to make the task easier the wp_ajax_response class will generate an xml formatted response set the correct content type for the header output the response xml then die ensuring a proper xml response top json this format is lightweight and easy to use and wordpress provides the wp_send_json function to json encode your response print it and die effectively replacing wp_ajax_response wordpress also provides the wp_send_json_success and wp_send_json_error functions which allow the appropriate done or fail callbacks to fire in js top other you can transfer data any way you like as long as the sender and receiver are coordinated text formats like comma delimited or tab delimited are one of many possibilities for small amounts of data sending the raw stream may be adequate that is what we will do with our example we will send the actual replacement html nothing else echo esc_html title the_query post_count in a real world application you must account for the possibility that the action could fail for some reason for instance maybe the database server is down the response should allow for this contingency and the jquery script receiving the response should act accordingly perhaps telling the user to try again later top die when the handler has finished all of its tasks it needs to die if you are using the wp_ajax_response or wp_send_json functions this is automatically handled for you if not simply use the wordpress wp_die function top ajax handler summary the complete ajax handler for our example looks like this ajax handler using json function my_ajax_handler__json check_ajax_referer title_example title wp_unslash _post title update_user_meta get_current_user_id title_preference sanitize_post_title title args array tag title the_query new wp_query args wp_send_json esc_html title the_query post_count ajax handler not using json function my_ajax_handler check_ajax_referer title_example title wp_unslash _post title update_user_meta get_current_user_id title_preference sanitize_post_title title args array tag title the_query new wp_query args echo esc_html title the_query post_count wp_die all ajax handlers should die when finished handbook navigation ajax heartbeat api about news hosting donate swag documentation developers get involved learn showcase plugins themes patterns wordcamp wordpress tv buddypress bbpress wordpress com matt privacy public code wordpress org wordpress org visit our facebook page visit our twitter account visit our instagram account visit our linkedin account
Thumbnail images (randomly selected): * Images may be subject to copyright.GREEN status (no comments)
  • loading
  • Code is Poetry

Verified site has: 131 subpage(s). Do you want to verify them? Verify pages:

1-5 6-10 11-15 16-20 21-25 26-30 31-35 36-40 41-45 46-50
51-55 56-60 61-65 66-70 71-75 76-80 81-85 86-90 91-95 96-100
101-105 106-110 111-115 116-120 121-125 126-130 131-131


The site also has references to the 2 subdomain(s)

  archive.org  Verify   help.archive.org  Verify


The site also has 2 references to other resources (not html/xhtml )

 web.archive.org/#xml  Verify  web.archive.org/#json  Verify


Top 50 hastags from of all verified websites.

Supplementary Information (add-on for SEO geeks)*- See more on header.verify-www.com

Header

HTTP/1.1 302 FOUND
Server nginx
Date Wed, 16 Sep 2026 16:48:35 GMT
Content-Type text/plain; charset=utf-8
Content-Length 0
Connection close
x-archive-redirect-reason found capture at 20230127081347
location htt???/web.archive.org/web/20230127081347/htt????/developer.wordpress.org/plugins/javascript/enqueuing/
server-timing captures_list;dur=0.452159, exclusion.robots;dur=0.041293, exclusion.robots.policy;dur=0.032494, esindex;dur=0.008889, cdx.remote;dur=144.240374, LoadShardBlock;dur=331.766059, PetaboxLoader3.datanode;dur=261.408714, PetaboxLoader3.resolve;dur=15.714690
x-app-server wwwb-app221-dc8
x-ts 302
x-tr 494
server-timing TR;dur=0,Tw;dur=0,Tc;dur=1
set-cookie wb-p-SERVER=wwwb-app221; path=/
X-location All
X-AS 16276
X-RL 0
X-NA 0
X-Page-Cache MISS
Server-Timing MISS
X-NID OVH SAS
Referrer-Policy no-referrer-when-downgrade
Permissions-Policy interest-cohort=()
X-sd 0
HTTP/1.1 200 OK
Server nginx
Date Wed, 16 Sep 2026 16:48:35 GMT
Content-Type text/html; charset=UTF-8
Transfer-Encoding chunked
Connection close
x-archive-orig-server nginx
x-archive-orig-date Fri, 27 Jan 2023 08:13:47 GMT
x-archive-orig-x-crawler-transfer-encoding chunked
x-archive-orig-connection keep-alive
x-archive-orig-vary Accept-Encoding
x-archive-orig-x-olaf ?
x-archive-orig-link <htt????/developer.wordpress.org/wp-json/>; rel= htt????/api.w.org/
x-archive-orig-link <htt????/developer.wordpress.org/wp-json/wp/v2/plugin-handbook/11153>; rel= alternate ; type= application/json
x-archive-orig-link <htt????/developer.wordpress.org/?p=11153>; rel=shortlink
x-archive-orig-x-frame-options SAMEORIGIN
x-archive-orig-x-crawler-content-encoding br
x-archive-orig-x-nc MISS ord 1
x-archive-orig-content-length 115402
x-archive-guessed-content-type text/html
x-archive-guessed-charset utf-8
memento-datetime Fri, 27 Jan 2023 08:13:47 GMT
link <htt????/developer.wordpress.org/plugins/javascript/enqueuing/>; rel= original , <htt???/web.archive.org/web/timemap/link/htt????/developer.wordpress.org/plugins/javascript/enqueuing/>; rel= timemap ; type= application/link-format , <htt???/web.archive.org/web/htt????/developer.wordpress.org/plugins/javascript/enqueuing/>; rel= timegate , <htt???/web.archive.org/web/20150324112932/htt????/developer.wordpress.org/plugins/javascript/enqueuing/>; rel= first memento ; datetime= Tue, 24 Mar 2015 11:29:32 GMT , <htt???/web.archive.org/web/20221003082606/htt????/developer.wordpress.org/plugins/javascript/enqueuing/>; rel= prev memento ; datetime= Mon, 03 Oct 2022 08:26:06 GMT , <htt???/web.archive.org/web/20230127081347/htt????/developer.wordpress.org/plugins/javascript/enqueuing/>; rel= memento ; datetime= Fri, 27 Jan 2023 08:13:47 GMT , <htt???/web.archive.org/web/20230326080319/htt????/developer.wordpress.org/plugins/javascript/enqueuing/>; rel= next memento ; datetime= Sun, 26 Mar 2023 08:03:19 GMT , <htt???/web.archive.org/web/20260916003135/htt????/developer.wordpress.org/plugins/javascript/enqueuing/>; rel= last memento ; datetime= Wed, 16 Sep 2026 00:31:35 GMT
content-security-policy default-src self unsafe-eval unsafe-inline data: blob: archive.org web.archive.org web-static.archive.org wayback-api.archive.org athena.archive.org analytics.archive.org pragma.archivelab.org wwwb-events.archive.org
x-archive-src CC-MAIN-2023-06-1674764494974.98-0017/CC-MAIN-20230127065356-20230127095356-00345.warc.gz
server-timing captures_list;dur=0.512799, exclusion.robots;dur=0.074831, exclusion.robots.policy;dur=0.063797, esindex;dur=0.007710, cdx.remote;dur=7.777535, LoadShardBlock;dur=157.133047, PetaboxLoader3.datanode;dur=145.732033, load_resource;dur=109.106316, PetaboxLoader3.resolve;dur=38.943137, nav;dur=0.232710
x-app-server wwwb-app244-dc8
x-ts 200
x-tr 372
server-timing TR;dur=0,Tw;dur=0,Tc;dur=1
set-cookie wb-p-SERVER=wwwb-app244; path=/
X-location All
X-AS 16276
X-RL 0
X-NA 0
X-Page-Cache MISS
Server-Timing MISS
X-NID OVH SAS
Referrer-Policy no-referrer-when-downgrade
Permissions-Policy interest-cohort=()
X-sd 0
Content-Encoding gzip

Meta Tags

title="WordPress.org"
charset="UTF-8"
name="viewport" content="width=device-width, initial-scale=1"
name="robots" content="max-image-preview:large"
property="og:title" content="Server Side PHP and Enqueuing | Plugin Developer Handbook | WordPress Developer Resources"
property="og:site_name" content="WordPress Developer Resources"
property="og:type" content="website"
property="og:url" content="htt???/web.archive.org/web/20230127081347/htt????/developer.wordpress.org/"
name="twitter:card" content="summary_large_image"
name="twitter:site" content="@WordPress"
name="description" content="There are two parts to the server side PHP script that are needed to implement AJAX communication. First we need to enqueue the jQuery…"
property="og:description" content="There are two parts to the server side PHP script that are needed to implement AJAX communication. First we need to enqueue the jQuery…"
name="generator" content="WordPress 6.2-alpha-55148"
name="msapplication-TileImage" content="htt????/s.w.org/images/wmark.png"

Load Info

page size32961
load time (s)1.621642
redirect count1
speed download20333
server IP 207.241.237.3
* all occurrences of the string "http://" have been changed to "htt???/"