Skip to content

Instantly share code, notes, and snippets.

@lots0logs
Created March 26, 2018 08:27
Show Gist options
  • Save lots0logs/1f57400d5fe7b34a84dc27341f14a772 to your computer and use it in GitHub Desktop.
Save lots0logs/1f57400d5fe7b34a84dc27341f14a772 to your computer and use it in GitHub Desktop.
Module Setting Default Value Example
<?php
class SIMP_SimpleHeader extends ET_Builder_Module {
// ...Rest of implementation
public function get_fields() {
return array(
'text_orientation' => array(
'default' => 'left',
'label' => esc_html__( 'Text & Logo Orientation', 'simp-simple' ),
'type' => 'text_align',
'option_category' => 'layout',
'options' => array( 'left', 'center', 'right', 'justified' ),
'tab_slug' => 'advanced',
'toggle_slug' => 'layout',
'description' => esc_html__( 'This controls how your text is aligned within the module.', 'simp-simple' ),
),
);
}
// Rest of implementation...
}
new SIMP_SimpleHeader;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment