Editing alt text in media library
Editing alt text in media library
Editing alt text in media library
Well, that was easy. leaving here if someone stumbles upon this and it’s useful OR if someone has a better solution. In the comments below – the first if statement designates we only want this to apply to our mega menu which in our case is menu-2 in theme_location of wp_nav_menu // ADD SUBMENU BUTTON … Read more
Gutenberg: Issue trying to commit locally
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
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
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
never access theme or plugin files directly in their directory, this is a non secure way to develop code which will be blocked on any server with hardened security. If you need to get information from the site you can either add an ajax access, or json end point in your code for that.
sometimes on saving a post as draft, it says Access Denied You don’t have permission to access “mywebsite.com/wp-admin/post.php”
Well I am a complete fool. It wasn’t the use of the alt tags at all, it was the fact that the icons were set to display:none, yet the code was still there which seems to confuse a screen reader. I just hid the element in a theme file and made it appear when it … Read more
Kevin Leary posted a snippet to add aria-expanded tags in 2018. I love the simplicity of it. He describes what we’re doing here: This is the recommended approach for “fly-out (or drop-down) menus” provided by the w3.org, more on fly-out menu accessibility can be read on their site directly. function my_nav_menu_link_attributes( $atts, $item, $args ) … Read more