panels[$id] = array( 'title' => $title, 'content' => 'tag-generator-panel-' . $id, 'options' => $options, 'callback' => $callback, ); return true; } public function print_buttons() { echo ''; foreach ( (array) $this->panels as $panel ) { echo sprintf( '%3$s', esc_attr( $panel['content'] ), esc_attr( sprintf( /* translators: %s: title of form-tag like 'email' or 'checkboxes' */ __( 'Form-tag Generator: %s', 'contact-form-7' ), $panel['title'] ) ), esc_html( $panel['title'] ) ); } echo ''; } public function print_panels( WPCF7_ContactForm $contact_form ) { foreach ( (array) $this->panels as $id => $panel ) { $callback = $panel['callback']; $options = wp_parse_args( $panel['options'], array() ); $options = array_merge( $options, array( 'id' => $id, 'title' => $panel['title'], 'content' => $panel['content'], ) ); if ( is_callable( $callback ) ) { echo sprintf( ''; } } } }