[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

includes/shortcodes-earlier.php


Lines:
1 to 73 of 73
<?php // (C) Copyright Bobbing Wide 2015


/**
 * WordPress API for processing shortcodes earlier - before other filter processing
 * 
 * Shortcodes are expected to be coded in the same format as documented in shortcodes.php
 * The reason we want to expand shortcodes earlier is to extract content from the database
 * and generate the HTML using the written content, then apply the texturizing logic later.
 * 
 * The texturizing will have to respect the requests of the shortcodes to not texturize their output.
 * This is achieved by HTML comments generated in the ouptut.
 * - `<!--notext:-->` represents the start of the content that should not be texturized
 * - `<!--dotext:-->` represents the end of the content that should not be texturized
 * 
 * There should be no reason to support nested notext: comments
 * The code does not yet prevent this from happening. 
 * 
 * Note: notext: and dotext: are arbitrarily chosen keywords that have not yet been used.
 * Abbreviations for "no texturize" and "do texturize"
 * 
 * We didn't use `<!--/notext-->` since this seems too clumsy
 *
 * To apply shortcode tags to content which may generate notext:/dotext: comments:
 * `
 * $out = do_shortcode_earlier( $content );
 * `
 * 
 * You also need to replace: 
 * `
 * add_filter('the_content', 'do_shortcode', 11); // AFTER wpautop()
 * `
 *
 * with:
 * `
 * remove_filter( 'the_content', 'do_shortcode', 11 ); 
 * add_filter( 'the_content', 'do_shortcode_earlier', 10 ); // BEFORE wpautop();
 * `
 * 
 * alternatively use:
 * `
 * bw_replace_filter( 'the_content', 'do_shortcode', 11, 'do_shortcode_earlier' );
 * `
 * where bw_replace_filter() is from the oik base plugin.
 * 
 *
 *
 * @link http://codex.wordpress.org/Shortcode_API
 *
 * @package WordPress
 * @subpackage Shortcodes
 * @since 4.x 
 */
 
 

if ( !function_exists( "do_shortcode_earlier" ) ) { 


/* function do_shortcode_earlier() – Search content for shortcodes and filter shortcodes through their hooks. */
}

if ( !function_exists( "do_shortcode_tag_earlier" ) ) {
/* function do_shortcode_tag_earlier() – Regular Expression callable for do_shortcode_earlier() for calling shortcode hook. */
}

if ( !function_exists( "notext_wrappit" ) ) {
/* function notext_wrappit() – Wrap the result of the shortcode in notext/dotext */
}



 
 View on GitHub View on Trac

Called by

    Invoked by

      Calls

      Call hooks

      File name: includes/shortcodes-earlier.php
      Plugin ref: oik-css
      Version: 2.1.0
      Deprecated?: No
      API Letters: E,I,P,S

      Published: August 29, 2015 | Last updated: December 18, 2017

      Information

      File name: includes/shortcodes-earlier.php
      Plugin ref: oik-css
      Version: 2.1.0
      Deprecated?: No
      API Letters: E,I,P,S

      Recent plugin updates

      UK-tides v3.1.1 UK-tides v3.1.1 is built with the latest wp-scripts. It's been tested with WordPress 6.2 and Gutenberg 15.7.0 ...
      oik-weight-zone-shipping v0.2.6 oik-weight-zone-shipping v0.2.6 has been tested with WooCommerce 7.4.0. ...
      sb-chart-block v1.2.3 SB Chart Block v1.2.3 contains a fix for an Uncaught Error: Call to undefined function bw_trace2()  ...
      SB Chart Block v1.2.1 Update to SB Chart Block v1.2.0 for custom colors, font size options and multiple y-axis charts.  ...
      oik-css v2.1.0 Update to oik-css v2.1.0 for the ability to style CSS and GeSHi output in documentation. ...

      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.2.1. PHP: 7.4.33. Memory limit: 768M