[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

_ca_doaplugin_local() – Create the APIs for a component

You appear to be a bot. Output may be restricted

Description

Create the APIs for a component

List the files for the component Components supported: "wordpress" – all files in the WordPress installation excluding wp-content <i>plugin</i> – all the files in the named plugin <i>theme</i> – all the files in the named theme Process each file in the component, defining the file, classes, methods and APIs

Usage

_ca_doaplugin_local( $component, $previous, $start );

Parameters

$component
( string ) required – the name of the plugin or theme, or "wordpress"
$previous
( string ) optional – the previous version to compare against – for performance
$start
( string ) optional –

Returns

void

Source

File name: oik-shortcodes/admin/oik-create-apis.php
Lines:

1 to 66 of 66
function _ca_doaplugin_local( $component, $previous=null, $start=null ) {
  global $plugin;
  $plugin = $component;
  if ( $plugin ) {
    $component_type = oiksc_query_component_type( $plugin );
    if ( $component_type ) {
      echo "Doing a $component_type: " . $plugin . PHP_EOL;
      $response = oikb_get_response( "Continue?", true );
      if ( $response ) {
        oik_require( "admin/oik-apis.php", "oik-shortcodes" );
        //wp_register_plugin_realpath( WP_PLUGIN_DIR . "/$plugin/." );
        oik_require( "oik-list-wordpress-files.php", "oik-batch" );
        oik_require( "oik-list-previous-files.php", "oik-batch" );
        $component_preloaded = oiksc_pre_load_component( $plugin, $component_type );
        if ( $component_preloaded ) {
        
          $oiksc_parse_status = oiksc_parse_status::instance();
          $oiksc_parse_status->register_fields();
          $oiksc_parse_status->set_component( $component_preloaded->ID );
          $oiksc_parse_status->fetch_status();
          $finished = $oiksc_parse_status->finished_two_passes();
          if ( $finished && null == $previous ) {
            $previous = $oiksc_parse_status->get_to_sha( $previous );
            echo "We've finished the previous pass: $previous" . PHP_EOL;
          } else {
            if ( "0" === $previous && $start < 1 ) {
              oiksc_delete_posts( $component_preloaded );
              $oiksc_parse_status->set_component( $component_preloaded->ID );
              $oiksc_parse_status->update_status();
              oiksc_preload_content(); 
              
            } else {
              echo "Previous: $previous" . PHP_EOL;
              
            }
            $previous = $oiksc_parse_status->get_from_sha( $previous );
            $start = $oiksc_parse_status->get_file_m( $start );
            echo "Continuing previous pass: $previous from $start" . PHP_EOL;
            
          }
          $files = oikb_list_changed_files( $previous, $plugin, $component_type, $oiksc_parse_status );
          if ( null === $files ) {
            $files = oiksc_load_files( $plugin, $component_type );
            $files = oikb_maybe_do_files( $files, $previous, $component, $component_type );
          }
          if ( $component_type == "wordpress" ) {
            $files = oikb_filter_wordpress_files( $files );
          }
          $finished = $oiksc_parse_status->finished_two_passes();
          if ( !$finished ) {
            oiksc_do_files( $files, $plugin, $component_type, "_ca_dofile_local", $start );
          }
        } else {
          echo "Plugin/theme not defined: $component" . PHP_EOL;
        }
      } else {
        echo "Invalid plugin/theme: $component" . PHP_EOL;
      }
    } else {
      //echo "Missing --plugin= parameter" . PHP_EOL;
      echo "Cannot determine component type for: $component" . PHP_EOL;
      echo "Perhaps the component is not available." . PHP_EOL;
      bw_trace2( $component, "Missing component", true, BW_TRACE_WARNING );
    }
  }  
}
 

 View on GitHub

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

Information

Function name: _ca_doaplugin_local
Plugin ref: oik block shortcode and API server
Version: 1.38.0
Sourcefile: admin/oik-create-apis.php
File ref: admin/oik-create-apis.php
API type: private
Deprecated?: No
API Letters: C,D,L,_

Recent plugin updates

oik-weight-zone-shipping v0.2.2 

Upgrade to oik-weight-zone-shipping v0.2.2 for internationalized strings for migration. This version may also resolve a problem where a Warning message is produced while listing Shipping classes.

 ...
oik-weight-zone-shipping v0.2.1 

oik-weight-zone-shipping v0.2.1 fixes a problem with v0.2.0 on worpress.org, where two new files weren't included in the SVN repository.

 ...
oik-weightcountry-shipping v1.4.0 

oik-weightcountry-shipping v1.4.0 has been tested with WordPress 5.6 and WooCommerce 4.8.0. It is no longer supported. We suggest you switch to the oik weight zone shipping plugin.

 ...
oik-weight-zone-shipping v0.2.0 

oik-weight-zone-shipping v0.2.0 now supports migration from oik weight/country shipping. You can create Multi Rate shipping tables and methods restricting shipping classes.

 ...
oik-css v1.1.1 

oik-css v1.1.1 contains an update for improved compatibility with Gutenberg. It has been tested with WordPress 5.6 and WordPress Multi Site.

 ...

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: [email protected]

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-2021. All rights reserved.


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