WordPress.org

Plugin Directory

Changeset 366865


Ignore:
Timestamp:
03/30/11 10:54:51 (3 years ago)
Author:
JohnPBloch
Message:

Some fixes

Location:
alot/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • alot/trunk/alot.php

    r335531 r366865  
    4141    function __construct(){ 
    4242        $this->settings = get_option( $this->settings_name ); 
    43         $installed_version = get_option( $this->version_option ); 
     43        $installed_version = get_option( $this->version_name ); 
    4444        $this->url = trailingslashit( plugins_url( '', __FILE__ ) ); 
    4545        $this->dir = trailingslashit( dirname( __FILE__ ) ); 
     
    5252            add_action( $hook, array( &$this, $hook ), 1 ); 
    5353        $this->td[] = basename(dirname(__FILE__)); 
    54         $this->td[] = trailingslashit($this->textdomain[0]) . 'languages'; 
     54        $this->td[] = trailingslashit($this->td[0]) . 'languages'; 
    5555    } 
    5656 
     
    9393 
    9494    function admin_menu(){ 
    95         $this->admin_page_title = $page_title = sprintf( __( '%s of Options', $this->textdomain[0] ), 'Alot' ); 
     95        $this->admin_page_title = $page_title = sprintf( __( '%s of Options', $this->td[0] ), 'Alot' ); 
    9696        add_options_page( $page_title, $page_title, 'manage_options', $this->slug, array( &$this, 'menu' ) ); 
    9797    } 
     
    110110    function settings_san( $settings ){ 
    111111        $raw_settings = $settings; 
    112         if( isset( $settings['modules'] ) && is_array( $settings['modules'] ) && !empty( $settings['modules'] ) ){ 
    113             foreach( $settings['modules'] as $mod => $state ) 
    114                 $settings['modules'][$mod] = 'active' == $state ? true : false; 
    115             if( array_diff( $this->settings['modules'], $settings['modules'] ) ) 
    116                 $settings['modules'] = array_merge( $settings['modules'], $this->settings['modules'] ); 
    117         } else { 
    118             $settings['modules'] = $this->settings['modules']; 
    119         } 
     112        $settings['modules'] = isset($settings['modules']) && is_array($settings['modules']) ? $settings['modules'] : array(); 
     113        $settings['modules'] = array_map( '__return_true', $settings['modules'] ); 
     114        $diff = array_diff_key( $this->settings['modules'], $settings['modules'] ); 
     115        $diff = array_map( '__return_false', $diff ); 
     116        $settings['modules'] = array_merge( $settings['modules'], $diff ); 
    120117        return apply_filters( 'sanitize_alot_of_settings', $settings, $this->settings ); 
    121118    } 
  • alot/trunk/js/alotofalot.js

    r335353 r366865  
    1 jquery(document).ready(function($){ 
     1jQuery(document).ready(function($){ 
    22    if(typeof AoA == 'undefined'){ 
    33        return; 
    44    } 
    5     $(window).trbamc(function(){ 
     5    AoA.i = AoA.i.split(','); 
     6    AoA.a = false; 
     7    $('body').trbamc(function(){ 
    68        if(AoA.a){ 
    79            return true; 
    810        } 
    911        AoA.a=true; 
    10         $(window).click(function(e){ 
     12        $('body').click(function(e){ 
    1113            var vH = $(window).height(); 
    1214            var vW = $(window).width(); 
    1315            var vW=vW<400?400:vW; 
    14             var hH=vH<300:300:vH; 
     16            var hH=vH<300?300:vH; 
    1517            var src=AoA.u+(vW>1600?'l':'')+'alot'+AoA.i[Math.floor(Math.random()*12)]+'.png'; 
    1618            var pX=vW>1600?Math.floor(Math.random()*(vW-800)):Math.floor(Math.random()*(vW-400)); 
  • alot/trunk/js/k.js

    r335353 r366865  
    1 jQuery(document).ready(function(z){var k=new Array(65,66,37,38,39,40),r='38384040373937396566',c='',t;z('body').keydown(function(e){if(z.inArray(e.keyCode,k)<0){return;}c+=e.keyCode.toString();clearTimeout(t);t=setTimeout(function(){c='';},300);if(c.length>20){c=c.substr((c.length-20));}if(r===c){z('body').trigger('trbamc');}});z.fn.trbamc=function(h){z(this).bind('trbamc',h);};}); 
     1jQuery(document).ready(function(z){var k=new Array(65,66,37,38,39,40),r='38384040373937396665',c='',t;z('body').keydown(function(e){if(z.inArray(e.keyCode,k)<0){return;}c+=e.keyCode.toString();clearTimeout(t);t=setTimeout(function(){c='';},300);if(c.length>20){c=c.substr((c.length-20));}if(r===c){z('body').trigger('trbamc');}});z.fn.trbamc=function(h){z(this).bind('trbamc',h);};}); 
  • alot/trunk/modules/bottom_corner.php

    r335353 r366865  
    1515    } 
    1616 
    17     function wp_footer { 
     17    function wp_footer() { 
    1818        if( apply_filters( 'not_alot_of_corners_on_this_page', false ) ) 
    1919            return; 
  • alot/trunk/modules/easter_eggs.php

    r335353 r366865  
    77        wp_localize_script( 'alotofalot', 'AoA', array( 
    88            'a' => false, 
    9             'i' => array('1','2','3','4','5','6','8','9','12','13','14','15'), 
     9            'i' => implode( ',', array('1','2','3','4','5','6','8','9','12','13','14','15') ), 
    1010            'u' => trailingslashit( plugins_url( 'alot/img/' ) ) 
    1111        )); 
Note: See TracChangeset for help on using the changeset viewer.