How to speed up admin-ajax.php in wordpress

Here’s the answer you’re searching for: Ajax takes 10x as long as it should/could Unfortunately, the solution there involves very detailed knowledge of what parts to load / what not to load and why stuff would break. Reading through github issues / comments, it seems this doesn’t work with HTTPS. Otherwise, you really can’t speed … Read more

How can I add tinymce editor in WordPress with jQuery?

This is a good use case for the JS version of the editor introduced in 4.8: https://make.wordpress.org/core/2017/05/20/editor-api-changes-in-4-8/ A new editor API was added in #35760. It makes it possible to dynamically instantiate the editor from JS. Here’s an example of how it’s used (stolen from Rheinard Korf’s example here): // Remember to wp_enqueue_editor(); inside PHP. … Read more

VB.net and WordPress

So I’m wondering if anyone might know how I could use VB.net for my calculators on my WordPress website. Directly? No, you can’t run .Net in a browser, and the closest available is silverlight and activeX, both of which were discontinued. As I understand it, the problem is that VB.net doesn’t run on an Apache … Read more

Can “ and “ tags be used in the HTML editor?

Mostly no, but you shouldn’t do that anyway. The exception, is if your user has the unfiltered_html capability, which is a dangerous power to have. Users that have this are admins on a single site install, or a super admin on a multisite install. But, there are major security downside to putting script and style … Read more

Custom block SelectControl works but equivalent ComboboxControl gives errors – where’s my mistake?

This took me a while to figure out… It’s a bug. The JavaScript error occurs because the onFilterValueChange function is not defined… Even though the WordPress documentation says this function is optional. Simply adding onFilterValueChange with an anonymous function removes the JavaScript error. E.g. <ComboboxControl label=”Font Size” value=”small” options={[ { value: “small”, label: “Small” }, … Read more

JavaScript and images files are not recognized

You need to give the full path to your theme files. To get the URL of your theme, use the WordPress function bloginfo( ‘template_directory’ ); so at a minimum you would need: <script src=”https://wordpress.stackexchange.com/questions/18828/<?php bloginfo(“template_directory’ ) ?>/jquery.js” type=”text/javascript”></script> However, scripts / styles should really be “enqueued” using wp_enqueue_script(); (see http://codex.wordpress.org/Function_Reference/wp_enqueue_script) I would recommend taking a … Read more