<?php
wpml_register_string( THEME_NAME , 'Welcome Text', stripslashes(theme_get_option('general','welcome_text')));

wpml_register_string( THEME_NAME , 'Topbar Html', stripslashes(theme_get_option('general','topbar_html')));

wpml_register_string( THEME_NAME , 'Portfolio More Button Text', theme_get_option('portfolio','more_button_text'));

wpml_register_string( THEME_NAME , 'Copyright Footer Text', stripslashes(theme_get_option('footer','copyright')));

wpml_register_string( THEME_NAME , 'Footer Right Area Html Code', stripslashes(theme_get_option('footer','footer_right_area_html')));

wpml_register_string( THEME_NAME , 'Social Icon Widget Alt Title', 'Follow Us on');

wpml_register_string( THEME_NAME , 'Blog Post Read More Button Text', stripslashes(theme_get_option('blog','read_more_text')));

wpml_register_string( THEME_NAME , 'Html Title Format', stripslashes(theme_get_option('advanced','title_format')));
wpml_register_string( THEME_NAME , 'Category Archive Title', stripslashes(theme_get_option('advanced','category_title')));
wpml_register_string( THEME_NAME , 'Tag Archive Title', stripslashes(theme_get_option('advanced','tag_title')));
wpml_register_string( THEME_NAME , 'Daily Archive Title', stripslashes(theme_get_option('advanced','daily_title')));
wpml_register_string( THEME_NAME , 'Monthly Archive Title', stripslashes(theme_get_option('advanced','monthly_title')));
wpml_register_string( THEME_NAME , 'Yearly Archive Title', stripslashes(theme_get_option('advanced','yearly_title')));
wpml_register_string( THEME_NAME , 'Author Archive Title', stripslashes(theme_get_option('advanced','author_title')));
wpml_register_string( THEME_NAME , 'Blog Archive Title', stripslashes(theme_get_option('advanced','blog_title')));
wpml_register_string( THEME_NAME , 'Taxonomy Archive Title', stripslashes(theme_get_option('advanced','taxonomy_title')));
wpml_register_string( THEME_NAME , '404 Page Title', stripslashes(theme_get_option('advanced','404_title')));
wpml_register_string( THEME_NAME , 'Search Page Title', stripslashes(theme_get_option('advanced','search_title')));

wpml_register_string( THEME_NAME , 'Category Archive Text', stripslashes(theme_get_option('advanced','category_text')));
wpml_register_string( THEME_NAME , 'Tag Archive Text', stripslashes(theme_get_option('advanced','tag_text')));
wpml_register_string( THEME_NAME , 'Daily Archive Text', stripslashes(theme_get_option('advanced','daily_text')));
wpml_register_string( THEME_NAME , 'Monthly Archive Text', stripslashes(theme_get_option('advanced','monthly_text')));
wpml_register_string( THEME_NAME , 'Yearly Archive Text', stripslashes(theme_get_option('advanced','yearly_text')));
wpml_register_string( THEME_NAME , 'Author Archive Text', stripslashes(theme_get_option('advanced','author_text')));
wpml_register_string( THEME_NAME , 'Blog Archive Text', stripslashes(theme_get_option('advanced','blog_text')));
wpml_register_string( THEME_NAME , 'Taxonomy Archive Text', stripslashes(theme_get_option('advanced','taxonomy_text')));
wpml_register_string( THEME_NAME , '404 Page Text', stripslashes(theme_get_option('advanced','404_text')));
wpml_register_string( THEME_NAME , 'Search Page Text', stripslashes(theme_get_option('advanced','search_text')));
wpml_register_string( THEME_NAME , 'Blog Custom Title', stripslashes(theme_get_option('blog','custom_title')));
wpml_register_string( THEME_NAME , 'Blog Custom Text', stripslashes(theme_get_option('blog','custom_introduce_text')));
wpml_register_string( THEME_NAME , 'Sinlge Blog Custom Title', stripslashes(theme_get_option('blog','sinlge_custom_title')));
wpml_register_string( THEME_NAME , 'Sinlge Blog Custom Text', stripslashes(theme_get_option('blog','sinlge_custom_introduce_text')));
wpml_register_string( THEME_NAME , 'Single Product Custom Title', stripslashes(theme_get_option('woocommerce','product_custom_title')));
wpml_register_string( THEME_NAME , 'Single Product Custom Text', stripslashes(theme_get_option('woocommerce','product_custom_introduce_text')));
wpml_register_string( THEME_NAME , 'Product Category Custom Title', stripslashes(theme_get_option('woocommerce','product_cat_custom_title')));
wpml_register_string( THEME_NAME , 'Product Category Custom Text', stripslashes(theme_get_option('woocommerce','product_cat_custom_introduce_text')));
wpml_register_string( THEME_NAME , 'Shop Custom Title', stripslashes(theme_get_option('woocommerce','shop_custom_title')));
wpml_register_string( THEME_NAME , 'Shop Custom Text', stripslashes(theme_get_option('woocommerce','shop_custom_introduce_text')));
wpml_register_string( THEME_NAME , 'Portfolio Custom Title', stripslashes(theme_get_option('portfolio','custom_title')));
wpml_register_string( THEME_NAME , 'Portfolio Custom Text', stripslashes(theme_get_option('portfolio','custom_introduce_text')));
wpml_register_string( THEME_NAME , 'Search Nothing Found Text', stripslashes(theme_get_option('blog','search_nothing_found')));

$archives = get_post_types(array(
  'public'   => true,
  '_builtin' => false,
  'show_ui'=> true,
),'objects');
if ($archives) {
	foreach ($archives  as $archive ) {
		wpml_register_string( THEME_NAME , $archive->name.' Post Type Archive Title', stripslashes(theme_get_option('advance','archive_'.$archive->name.'_title')));
		wpml_register_string( THEME_NAME , $archive->name.' Post Type Archive Text', stripslashes(theme_get_option('advance','archive_'.$archive->name.'_text')));
	}
}
$taxonomies=get_taxonomies(array(
	'public'   => true,
	'_builtin' => false,
	'show_ui'=> true,
),'objects'); 
if ($taxonomies) {
	foreach ($taxonomies  as $taxonomy ) {
		wpml_register_string( THEME_NAME , $taxonomy->name.' Taxonomy Archive Title', stripslashes(theme_get_option('advanced','taxonomy_'.$taxonomy->name.'_title')));
		wpml_register_string( THEME_NAME , $taxonomy->name.' Taxonomy Archive Text', stripslashes(theme_get_option('advanced','taxonomy_'.$taxonomy->name.'_text')));
	}
}
