How do I access the contents of WordPress Classic editor in admin area with JavaScript?

To get the editor content as a string in the classic editor use this: content = tinymce.activeEditor.getContent(); Taken from https://stackoverflow.com/a/5843951/57482 Note that you should use the APIs provided rather than directly modifying the DOM if you want to modify the content. If you don’t, you won’t update plugins local states in javascript causing problems. Modifying … Read more

one time visit to the page

Although this is not a WP question, it could be done with some PHP/MySQL code. Just the psuedocode: generate a GUID value on each main page visit check if the GUID is already in the GUID database if not, store the GUID in the GUID database if GUID exists in the database, redirect to another … Read more

Remove all link title attributes

Do you want to preserve the images title attribute? If not here is a code that fixes that for you: add_filter(‘the_content’, ‘remove_title_attr’); function remove_title_attr($text) { // Get all title=”…” tags from the html. $result = array(); preg_match_all(‘|title=”[^”]*”|U’, $text, $result); // Replace all occurances with an empty string. foreach($result[0] as $html_tag) { $text = str_replace($html_tag, ”, … Read more