JSM file_get_contents() Shortcode
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’ co
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.