Plugin Directory

Changeset 717625


Ignore:
Timestamp:
05/24/2013 05:04:18 AM (13 years ago)
Author:
misterbisson
Message:

version 5.1, synced from github: git@…:misterbisson/bcms.git

Location:
bcms/trunk
Files:
11 added
4 deleted
22 edited

Legend:

Unmodified
Added
Removed
  • bcms/trunk

    • Property svn:ignore set to
      README.md
      .git
      .gitignore
      .gitmodules
      deploy/
  • bcms/trunk/admin.php

    • Property svn:executable deleted
    r531201 r717625  
    134134
    135135<p class="submit">
    136 <input type="submit" name="Submit" value="<?php _e('Save Changes') ?>" class="button" />
     136<input type="submit" name="Submit" value="<?php esc_attr_e('Save Changes') ?>" class="button" />
    137137</p>
    138138</form>
     
    153153<th scope="row" class="th-full">
    154154<form method="post">
    155 <input type="submit" name="Options" value="<?php _e('Rebuild bCMS search index') ?>" /> &nbsp;
     155<input type="submit" name="Options" value="<?php esc_attr_e('Rebuild bCMS search index') ?>" /> &nbsp;
    156156</th>
    157157</tr>
     
    165165<th scope="row" class="th-full">
    166166<form method="post">
    167 <input type="submit" name="Options" value="<?php _e('Show rewrite rules') ?>" /> &nbsp;
    168 <input type="submit" name="Options" value="<?php _e('PHP Info') ?>" /></form>
     167<input type="submit" name="Options" value="<?php esc_attr_e('Show rewrite rules') ?>" /> &nbsp;
     168<input type="submit" name="Options" value="<?php esc_attr_e('PHP Info') ?>" /></form>
    169169</th>
    170170</tr>
  • bcms/trunk/bcms.php

    r559688 r717625  
    44Plugin URI: http://maisonbisson.com/bsuite/
    55Description: Make WordPress a better CMS. Create a post loop in a widget. Lazy load widgets. More shortcodes. More good.
    6 Version: 5.0
     6Version: 5.1
    77Author: Casey Bisson
    88Author URI: http://maisonbisson.com/blog/
     
    1111// the admin menu
    1212if ( is_admin() )
     13{
    1314    require_once dirname( __FILE__ ) . '/admin.php';
     15}
    1416
    1517// include the core components
    16 require_once( dirname( __FILE__ ) .'/components/postloops.php' );
    17 require_once( dirname( __FILE__ ) .'/components/wijax.php' );
     18require_once( dirname( __FILE__ ) .'/components/class-bcms-postloop.php' );
     19bcms_postloop();
     20require_once( dirname( __FILE__ ) .'/components/class-bcms-wijax.php' );
     21bcms_wijax();
     22require_once( dirname( __FILE__ ) .'/components/class-bcms-postloop-widget.php' );
     23require_once( dirname( __FILE__ ) .'/components/class-bcms-wijax-widget.php' );
     24require_once( dirname( __FILE__ ) .'/components/functions.php' );
    1825require_once( dirname( __FILE__ ) .'/components/late-enqueue.php' );
     26add_action( 'widgets_init', 'bcms_widgets_init', 1 );
     27
    1928
    2029// override the URL path by setting it in the object as such:
     
    2231
    2332// include the CMS convenience features
    24 require_once( dirname( __FILE__ ) .'/components/child-posts.php' );
    2533require_once( dirname( __FILE__ ) .'/components/cms-widgets.php' );
    2634require_once( dirname( __FILE__ ) .'/components/innerindex.php');
     
    2937
    3038// optionally include the mysql-based full text indexing
    31 if( get_option('bcms_searchsmart'))
    32     require_once( dirname( __FILE__ ) .'/components/search.php' );
     39if( get_option( 'bcms_searchsmart' ))
     40{
     41    require_once( dirname( __FILE__ ) .'/components/class-bcms-search.php' );
     42    bcms_search();
     43}
  • bcms/trunk/components/cms-widgets.php

    r531109 r717625  
    1414    function widget( $args, $instance ) {
    1515        extract( $args );
    16        
     16
    1717        if( $instance['startpage'] < 0 ||  $instance['startpage'] === 'c' )
    1818        {
     
    4242        $exclude = empty( $instance['exclude'] ) ? '' : $instance['exclude'];
    4343        $depth = isset( $instance['depth'] ) ? $instance['depth'] : 1;
    44        
     44
    4545        if( $instance['startpage'] < 0 )
    4646        {
     
    6767
    6868        $out = wp_list_pages( array(
    69                 'child_of' => $startpage, 
    70                 'title_li' => '', 
    71                 'echo' => 0, 
    72                 'sort_column' => $sortby, 
    73                 'exclude' => $exclude, 
    74                 'depth' => $depth 
     69                'child_of' => $startpage,
     70                'title_li' => '',
     71                'echo' => 0,
     72                'sort_column' => $sortby,
     73                'exclude' => $exclude,
     74                'depth' => $depth
    7575        ));
    7676
     
    9191
    9292                // get any children, insert them into the tree
    93                 if( $children = wp_list_pages( array( 'child_of' => $post->ID, 'title_li' => '', 'echo' => 0, 'sort_column' => $sortby, 'exclude' => $exclude, 'depth' => $depth ))){       
     93                if( $children = wp_list_pages( array( 'child_of' => $post->ID, 'title_li' => '', 'echo' => 0, 'sort_column' => $sortby, 'exclude' => $exclude, 'depth' => $depth ))){
    9494                    $subtree = preg_replace( '/current_page_item[^<]*<a([^<]*)/i', 'current_page_item"><a\1<ul>'. $children .'</ul>', $subtree );
    9595                }
     
    102102            }
    103103        }
    104        
     104
    105105        if ( !empty( $out ) ) {
    106106            echo $before_widget;
     
    138138    function form( $instance ) {
    139139        //Defaults
    140         $instance = wp_parse_args( (array) $instance, 
    141             array( 
    142                 'sortby' => 'post_title', 
    143                 'title' => '', 
    144                 'exclude' => '', 
    145                 'depth' => 1, 
     140        $instance = wp_parse_args( (array) $instance,
     141            array(
     142                'sortby' => 'post_title',
     143                'title' => '',
     144                'exclude' => '',
     145                'depth' => 1,
    146146                'startpage' => 0,
    147147                'expandtree' => 1,
     
    181181        <p>
    182182            <label for="<?php echo $this->get_field_id('startpage'); ?>"><?php _e( 'Start page hierarchy at:' ); ?></label>
    183             <?php echo preg_replace( 
     183            <?php echo preg_replace(
    184184                '#<select.*?>#i',
    185185
     
    223223        extract( $args );
    224224
    225         if( is_tax() || is_tag() || is_category() ) 
     225        if( is_tax() || is_tag() || is_category() )
    226226            $category_description = term_description();
    227227        else
     
    231231        $term = $wp_query->get_queried_object();
    232232        $my_tag = &get_term( $term->term_id , $term->taxonomy , OBJECT , 'display' );
    233        
     233
    234234        if ( is_wp_error( $my_tag ) )
    235235            return false;
    236        
     236
    237237        $my_tag_name =  $my_tag->name;
    238238//      $my_tag_name = apply_filters( 'single_tag_title' , $my_tag->name );
     
    252252    function update( $new_instance, $old_instance ) {
    253253        $instance = $old_instance;
    254         $instance['title'] = wp_filter_nohtml_kses( $new_instance['title'] );
     254        $instance['title'] = wp_kses( $new_instance['title'], array() );
    255255
    256256        return $instance;
     
    259259    function form( $instance ) {
    260260        //Defaults
    261         $instance = wp_parse_args( (array) $instance, 
    262             array( 
    263                 'title' => '%term_name% Archives', 
     261        $instance = wp_parse_args( (array) $instance,
     262            array(
     263                'title' => '%term_name% Archives',
    264264            )
    265265        );
     
    369369    function form( $instance ) {
    370370        //Defaults
    371         $instance = wp_parse_args( (array) $instance, 
    372             array( 
    373                 'title' => '', 
     371        $instance = wp_parse_args( (array) $instance,
     372            array(
     373                'title' => '',
    374374                'homelink' => get_option('blogname'),
    375375                'maxchars' => 35,
     
    416416            $urlbase = preg_replace( '#/page/[0-9]+?(/+)?$#' , '/', remove_query_arg( 'paged' ) );
    417417            $prettylinks = ( $wp_rewrite->using_permalinks() && ( !strpos( $urlbase , '?' )));
    418            
    419             $page_links = paginate_links( array(
     418
     419            $opts = array(
    420420                'base' => $urlbase . '%_%',
    421421                'format' => $prettylinks ? user_trailingslashit( trailingslashit( 'page/%#%' )) : ( strpos( $urlbase , '?' ) ? '&paged=%#%' : '?paged=%#%' ),
    422422                'total' => absint( $wp_query->max_num_pages ),
    423423                'current' => absint( $wp_query->query_vars['paged'] ) ? absint( $wp_query->query_vars['paged'] ) : 1,
    424             ));
    425            
     424            );
     425
     426            if ( $instance['prev_text'] )
     427                $opts['prev_text'] = $instance['prev_text'];
     428
     429            if ( $instance['next_text'] )
     430                $opts['next_text'] = $instance['next_text'];
     431
     432            $page_links = paginate_links( $opts );
     433
    426434            if ( $page_links )
    427435                echo $before_widget . $page_links .'<div class="clear"></div>'. $after_widget;
     
    439447    }
    440448
     449    function form( $instance ) {
     450        //Defaults
     451        $instance = wp_parse_args( (array) $instance,
     452            array(
     453                'prev_text' => null,
     454                'next_text' => null,
     455            )
     456        );
     457        $prev_text = esc_attr( $instance['prev_text'] );
     458        $next_text = esc_attr( $instance['next_text'] );
     459
     460        ?>
     461        <p>
     462            <label for="<?php echo $this->get_field_id('prev_text'); ?>"><?php _e('Previous text:'); ?></label> <input class="widefat" id="<?php echo $this->get_field_id('prev_text'); ?>" name="<?php echo $this->get_field_name('prev_text'); ?>" type="text" value="<?php echo $prev_text; ?>" /><br /><small><?php _e( 'Optional, leave empty to use WP default.' ); ?></small>
     463        </p>
     464        <p>
     465            <label for="<?php echo $this->get_field_id('next_text'); ?>"><?php _e('Next text:'); ?></label> <input class="widefat" id="<?php echo $this->get_field_id('next_text'); ?>" name="<?php echo $this->get_field_name('next_text'); ?>" type="text" value="<?php echo $next_text; ?>" /><br /><small><?php _e( 'Optional, leave empty to use WP default.' ); ?></small>
     466        </p>
     467        <?php
     468    }
    441469}// end bSuite_Widget_Pagednav
    442 
    443 // register these widgets
    444 function bcms_widgets_init()
    445 {
    446     register_widget( 'bSuite_Widget_CategoryDescription' );
    447 
    448     register_widget( 'bSuite_Widget_Crumbs' );
    449 
    450     register_widget( 'bSuite_Widget_Pagednav' );
    451 
    452     unregister_widget('WP_Widget_Pages');
    453     register_widget( 'bSuite_Widget_Pages' );
    454 }
    455 add_action('widgets_init', 'bcms_widgets_init', 1);
  • bcms/trunk/components/innerindex.php

    r531086 r717625  
    88//      add_filter( 'content_save_pre' , array( $this, 'addsections' ) , 7 );
    99        add_filter( 'save_post' , array( $this , 'delete_cache' ));
     10        add_filter( 'go_theme_page_summary' , array( $this , 'go_theme_page_summary' ));
    1011        $this->allowedposttags(); // allow IDs on H1-H6 tags
    1112    }
     
    153154        return;
    154155    }
     156   
     157    function go_theme_page_summary()
     158    {
     159        $this->shortcode( array( 'title' => '', 'div_class' => '' ) );
     160    }
    155161}
    156 $bbuite_innerindex = new bSuite_Innerindex;
     162
     163function bsuite_innerindex()
     164{
     165    global $bsuite_innerindex;
     166
     167    if ( ! is_object( $bsuite_innerindex ) )
     168    {
     169        $bsuite_innerindex = new bSuite_Innerindex();
     170    }
     171
     172    return $bsuite_innerindex;
     173}
     174
     175bsuite_innerindex();
  • bcms/trunk/components/js/waypoints.js

    • Property svn:executable deleted
  • bcms/trunk/components/js/waypoints.min.js

    • Property svn:executable deleted
  • bcms/trunk/components/late-enqueue.php

    r531109 r717625  
    2727    $wp_styles->in_footer = array_merge( (array) $wp_styles->in_footer , (array) array_diff( (array) $wp_styles->to_do , $to_do_orig ) );
    2828
    29     add_filter( 'print_footer_scripts', 'bcms_print_late_styles' );
     29    add_filter( 'print_footer_scripts', 'bcms_print_late_styles', 10, 1 );
    3030}
    3131
    32 function bcms_print_late_styles()
     32function bcms_print_late_styles( $finish_print )
    3333{
    3434    global $wp_styles;
     
    5050
    5151    if( ! array( $tags ))
    52         return;
     52        return $finish_print;
    5353
    5454?>
     
    6666</script>
    6767<?php
     68    return $finish_print;
    6869}
    6970
  • bcms/trunk/components/listchildren.php

    r529722 r717625  
    3434            'exclude'     => '',
    3535            'authors'     => '',
     36            'post_type'   => 'page',
     37            'post_status' => 'publish'
    3638        ), $arg );
    3739   
  • bcms/trunk/license.txt

    • Property svn:executable deleted
  • bcms/trunk/readme.txt

    • Property svn:executable deleted
    r531272 r717625  
    44Tags: bSuite, cms, content management, formatting, widgets, shortcodes, post loop, post, posts, page, pages, show posts, scroller, featured posts
    55Requires at least: 3.3
    6 Tested up to: 3.3.1
     6Tested up to: 3.5.1
    77Stable tag: trunk
    88
  • bcms/trunk/screenshot-4.png

    • Property svn:executable deleted
  • bcms/trunk/templates-post/e_default_icon.php

    • Property svn:executable deleted
  • bcms/trunk/templates-post/e_default_icontiny.php

    • Property svn:executable deleted
  • bcms/trunk/templates-post/f_default_scroller_before.php

    r531179 r717625  
    11<?php
    22
    3 new bCMS_PostLoop_Scroller( array(
     3bcms_get_new_postloop_scroller( array(
    44    // configuration
    55    'parent_selector' => '#'. $this->current->widget->id .' .scrollable',
Note: See TracChangeset for help on using the changeset viewer.