Plugin Directory

Changeset 335395


Ignore:
Timestamp:
01/21/2011 04:54:09 AM (15 years ago)
Author:
Gecka
Message:

Adds background_cb and shuffle parameters

Location:
gecka-bgstretcher/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • gecka-bgstretcher/trunk/bgstretcher.php

    r317416 r335395  
    55Plugin URI: http://gecka-apps.com/wordpress-plugins/geka-submenu/
    66Description: Implements the bgstretcher jquery script
    7 Version: 0.1
     7Version: 0.2
    88Author: Gecka
    99Author URI: http://gecka-apps.com
     
    5353                        'slideShow' => 'true',
    5454                        'background' => '',
    55                         'pageWrapper' => '#wrapper' );
     55                        'background_cb' => null,
     56                        'pageWrapper' => '#wrapper',
     57                        'shuffle' => false );
    5658   
    5759    $options = wp_parse_args( $options, $defaults );
     
    5961   
    6062    /* no function level defined background */
    61     if(!$background) {
     63    if(!$background && !$background_cb) {
    6264       
    6365        $repeat = get_theme_mod( 'background_repeat', 'repeat' );
     
    8385    extract( $GLOBALS['bgstretcher_options'], EXTR_SKIP );
    8486
    85     if( !is_array($background) ) $background = array($background);
     87    if($background_cb) $background = call_user_func( $background_cb );
     88
     89    if( !is_array($background) && $background ) $background = array($background);
     90   
     91    if(!sizeof($background)) return;
    8692   
    8793    $_bg = array();
    8894    foreach ($background as $bg)     
    8995        $_bg[] = "'$bg'";
     96   
     97    if($shuffle) shuffle($_bg);   
    9098   
    9199    $background = implode(', ', $_bg);
  • gecka-bgstretcher/trunk/readme.txt

    r317416 r335395  
    11=== Gecka BgStretcher ===
    2 Contributors: Laurent Dinclaux, Gecka
    3 Tags: background, background stretch, image, bgstretcher, jquery
     2Contributors: Gecka
     3Tags: background, background stretch, image, bgstretcher, jquery, streched background
    44Requires at least: 3.0
    5 Tested up to: 3.0.1
    6 Stable tag: 0.1
     5Tested up to: 3.1
     6Stable tag: 0.2
    77Donate link: http://gecka-apps.com/wordpress-plugins/bgstretcher/
    88
     
    3535== Changelog ==
    3636
     37= 0.2 = 
     38* News background_cb and shuffle parameters.
     39
    3740= 0.1 = 
    3841* First version.
Note: See TracChangeset for help on using the changeset viewer.