WordPress.org

Plugin Directory

Changeset 1317078


Ignore:
Timestamp:
12/28/15 02:44:32 (2 years ago)
Author:
nicholas_io
Message:

Releasing version 1.0.6

Location:
wp-central-posts-network
Files:
12 edited
1 copied

Legend:

Unmodified
Added
Removed
  • wp-central-posts-network/tags/1.0.6/README.md

    r1217756 r1317078  
    1010Tags: multisite, posts-selector, global,posts 
    1111Requires at least: 4.1 
    12 Tested up to: 4.3 
    13 Stable tag: 1.0.5 
     12Tested up to: 4.4 
     13Stable tag: 1.0.6 
    1414License: GPLv2 or later 
    1515License URI: http://www.gnu.org/licenses/gpl-2.0.html 
  • wp-central-posts-network/tags/1.0.6/README.txt

    r1217756 r1317078  
    33Tags: multisite, posts-selector, global,posts 
    44Requires at least: 4.1 
    5 Tested up to: 4.3 
    6 Stable tag: 1.0.5 
     5Tested up to: 4.4 
     6Stable tag: 1.0.6 
    77License: GPLv2 or later 
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html 
  • wp-central-posts-network/tags/1.0.6/admin/class-wpcpn-admin.php

    r1159588 r1317078  
    22 
    33/** 
    4  * Plugin class. This class should ideally be used to work with the 
    5  * administrative side of the WordPress site. 
     4 * WPCPN Admin class 
    65 * 
    76 * @package WPCPN_Admin 
    87 * @author  Nícholas André <nicholasandre@ufersa.edu.br> 
    98 */ 
    10  
    11  
    129class WPCPN_Admin { 
    1310 
  • wp-central-posts-network/tags/1.0.6/public/class-wpcpn.php

    r1217756 r1317078  
    3333     * @var     string 
    3434     */ 
    35     const VERSION = '1.0.5'; 
     35    const VERSION = '1.0.6'; 
    3636 
    3737    /** 
  • wp-central-posts-network/tags/1.0.6/public/includes/functions.php

    r1217756 r1317078  
    11<?php 
     2/** 
     3 * Returns the path of the supplied site 
     4 * 
     5 * @param $site 
     6 * 
     7 * @return string 
     8 */ 
    29function wpcpn_get_path_for_site( $site ) { 
    3     $network_site_url = str_replace('http://', '', network_site_url()); 
    4     $network_site_url = str_replace('www.','', $network_site_url); 
    5     $network_site_url = str_replace('/', '', $network_site_url); 
    6  
    7  
    8     $site_path = get_site_by_path( "{$site}." . $network_site_url, '/'); 
     10    $network_site_url = str_replace( 'http://', '', network_site_url() ); 
     11    $network_site_url = str_replace( 'www.','', $network_site_url ); 
     12    $network_site_url = str_replace( '/', '', $network_site_url ); 
     13 
     14 
     15    $site_path = get_site_by_path( "{$site}." . $network_site_url, '/' ); 
    916    $site_path_url = '#'; 
    1017    if ( $site_path ) $site_path_url = 'http://' . $site_path->domain; 
     
    1320} 
    1421 
    15 //Cache functions 
    16  
     22/** 
     23 * Returns whether the cache is active or not 
     24 * 
     25 * @return bool 
     26 */ 
    1727function wpcpn_is_cache_active() { 
    18     return WPCPN::$cache_config !== false && is_array(WPCPN::$cache_config); 
    19 } 
    20  
    21 function wpcpn_should_fragment_cache($group, $section) { 
    22     return isset(WPCPN::$cache_config['cache'][$group]) && 
    23            in_array($section, WPCPN::$cache_config['cache'][$group]); 
    24 } 
    25  
    26 function wpcpn_cache_delete($group, $section) { 
    27     switch(WPCPN::$cache_config['type']) { 
     28    return false !== WPCPN::$cache_config && is_array( WPCPN::$cache_config ); 
     29} 
     30 
     31/** 
     32 * Checks if the we should cache the given $group/$section 
     33 * 
     34 * @param $group The group we are checking 
     35 * @param $section The section we are checking 
     36 * 
     37 * @return bool 
     38 */ 
     39function wpcpn_should_fragment_cache( $group, $section ) { 
     40    return isset( WPCPN::$cache_config['cache'][$group] ) && 
     41           in_array( $section, WPCPN::$cache_config['cache'][$group] ); 
     42} 
     43 
     44/** 
     45 * Flushes the cache for the given $group/$section 
     46 * 
     47 * @param $group 
     48 * @param $section 
     49 */ 
     50function wpcpn_cache_delete( $group, $section ) { 
     51    switch( WPCPN::$cache_config['type'] ) { 
    2852        case 'fragment-caching': 
    29             $cache_keys = get_site_option('wpcpn_cache_keys'); 
    30  
    31             if ( $cache_keys && isset($cache_keys[$group][$section]) ) { 
    32                 foreach($cache_keys[$group][$section] as $cache_key) { 
    33                     delete_transient('wpcpn-fragments_' . $cache_key); //@TODO improve this 
     53            $cache_keys = get_site_option( 'wpcpn_cache_keys' ); 
     54 
     55            if ( $cache_keys && isset( $cache_keys[$group ][$section] ) ) { 
     56                foreach( $cache_keys[$group][$section] as $cache_key ) { 
     57                    delete_transient( 'wpcpn-fragments_' . $cache_key ); //@TODO improve this 
    3458                } 
    3559            } 
    3660        break; 
    3761        case 'wp-super-cache': 
    38             if ( function_exists('wp_cache_clear_cache') ) { 
     62            if ( function_exists( 'wp_cache_clear_cache' ) ) { 
    3963                $GLOBALS["super_cache_enabled"] = 1; 
    4064                wp_cache_clear_cache(); 
     
    4367        case 'w3-total-cache': 
    4468            // Clear all W3 Total Cache 
    45             if( class_exists('W3_Plugin_TotalCacheAdmin') ) 
    46             { 
    47                 $plugin_totalcacheadmin = & w3_instance('W3_Plugin_TotalCacheAdmin'); 
     69            if( class_exists( 'W3_Plugin_TotalCacheAdmin' ) ) { 
     70                $plugin_totalcacheadmin = & w3_instance( 'W3_Plugin_TotalCacheAdmin' ); 
    4871                $plugin_totalcacheadmin->flush_all(); 
    4972            } 
     
    5275} 
    5376 
    54 function wpcpn_cache_get_instance($group, $section, $template = '', $params = '' ) { 
    55     $hash_key = md5($group . '-' .  $section . '/' . json_encode($template) . json_encode($params)); 
    56     return new WPCPN_Fragment_Cache($hash_key, WPCPN::$cache_config['expiration'], false ); 
     77/** 
     78 * Get a cache instance of a given $group/$section 
     79 * 
     80 * @param $group 
     81 * @param $section 
     82 * @param string $template 
     83 * @param string $params 
     84 * 
     85 * @return WPCPN_Fragment_Cache 
     86 */ 
     87function wpcpn_cache_get_instance( $group, $section, $template = '', $params = '' ) { 
     88    $hash_key = md5( $group . '-' .  $section . '/' . json_encode( $template ) . json_encode( $params ) ); 
     89    return new WPCPN_Fragment_Cache( $hash_key, WPCPN::$cache_config['expiration'], false ); 
    5790} 
    5891 
     
    6093 * Adds a cache key to options table because we need to know which cache keys are associated 
    6194 * with each $group-$section because we need to flush it when the user updates the posts list. 
     95 * 
     96 * @param $group 
     97 * @param $section 
     98 * @param $key 
    6299 */ 
    63100function wpcpn_cache_add_key($group, $section, $key) { 
    64     $cache_keys = get_site_option('wpcpn_cache_keys'); 
     101    $cache_keys = get_site_option( 'wpcpn_cache_keys' ); 
    65102    if ( ! $cache_keys ) $cache_keys = array(); 
    66103 
    67     if ( ! isset($cache_keys[$group][$section]) ) { 
    68         $cache_keys[$group][$section] = array($key); 
    69     } else if (  ! in_array($key, $cache_keys[$group][$section]) ) { 
     104    if ( ! isset( $cache_keys[$group][$section] ) ) { 
     105        $cache_keys[$group][$section] = array( $key ); 
     106    } else if (  ! in_array( $key, $cache_keys[$group][$section] ) ) { 
    70107        $cache_keys[$group][$section][] = $key; 
    71         update_site_option('wpcpn_cache_keys', $cache_keys); 
    72     } 
    73  
    74 } 
    75  
    76 //API 
    77  
     108        update_site_option( 'wpcpn_cache_keys', $cache_keys ); 
     109    } 
     110} 
     111 
     112/** 
     113 * Returns the post list for a given $group_name/$section_name 
     114 * 
     115 * @param $group_name 
     116 * @param $section_name 
     117 * 
     118 * @return array|mixed|void 
     119 */ 
    78120function wpcpn_get_posts_list( $group_name, $section_name ) { 
    79121    return WPCPN_Post_Selector_Model::getPostsList( $group_name, $section_name ); 
    80122} 
    81123 
     124/** 
     125 * Displays the selected posts of a given $group_name/$section_name, 
     126 * using cache if available 
     127 * 
     128 * @param $group_name 
     129 * @param $section_name 
     130 * @param array $template 
     131 * @param array $params 
     132 * 
     133 * @uses wpcpn_show_posts 
     134 */ 
    82135function wpcpn_show_posts_section( $group_name, $section_name, Array $template, $params = array() )  { 
    83136    $section_posts  = wpcpn_get_posts_section( $group_name, $section_name, $params ); 
    84137    if ( $section_posts ) { 
    85         if ( wpcpn_is_cache_active() && wpcpn_should_fragment_cache($group_name, $section_name) ) { 
    86             $cache = wpcpn_cache_get_instance($group_name, $section_name, $template, $params); 
     138        if ( wpcpn_is_cache_active() && wpcpn_should_fragment_cache( $group_name, $section_name ) ) { 
     139            $cache = wpcpn_cache_get_instance( $group_name, $section_name, $template, $params ); 
    87140            if ( ! $cache->output() ) { 
    88141                echo '<!-- Started WPCPN Fragment Cache block ' . date('Y-m-d H:i:s'). ' -->' . PHP_EOL; 
    89                 wpcpn_show_posts($section_posts, $template); 
     142                wpcpn_show_posts( $section_posts, $template ); 
    90143                echo PHP_EOL . '<!-- End WPCPN Fragment Cache block -->'; 
    91                 wpcpn_cache_add_key($group_name, $section_name,$cache->key); 
     144                wpcpn_cache_add_key( $group_name, $section_name, $cache->key ); 
    92145                $cache->store(); 
    93146            } 
    94147        } else { 
    95             wpcpn_show_posts($section_posts, $template); 
     148            wpcpn_show_posts( $section_posts, $template ); 
    96149        } 
    97150    } 
    98151} 
    99152 
     153/** 
     154 * Displays the $posts using $template params 
     155 * 
     156 * @param $posts 
     157 * @param array $template 
     158 */ 
    100159function wpcpn_show_posts( $posts, Array $template ) { 
    101160    $slug   = $template['template_slug']; 
    102     $name   = isset($template['template_name']) && ! empty($template['template_name']) ?  '-' . $template['template_name'] : ''; 
     161    $name   = isset($template['template_name']) && ! empty( $template['template_name'] ) ?  '-' . $template['template_name'] : ''; 
    103162 
    104163    if ( $posts && is_array($posts) ) { 
     
    109168            setup_postdata($post); 
    110169 
    111             include( locate_template($slug . $name . '.php') ); 
     170            include( locate_template( $slug . $name . '.php' ) ); 
    112171 
    113172            wp_reset_postdata(); 
     
    117176} 
    118177 
     178/** 
     179 * Gets the selected posts of a given $group_name/$section_name 
     180 * 
     181 * @param $group_name 
     182 * @param $section_name 
     183 * @param array $params 
     184 * 
     185 * @return array|bool|mixed|void 
     186 */ 
    119187function wpcpn_get_posts_section(  $group_name, $section_name, $params = array() ) { 
    120188    $section    = wpcpn_get_posts_list( $group_name, $section_name ); 
     
    129197    $params     = wp_parse_args($params, 
    130198                    array( 
    131                         'limit' => count($section), 
     199                        'limit' => count( $section ), 
    132200                        'offset' => 0 
    133201                    ) 
    134202                  ); 
    135203 
    136     $section    = array_slice($section, $params['offset'], $params['limit'], true); 
     204    $section    = array_slice ($section, $params['offset'], $params['limit'], true ); 
    137205 
    138206    return $section; 
  • wp-central-posts-network/tags/1.0.6/wpcpn.php

    r1217756 r1317078  
    1313 * Plugin URI:      https://github.com/nicholasio/wp-central-posts-network 
    1414 * Description:     A Plugin that let you choose any posts on any site in the network to display on the main site. 
    15  * Version:         1.0.5 
     15 * Version:         1.0.6 
    1616 * Author:      Nícholas André 
    1717 * Author URI:      http://nicholasandre.com.br 
  • wp-central-posts-network/trunk/README.md

    r1217756 r1317078  
    1010Tags: multisite, posts-selector, global,posts 
    1111Requires at least: 4.1 
    12 Tested up to: 4.3 
    13 Stable tag: 1.0.5 
     12Tested up to: 4.4 
     13Stable tag: 1.0.6 
    1414License: GPLv2 or later 
    1515License URI: http://www.gnu.org/licenses/gpl-2.0.html 
  • wp-central-posts-network/trunk/README.txt

    r1217756 r1317078  
    33Tags: multisite, posts-selector, global,posts 
    44Requires at least: 4.1 
    5 Tested up to: 4.3 
    6 Stable tag: 1.0.5 
     5Tested up to: 4.4 
     6Stable tag: 1.0.6 
    77License: GPLv2 or later 
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html 
  • wp-central-posts-network/trunk/admin/class-wpcpn-admin.php

    r1159588 r1317078  
    22 
    33/** 
    4  * Plugin class. This class should ideally be used to work with the 
    5  * administrative side of the WordPress site. 
     4 * WPCPN Admin class 
    65 * 
    76 * @package WPCPN_Admin 
    87 * @author  Nícholas André <nicholasandre@ufersa.edu.br> 
    98 */ 
    10  
    11  
    129class WPCPN_Admin { 
    1310 
  • wp-central-posts-network/trunk/public/class-wpcpn.php

    r1217756 r1317078  
    3333     * @var     string 
    3434     */ 
    35     const VERSION = '1.0.5'; 
     35    const VERSION = '1.0.6'; 
    3636 
    3737    /** 
  • wp-central-posts-network/trunk/public/includes/functions.php

    r1217756 r1317078  
    11<?php 
     2/** 
     3 * Returns the path of the supplied site 
     4 * 
     5 * @param $site 
     6 * 
     7 * @return string 
     8 */ 
    29function wpcpn_get_path_for_site( $site ) { 
    3     $network_site_url = str_replace('http://', '', network_site_url()); 
    4     $network_site_url = str_replace('www.','', $network_site_url); 
    5     $network_site_url = str_replace('/', '', $network_site_url); 
    6  
    7  
    8     $site_path = get_site_by_path( "{$site}." . $network_site_url, '/'); 
     10    $network_site_url = str_replace( 'http://', '', network_site_url() ); 
     11    $network_site_url = str_replace( 'www.','', $network_site_url ); 
     12    $network_site_url = str_replace( '/', '', $network_site_url ); 
     13 
     14 
     15    $site_path = get_site_by_path( "{$site}." . $network_site_url, '/' ); 
    916    $site_path_url = '#'; 
    1017    if ( $site_path ) $site_path_url = 'http://' . $site_path->domain; 
     
    1320} 
    1421 
    15 //Cache functions 
    16  
     22/** 
     23 * Returns whether the cache is active or not 
     24 * 
     25 * @return bool 
     26 */ 
    1727function wpcpn_is_cache_active() { 
    18     return WPCPN::$cache_config !== false && is_array(WPCPN::$cache_config); 
    19 } 
    20  
    21 function wpcpn_should_fragment_cache($group, $section) { 
    22     return isset(WPCPN::$cache_config['cache'][$group]) && 
    23            in_array($section, WPCPN::$cache_config['cache'][$group]); 
    24 } 
    25  
    26 function wpcpn_cache_delete($group, $section) { 
    27     switch(WPCPN::$cache_config['type']) { 
     28    return false !== WPCPN::$cache_config && is_array( WPCPN::$cache_config ); 
     29} 
     30 
     31/** 
     32 * Checks if the we should cache the given $group/$section 
     33 * 
     34 * @param $group The group we are checking 
     35 * @param $section The section we are checking 
     36 * 
     37 * @return bool 
     38 */ 
     39function wpcpn_should_fragment_cache( $group, $section ) { 
     40    return isset( WPCPN::$cache_config['cache'][$group] ) && 
     41           in_array( $section, WPCPN::$cache_config['cache'][$group] ); 
     42} 
     43 
     44/** 
     45 * Flushes the cache for the given $group/$section 
     46 * 
     47 * @param $group 
     48 * @param $section 
     49 */ 
     50function wpcpn_cache_delete( $group, $section ) { 
     51    switch( WPCPN::$cache_config['type'] ) { 
    2852        case 'fragment-caching': 
    29             $cache_keys = get_site_option('wpcpn_cache_keys'); 
    30  
    31             if ( $cache_keys && isset($cache_keys[$group][$section]) ) { 
    32                 foreach($cache_keys[$group][$section] as $cache_key) { 
    33                     delete_transient('wpcpn-fragments_' . $cache_key); //@TODO improve this 
     53            $cache_keys = get_site_option( 'wpcpn_cache_keys' ); 
     54 
     55            if ( $cache_keys && isset( $cache_keys[$group ][$section] ) ) { 
     56                foreach( $cache_keys[$group][$section] as $cache_key ) { 
     57                    delete_transient( 'wpcpn-fragments_' . $cache_key ); //@TODO improve this 
    3458                } 
    3559            } 
    3660        break; 
    3761        case 'wp-super-cache': 
    38             if ( function_exists('wp_cache_clear_cache') ) { 
     62            if ( function_exists( 'wp_cache_clear_cache' ) ) { 
    3963                $GLOBALS["super_cache_enabled"] = 1; 
    4064                wp_cache_clear_cache(); 
     
    4367        case 'w3-total-cache': 
    4468            // Clear all W3 Total Cache 
    45             if( class_exists('W3_Plugin_TotalCacheAdmin') ) 
    46             { 
    47                 $plugin_totalcacheadmin = & w3_instance('W3_Plugin_TotalCacheAdmin'); 
     69            if( class_exists( 'W3_Plugin_TotalCacheAdmin' ) ) { 
     70                $plugin_totalcacheadmin = & w3_instance( 'W3_Plugin_TotalCacheAdmin' ); 
    4871                $plugin_totalcacheadmin->flush_all(); 
    4972            } 
     
    5275} 
    5376 
    54 function wpcpn_cache_get_instance($group, $section, $template = '', $params = '' ) { 
    55     $hash_key = md5($group . '-' .  $section . '/' . json_encode($template) . json_encode($params)); 
    56     return new WPCPN_Fragment_Cache($hash_key, WPCPN::$cache_config['expiration'], false ); 
     77/** 
     78 * Get a cache instance of a given $group/$section 
     79 * 
     80 * @param $group 
     81 * @param $section 
     82 * @param string $template 
     83 * @param string $params 
     84 * 
     85 * @return WPCPN_Fragment_Cache 
     86 */ 
     87function wpcpn_cache_get_instance( $group, $section, $template = '', $params = '' ) { 
     88    $hash_key = md5( $group . '-' .  $section . '/' . json_encode( $template ) . json_encode( $params ) ); 
     89    return new WPCPN_Fragment_Cache( $hash_key, WPCPN::$cache_config['expiration'], false ); 
    5790} 
    5891 
     
    6093 * Adds a cache key to options table because we need to know which cache keys are associated 
    6194 * with each $group-$section because we need to flush it when the user updates the posts list. 
     95 * 
     96 * @param $group 
     97 * @param $section 
     98 * @param $key 
    6299 */ 
    63100function wpcpn_cache_add_key($group, $section, $key) { 
    64     $cache_keys = get_site_option('wpcpn_cache_keys'); 
     101    $cache_keys = get_site_option( 'wpcpn_cache_keys' ); 
    65102    if ( ! $cache_keys ) $cache_keys = array(); 
    66103 
    67     if ( ! isset($cache_keys[$group][$section]) ) { 
    68         $cache_keys[$group][$section] = array($key); 
    69     } else if (  ! in_array($key, $cache_keys[$group][$section]) ) { 
     104    if ( ! isset( $cache_keys[$group][$section] ) ) { 
     105        $cache_keys[$group][$section] = array( $key ); 
     106    } else if (  ! in_array( $key, $cache_keys[$group][$section] ) ) { 
    70107        $cache_keys[$group][$section][] = $key; 
    71         update_site_option('wpcpn_cache_keys', $cache_keys); 
    72     } 
    73  
    74 } 
    75  
    76 //API 
    77  
     108        update_site_option( 'wpcpn_cache_keys', $cache_keys ); 
     109    } 
     110} 
     111 
     112/** 
     113 * Returns the post list for a given $group_name/$section_name 
     114 * 
     115 * @param $group_name 
     116 * @param $section_name 
     117 * 
     118 * @return array|mixed|void 
     119 */ 
    78120function wpcpn_get_posts_list( $group_name, $section_name ) { 
    79121    return WPCPN_Post_Selector_Model::getPostsList( $group_name, $section_name ); 
    80122} 
    81123 
     124/** 
     125 * Displays the selected posts of a given $group_name/$section_name, 
     126 * using cache if available 
     127 * 
     128 * @param $group_name 
     129 * @param $section_name 
     130 * @param array $template 
     131 * @param array $params 
     132 * 
     133 * @uses wpcpn_show_posts 
     134 */ 
    82135function wpcpn_show_posts_section( $group_name, $section_name, Array $template, $params = array() )  { 
    83136    $section_posts  = wpcpn_get_posts_section( $group_name, $section_name, $params ); 
    84137    if ( $section_posts ) { 
    85         if ( wpcpn_is_cache_active() && wpcpn_should_fragment_cache($group_name, $section_name) ) { 
    86             $cache = wpcpn_cache_get_instance($group_name, $section_name, $template, $params); 
     138        if ( wpcpn_is_cache_active() && wpcpn_should_fragment_cache( $group_name, $section_name ) ) { 
     139            $cache = wpcpn_cache_get_instance( $group_name, $section_name, $template, $params ); 
    87140            if ( ! $cache->output() ) { 
    88141                echo '<!-- Started WPCPN Fragment Cache block ' . date('Y-m-d H:i:s'). ' -->' . PHP_EOL; 
    89                 wpcpn_show_posts($section_posts, $template); 
     142                wpcpn_show_posts( $section_posts, $template ); 
    90143                echo PHP_EOL . '<!-- End WPCPN Fragment Cache block -->'; 
    91                 wpcpn_cache_add_key($group_name, $section_name,$cache->key); 
     144                wpcpn_cache_add_key( $group_name, $section_name, $cache->key ); 
    92145                $cache->store(); 
    93146            } 
    94147        } else { 
    95             wpcpn_show_posts($section_posts, $template); 
     148            wpcpn_show_posts( $section_posts, $template ); 
    96149        } 
    97150    } 
    98151} 
    99152 
     153/** 
     154 * Displays the $posts using $template params 
     155 * 
     156 * @param $posts 
     157 * @param array $template 
     158 */ 
    100159function wpcpn_show_posts( $posts, Array $template ) { 
    101160    $slug   = $template['template_slug']; 
    102     $name   = isset($template['template_name']) && ! empty($template['template_name']) ?  '-' . $template['template_name'] : ''; 
     161    $name   = isset($template['template_name']) && ! empty( $template['template_name'] ) ?  '-' . $template['template_name'] : ''; 
    103162 
    104163    if ( $posts && is_array($posts) ) { 
     
    109168            setup_postdata($post); 
    110169 
    111             include( locate_template($slug . $name . '.php') ); 
     170            include( locate_template( $slug . $name . '.php' ) ); 
    112171 
    113172            wp_reset_postdata(); 
     
    117176} 
    118177 
     178/** 
     179 * Gets the selected posts of a given $group_name/$section_name 
     180 * 
     181 * @param $group_name 
     182 * @param $section_name 
     183 * @param array $params 
     184 * 
     185 * @return array|bool|mixed|void 
     186 */ 
    119187function wpcpn_get_posts_section(  $group_name, $section_name, $params = array() ) { 
    120188    $section    = wpcpn_get_posts_list( $group_name, $section_name ); 
     
    129197    $params     = wp_parse_args($params, 
    130198                    array( 
    131                         'limit' => count($section), 
     199                        'limit' => count( $section ), 
    132200                        'offset' => 0 
    133201                    ) 
    134202                  ); 
    135203 
    136     $section    = array_slice($section, $params['offset'], $params['limit'], true); 
     204    $section    = array_slice ($section, $params['offset'], $params['limit'], true ); 
    137205 
    138206    return $section; 
  • wp-central-posts-network/trunk/wpcpn.php

    r1217756 r1317078  
    1313 * Plugin URI:      https://github.com/nicholasio/wp-central-posts-network 
    1414 * Description:     A Plugin that let you choose any posts on any site in the network to display on the main site. 
    15  * Version:         1.0.5 
     15 * Version:         1.0.6 
    1616 * Author:      Nícholas André 
    1717 * Author URI:      http://nicholasandre.com.br 
Note: See TracChangeset for help on using the changeset viewer.