whomever] check for other sitemap plugins which may conflict ? * @todo - [JRF => whomever] check for existance of .xls rewrite rule in .htaccess from * google-sitemaps-plugin/generator and remove as it will cause errors for our sitemaps * (or inform the user and disallow enabling of sitemaps ) * @todo - [JRF => whomever] check if anything along these lines is already being done */ if ( ! defined( 'WPSEO_VERSION' ) ) { header( 'Status: 403 Forbidden' ); header( 'HTTP/1.1 403 Forbidden' ); exit(); } global $wpseo_admin_pages; $wpseo_admin_pages->admin_header( true, WPSEO_Options::get_group_name( 'wpseo_xml' ), 'wpseo_xml' ); $options = get_option( 'wpseo_xml' ); $content = $wpseo_admin_pages->checkbox( 'enablexmlsitemap', __( 'Check this box to enable XML sitemap functionality.', 'wordpress-seo' ), false ); $content .= '
'; if ( wpseo_is_nginx() ) { $content .= '
'; $content .= '

' . __( 'As you\'re on NGINX, you\'ll need the following rewrites:', 'wordpress-seo' ) . '

'; $content .= '
rewrite ^/sitemap_index\.xml$ /index.php?sitemap=1 last;
rewrite ^/([^/]+?)-sitemap([0-9]+)?\.xml$ /index.php?sitemap=$1&sitemap_n=$2 last;
'; $content .= '
'; } if ( $options['enablexmlsitemap'] === true ) { $content .= '

' . sprintf( esc_html__( 'You can find your XML Sitemap here: %sXML Sitemap%s', 'wordpress-seo' ), '', '' ) . '

' . __( 'You do not need to generate the XML sitemap, nor will it take up time to generate after publishing a post.', 'wordpress-seo' ) . '

'; } else { $content .= '

' . __( 'Save your settings to activate XML Sitemaps.', 'wordpress-seo' ) . '

'; } // When we write the help tab for this we should definitely reference this plugin :https://wordpress.org/plugins/edit-author-slug/ $content .= '

' . __( 'User sitemap', 'wordpress-seo' ) . '

'; $content .= $wpseo_admin_pages->checkbox( 'disable_author_sitemap', __( 'Disable author/user sitemap', 'wordpress-seo' ), false ); $content .= '
'; $content .= '

' . __( 'Exclude users without posts', 'wordpress-seo' ) . '
'; $content .= $wpseo_admin_pages->checkbox( 'disable_author_noposts', __( 'Disable all users with zero posts', 'wordpress-seo' ), false ); $roles = wpseo_get_roles(); if ( is_array( $roles ) && $roles !== array() ) { $content .= '

' . __( 'Exclude user roles', 'wordpress-seo' ) . '
'; $content .= __( 'Please check the appropriate box below if there\'s a user role that you do NOT want to include in your sitemap:', 'wordpress-seo' ) . '

'; foreach ( $roles as $role_key => $role_name ) { $content .= $wpseo_admin_pages->checkbox( 'user_role-' . $role_key . '-not_in_sitemap', $role_name ); } } $content .= '
'; $content .= '
'; $content .= '

' . __( 'General settings', 'wordpress-seo' ) . '

'; $content .= '

' . __( 'After content publication, the plugin automatically pings Google and Bing, do you need it to ping other search engines too? If so, check the box:', 'wordpress-seo' ) . '

'; $content .= $wpseo_admin_pages->checkbox( 'xml_ping_yahoo', __( 'Ping Yahoo!', 'wordpress-seo' ), false ); $content .= $wpseo_admin_pages->checkbox( 'xml_ping_ask', __( 'Ping Ask.com', 'wordpress-seo' ), false ); $post_types = apply_filters( 'wpseo_sitemaps_supported_post_types', get_post_types( array( 'public' => true ), 'objects' ) ); if ( is_array( $post_types ) && $post_types !== array() ) { $content .= '

' . __( 'Exclude post types', 'wordpress-seo' ) . '

'; $content .= '

' . __( 'Please check the appropriate box below if there\'s a post type that you do NOT want to include in your sitemap:', 'wordpress-seo' ) . '

'; foreach ( $post_types as $pt ) { $content .= $wpseo_admin_pages->checkbox( 'post_types-' . $pt->name . '-not_in_sitemap', $pt->labels->name . ' (' . $pt->name . ')' ); } } $taxonomies = apply_filters( 'wpseo_sitemaps_supported_taxonomies', get_taxonomies( array( 'public' => true ), 'objects' ) ); if ( is_array( $taxonomies ) && $taxonomies !== array() ) { $content .= '

' . __( 'Exclude taxonomies', 'wordpress-seo' ) . '

'; $content .= '

' . __( 'Please check the appropriate box below if there\'s a taxonomy that you do NOT want to include in your sitemap:', 'wordpress-seo' ) . '

'; foreach ( $taxonomies as $tax ) { if ( isset( $tax->labels->name ) && trim( $tax->labels->name ) != '' ) { $content .= $wpseo_admin_pages->checkbox( 'taxonomies-' . $tax->name . '-not_in_sitemap', $tax->labels->name . ' (' . $tax->name . ')' ); } } } $content .= '
'; $content .= '

' . __( 'Entries per page', 'wordpress-seo' ) . '

'; $content .= '

' . sprintf( __( 'Please enter the maximum number of entries per sitemap page (defaults to %s, you might want to lower this to prevent memory issues on some installs):', 'wordpress-seo' ), WPSEO_Options::get_default( 'wpseo_xml', 'entries-per-page' ) ) . '

'; $content .= $wpseo_admin_pages->textinput( 'entries-per-page', __( 'Max entries per sitemap page', 'wordpress-seo' ) ); $content .= '
'; $content .= '
'; $wpseo_admin_pages->postbox( 'xmlsitemaps', __( 'XML Sitemap', 'wordpress-seo' ), $content ); do_action( 'wpseo_xmlsitemaps_config' ); $wpseo_admin_pages->admin_footer();