array(
'title' => __( 'Grid Settings', 'ajax-filter-posts' ),
'fields' => array(
'grid_id' => array(
'type' => 'select',
'label' => __( 'Select Grid', 'ajax-filter-posts' ),
'default' => '0',
'options' => $choices,
'preview' => array(
'type' => 'refresh',
),
),
),
),
);
if ( current_user_can( 'manage_options' ) ) {
$create_url = Embed_Helper::get_create_url();
$manage_url = Embed_Helper::get_manage_url();
$links_html = '
';
if ( $create_url ) {
$links_html .= sprintf(
'
+ %s',
esc_url( $create_url ),
esc_html__( 'Create New Grid in GridMaster', 'ajax-filter-posts' )
);
}
if ( $manage_url ) {
$links_html .= sprintf(
'
%s',
esc_url( $manage_url ),
esc_html__( 'Manage All Grids', 'ajax-filter-posts' )
);
}
$links_html .= '
';
$form_sections['grid_settings']['fields']['grid_helper_links'] = array(
'type' => 'raw',
'label' => '',
'content' => $links_html,
);
}
\FLBuilder::register_module(
'GridMaster\Integrations\Beaver\Grid_Module',
array(
'general' => array(
'title' => __( 'General', 'ajax-filter-posts' ),
'sections' => $form_sections,
),
)
);
}
}
Loader::init();