Guest User

Untitled

a guest
Oct 23rd, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. define('SITE_LANG', pll_current_language('slug'));
  2.  
  3. if (function_exists('pll_register_string')) {
  4. pll_register_string('Chat with us', 'Discute avec nous', 'Theme');
  5. }
  6.  
  7.  
  8. // for custom post type add lang
  9. add_filter( 'pll_get_post_types', 'add_cpt_to_pll', 10, 2 );
  10. function add_cpt_to_pll( $post_types, $is_settings ) {
  11. $post_types['portfolio'] = 'portfolio';
  12.  
  13. return $post_types;
  14. }
  15.  
  16.  
  17. acf_add_options_page(array(
  18. 'page_title' => 'Site Options',
  19. 'menu_title' => 'Site Options',
  20. 'menu_slug' => 'theme-general-settings',
  21. 'capability' => 'edit_posts',
  22. 'post_id' => 'en',
  23. 'redirect' => false
  24. ));
  25.  
  26. acf_add_options_sub_page( array(
  27. 'page_title' => 'Site Options (FR)',
  28. 'menu_title' => __('Site Options (FR)', 'text-domain'),
  29. 'menu_slug' => "site-options-fr",
  30. 'post_id' => 'fr',
  31. 'parent' => 'theme-general-settings'
  32. ) );
Add Comment
Please, Sign In to add comment