Plugin Directory

Changeset 404671


Ignore:
Timestamp:
07/05/2011 07:49:14 AM (15 years ago)
Author:
BisonTech
Message:

Added support for Wordpress 3.2

Location:
logoreplacer/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • logoreplacer/trunk/logoReplacer.php

    r271968 r404671  
    1919Description: Replace registration and admin Logo
    2020Author:  http://www.BisonTech.net
    21 Version: 1.0.1
     21Version: 1.2.0
    2222*/
    2323
    24  
     24
    2525add_action('plugins_loaded', 'lr_init');
    2626
     
    2929
    3030function lr_init(){
     31  $version = get_bloginfo('version');
    3132
    32   $src_login = LOGO_DIR . 'logo-login.gif';
     33  list($version,$release, $minor) = explode('.',$version);
     34 
     35  //wp 3.1
     36  if (($version >= 3) && ($release >=2) ){
     37       $src_login = LOGO_DIR . 'logo-login.png';
     38  }else{
     39       $src_login = LOGO_DIR . 'logo-login.gif';
     40  }
    3341  $src_head = LOGO_DIR . 'wp-logo-vs.png';
    34 
    35   $dst_login = ABSPATH . '/wp-admin/images/logo-login.gif';
     42  if (($version >= 3) && ($release >=2) ){
     43    $dst_login = ABSPATH . '/wp-admin/images/logo-login.png';
     44  }else{
     45    $dst_login = ABSPATH . '/wp-admin/images/logo-login.gif';
     46  }
    3647  $dst_head = ABSPATH . '/wp-admin/images/wp-logo-vs.png';
    3748  $dst_head2 = ABSPATH . '/wp-admin/images/wp-logo.png';
     
    4354  $logo_head_current   = md5_file($dst_head);
    4455  $logo_head_current2  = md5_file($dst_head2);
    45  
    46  
     56
     57
     58
    4759  if ($logo_login_current == $logo_login_md5){
    4860    //log...
     
    5062    lr_installLogo($src_login,$dst_login);
    5163  }
    52  
     64
    5365  if ($logo_head_current == $logo_head_md5){
    5466    //log
    5567  }else{
    56     lr_installLogo($src_head,$dst_head);   
     68    lr_installLogo($src_head,$dst_head);
    5769  }
    5870
    5971  if ($logo_head_current2 == $logo_head_md5){
    6072    //log
    61   }else{   
    62     lr_installLogo($src_head,$dst_head2);   
     73  }else{
     74    lr_installLogo($src_head,$dst_head2);
    6375  }
    6476
  • logoreplacer/trunk/readme.txt

    r271968 r404671  
    11=== Plugin Name ===
    22Contributors: Bison Airon
    3 Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=socialic%40gmail%2ecom&item_name=logoReplacer&item_number=Support%20Open
     3Donate link: http://flattr.com/thing/264874/ICSocial-Network
    44
    55Tags: logo, graphics, admin, registration
    66Requires at least: 2.0.2
    77Tested up to: 2.1
    8 Stable tag: 1.0
     8Stable tag: 1.2
    99
    1010This plugin replace WP default admin/login/register page.
     
    1515The technique used is pretty brutal but the best currently possible, the plugin replaces the modified files automatically.
    1616To make the plugin run the web server must be able to write to the wp-admin directory.
    17 http://www.bisontech.net
     17more info @ http://www.bisontech.net
    1818
    1919== Installation ==
    2020
    21211. Download the .zip file of logoReplacer from the WordPress plugins directory.
    22 1. Unzip it into temp directory, edit logo-login.gif and wp-logo-vs.png and save with same format.
     221. Unzip it into temp directory, edit logo-login.gif or logo-login.png and wp-logo-vs.png and save with same format.
    23231. Upload logoReplacer direcotry  into the /wp-content/plugins/
    24 1. Activate the plugin through the ‘Plugins’ menu in WordPress.
     241. Activate the plugin through the "Plugins" menu in WordPress.
    2525
    2626== Screenshots ==
     
    3030
    3131== Changelog ==
     32= 1.2.0 =
     33* Added support for Wordpress 3.2 admin (now login image is a png)
     34* Added wp-logo.png for old wordpress admin grey theme
    3235
    3336= 1.0.1 =
Note: See TracChangeset for help on using the changeset viewer.