If I understand correctly; you just need to make a Javascript variable available to testing.js.
I think it would be just as useful to send the variable with jQuery, as that would be loaded prior to TinyMCE anyway:
add_action('wp_enqueue_scripts', 'YOUR_NAME_scripts'); //back end
function YOUR_NAME_scripts( $hook_suffix ) {
global $blog_id;
$params = array(
'site_url' => site_url(),
'admin_ajax_url' => site_url() . '/wp-admin/admin-ajax.php',
'mytest' => $whatever_variable_value
);
wp_localize_script( 'jquery', 'YOUR_JAVASCRIPT_VARIABLE_HOLDER', $params );
}
Then you can access the mytest variable in testing.js by simply using YOUR_JAVASCRIPT_VARIABLE_HOLDER.mytest
anywhere in the script.
Related Posts:
- :wq! command in vim
- Understanding The Modulus Operator %
- Understanding the main method of python [duplicate]
- ping response “Request timed out.” vs “Destination Host unreachable”
- What does “:=” mean in Pseudocode? [closed]
- Why do we need virtual functions in C++?
- Eclipse IDE for Java – Full Dark Theme
- Amazon Linux: apt-get: command not found
- What does the Java assert keyword do, and when should it be used?
- How to accept space in regex?
- Is a wildcard CNAME DNS record valid?
- File extension .DB – What kind of database is it exactly?
- How to resolve “The requested URL was rejected. Please consult with your administrator.”
- Difference between binary semaphore and mutex
- Python Logic of ListNode in Leetcode
- What is the difference between a strongly typed language and a statically typed language?
- Error in Python script “Expected 2D array, got 1D array instead:”?
- segmentation fault 11 in C++ on Mac
- How to append text to a text file in C++?
- expected assignment or function call: no-unused-expressions ReactJS
- How do I learn WebGL the fast way?
- What is the meaning of t=”shared” in a formula element?
- MySQL Every derived table must have its own alias
- How to print out a backslash in LaTeX
- Echo newline in Bash prints literal \n
- Proper shebang for Python script
- AttributeError: can’t set attribute
- How to kill a running Spark application?
- Log to the base 2 in python
- fix java.net.SocketTimeoutException: Read timed out
- Sqoop Incremental Import
- What does it mean by word size in computer?
- Python setup.py develop vs install
- Raise to power in R
- APDU command to read Track1/track2 data from NFC card and MobileApp
- Android setOnClickListener method – How does it work?
- Convert a CERT/PEM certificate to a PFX certificate
- What is process.env.PORT in Node.js?
- enum to string in modern C++11 / C++14 / C++17 and future C++20
- ORA-29913: error in executing ODCIEXTTABLEOPEN callout when inserting csv into oracle
- Reason for the exception java.lang.VerifyError: Bad type on operand stack
- How do I get monitor resolution in Python?
- git: fatal unable to auto-detect email address
- R error which says “Models were not all fitted to the same size of dataset”
- pandoc document conversion failed with error 43 : pdflatex: The memory dump file could not be found
- ERROR: transport error 202: bind failed when starting Tomcat 7 in debug mode
- How to check whether a Button is clicked by using JavaScript
- jQuery onclick not firing on dynamically inserted HTML elements?
- What is correct media query for IPad Pro?
- simple IPython example raises exception on sys.exit()
- How to get a minecarft session ID?
- Factory Pattern. When to use factory methods?
- How to send a PUT/DELETE request in jQuery?
- Arithmetic Overflow in mips
- How to change angular port from 4200 to any other
- Render HTML string as real HTML in a React component
- How to draw lines in Java
- Styling Select Drop down box
- NoClassDefFoundError in Java: com/google/common/base/Function
- Where are the ampersand and vertical bar characters used in Python?
- Which font is used in MS-DOS?
- Google Gmail – “The conversation that you requested could not be loaded”
- apt-get for Cygwin?
- Python: What OS am I running on?
- ER-Diagram: Ternary Relationship – How to read properly?
- How can I diff 2 files while ignoring leading white space
- Converting time stamps in excel to dates
- The name ‘InitializeComponent’ does not exist in the current context
- What is “pass-by-name” and how does it work exactly?
- is it possible to get the MAC address for machine using nmap
- Import error No module named skimage
- Why define PI = 4*ATAN(1.d0)
- Java: Not a statement
- Passing a hexadecimal value into a module in Verilog
- mport win32ui in python 3.6
- Empty functions in Javascript
- Solr: how to delete a collection?
- How to print a int64_t type in C
- How to store data in the flash memory of a Arduino Uno (ATmega328p)
- What is a blob URL and why it is used?
- Call to undefined function `get_plugin_data()`
- Contact Form 7 – Execute code AFTER mail send [closed]
- Add Shortcode inline inside Gutenberg block
- TinyMCE Autoresize
- How to Add TinyMCE’s plugin in wordpress?
- How can I control the HTML output of my post?
- Using wp_editor in TinyMCE WindowManager dialog
- Add a select a class dropdown in tinymce
- Child theme on style.min.css
- Refresh admin page after woocommerce order received
- Translate MCE button text/tooltip in custom plugin
- jquery anchor effect does not work properly
- Import local site to WordPress.com
- Can I make the post type value dynamic in ajax.php in wordpress
- Posts feed number of posts
- How can I debug what is wrong ? Featured images stopped showing
- Add link to php field text on wordpress form
- Bootstrap theme embedded iframes are distorted [closed]
- To remove rendering of menus and header, plugin or theme?
- install tinymce plugin [closed]