WordPress.org

Plugin Directory

Changeset 1788675


Ignore:
Timestamp:
12/18/17 10:55:21 (5 weeks ago)
Author:
bobbingwide
Message:

oik v3.2.3 2017/12/17 - tested with PHP 7.2

Location:
oik/trunk
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • oik/trunk/includes/bw_metadata.php

    r1775626 r1788675  
    515515function bw_update_post_meta( $post_id, $field, $mydata ) { 
    516516  delete_post_meta( $post_id, $field ); 
    517   if ( count( $mydata ) ) {  
     517  if ( is_array( $mydata) && count( $mydata ) ) { 
    518518    foreach ( $mydata as $key => $value ) { 
    519519      add_post_meta( $post_id, $field, $value, false );  
  • oik/trunk/languages/oik-bb_BB.po

    r1780343 r1788675  
    33msgid "" 
    44msgstr "" 
    5 "Project-Id-Version: oik 3.2.2\n" 
     5"Project-Id-Version: oik 3.2.3\n" 
    66"Report-Msgid-Bugs-To: http://wordpress.org/tag/oik\n" 
    7 "POT-Creation-Date: 2017-11-30 21:52:24+00:00\n" 
     7"POT-Creation-Date: 2017-12-16 19:19:53+00:00\n" 
    88"MIME-Version: 1.0\n" 
    99"Plural-Forms: nplurals=2; plural=n == 1 ? 0 : 1;\n" 
     
    151151 
    152152#: admin/oik-activation.php:203 libs/oik-activation.php:191 
    153 #: libs/oik-depends.php:143 
     153#: libs/oik-depends.php:150 
    154154msgid "%1$s may not be fully functional." 
    155155msgstr "%1$s mAy nOt bE fluly fnutcoianl." 
     
    18281828 
    18291829 
    1830 #: libs/oik-activation.php:23 libs/oik-depends.php:277 
     1830#: libs/oik-activation.php:23 libs/oik-depends.php:284 
    18311831msgid "Install %1$s" 
    18321832msgstr "Isnatll %1$s" 
    18331833 
    18341834 
    1835 #: libs/oik-activation.php:55 libs/oik-depends.php:305 
     1835#: libs/oik-activation.php:55 libs/oik-depends.php:312 
    18361836msgid "Activate %1$s" 
    18371837msgstr "Atcvitae %1$s" 
    18381838 
    18391839 
    1840 #: libs/oik-activation.php:73 libs/oik-depends.php:323 libs/oik_themes.php:395 
     1840#: libs/oik-activation.php:73 libs/oik-depends.php:330 libs/oik_themes.php:395 
    18411841msgid "Upgrade %1$s" 
    18421842msgstr "Ugparde %1$s" 
    18431843 
    18441844 
    1845 #: libs/oik-activation.php:189 libs/oik-depends.php:93 
    1846 #: libs/oik-depends.php:140 
     1845#: libs/oik-activation.php:189 libs/oik-depends.php:100 
     1846#: libs/oik-depends.php:147 
    18471847msgid " version " 
    18481848msgstr " vreison " 
    18491849 
    18501850 
    1851 #: libs/oik-activation.php:193 libs/oik-depends.php:99 
    1852 #: libs/oik-depends.php:145 
     1851#: libs/oik-activation.php:193 libs/oik-depends.php:106 
     1852#: libs/oik-depends.php:152 
    18531853msgid "" 
    18541854"Please install and activate the required minimum version of this plugin: %1$s" 
     
    18571857 
    18581858 
    1859 #: libs/oik-depends.php:96 
     1859#: libs/oik-depends.php:103 
    18601860msgid "Plugin %1$s may not be fully functional." 
    18611861msgstr "Pulign %1$s mAy nOt bE fluly fnutcoianl." 
  • oik/trunk/languages/oik-en_GB.po

    r1780343 r1788675  
    33msgid "" 
    44msgstr "" 
    5 "Project-Id-Version: oik 3.2.2\n" 
     5"Project-Id-Version: oik 3.2.3\n" 
    66"Report-Msgid-Bugs-To: http://wordpress.org/tag/oik\n" 
    7 "POT-Creation-Date: 2017-11-30 21:52:24+00:00\n" 
     7"POT-Creation-Date: 2017-12-16 19:19:53+00:00\n" 
    88"MIME-Version: 1.0\n" 
    99"Plural-Forms: nplurals=2; plural=n == 1 ? 0 : 1;\n" 
     
    129129 
    130130#: admin/oik-activation.php:203 libs/oik-activation.php:191 
    131 #: libs/oik-depends.php:143 
     131#: libs/oik-depends.php:150 
    132132msgid "%1$s may not be fully functional." 
    133133msgstr "%1$s may not be fully functional." 
     
    14581458msgstr "Updates" 
    14591459 
    1460 #: libs/oik-activation.php:23 libs/oik-depends.php:277 
     1460#: libs/oik-activation.php:23 libs/oik-depends.php:284 
    14611461msgid "Install %1$s" 
    14621462msgstr "Install %1$s" 
    14631463 
    1464 #: libs/oik-activation.php:55 libs/oik-depends.php:305 
     1464#: libs/oik-activation.php:55 libs/oik-depends.php:312 
    14651465msgid "Activate %1$s" 
    14661466msgstr "Activate %1$s" 
    14671467 
    1468 #: libs/oik-activation.php:73 libs/oik-depends.php:323 libs/oik_themes.php:395 
     1468#: libs/oik-activation.php:73 libs/oik-depends.php:330 libs/oik_themes.php:395 
    14691469msgid "Upgrade %1$s" 
    14701470msgstr "Upgrade %1$s" 
    14711471 
    1472 #: libs/oik-activation.php:189 libs/oik-depends.php:93 
    1473 #: libs/oik-depends.php:140 
     1472#: libs/oik-activation.php:189 libs/oik-depends.php:100 
     1473#: libs/oik-depends.php:147 
    14741474msgid " version " 
    14751475msgstr " version " 
    14761476 
    1477 #: libs/oik-activation.php:193 libs/oik-depends.php:99 
    1478 #: libs/oik-depends.php:145 
     1477#: libs/oik-activation.php:193 libs/oik-depends.php:106 
     1478#: libs/oik-depends.php:152 
    14791479msgid "" 
    14801480"Please install and activate the required minimum version of this plugin: %1$s" 
    14811481msgstr "Please install and activate the required minimum version of this plugin: %1$s" 
    14821482 
    1483 #: libs/oik-depends.php:96 
     1483#: libs/oik-depends.php:103 
    14841484msgid "Plugin %1$s may not be fully functional." 
    14851485msgstr "Plugin %1$s may not be fully functional." 
  • oik/trunk/languages/oik.pot

    r1780343 r1788675  
    33msgid "" 
    44msgstr "" 
    5 "Project-Id-Version: oik 3.2.2\n" 
     5"Project-Id-Version: oik 3.2.3\n" 
    66"Report-Msgid-Bugs-To: http://wordpress.org/tag/oik\n" 
    7 "POT-Creation-Date: 2017-11-30 21:52:24+00:00\n" 
     7"POT-Creation-Date: 2017-12-16 19:19:53+00:00\n" 
    88"MIME-Version: 1.0\n" 
    99"Content-Type: text/plain; charset=UTF-8\n" 
     
    128128 
    129129#: admin/oik-activation.php:203 libs/oik-activation.php:191 
    130 #: libs/oik-depends.php:143 
     130#: libs/oik-depends.php:150 
    131131msgid "%1$s may not be fully functional." 
    132132msgstr "" 
     
    14571457msgstr "" 
    14581458 
    1459 #: libs/oik-activation.php:23 libs/oik-depends.php:277 
     1459#: libs/oik-activation.php:23 libs/oik-depends.php:284 
    14601460msgid "Install %1$s" 
    14611461msgstr "" 
    14621462 
    1463 #: libs/oik-activation.php:55 libs/oik-depends.php:305 
     1463#: libs/oik-activation.php:55 libs/oik-depends.php:312 
    14641464msgid "Activate %1$s" 
    14651465msgstr "" 
    14661466 
    1467 #: libs/oik-activation.php:73 libs/oik-depends.php:323 libs/oik_themes.php:395 
     1467#: libs/oik-activation.php:73 libs/oik-depends.php:330 libs/oik_themes.php:395 
    14681468msgid "Upgrade %1$s" 
    14691469msgstr "" 
    14701470 
    1471 #: libs/oik-activation.php:189 libs/oik-depends.php:93 
    1472 #: libs/oik-depends.php:140 
     1471#: libs/oik-activation.php:189 libs/oik-depends.php:100 
     1472#: libs/oik-depends.php:147 
    14731473msgid " version " 
    14741474msgstr "" 
    14751475 
    1476 #: libs/oik-activation.php:193 libs/oik-depends.php:99 
    1477 #: libs/oik-depends.php:145 
     1476#: libs/oik-activation.php:193 libs/oik-depends.php:106 
     1477#: libs/oik-depends.php:152 
    14781478msgid "" 
    14791479"Please install and activate the required minimum version of this plugin: %1$s" 
    14801480msgstr "" 
    14811481 
    1482 #: libs/oik-depends.php:96 
     1482#: libs/oik-depends.php:103 
    14831483msgid "Plugin %1$s may not be fully functional." 
    14841484msgstr "" 
  • oik/trunk/libs/class-oik-remote.php

    r1760629 r1788675  
    22 
    33if ( !defined( "CLASS_OIK_REMOTE_INCLUDED" ) ) { 
    4     define( "CLASS_OIK_REMOTE_INCLUDED", "0.1.0" ); 
     4    define( "CLASS_OIK_REMOTE_INCLUDED", "0.2.0" ); 
    55 
    66/** 
     
    88 * Provided: class-oik-remote 
    99 * Depends: class-oik-update - a cyclical dependency 
    10  * Version: v0.1.0 
     10 * Version: v0.2.0 
    1111 *  
    1212 * Implements oik/includes/oik-remote.inc as a shared library. 
     
    759759        $local = self::are_you_local_IP( $url ); 
    760760        if ( !$local ) { 
    761             $local = self::are_you_local_computer( $url ); 
     761            $local = self::are_you_private_IP( $url ); 
     762            if ( !$local ) { 
     763                $local = self::are_you_local_computer( $url ); 
     764            } 
    762765        } 
    763766        return $local; 
     
    767770     * Determines if this is a local IP 
    768771     * 
    769      * If the server IP is the same address as the URL IP then assume it's a local request 
     772     * If the URL is the same as the server then it's a local request. 
     773     * If the IP for the URL is 127.0.0.1 then it's local. 
     774     * @TODO Determine whether or not to test for just 127. 
    770775     * 
    771      * @param string $url 
    772      * @return bool 
     776     * @param string $url e.g. https://qw/wordpress 
     777     * @return bool - true if a local IP 
    773778     */ 
    774779    static function are_you_local_IP( $url ) { 
    775780        $local_host = $_SERVER['SERVER_NAME']; 
    776         $local_ip = gethostbyname( $local_host ); 
    777781        $remote_host = parse_url( $url, PHP_URL_HOST ); 
    778         $remote_ip = gethostbyname( $remote_host ); 
    779         $local = $local_ip == $remote_ip; 
     782        $local = ( $local_host == $remote_host );  
     783        if ( !$local ) { 
     784            $remote_ip = gethostbyname( $remote_host ); 
     785            $local = $remote_ip === "127.0.0.1"; 
     786        }    
     787        return $local; 
     788    } 
     789     
     790    /** 
     791     * Determines if this is a private IP 
     792     *  
     793     * The following ranges are reserved for private networks. 
     794     * 
     795   * - 192.168.0.0 - 192.168.255.255 (65,536 IP addresses) 
     796     * - 172.16.0.0 - 172.31.255.255 (1,048,576 IP addresses) 
     797     * - 10.0.0.0 - 10.255.255.255 (16,777,216 IP addresses) 
     798     * 
     799     * @TODO - Determine if we need to check all ranges.  
     800     *  
     801     * @param string $url e.g. https://qw/wordpress 
     802     * @return bool - true if a private IP 
     803     */ 
     804    static function are_you_private_ip( $url ) { 
     805        $host = parse_url( $url, PHP_URL_HOST ); 
     806        $local_ip = gethostbyname( $host ); 
     807        $local = ( 0 === strpos( $local_ip, "192.168" ) ); 
    780808        return $local; 
    781809    } 
  • oik/trunk/libs/class-oik-update.php

    r1760629 r1788675  
    11<?php // (C) Copyright Bobbing Wide 2011-2017 
    22if ( !defined( "CLASS_OIK_UPDATE_INCLUDED" ) ) { 
    3 define( "CLASS_OIK_UPDATE_INCLUDED", "3.0.2" ); 
     3define( "CLASS_OIK_UPDATE_INCLUDED", "3.2.3" ); 
    44 
    55/** 
     
    207207    if ( !isset( $bw_theme_slugs ) ) { 
    208208        $bw_theme_slugs = array(); 
    209         if ( count( $bw_registered_themes) ) { 
     209        if ( is_array( $bw_registered_themes) && count( $bw_registered_themes ) ) { 
    210210            foreach ( $bw_registered_themes as $key => $value ) { 
    211211                $file = bw_array_get( $value, "file", null ); 
  • oik/trunk/libs/oik-depends.php

    r1744071 r1788675  
    11<?php // (C) Copyright Bobbing Wide 2012-2017 
    22if ( !defined( "OIK_DEPENDS_INCLUDED" ) ) { 
    3 define( "OIK_DEPENDS_INCLUDED", "3.2.0" ); 
     3define( "OIK_DEPENDS_INCLUDED", "3.2.3" ); 
    44 
    55/** 
     
    4848            foreach ( $active_plugins as $key => $value ) { 
    4949                $name = basename( $value, '.php' ); 
    50                 if ( !isset( $names[ $name ] ) ) { 
     50                $dir = dirname( $value ); 
     51                if ( ( $name == $dir ) && !isset( $names[ $name ] ) ) { 
    5152                    $names[$name] = $value; 
    5253                } 
    53             }  
     54            } 
     55            foreach ( $active_plugins as $key => $value ) { 
     56                $name = basename( $value, '.php' ); 
     57                if ( !isset( $names[ $name ] ) ) { 
     58                    $names[ $name ] = $value; 
     59                } 
     60            } 
    5461        }    
    5562  } 
  • oik/trunk/libs/oik-sc-help.php

    r1775626 r1788675  
    11<?php // (C) Copyright Bobbing Wide 2012-2017 
    22if ( !defined( "OIK_SC_HELP_INCLUDED" ) ) { 
    3 define( "OIK_SC_HELP_INCLUDED", "3.2.1" ); 
     3define( "OIK_SC_HELP_INCLUDED", "3.2.3" ); 
    44 
    55/** 
     
    7373 */ 
    7474function bw_form_sc_syntax( $syntax, $shortcode ) { 
    75   if ( count( $syntax ) ) {  
     75  if ( is_array( $syntax ) && count( $syntax ) ) {  
    7676    foreach ( $syntax as $key => $value ) { 
    7777      BW_::br(); 
  • oik/trunk/oik.php

    r1780343 r1788675  
    44Plugin URI: https://www.oik-plugins.com/oik-plugins/oik 
    55Description: OIK Information Kit - Over 80 lazy smart shortcodes for displaying WordPress content 
    6 Version: 3.2.2 
     6Version: 3.2.3 
    77Author: bobbingwide 
    88Author URI: https://www.oik-plugins.com/author/bobbingwide 
  • oik/trunk/readme.txt

    r1780343 r1788675  
    55Requires at least: 4.8  
    66Tested up to: 4.9.1 
    7 Stable tag: 3.2.2 
     7Stable tag: 3.2.3 
    88License: GPLv2 or later 
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html 
     
    9191 
    9292== Upgrade Notice == 
     93= 3.2.3 =  
     94Upgrade if you're using PHP 7.2 
     95 
    9396= 3.2.2 =  
    9497Upgrade for improvements related to the bw_address shortcode. Translation ready. Tested with WordPress 4.9.1 and WordPress Multisite.  
     
    424427 
    425428== Changelog == 
     429= 3.2.3 = 
     430* Changed: update oik_remote::are_you_local to support testing in WPMS [github bobbingwide oik-libs issues 9] 
     431* Fixed: Cater for old/renamed versions of plugins [github bobbingwide oik issues 80] 
     432* Tested: With PHP 7.0, 7.1 and 7.2 [github bobbingwide oik issues 91] 
     433* Tested: With WordPress 4.9.1 and WordPress Multisite 
     434 
    426435= 3.2.2 =  
    427436* Changed: Added tag= parameter to [bw_address] shortcode [github bobbingwide oik issues 89] 
Note: See TracChangeset for help on using the changeset viewer.