コード例 #1
0
 /**
  * Populate rows for the given date
  */
 function load_file($date, $host = "../play/oik-plugins.com")
 {
     gob();
     $file = "{$host}/{$date}.vt";
     $contents = file($file);
     echo "Date: {$date} Count: " . count($contents) . PHP_EOL;
     foreach ($contents as $line) {
         $this->rows[] = new VT_row_basic($line);
     }
     unset($contents);
 }
コード例 #2
0
 /**
  * Calculate a single percentage
  */
 function percentage($key, $field)
 {
     if (is_array($field)) {
         gob();
         // Not catered for
     } else {
         $percentage = $field * 100 / $this->total;
     }
     $this->percentages[$key] = $percentage;
 }
コード例 #3
0
ファイル: class-object.php プロジェクト: bobbingwide/wp-top12
 function import_csv()
 {
     gob();
 }
コード例 #4
0
 /**
  * Hunt for shortcodes in the post
  *
  */
 function schunt_post($post)
 {
     echo "{$post->ID} {$post->post_type} {$post->post_modified}" . PHP_EOL;
     if ($post->post_type == "revision") {
         gob();
     }
     $codes = $this->schunt_codes($post->post_title);
     $codes += $this->schunt_codes($post->post_content);
     $codes += $this->schunt_codes($post->post_excerpt);
     $this->add_codes($post->ID, "posts");
 }
コード例 #5
0
ファイル: oik-lib.php プロジェクト: bobbingwide/oik-lib
/**
 * Functions to invoke when loaded
 *
 * Just about everything that needs to be done should be done by the _oik-lib-mu plugin
 * so we don't need to do anything except when being activated / deactivated
 * 
 * Given that we don't do anything much we might as well let ourselves become deactivated. 
 * In which case, we should have / share an option field to record the state of play.
 * One of the values will be "Always load MU libraries"
 *  
 * This can also be used by the _oik-lib-mu plugin to 
 * decide which library files should be loaded, regardless of the state of the plugins which deliver them.
 * 
 * So we only need to do anything when we're processing "admin" stuff
 *
 */
function oik_lib_loaded()
{
    if (oik_lib_boot_oik_lib()) {
        bw_trace2("oik_lib_boot_oik_lib worked", null, false, BW_TRACE_DEBUG);
        add_filter("oik_query_libs", "oik_lib_oik_query_libs", 11);
        add_action("admin_menu", "oik_lib_admin_menu");
        oik_lib_fallback(__DIR__ . "/libs");
        add_action("init", "oik_lib_init");
        add_action("plugins_loaded", "oik_lib_reset_libs");
        add_action("wp_loaded", "oik_lib_wp_loaded");
    } else {
        gob();
    }
}
コード例 #6
0
ファイル: __oik-lib-mu.php プロジェクト: bobbingwide/oik-lib
Author URI: http://www.oik-plugins.com/author/bobbingwide
License: GPL2
    Copyright 2015 Bobbing Wide (email : herb@bobbingwide.com )
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License version 2,
    as published by the Free Software Foundation.
    You may NOT assume that you can use any other version of the GPL.
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
    The license for this software can likely be found here:
    http://www.gnu.org/licenses/gpl-2.0.html
*/
/**														 
 * oik-lib Must Use version is the file that is used to implement oik-lib's logic as a Must Use plugin
 *
 * 
 *  
 */
if (defined('WP_PLUGIN_DIR')) {
    $file = WP_PLUGIN_DIR . '/oik-lib/libs/oik-lib.php';
} else {
    $file = dirname(dirname(__FILE__)) . '/plugins/oik-lib/libs/oik-lib.php';
}
if (file_exists($file)) {
    require_once $file;
    oik_lib_boot();
} else {
    gob();
}
コード例 #7
0
ファイル: oik-fum.php プロジェクト: bobbingwide/oik-fum
/**
 * Implement "auto_update_theme" for oik-fum
 * 
 * Return true if you want auto updates to be applied to the theme
 * 
 * @param bool $update 
 * @param object $item 
 * @return bool 
 */
function oikf_auto_update_theme($update, $item)
{
    bw_trace2();
    bw_backtrace();
    gob();
}