Esempio n. 1
0
 /**
  * Insert re-configured site title
  *
  * @return void
  **/
 function wp_title($title, $separator = '', $location = '')
 {
     HeadSpace2::reload($this);
     $sep = $separator;
     if ($this->separator != '') {
         $sep = $this->separator;
     }
     $replace = $separator;
     if ($replace == ' ') {
         $replace = '';
     }
     if (strlen($this->page_title) == 0 && strlen($title) == 0) {
         $title = '';
     } else {
         if ($this->position == 'after' || $location == 'right') {
             if (strlen($this->page_title) > 0) {
                 $title = $this->page_title . " " . $sep . " ";
             } else {
                 $title = trim(str_replace($replace, '', $title)) . " " . $sep . " ";
             }
         } else {
             // Before
             if (strlen($this->page_title) > 0) {
                 $title = " " . $sep . " " . $this->page_title;
             } else {
                 $title = $sep . " " . trim(str_replace($replace, '', $title)) . '';
             }
         }
     }
     return $title;
 }
Esempio n. 2
0
 function more_link_text($text)
 {
     HeadSpace2::reload($this);
     if ($this->more_text) {
         return preg_replace('@' . $this->pattern . '@', str_replace('$1', $this->more_text, $this->replace), $text);
     }
     return $text . $this->more_text;
 }
 /**
  * Get new blog name
  *
  * @return string
  **/
 function option_blogdescription($tagline)
 {
     HeadSpace2::reload($this);
     if (strlen($this->blog_tagline) > 0) {
         return $this->blog_tagline;
     }
     return $tagline;
 }
 /**
  * Insert re-configured blog name and description into the RSS feed
  *
  * @return void
  **/
 function bloginfo_rss($info, $show)
 {
     HeadSpace2::reload($this);
     if ($show == 'description' && $this->rss_desc) {
         return $this->rss_desc;
     }
     return $info;
 }
 /**
  * Insert re-configured blog name and description into the RSS feed
  *
  * @return void
  **/
 function get_wp_title_rss($show)
 {
     HeadSpace2::reload($this);
     if ($this->rss_title) {
         return $this->rss_title;
     }
     return $show;
 }
Esempio n. 6
0
 /**
  * Get new blog name
  *
  * @return string
  **/
 function option_blogname($tagline)
 {
     global $headspace2;
     if ($headspace2->ugly_hack !== true) {
         HeadSpace2::reload($this);
     }
     if (strlen($this->blog_name) > 0) {
         return trim(HeadSpace_Plugin::specialchars($this->blog_name));
     }
     return trim($tagline);
 }
 /**
  * Get new blog name
  *
  * @return string
  **/
 function option_blogname($tagline)
 {
     global $headspace2;
     if (isset($headspace2->ugly_hack) && $headspace2->ugly_hack !== true) {
         HeadSpace2::reload($this);
     }
     if (strlen($this->blog_name) > 0) {
         return trim(esc_html($this->blog_name));
     }
     return trim($tagline);
 }
Esempio n. 8
0
 function do_link($link, $var)
 {
     if ($this->reloaded == false) {
         HeadSpace2::reload($this);
     }
     $post_id = $this->{$var};
     if ($post_id > 0) {
         $post = get_post($post_id);
         if (!empty($post)) {
             $link = preg_replace("/href='(.*?)'/", 'href="' . get_permalink($post_id) . '"', $link);
             $link = preg_replace("/title='(.*?)'/", 'title="' . $post->post_title . '"', $link);
         }
     }
     return $link;
 }
Esempio n. 9
0
 function add_tags($text)
 {
     HeadSpace2::reload($this);
     return $text . get_the_tag_list(__('<p>Tags: ', 'headspace'), ', ', '</p>');
 }