
// V2 fix: create required client pages even when the theme was uploaded over an older version.
function pts_ensure_client_pages_v2(){
  if(!is_admin()) return;
  $pages = array(
    'client-login'=>array('title'=>'Client Login','content'=>'[pts_login]'),
    'my-albums'=>array('title'=>'My Albums','content'=>'[pts_client_albums]')
  );
  foreach($pages as $slug=>$data){
    $page = get_page_by_path($slug);
    if(!$page){
      wp_insert_post(array(
        'post_title'=>$data['title'],
        'post_name'=>$slug,
        'post_content'=>$data['content'],
        'post_status'=>'publish',
        'post_type'=>'page'
      ));
    } elseif(strpos($page->post_content, '[') === false) {
      wp_update_post(array('ID'=>$page->ID,'post_content'=>$data['content']));
    }
  }
  if(!get_option('pts_client_album_v2_rewrite_flushed')){
    flush_rewrite_rules(false);
    update_option('pts_client_album_v2_rewrite_flushed',1);
  }
}
add_action('admin_init','pts_ensure_client_pages_v2');

function pts_fix_login_nav_url($items, $args){ return $items; }
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="https://paristamilstudio.com/wp-sitemap-index.xsl" ?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"><sitemap><loc>https://paristamilstudio.com/wp-sitemap-posts-post-1.xml</loc></sitemap><sitemap><loc>https://paristamilstudio.com/wp-sitemap-posts-page-1.xml</loc></sitemap><sitemap><loc>https://paristamilstudio.com/wp-sitemap-taxonomies-category-1.xml</loc></sitemap><sitemap><loc>https://paristamilstudio.com/wp-sitemap-users-1.xml</loc></sitemap></sitemapindex>
