for_widget = $for_widget;
$this->parent_repeater = $parent_container;
}
protected function get_default_options() {
return array(
'choose' => __( 'Choose Maxbutton', 'maxbuttons' ),
'update' => __( 'Set Media', 'maxbuttons' ),
// 'library' => 'image'
);
}
protected function render_field( $value, $instance ) {
//$buttons = MB()
?>
getClass('button');
if (intval($value) > 0)
{
$button->set($value);
$button->display(array('load_css' => 'inline') );
}
?>
get_fallback_field_name( $this->base_name );
if( !empty( $this->fallback ) && !empty( $instance[ $fallback_name ] ) ) {
$instance[ $fallback_name ] = esc_url_raw( $instance[ $fallback_name ] );
}
return $instance;
}
public function get_fallback_field_name( $base_name ) {
$v_name = $base_name;
if( strpos($v_name, '][') !== false ) {
// Remove this splitter
$v_name = substr( $v_name, strpos($v_name, '][') + 2 );
}
return $v_name . '_fallback';
}
}