help_text( $this->get_default_help_text() ); add_action( $this->get_hook_name(), array( $this, 'print_scripts' ) ); parent::init(); } /** * Display the field value in the front-end header. */ public function print_scripts() { if ( ! $this->store || ! is_a( $this->store, 'Carbon_Fields\\Datastore\\Theme_Options_Datastore' ) ) { return; } echo get_option( $this->name ); } /** * Default help text to be displayed for this type of field. */ abstract public function get_default_help_text(); /** * Action name to be hooked on. */ abstract public function get_hook_name(); }