add info footer
This commit is contained in:
@@ -22,23 +22,28 @@ if ( file_exists( $composer_autoload ) ) {
|
||||
|
||||
if( function_exists('acf_add_options_page') ) {
|
||||
|
||||
acf_add_options_page(array(
|
||||
'page_title' => 'Information',
|
||||
'menu_title' => 'Information',
|
||||
'icon_url' => 'dashicons-buddicons-activity',
|
||||
'capability' => 'edit_posts',
|
||||
'redirect' => false
|
||||
));
|
||||
acf_add_options_page(array(
|
||||
'page_title' => 'Information',
|
||||
'menu_title' => 'Information',
|
||||
'menu_slug' => 'information',
|
||||
'capability' => 'edit_posts',
|
||||
'redirect' => false
|
||||
));
|
||||
|
||||
acf_add_options_sub_page(array(
|
||||
'page_title' => 'Partenaires',
|
||||
'menu_title' => 'Partenaires',
|
||||
'parent_slug' => 'information',
|
||||
));
|
||||
|
||||
acf_add_options_page(array(
|
||||
'page_title' => 'Partenaires',
|
||||
'menu_title' => 'Partenaires',
|
||||
'icon_url' => 'dashicons-buddicons-activity',
|
||||
'capability' => 'edit_posts',
|
||||
'redirect' => false
|
||||
));
|
||||
}
|
||||
|
||||
add_filter( 'timber_context', 'options_footer' );
|
||||
|
||||
function options_footer( $context ) {
|
||||
$context['options'] = get_fields('option');
|
||||
return $context;
|
||||
}
|
||||
|
||||
/**
|
||||
* This ensures that Timber is loaded and available as a PHP class.
|
||||
|
||||
Reference in New Issue
Block a user