[oik] plugins.com

WordPress plugins and themes

  • Home
  • About
    • lazy shortcodes
    • smart shortcodes
    • oik base plugin
      • oik – donate
      • oik PayPal buttons
      • oik installation
      • oik Button Shortcode button
      • oik changelog
      • oik FAQ
      • oik plugins on SVN
      • oik plugins on GitHub
  • Plugins
    • oik base plugin
    • FREE oik plugins
    • WordPress plugins
    • Premium oik plugins
    • Bespoke oik plugins
  • Shortcodes
    • Shortcode examples
  • Blocks
    • Block examples
  • APIs
    • ALL action and filter hooks
  • Blog

oik_path() – Return the path of the oik base plugin or any particular file

Description

Return the path of the oik base plugin or any particular file

Note: You can either use oik_path() to find where oik is installed OR use add_action( "init", "oik_init" ); to let oik initialise itself and then you don't have to worry about including the oik header files until you need them. Use add_action( "oik_loaded", 'your_init_function' ); to know when oik has been loaded so you can use the APIs. Note: oik_boot may be loaded before WordPress has done its stuff, so we may need to define some constants ourselves. Here we assume the file is in ABSPATH/wp-content/plugins/oik/libs so we need 4 dirnames to get back to ABSPATH, and then we need to convert backslashes to forward slashes and the drive letter, if present, to uppercase.

Usage

$string = oik_path( $file, $plugin );

Parameters

$file
( string ) optional – the relative file name within the plugin, without a leading slash
$plugin
( string ) optional default: oik – the plugin slug

Returns

string the fully qualified plugin file name

Source

File name: oik/libs/oik_boot.php
Lines:
1 to 4 of 4
  function oik_path( $file=NULL, $plugin='oik') {
    $wp_plugin_dir = str_replace( "\\", '/', WP_PLUGIN_DIR );
    return( $wp_plugin_dir . '/'. $plugin. '/' . $file );
  }
 
 View on GitHub View on Trac

Called by

1 to 7 of 7
  • bw_jquery_script_url() – Default jQuery script file filter
  • bw_oik_lazy_add_shortcodes() – Implement "oik_add_shortcodes" action for oik
  • oik_lib_set_lib_versions() –
  • oik_require() – Invoke require_once on an oik include file or other file
  • oik_require2() – Load a file which could have been relocated from one plugin to another
  • Tests_oik_admin::remove_most_shortcodes() –
  • Tests_shortcodes_oik_thumbs::dummy_attachment() –

Invoked by

    Calls

    Call hooks

    Function name: oik_path
    Plugin ref: oik – oik information kit
    Version: 4.15.3
    Sourcefile: libs/oik_boot.php
    File ref: libs/oik_boot.php
    Deprecated?: No
    API Letters: O,P

    Published: February 2, 2018 | Last updated: February 2, 2018

    Information

    Function name: oik_path
    Plugin ref: oik – oik information kit
    Version: 4.15.3
    Sourcefile: libs/oik_boot.php
    File ref: libs/oik_boot.php
    Deprecated?: No
    API Letters: O,P

    Recent plugin updates

    oik-weight-zone-shipping v0.2.13 oik-weight-zone-shipping v0.2.13 has been tested with WooCommerce 10.1.2 and WordPress 6.8.2 ...
    SB Children Block v1.3.0 Upgrade to SB Children Block v1.3.0 for support for PHP 8.3 and PHP 8.4  ...
    oik v4.15.3 Update to oik v4.15.3 for a couple of security fixes. Tested with WordPress 6.8.2 ...
    oik-privacy-policy v1.4.9 Update to oik-privacy-policy v1.4.9 for a security fix. Tested with WordPress 6.8.2 and PHP 8.3 and PHP 8.4 ...
    oik-nivo-slider v1.17.0 oik-nivo-slider v1.17.0 introduces the Nivo slider block - oik-nivo-slider/nivo. ...

    Plugins

    • All Plugins
    • oik base plugin
    • FREE oik plugins
    • WordPress plugins
    • Premium oik plugins

    Themes

    • FREE themes
    • Bespoke themes
    • Premium themes

    Blocks

    • All Blocks
    • Block examples
    • About Blocks

    Shortcodes

    • All Shortcodes
    • Shortcode examples
    • About Shortcodes

    Reference

    • About APIs
    • All APIs
    • All Classes
    • All Files
    • All Hooks

    Support

    • Contact
    • Cookies policy
    • Get API key
    • Privacy
    • Request support
    • Sitemap
    • Stay informed
    • Terms and Conditions
    oik-plugins
    Email: herb@bobbingwide.com

    Weight shipping plugins

    Find out which cart weight shipping plugin you need for your WooCommerce site.
    Which cart weight based plugin do I need?

    Site:  www.oik-plugins.com
    © Copyright oik-plugins 2011-2025. All rights reserved.


    Website designed and developed by Herb Miller of Bobbing Wide
    Proudly powered by WordPress and oik-plugins

    WordPress version: 6.8.3

    Gutenberg version: 21.7.0

    PHP version: 8.2.29