Commit c2915c67 authored by agnez's avatar agnez

post types i18n + single gasap popup contact

parent 96c872ae
......@@ -189,17 +189,17 @@ function add_type_taxonomy_to_producer(){
$taxonomy = 'producertype';
$object_type = 'producer';
$labels = array(
'name' => 'Producer Types',
'singular_name' => 'Producer Type',
'search_items' => 'Search Producer Types',
'all_items' => 'All Producer Types',
'parent_item' => 'Parent Type',
'parent_item_colon' => 'Parent Type:',
'update_item' => 'Update Type',
'edit_item' => 'Edit Type',
'add_new_item' => 'Add New Producer Type',
'new_item_name' => 'New Type Name',
'menu_name' => 'Type',
'name' => _x( 'Producer Types', 'taxonomy general name', 'gasap-posttypes' ),
'singular_name' => _x( 'Producer Type', 'taxonomy singular name', 'gasap-posttypes' ),
'search_items' => __( 'Search Producer Types', 'gasap-posttypes' ),
'all_items' => __( 'All Producer Types', 'gasap-posttypes' ),
'parent_item' => __( 'Parent Type', 'gasap-posttypes' ),
'parent_item_colon' => __( 'Parent Type:', 'gasap-posttypes' ),
'update_item' => __( 'Update Type', 'gasap-posttypes' ),
'edit_item' => __( 'Edit Type', 'gasap-posttypes' ),
'add_new_item' => __( 'Add New Producer Type', 'gasap-posttypes' ),
'new_item_name' => __( 'New Type Name', 'gasap-posttypes' ),
'menu_name' => __( 'Type', 'gasap-posttypes' ),
);
$args = array(
'labels' => $labels,
......@@ -220,17 +220,17 @@ function add_status_taxonomy_to_gasap(){
$taxonomy = 'gasapstatus';
$object_type = 'gasap';
$labels = array(
'name' => 'GASAP Statuses',
'singular_name' => 'GASAP Status',
'search_items' => 'Search GASAP Status',
'all_items' => 'All GASAP Statuses',
'name' => _x( 'GASAP Statuses', 'taxonomy general name', 'gasap-posttypes' ),
'singular_name' => _x( 'GASAP Status', 'taxonomy singular name', 'gasap-posttypes' ),
'search_items' => __( 'Search GASAP Status', 'gasap-posttypes' ),
'all_items' => __( 'All GASAP Statuses', 'gasap-posttypes' ),
'parent_item' => null,
'parent_item_colon' => null,
'update_item' => 'Update Status',
'edit_item' => 'Edit Status',
'add_new_item' => 'Add New GASAP Status',
'new_item_name' => 'New GASAP Status',
'menu_name' => 'GASAP Status',
'update_item' => __( 'Update Status', 'gasap-posttypes' ),
'edit_item' => __( 'Edit Status', 'gasap-posttypes' ),
'add_new_item' => __( 'Add New GASAP Status', 'gasap-posttypes' ),
'new_item_name' => __( 'New GASAP Status', 'gasap-posttypes' ),
'menu_name' => __( 'GASAP Status', 'gasap-posttypes' ),
);
$args = array(
'labels' => $labels,
......@@ -250,17 +250,17 @@ function add_type_taxonomy_to_gasap(){
$taxonomy = 'gasaptype';
$object_type = 'gasap';
$labels = array(
'name' => 'GASAP Types',
'singular_name' => 'GASAP Type',
'search_items' => 'Search GASAP Types',
'all_items' => 'All GASAP Types',
'name' => _x( 'GASAP Types', 'taxonomy general name', 'gasap-posttypes' ),
'singular_name' => _x( 'GASAP Type', 'taxonomy singular name', 'gasap-posttypes' ),
'search_items' => __( 'Search GASAP Types', 'gasap-posttypes' ),
'all_items' => __( 'All GASAP Types', 'gasap-posttypes' ),
'parent_item' => null,
'parent_item_colon' => null,
'update_item' => 'Update Type',
'edit_item' => 'Edit Type',
'add_new_item' => 'Add New GASAP Type',
'new_item_name' => 'New GASAP Type',
'menu_name' => 'GASAP Type',
'update_item' => __( 'Update Type', 'gasap-posttypes' ),
'edit_item' => __( 'Edit Type', 'gasap-posttypes' ),
'add_new_item' => __( 'Add New GASAP Type', 'gasap-posttypes' ),
'new_item_name' => __( 'New GASAP Type', 'gasap-posttypes' ),
'menu_name' => __( 'GASAP Type', 'gasap-posttypes' ),
);
$args = array(
'labels' => $labels,
......@@ -288,17 +288,17 @@ function add_day_taxonomy_to_gasap(){
$taxonomy = 'gasapday';
$object_type = 'gasap';
$labels = array(
'name' => 'GASAP days',
'singular_name' => 'GASAP day',
'search_items' => 'Search GASAP days',
'all_items' => 'All GASAP days',
'name' => _x( 'GASAP days', 'taxonomy general name', 'gasap-posttypes' ),
'singular_name' => _x( 'GASAP day', 'taxonomy singular name', 'gasap-posttypes' ),
'search_items' => __( 'Search GASAP days', 'gasap-posttypes' ),
'all_items' => __( 'All GASAP days', 'gasap-posttypes' ),
'parent_item' => null,
'parent_item_colon' => null,
'update_item' => 'Update day',
'edit_item' => 'Edit day',
'add_new_item' => 'Add New GASAP day',
'new_item_name' => 'New GASAP day',
'menu_name' => 'GASAP day',
'update_item' => __( 'Update day', 'gasap-posttypes' ),
'edit_item' => __( 'Edit day', 'gasap-posttypes' ),
'add_new_item' => __( 'Add New GASAP day', 'gasap-posttypes' ),
'new_item_name' => __( 'New GASAP day', 'gasap-posttypes' ),
'menu_name' => __( 'GASAP day', 'gasap-posttypes' ),
);
$args = array(
'labels' => $labels,
......@@ -378,16 +378,13 @@ function gasap_add_usage_taxonomy() {
/* *** */
// ---reorder admin menu. default 10 = Media, 20 = Pages, 4 = Separator
// ---reorder admin menu. default 10 = Media,
add_action('admin_menu', 'gasap_change_admin_menu');
function gasap_change_admin_menu() {
global $menu;
$menu[6] = $menu[20];
$menu[30] = $menu[10];
unset($menu[4]);
unset($menu[10]);
unset($menu[20]);
add_menu_page( __( 'Event', 'gasap-posttypes' ),'Event','page','edit.php?post_type=event','','',5 );
remove_menu_page( 'dashboard' );
if ( !current_user_can( 'manage_options' ) ){
remove_menu_page( 'tools.php' );
remove_submenu_page( 'edit.php?post_type=gasap', 'edit-tags.php?taxonomy=gasaptype&post_type=gasap' );
......@@ -553,7 +550,7 @@ function gasap_rename_metabox( $post ) {
remove_meta_box( 'authordiv', 'gasap', 'core' );
add_meta_box(
'authordiv',
__('Author = GASAP representative','gasap-posttypes'),
__( 'GASAP representative','gasap-posttypes' ),
'post_author_meta_box',
'gasap',
'advanced',
......
......@@ -2,10 +2,19 @@
add_action( 'beans_post_after_markup', 'add_after_gasapsingle' );
function add_after_gasapsingle() {
// include (get_stylesheet_directory() . '/assets/template_parts/form_contact_gasap.php');
global $post;
$author_mail = get_the_author_meta('user_email',$post->post_author);
echo do_shortcode('[contact-form subject="message from.'$post->post_title.'" to="'.$author_mail.'"]');
// include (get_stylesheet_directory() . '/assets/template_parts/form_contact_gasap.php');
//global $post;
//$author_mail = get_the_author_meta('user_email',$post->post_author);
//echo do_shortcode('[contact-form subject="message from.'$post->post_title.'" to="'.$author_mail.'"]');?>
<!-- Contact form popup -->
<button class="uk-button" data-uk-modal="{target:'#contac-gasap-form'}"><?php esc_html_e( 'Contacter ce GASAP', 'beans_gasap' ) ?></button>
<div id="contac-gasap-form" class="uk-modal">
<div class="uk-modal-dialog">
<a class="uk-modal-close uk-close"></a>
<?php echo do_shortcode( '[contact-form-7 id="147" title="Contact form 1"]' ); ?>
</div>
</div> <?php
include (get_stylesheet_directory() . '/assets/template_parts/footer.php');
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment