$functionality

At the top of your Skin class, you may wish to include an optional $functionality array to initiate certain types of functionality or override default behaviors in your Skin.

In short, this is the easiest way to add functionality to your Skin. Many $functionality parameters are available; we’ll cover the most useful ones here:

  • css_preprocessor — can be either scss or less; scss is recommended
  • formatting_class — set to your desired CSS formatting class, such as grt
  • fonts_google — set to true to add Google Fonts to your Skin
  • header_image — set to true to add Header Image functionality to your Skin
  • launcher_position — set to right to move the Template launcher to the bottom right portion of the screen (this only displays on the front end when the admin is logged in)
  • legacy_image_support — set to false to remove Thesis Post Image and Thesis Post Thumbnail Boxes
  • logo — set to true to add Logo functionality to your Skin
  • meta_viewport — set to your desired <meta viewport> declaration

Given the parameters listed above, let’s try an example and add SCSS, Google Fonts, Header Image, and Logo functionality to a Skin. Here’s what the resulting $functionality array would look like:

public $functionality = array(
	'css_preprocessor' => 'scss',
	'fonts_google' => true,
	'header_image' => true,
	'logo' => true);

Other $functionality parameters can be used to change default Design Options Admin behavior.

Skin Functionality Tutorials

Deprecated Skin Functionality

  • editor_grt has been replaced by formatting_class, which allows Skin authors to specify a formatting class that is used in places like the WordPress post editor and also WooCommerce template output.