Trying to get property of non-object

If you look at the documentation for get_term_by(), you’ll see that it: Will return false if $taxonomy does not exist or $term was not found. You need to account for this possibility in your code by checking the value of $term. You’ll also note from the documentation that get_term_by() does not return a WP_Error, so … Read more

How to prevent XSS alter custom global javascript object & methods in WordPress

You’re not doing anything unusual or unsafe. You are just defining functions, which is a perfectly normal and reasonable thing to do with JavaScript. If there’s a malicious script running on your page then sure, it could redefine those methods, but it could also do other things that much worse. This is why you need … Read more

Is the object cached?

If you use the WordPress API to retrieve the metadata, then it should be cached for you. If you do other complex stuff, there is the Transients API for caching data yourself, which will take advantage of whatever object cache you use with WordPress. EDIT – I should clarify, it’ll be loaded for each request … Read more

TInyMCE object Tag stripped

I’m not 100% sure, but this problem seems related to the unfiltered_html capability restriction. unfiltered_html Since 2.0 Allows user to post HTML markup or even JavaScript code in pages, posts, and comments. Note: Enabling this option for untrusted users may result in their posting malicious or poorly formatted code. An easy fix (and probably a … Read more

UML diagrams of WordPress

I donΒ΄t know any sequence diagram for WordPress but if you decide to built them yourself (which would be appreciated πŸ™‚ ) you may get some inspiration from these sequence diagrams created for Drupal