Archives

gppro_body_class

The plugin adds a custom body class (gppro-custom) to the live preview and CSS building. This ensures that the styles take precedent when needed, without overriding anything native to the theme itself.

gppro_buttons

There are two default action buttons: “save” and “clear”. Both are tied to built-in AJAX functions to either save the data entered, or clear out all the data and reset it. The button takes multiple variables:

  • button-type: (string) can be either ‘link’ or ‘input’
  • button-label: (string) the text portion of the button
  • button-class: (string) CSS classes applied to the item
  • image-class: (string) for optional image (usually a spinner icon) to appear next to the button
  • button-link: (string) if using the ‘link’ type, this is the URL that will be entered.
  • button-blank: (bool) if using the ‘link’ type, whether to open the link in a new tab or not.

gppro_compare_default

During the CSS build process, a few checks are made before the value is written. One of them is comparing the stored value against the default value. If they match, the CSS is not written, so that the file only has updated styles. This filter bypasses that check and writes the value, assuming that it exists.

Useful if another plugin’s CSS is overriding your theme, and you need to ensure that the style is written out.

gppro_css_builder

This filter adds the ability to include more data into the CSS being generated. This is put at the bottom of the file and contains the saved data array. Any new data keys added require the use of either this filter or one of the inline CSS filters to actually write the values.