[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

_oikai_create_file() – Create or update an "oik_file" post_type

Description

Create or update an "oik_file" post_type

Usage

$ID = _oikai_create_file( $plugin, $file );

Parameters

$plugin
( ID ) required –
$file
( string ) required –

Returns

ID

Source

File name: oik-shortcodes/admin/oik-files.php
Lines:
1 to 34 of 34
function _oikai_create_file( $plugin, $file ) {
  p( "Creating file: $file" );
  bw_flush();
  $post = oiksc_get_oik_file_byname( $plugin, $file );
  $parent = oiksc_create_ancestry( $post, $plugin, $file );
  bw_trace2( $post, "post", true, BW_TRACE_DEBUG );
  if ( !$post ) {
    $post_id = oiksc_create_oik_file( $plugin, $file, $parent );     
  } else {
    $post_id = $post->ID;
    $post->post_parent = $parent;
    oiksc_update_oik_file( $post, $plugin, $file );
  }
  global $oikai_post_id;
  $oikai_post_id = $post_id;
  
   
  
/**
   * We need to ensure that the first instance of the function name does not appear as a call to the function.
   * To achieve this we need to let the pseudo method know that it's part of the class.
   */
  //$class = oikai_get_class( $api );
  //p( "Class $class" );
  //bw_context( "classname", $class );
  //bw_context( "variable", "this" );
  // bw_context( "operator", "function" );
  
  //oiksc_build_callees( null, $file, $plugin );
  // oikai_save_callees( $post_id );
  
  // oiksc_save_hooks( $post_id );
  // oiksc_save_associations( $post_id );
  return( $post_id );
}
 
 View on GitHub

Called by

1 to 3 of 3
  • oiksc_ajax_oiksc_create_file() – Implement "wp_ajax_oiksc_create_file" action for oik-shortcodes
  • oiksc_create_ancestry() – Determine the post_parent for an oik_file
  • oiksc_local_oiksc_create_file() – Create an oik_file locally

Invoked by

    Calls

    1 to 7 of 7
    • bw_flush() – Use bw_flush() to echo the contents of $bwecho then empty it
    • bw_trace2() – Trace $value to the trace log file if tracing is active
    • oiksc_create_ancestry() – Determine the post_parent for an oik_file
    • oiksc_create_oik_file() – Programmatically create an oik_file record for a selected plugin’s file
    • oiksc_get_oik_file_byname() – Return the "oik_file" post for the given plugin ID and file name
    • oiksc_update_oik_file() – Update an "oik_file" post type
    • p() – Output a paragraph of translatable text

    Call hooks

    Function name: _oikai_create_file
    Plugin ref: oik block shortcode and API server
    Version: 1.41.5
    Sourcefile: admin/oik-files.php
    File ref: admin/oik-files.php
    API type: private
    Deprecated?: No
    API Letters: C,F,O,_

    Published: March 11, 2017 | Last updated: March 11, 2017

    Information

    Function name: _oikai_create_file
    Plugin ref: oik block shortcode and API server
    Version: 1.41.5
    Sourcefile: admin/oik-files.php
    File ref: admin/oik-files.php
    API type: private
    Deprecated?: No
    API Letters: C,F,O,_

    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