[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

bw_see_if_domain_required() – See if domain required?

You appear to be a bot. Output may be restricted

Description

See if domain required?

This is now a lot simpler. If it starts with '/' then path[0] will be null So we use this as the domain ( host ) otherwise… we treat as a link within the current site

path[0] path[1] e.g. Processing
set set post_type/etcetera
set null post_type Is this a permalink?
null set /somewhere
null null / domain required. They just entered ‘/’ – so domain required. A bit of a silly link? No; it depends on what’s in query/fragment

Usage

$array = bw_see_if_domain_required( $parts, $path );

Parameters

$parts
( array ) required – the URL's component parts
$path
( mixed ) required –

Returns

array parts

Source

File name: oik/shortcodes/oik-link.php
Lines:
1 to 22 of 22
function bw_see_if_domain_required( $parts, $path ) {
  $path0 = bw_array_get( $path, 0, null );
  $path1 = bw_array_get( $path, 1, null );
  if ( $path0 ) {
    //$parts = bw_check_permalink( $parts, $path0, $path1 );
    $parts['host'] = $path0;
    $parts['path'] = $path1;
    if ( $path1 ) {
    // we don't yet know if we need to set the host 
    } else {
      // we still don't know
    }
  } else { 
    $parts['host'] = bw_get_domain();
    if ( $path1 ) {
      //
    } else {
      //
    }
  } 
  return( $parts );
}
 
 View on GitHub View on Trac

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

Information

Function name: bw_see_if_domain_required
Plugin ref: oik – oik information kit
Version: 4.10.0
Sourcefile: shortcodes/oik-link.php
File ref: shortcodes/oik-link.php
Deprecated?: No
API Letters: B,D,I,R,S

Recent plugin updates

sb-post-edit-block v0.3.2 Update to sb-post-edit-block v0.3.2 for support for PHP 8.1, 8.2 and 8.3 ...
oik-user v0.9.0 Update to oik-user v0.9.0 for support for PHP 8.1, PHP 8.2 and PHP 8.3  ...
oik-weight-zone-shipping v0.2.11 Update to oik-weight-zone-shipping v0.2.11 for WooCommerce High-Performance order storage compatibility ...
sb-breadcrumbs-block v0.6.1 Update to sb-breadcrumbs-block v0.6.1 for support for PHP 8.1 and PHP 8.2 ...
slog v1.5.1 Update to slog v1.5.1 for support for PHP 8.1 and PHP 8.2 ...

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


Website designed and developed by Herb Miller of Bobbing Wide
Proudly powered by WordPress and oik-plugins
WordPress 6.4.1. PHP: 7.4.33. Memory limit: 768M