33 lines
645 B
PHP
33 lines
645 B
PHP
<?php
|
|
include 'inc/function.php';
|
|
|
|
// CUSTOM FUNCTION
|
|
|
|
// ADD OPTION PAGES
|
|
if( function_exists('acf_add_options_page') ) {
|
|
|
|
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',
|
|
));
|
|
|
|
}
|
|
|
|
add_filter( 'timber_context', 'options_footer' );
|
|
|
|
function options_footer( $context ) {
|
|
$context['options'] = get_fields('option');
|
|
return $context;
|
|
}
|
|
|
|
?>
|