WordPress plugin intelligence profile

JSM file_get_contents() Shortcode

A safe and reliable WordPress shortcode for PHP's file_get_contents() function.

WP PlugIndex snapshot

Current directory snapshot

Tested up to WordPress 7.1
Current version2.7.1
WordPress coverageTested up to WordPress 7.1
Minimum stackWP 6.0 · PHP 7.4.33
Directory statusactive
Last directory update29 Oct 20263d ago
Active installations300Adoption metric — not a quality score
WordPress.org rating5.0 / 5 from 1 ratings
Official packageDirect from WordPress.org

Repository metrics are context, not quality scores. Active installations measure adoption and can strongly reflect a plugin’s age and historical popularity. Ratings, recent updates and “Tested up to” metadata also do not guarantee modern code, error-free operation, security, feature completeness or suitability for a particular site. Why active installs don’t tell the whole story →

WP PlugIndex currently records JSM file_get_contents() Shortcode version 2.7.1 as active, updated 3d ago and tested up to WordPress 7.1.

Overview

About this plugin

A safe and reliable WordPress shortcode for PHP’s file_get_contents() function.

Shortcode Attributes

  • body = Keep only the content between <body></body> HTML tags (default is true).
  • cache = Number of seconds to cache the contents (defaults is 3600 seconds).
  • class = Add a class to the content ‘div’ container (default is none).
  • code = Wrap the content in a <code></code> container (default is false).
  • code_class = Add a class to the ‘code’ container (default is none).
  • code_lang = Escape HTML characters, wrap the content in a <pre><code></code></pre> container, and add a language class to the ‘code’ container (default is none).
  • esc_html = Escape HTML characters (default is false).
  • esc_html_pre_code = Escape HTML characters and wrap the content in a <pre><code></code></pre> container (default is false).
  • file = Path to a local file ( relative to the wp-content/ folder).
  • filter = Apply the named filter to the content (default is none).
  • more = Add a more link on non-singular web pages (default is true).
  • pre = Wrap the content in a <pre></pre> container (default is false).
  • pre_class = Add a class to the ‘pre’ container (default is none).
  • pre_code = Wrap the content in a <pre><code></code></pre> container (default is false).
  • pre_lang = Escape HTML characters, wrap the content in a <pre><code></code></pre> container, and add a language class to the ‘pre’ container (default is none).
  • pre_title = Add a title to the ‘pre’ container (default is none).
  • url = URL or file URI.
  • utf8 = Encode HTML entities (default is true).

>

Note that all file paths (not URLs) are relative to the wp-content/ folder. For security reasons, it is not possible to include files outside the wp-content/ folder. html.

The.. folder name is also stripped from file paths to prevent backing out of the wp-content/ folder.

Shortcode Name

php file to add an additional custom shortcode name (the default shortcode names are ‘wp-file-get-contents’ and ‘wpfgc’).

define( 'WPFGC_SHORTCODE_NAME', 'include' );

Shortcode Examples

html"&#93;

com/counter/" cache="7200"&#93;

html"&#93;

txt" pre="true" filter="my_custom_filter_name" cache="600"&#93;

php" code_lang="php"&#93;

WordPress.org metadata

Plugin tags

Topics listed for this plugin in the WordPress.org directory.

  • file get contents
  • include
  • shortcode
  • url
Compatibility & maintenance

Compatibility & maintenance

Tested with WP 7.1

Marked as tested with the current WordPress 7.1 release.

Current WordPress releaseWordPress 7.1
WordPress.org Tested up to7.1
Minimum requirementsWordPress 6.0 · PHP 7.4.33
Update activity29 Oct 20263d ago

“Tested up to” is directory metadata supplied by the plugin author. WP PlugIndex does not turn an older declaration into a claim that the plugin is incompatible.

Changes recorded by WP PlugIndex

Recent tracked changes

WordPress compatibility7.1.37.1.4
WordPress compatibility7.1.27.1.3
WordPress compatibility7.1.17.1.2
WordPress compatibility7.17.1.1
Tracking & source

WP PlugIndex tracks public WordPress.org directory metadata and records selected version, compatibility and availability changes as they are detected.

Plugin watchlist

Watch this plugin

Sign in to your WP PlugIndex account or create a free account. Free accounts can watch up to 5 plugins and see what changed.

Watch limit

Watchlist limit reached

You have reached your current active watch limit.