The $mod Variable

The $mod variable is defined early in the WPSSO Core load process and is passed to most methods and filters. The $mod variable name is short for "module" and it defines essential reference values for different WordPress and WPSSO object types:

  • comment
  • post
  • term
  • user

An example $mod array for a post:

An example to retrieve custom post meta:

The 'obj' element can be used to call object methods. Here's an example to get a custom Open Graph description value (if one has been defined):