WordPress.org

Plugin Directory

Changeset 1468244


Ignore:
Timestamp:
08/05/16 06:16:24 (12 months ago)
Author:
bhuwanroka
Message:

version 2.0 release

Location:
wens-responsive-column-layout-shortcodes
Files:
31 added
3 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • wens-responsive-column-layout-shortcodes/trunk/readme.txt

    r1403178 r1468244  
    22Contributors: bhuwanroka 
    33Tags: column, fluid layout, shortcode, responsive columns, one_half, one_third, one_fourth, one_fifth, one_six, Responsive design, CSS3, row, rows, grid, grid base, fit one responsive, bootstrap grid, layout flexible, column shortcode, wpcolumn, pagecolumn, wordpress layout shortcode, sidebar, sidebars, Style, theme, flexible layout, widget, widgets, css3, media 
    4 Stable tag: 1.2.8 
     4Stable tag: 2.0 
    55Requires at least: 3.0 
    6 Tested up to: 4.5 
    7 Donate link: http://bhu1roka.com/contact-me 
     6Tested up to: 4.5.3 
     7Donate link: http://evisionthemes.com/donate-now/ 
    88License: GPLv2 
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html 
    1010 
    1111This WordPress plugin gives you an easy way to add columns to any section - page , post or other content . 
     12 
    1213== Description == 
    1314This Plugin easily adds responsive ( BootStrap ) columns layout into posts and pages by wrapping content with a shortcode.  
     
    1718[bscolumns class="one_half"]Your Content Goes here[/bscolumns] 
    1819[bscolumns class="one_half_last"]Your Content Goes here[/bscolumns] 
     20[bscolumns class="clear"][/bscolumns] 
    1921 
    2022- 3 column layout: - 
     
    2224[bscolumns class="one_third"]Your Content Goes here[/bscolumns] 
    2325[bscolumns class="one_third_last"]Your Content Goes here[/bscolumns] 
     26[bscolumns class="clear"][/bscolumns] 
    2427 
    2528- 4 column layout: - 
     
    2831[bscolumns class="one_fourth"]Your Content Goes here[/bscolumns] 
    2932[bscolumns class="one_fourth_last"]Your Content Goes here[/bscolumns] 
     33[bscolumns class="clear"][/bscolumns] 
    3034 
    3135- 5 column layout: - 
     
    3539[bscolumns class="one_fifth"]Your Content Goes here[/bscolumns] 
    3640[bscolumns class="one_fifth_last"]Your Content Goes here[/bscolumns] 
     41[bscolumns class="clear"][/bscolumns] 
    3742 
    3843- 6 column layout: - 
     
    4348[bscolumns class="one_sixth"]Your Content Goes here[/bscolumns] 
    4449[bscolumns class="one_sixth_last"]Your Content Goes here[/bscolumns] 
     50[bscolumns class="clear"][/bscolumns] 
     51 
     52- 1/3 and 2/3 column layout: - 
     53[bscolumns class="one_third"]Your Content Goes here[/bscolumns] 
     54[bscolumns class="two_third_last_clear"]Your Content Goes here[/bscolumns] 
     55[bscolumns class="clear"][/bscolumns] 
     56 
     57- 2/3 and 1/3 column layout: - 
     58[bscolumns class="two_third"]Your Content Goes here[/bscolumns] 
     59[bscolumns class="one_third_last_clear"]Your Content Goes here[/bscolumns] 
     60[bscolumns class="clear"][/bscolumns] 
    4561 
    4662The columns are responsive and will occupy the whole width of your screen. 
     63 
     64With new plugin, you can enter the column combination from Tinymce button like 1/3+2/3. This will give you one third of column, and 2 third of the column. 
    4765 
    4866If you have any questions and suggestions, leave a comments or post it in support forum. Thank you!  
     
    6583 
    6684== Changelog == 
    67 = 1.2.8 = 
    68 Made Wordpress 4.5 compatible 
     85= 2.0 = 
     86* Tweak - Structured changed 
     87* Dev - Dissimilar column combination added 
     88 
    6989 
    7090= 1.2.7 = 
     
    94114 
    95115== Upgrade Notice == 
    96 Will update it pretty soon. 
     116This is a major release. So, make sure you have taken all the backups before doing the update. 
  • wens-responsive-column-layout-shortcodes/trunk/wen-responsive-layout.php

    r1305845 r1468244  
    44Plugin URI: http://wordpress.org/plugins/wens-responsive-column-shortcodes/ 
    55Description:  WEN's Responsive Column Layout Shortcodes easily add shortcodes to create 2, 3, 4, 5, 6, columns along with responsive layout in your posts/pages or widget section. 
    6 Version: 1.2.7 
     6Version: 2.0 
    77Author: Bhuwan Roka 
    88Author URI: http://bhu1roka.com 
    99License: GPL2 
    10 Copyright (C) 2013 Bhuwan Roka 
    1110Text Domain: evision-col 
    1211*/ 
    13 //Responsive columna layout created from shorcodes 
    14 //Coded by Web Experts Nepal Team //Bhuwan Roka 
     12 
     13if ( !function_exists( 'add_action' ) ) { 
     14    echo 'Hi there!  I\'m just a plugin, not much I can do when called directly.'; 
     15    exit; 
     16} 
     17 
     18define('ERCLS_DIR', dirname( __FILE__ ) ); 
     19define('ERCLS_URL', WP_PLUGIN_URL.'/wens-responsive-column-layout-shortcodes/' ); 
     20 
     21require_once ERCLS_DIR.'/classes/class.ercls.scripts.php'; 
     22require_once ERCLS_DIR.'/classes/class.ercls.shortcode.php'; 
     23require_once ERCLS_DIR.'/admin/class.ercls.admin.php'; 
    1524 
    1625 
    17 if ( !function_exists('wens_formatter') ) : 
    18 function wens_formatter($content) { 
    19   $new_content = ''; 
     26add_action( 'plugins_loaded', array('ERCLS_SCRIPTS', 'get_instance' ) ); 
     27add_action( 'plugins_loaded', array('ERCLS_SHORTCODES', 'get_instance' ) ); 
     28add_action( 'plugins_loaded', array('ERCLS_ADMIN', 'get_instance' ) ); 
    2029 
    21   /* Matches the contents and the open and closing tags */ 
    22   $pattern_full = '{(\[raw\].*?\[/raw\])}is'; 
    23  
    24   /* Matches just the contents */ 
    25   $pattern_contents = '{\[raw\](.*?)\[/raw\]}is'; 
    26  
    27   /* Divide content into pieces */ 
    28   $pieces = preg_split($pattern_full, $content, -1, PREG_SPLIT_DELIM_CAPTURE); 
    29  
    30   /* Loop over pieces */ 
    31   foreach ($pieces as $piece) { 
    32     /* Look for presence of the shortcode */ 
    33     if (preg_match($pattern_contents, $piece, $matches)) { 
    34  
    35       /* Append to content (no formatting) */ 
    36       $new_content .= $matches[1]; 
    37     } else { 
    38  
    39       /* Format and append to content */ 
    40       $new_content .= wptexturize(wpautop($piece)); 
    41     } 
    42   } 
    43  
    44   return $new_content; 
    45 } 
    46  
    47 // Remove the 2 main auto-formatters 
    48 #remove_filter('the_content', 'wpautop'); 
    49 #remove_filter('the_content', 'wptexturize'); 
    50 add_filter('widget_text', 'do_shortcode'); 
    51 // Before displaying for viewing, apply this function 
    52 #add_filter('the_content', 'wens_formatter', 99); 
    53 #add_filter('widget_text', 'wens_formatter', 99); 
    54 endif; 
    55  
    56 /** 
    57  * Enqueue style-file, if it exists. 
    58  * Register with hook 'wp_print_styles' 
    59  * 
    60  */ 
    61 function wens_column_stylesheet() { 
    62     $my_style_url = WP_PLUGIN_URL . '/wens-responsive-column-layout-shortcodes/wen-style.css'; 
    63     $my_style_file = WP_PLUGIN_DIR . '/wens-responsive-column-layout-shortcodes/wen-style.css'; 
    64  
    65     if ( file_exists($my_style_file) ) { 
    66         wp_register_style('column-styles', $my_style_url); 
    67         wp_enqueue_style('column-styles'); 
    68     } 
    69 } 
    70 add_action('wp_print_styles', 'wens_column_stylesheet'); 
    71 /** 
    72  *Responsive Fulid Columns Shortcodes 
    73  * 
    74  */ 
    75 // add the main shortcode [bscolumns] 
    76 add_shortcode( 'bscolumns', 'wen_bs_columns' ); 
    77 function wen_bs_columns( $atts, $content=null ){ 
    78   extract(shortcode_atts(array( 
    79     'class'     => 'span1' 
    80     ), $atts)); 
    81       $result =''; 
    82       $result .= '<div class="'.$class.'">'; 
    83       $result .= do_shortcode( $content ); 
    84       $result .= '</div>'; 
    85   return force_balance_tags( $result ); 
    86 } 
    87  
    88 // add buttons to tinyMCE editor 
    89 add_action( 'init', 'wen_bs_button' ); 
    90 function wen_bs_button() { 
    91   add_filter( 'mce_external_plugins', 'wen_bs_add_button' ); 
    92   add_filter( 'mce_buttons', 'wen_bs_register_button' ); 
    93 } 
    94  
    95 // add button action script 
    96 function wen_bs_add_button( $plugin_array ) { 
    97   $plugin_array['bscolumns'] = plugins_url( 'js/bscolumns.js', __FILE__ ); 
    98   return $plugin_array; 
    99 } 
    100  
    101 // register button in editor 
    102 function wen_bs_register_button( $buttons ) { 
    103   array_push( $buttons, 'bscolumns-button', 'bscolumns-list' ); 
    104   return $buttons; 
    105 } 
    106 // remove uncessary <p> tag inside column layout 
    107 function wen_custom_script() { 
    108 wp_register_script('wen_custom_script', plugins_url('js/custom.js', __FILE__), array('jquery'),'1.1', true); 
    109 wp_enqueue_script('wen_custom_script'); 
    110 } 
    111  
    112 add_action( 'wp_enqueue_scripts', 'wen_custom_script' ); 
    113  
    114  
    115 ?> 
Note: See TracChangeset for help on using the changeset viewer.