A list of NGFB filters used to modify and return the Open Graph array. Some filters, like the ‘ngfb_og’ filter, have an extra “seed” variant — the “seed” filter is typically applied at the beginning of a method (so the input string or array is empty), and if a value is returned by the filter, the value is used as-is and the remainder of the method is skipped. The “non-seed” filter variant is applied at the end of the method, so the filter receives a complete string or array that can be modified before being returned.
If you’d like to customize and integrate additional features into the NGFB plugin, we offer custom development services. Submit a ticket to describe your requirements, and we can give you an idea of the expected time and cost to develop your custom feature(s).
Returns an Array
ngfb_og_seed ( $og, $use_post, $mod )
ngfb_og ( $og, $use_post, $mod )
- A multidimensional array of Open Graph meta tags. The array returned by the “seed” filter will be completed with any missing elements, keeping the returned elements in the array as-is.
The $use_post variable can be true, false, or a post ID. When $use_post is false, you should retrieve information about the current $post object using the
get_queried_object()function, if true, you can simply use the global $post object, and if $use_post is numeric, use the
get_post()function.An Example Open Graph ArrayPHP12345678910111213141516171819202122232425262728293031323334353637383940Array([fb:app_id] => 525239184171769[og:locale] => en_US[og:site_name] => Surnia Ulula[og:url] => http://surniaulula.com/codex/plugins/ngfb/notes/filters/open-graph/[og:title] => Open Graph Filters – Surnia Ulula (Filters)[og:description] => Filters used to modify and return the Open Graph array. #filters #opengraph #ngfb[og:type] => article[article:author] => Array( => https://www.facebook.com/jsmoriss)[article:publisher] => https://www.facebook.com/SurniaUlulaCom[article:tag] => Array( => filters => opengraph => ngfb)[article:section] => Linux / Unix[article:published_time] => 2014-04-17T07:37:50+00:00[article:modified_time] => 2014-04-17T08:01:03+00:00[og:image] => Array( => Array([og:image:cropped] => 1[og:image:height] => 960[og:image:width] => 960[og:image] => http://surniaulula.com/wp-content/uploads/2014/03/ngfb-logo-960x960.jpg)))