Make WordPress Core


Ignore:
Timestamp:
12/09/2004 02:40:35 AM (22 years ago)
Author:
rboren
Message:

get_author_permastruct()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/classes.php

    r1910 r1933  
    703703        var $category_base;
    704704        var $category_structure;
     705        var $author_structure;
    705706        var $date_structure;
    706707        var $front;
     
    878879        }
    879880
     881        function get_author_permastruct() {
     882                if (isset($this->author_structure)) {
     883                        return $this->author_structure;
     884                }
     885
     886    if (empty($this->permalink_structure)) {
     887                        $this->author_structure = '';
     888                        return false;
     889                }
     890
     891                $this->author_structure = $this->front . 'author/%author%';
     892
     893                return $this->author_structure;
     894        }
     895
    880896        function add_rewrite_tag($tag, $pattern, $query) {
    881897                $this->rewritecode[] = $tag;
     
    10051021
    10061022                // Authors
    1007                 $author_structure = $this->front . 'author/%author%';
    1008                 $author_rewrite = $this->generate_rewrite_rules($author_structure);
     1023                $author_rewrite = $this->generate_rewrite_rules($this->get_author_permastruct());
    10091024
    10101025                // Pages
     
    10791094                $this->category_base = get_settings('category_base');
    10801095                unset($this->category_structure);
     1096                unset($this->author_structure);
    10811097                unset($this->date_structure);           
    10821098        }
Note: See TracChangeset for help on using the changeset viewer.