WordPress.org

Plugin Directory

Changeset 1503990


Ignore:
Timestamp:
09/27/16 19:39:56 (13 months ago)
Author:
bobbingwide
Message:

v1.6.3 - tested with WordPress 4.6.1

Location:
uk-tides/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • uk-tides/trunk/admin/oik-activation.php

    r1308949 r1503990  
    1 <?php // (C) Copyright Bobbing Wide 2012-2015 
    2  
    3 /** 
    4  *  
    5  * @TODO This logic has been converted to a shared library in libs/oik-activation.php 
    6  */ 
     1<?php // (C) Copyright Bobbing Wide 2012-2016 
    72 
    83if ( function_exists( "oik_plugin_lazy_activation" ) ) { 
     
    138 * Produce an install plugin link 
    149 * 
    15  * @param string $plugin 
    16  * @return string the install plugin link 
     10 * @param string $plugin plugin slug 
     11 *  
     12 * @return string link for the plugin install 
    1713 */ 
    1814function oik_plugin_install_plugin( $plugin ) { 
     
    3531 * @return string link to enable activation - which user must choose 
    3632 * We probably don't need plugin_status OR paged parameters 
    37   
     33 * 
    3834 * ` 
    3935   http://example.com/wp-admin/plugins.php? 
     
    5753}  
    5854  
    59 /**     
    60     $path = "update.php?action=install-plugin&plugin=$plugin"; 
    61     $url = admin_url( $path ); 
    62     $url = wp_nonce_url( $url, "install-plugin_oik" );  
    63     $link = '<a href="'; 
    64     $link .= $url; 
    65     $link .= '">Install oik</a>'; 
    66      
    67   $url = wp_nonce_url(self_admin_url('update.php?action=upgrade-plugin&plugin=' . $update_file), 'upgrade-plugin_' . $update_file); 
     55/** 
     56 * Create an Update plugin link 
     57 * 
     58 * Decided to use "Update" rather than " Upgrade".  
     59 * 
     60 * @param string $plugin the plugin slug 
     61 * @return string the update link 
    6862 */ 
    6963function oik_plugin_update_plugin( $plugin ) { 
     
    7468  $link .= $url; 
    7569  $link .= '">';  
    76   $link .= __(' Upgrade' ); 
     70  $link .= __( 'Update' ); 
    7771  $link .= " $plugin</a>"; 
    7872  return( $link ); 
     
    8175/**  
    8276 * Find out if we think the plugin is installed but not activated or not even installed 
     77 *  
    8378 * @param string $plugin - the plugin file name ( without plugin path info? ) 
    8479 * @return string - null if it's not installed or plugin to be activated 
     
    125120 
    126121/** 
     122 * Test if the plugin is activated 
     123 * 
    127124 * This won't work for Multisite since it doesn't find the network activated plugins 
    128125 * Even if it did, the admin may not be able to do anything. 
     
    231228 
    232229 
     230/** 
     231 * Simple implementation of plugin dependency logic 
     232 * 
     233 * @param string $plugin - the plugin file name 
     234 * @param string $dependencies - the list of plugins upon which this plugin is dependent 
     235 * @param string $callback - the callback function to invoke when the dependencies aren't satisfied 
     236 * 
     237 * Instead of calling this module during activation we invoke it in response to the  
     238 * after_plugin_row_$plugin_basename action. 
     239 *  
     240 * This gives us a bit more control over the information we provide. 
     241 * IF the oik plugin is not activated then oik_lazy_depends() will not be defined 
     242 *  
     243 */ 
     244if ( !function_exists( "oik_depends" ) ) { 
     245function oik_depends( $plugin=null, $dependencies="oik", $callback=null ) { 
     246  //bw_trace2(); 
     247  //if ( function_exists( "oik_load_plugins" )) { 
     248  //  oik_load_plugins(); 
     249  //}   
     250  if ( function_exists( "oik_lazy_depends" ) ) {   
     251    oik_lazy_depends( $plugin, $dependencies, $callback ); 
     252  } else { 
     253    if ( is_callable( $callback ) ) { 
     254      call_user_func( $callback, $plugin, $dependencies, "missing" ); 
     255    }   
     256  }   
     257} 
     258} 
     259 
     260 
    233261} // end else  
  • uk-tides/trunk/readme.txt

    r1349803 r1503990  
    44Tags: shortcode, tides, UK, heights and times, [bw_tides], saltwater 
    55Requires at least: 3.9 
    6 Tested up to: 4.4.2 
    7 Stable tag: 1.6.2 
     6Tested up to: 4.6.1 
     7Stable tag: 1.6.3 
    88License: GPLv2 or later 
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html 
     
    8686 
    8787== Upgrade Notice == 
     88= 1.6.3 = 
     89Tested with WordPress 4.6.1. Should not crash if oik is not active processing 'oik_add_shortcodes' 
     90 
    8891= 1.6.2 = 
    8992Tested with WordPress 4.4.2. Should not crash when tracing is active. 
     
    111114 
    112115== Changelog == 
     116= 1.6.3 =  
     117* Fixed: Avoid Fatal errors when oik not activated processing 'oik_add_shortcodes' action [github bobbingwide uk-tides issue 2] 
     118* Tested: With WordPress 4.6.1 
     119* Tested: Compatability with oik up to 3.0.3 
     120 
    113121= 1.6.2 =  
    114122* Fixed: Uncaught exception 'Serialization of 'SimpleXMLElement' when tracing   GitHub Issue 1 
  • uk-tides/trunk/uk-tides.php

    r1349803 r1503990  
    44Plugin URI: http://www.oik-plugins.com/oik-plugins/uk-tides-times-and-heights/ 
    55Description: shortcode for UK tide times and heights [bw_tides] 
    6 Version: 1.6.2 
     6Version: 1.6.3 
    77Author: bobbingwide 
    88Author URI: http://www.oik-plugins.com/author/bobbingwide 
     
    3636 */ 
    3737function uk_tides_init() { 
    38   bw_add_shortcode( 'bw_tides', 'bw_tides', oik_path( "shortcodes/uk-tides.php", "uk-tides"), false ); 
     38    if ( function_exists( "bw_add_shortcode" ) ) { 
     39        bw_add_shortcode( 'bw_tides', 'bw_tides', oik_path( "shortcodes/uk-tides.php", "uk-tides"), false ); 
     40    } 
    3941} 
    4042 
Note: See TracChangeset for help on using the changeset viewer.