@@ -76,25 +76,37 @@ function easy_xmlsitemap_settings_form() {
7676 );
7777 $ form ['settings ' ]['excluded_urls ' ] = array (
7878 '#type ' => 'textarea ' ,
79- '#title ' => t ('Excluded URLs list (optional) ' ),
79+ '#title ' => t ('Excluded URLs list: ' ),
8080 '#default_value ' => $ config ->get ('excluded_urls ' ),
81- '#description ' => t ('If some URLs should be excluded from sitemap, place these URLs here, one URL per line without domain, see an example below: ' )
81+ '#description ' => t ('If URL should be excluded from sitemap, place one URL per line without domain part , see an example below: ' )
8282 . '<br />403.html '
8383 . '<br />404.html '
8484 . '<br />node/123 '
8585 . '<br /> ' . t ('Multiple similar URLs can be selected by using asterisk wildcard (*), for example: ' )
8686 . '<br /><em>post-*</em>, '
87- . '<br /> ' . t ('so all URLs starting with post- (such as post-123 or post-about-cat.html) will be excluded from sitemap. ' )
87+ . '<br /> ' . t ('so all URLs starting with post- (such as post-123 or post-about-cat.html) will be excluded from sitemap. ' ),
88+ '#prefix ' => '<b> ' . t ('Exclusions: ' ) . '</b> '
89+
8890 );
8991 if (count ($ site_langs ) > 1 ) {
9092 $ form ['settings ' ]['excluded_langs ' ] = array (
9193 '#type ' => 'checkboxes ' ,
92- '#title ' => t ('Exclude from sitemap all pages for selected language (optional) : ' ),
94+ '#title ' => t ('Exclude from sitemap all pages for selected language: ' ),
9395 '#options ' => $ site_langs ,
9496 '#default_value ' => $ config ->get ('excluded_langs ' ),
95- '#description ' => t ('In some cases you might want do not include to sitemap links to pages for specific language. ' ),
97+ '#description ' => t ('You might want do not include to sitemap links to pages for specific language. ' ),
9698 );
9799 }
100+ if (module_exists ('seo_meta ' )) {
101+ $ form ['settings ' ]['seo_meta_integration ' ] = array (
102+ '#type ' => 'checkbox ' ,
103+ '#title ' => t ('Exclude also pages with "noindex" value of meta tag "robots". ' ),
104+ '#default_value ' => $ config ->get ('seo_meta_integration ' ),
105+ '#description ' => t ('Your site have module "SEO Meta Tags" enabled, so "noindex" in "robots" can be used for excluding pages from sitemap. ' ),
106+ '#prefix ' => '<b> ' . t ('"SEO Meta Tags" module integration: ' ) . '</b> ' ,
107+ );
108+ }
109+
98110 $ form ['settings ' ]['submit ' ] = array (
99111 '#type ' => 'submit ' ,
100112 '#value ' => t ('Save settings ' ),
@@ -122,6 +134,9 @@ function easy_xmlsitemap_settings_form_submit($form, &$form_state) {
122134 if (isset ($ form_state ['values ' ]['excluded_langs ' ])) {
123135 $ config ->set ('excluded_langs ' , $ form_state ['values ' ]['excluded_langs ' ]);
124136 }
137+ if (isset ($ form_state ['values ' ]['seo_meta_integration ' ])) {
138+ $ config ->set ('seo_meta_integration ' , $ form_state ['values ' ]['seo_meta_integration ' ]);
139+ }
125140 $ config ->save ();
126141 watchdog ('easy_xmlsitemap ' , t ('Settings changed by @user. ' , array ('@user ' => $ user ->name )));
127142 backdrop_set_message (t ('Configuration settings have been saved. ' ));
0 commit comments