WordPress.org

Plugin Directory

Changeset 607674


Ignore:
Timestamp:
10/03/12 21:12:46 (19 months ago)
Author:
eskapism
Message:

small update

Location:
simple-seo
Files:
2 edited
5 copied

Legend:

Unmodified
Added
Removed
  • simple-seo/tags/0.3.4/readme.txt

    r553142 r607674  
    44Tags: page, post, pages, posts, page title, menu title, menu label, title, seo, Search engine optimization, optimize, usability 
    55Requires at least: 3.0 
    6 Tested up to: 3.3 
    7 Stable tag: 0.3.3 
     6Tested up to: 3.4.2 
     7Stable tag: 0.3.4 
    88 
    99Change the page title and menu label output for any page or post. 
     
    5454== Changelog == 
    5555 
     56= 0.3.4 = 
     57- Added: if post used on front page has a custom title, that title is prepended to the page title. 
     58 
    5659= 0.3.3 = 
    5760- Fixed: it ran some SQL queries with errors in them when in admin 
  • simple-seo/tags/0.3.4/simple-seo.php

    r553142 r607674  
    44Plugin URI: http://eskapism.se/code-playground/simple-seo/ 
    55Description: Change the page title and menu label output for any page or post, which can be useful for SEO (Search Engine Optimization) reasons. It may also increase the usability of your website, making it more friendly and understandable for your visitors. 
    6 Version: 0.3.3 
     6Version: 0.3.4 
    77Author: Pär Thernström 
    88Author URI: http://eskapism.se/ 
     
    3131add_action("single_post_title", "simple_seo_single_post_title"); 
    3232add_action('get_pages', 'simple_seo_get_pages', 10, 2); 
    33 // add_action('the_title', 'simple_seo_the_title', 10, 2); 
     33add_action('wp_title', 'simple_seo_wp_title', 10, 3); 
    3434 
    3535 
     
    103103 
    104104 
    105 /* 
    106 function simple_seo_the_title($post_title, $post_id) { 
     105function simple_seo_wp_title($post_title, $sep, $seplocation) { 
     106 
     107    // If on front page and post has custom page title then append our title 
     108    global $post; 
     109    if (isset($post) && isset($post->ID)) { 
     110        $post_id = $post->ID; 
     111        $use_custom_page_title = (bool) get_post_meta($post_id, "_simple_seo_use_custom_page_title", true); 
     112 
     113        if (is_front_page() && $use_custom_page_title) { 
     114            $custom_page_title_value = (string) get_post_meta($post_id, "_simple_seo_custom_page_title_value", true); 
     115            $post_title = $custom_page_title_value; 
     116            if ( !empty($post_title) ) { 
     117                $post_title .= " $sep "; 
     118            } 
     119 
     120        } 
     121     
     122    } 
    107123    return $post_title; 
    108124} 
    109 */ 
     125 
    110126/** 
    111127 * change the page title. called by action single_post_title 
     
    242258} 
    243259 
    244  
  • simple-seo/trunk/readme.txt

    r553142 r607674  
    44Tags: page, post, pages, posts, page title, menu title, menu label, title, seo, Search engine optimization, optimize, usability 
    55Requires at least: 3.0 
    6 Tested up to: 3.3 
    7 Stable tag: 0.3.3 
     6Tested up to: 3.4.2 
     7Stable tag: 0.3.4 
    88 
    99Change the page title and menu label output for any page or post. 
     
    5454== Changelog == 
    5555 
     56= 0.3.4 = 
     57- Added: if post used on front page has a custom title, that title is prepended to the page title. 
     58 
    5659= 0.3.3 = 
    5760- Fixed: it ran some SQL queries with errors in them when in admin 
  • simple-seo/trunk/simple-seo.php

    r553142 r607674  
    44Plugin URI: http://eskapism.se/code-playground/simple-seo/ 
    55Description: Change the page title and menu label output for any page or post, which can be useful for SEO (Search Engine Optimization) reasons. It may also increase the usability of your website, making it more friendly and understandable for your visitors. 
    6 Version: 0.3.3 
     6Version: 0.3.4 
    77Author: Pär Thernström 
    88Author URI: http://eskapism.se/ 
     
    3131add_action("single_post_title", "simple_seo_single_post_title"); 
    3232add_action('get_pages', 'simple_seo_get_pages', 10, 2); 
    33 // add_action('the_title', 'simple_seo_the_title', 10, 2); 
     33add_action('wp_title', 'simple_seo_wp_title', 10, 3); 
    3434 
    3535 
     
    103103 
    104104 
    105 /* 
    106 function simple_seo_the_title($post_title, $post_id) { 
     105function simple_seo_wp_title($post_title, $sep, $seplocation) { 
     106 
     107    // If on front page and post has custom page title then append our title 
     108    global $post; 
     109    if (isset($post) && isset($post->ID)) { 
     110        $post_id = $post->ID; 
     111        $use_custom_page_title = (bool) get_post_meta($post_id, "_simple_seo_use_custom_page_title", true); 
     112 
     113        if (is_front_page() && $use_custom_page_title) { 
     114            $custom_page_title_value = (string) get_post_meta($post_id, "_simple_seo_custom_page_title_value", true); 
     115            $post_title = $custom_page_title_value; 
     116            if ( !empty($post_title) ) { 
     117                $post_title .= " $sep "; 
     118            } 
     119 
     120        } 
     121     
     122    } 
    107123    return $post_title; 
    108124} 
    109 */ 
     125 
    110126/** 
    111127 * change the page title. called by action single_post_title 
     
    242258} 
    243259 
    244  
Note: See TracChangeset for help on using the changeset viewer.