field_before();
echo $this->shortcoder();
echo '';
echo $this->field_after();
}
public function shortcoder() {
if ( ! empty( $this->field['shortcoder'] ) ) {
$shortcodes = ( is_array( $this->field['shortcoder'] ) ) ? $this->field['shortcoder'] : array_filter( (array) $this->field['shortcoder'] );
$instances = ( ! empty( Sakurairo_CSF::$shortcode_instances ) ) ? Sakurairo_CSF::$shortcode_instances : array();
if ( ! empty( $shortcodes ) && ! empty( $instances ) ) {
foreach ( $shortcodes as $shortcode ) {
foreach ( $instances as $instance ) {
if ( $instance['modal_id'] === $shortcode ) {
$id = $instance['modal_id'];
$title = $instance['button_title'];
echo ''. esc_html( $title ) .'';
}
}
}
}
}
}
}
}