Linux 软件免费装
Banner图

JSM file_get_contents() Shortcode

开发者 jsmoriss
更新时间 2024年11月21日 08:31
PHP版本: 7.4.33 及以上
版权: GPLv3
版权网址: 版权信息

标签

shortcode url file include file_get_contents

下载

2.3.0 2.4.0 2.5.0 2.6.0 2.7.0 2.7.1

详情介绍:

A safe and reliable WordPress shortcode for PHP's file_get_contents() function. Shortcode Attributes
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. As an example, the shortcode attributes url="file://dir/file.html" and file="/dir/file.html" are both read as wordpress/wp-contents/dir/file.html. The .. folder name is also stripped from file paths to prevent backing out of the wp-content/ folder.
Shortcode Name The WPFGC_SHORTCODE_NAME constant can be defined in your wp-config.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 [wpfgc url="http://example.com/dir/file.html"] [wpfgc url="http://example.com/counter/" cache="7200"] [wpfgc url="file://dir/file.html"] [wpfgc file="/dir/file.txt" pre="true" filter="my_custom_filter_name" cache="600"] [wpfgc file="examples/example-1.php" code_lang="php"]

升级注意事项:

2.7.1 (2023/12/20) Added sanitation for file path and URL values.

更新日志:

Version Numbering Version components: {major}.{minor}.{bugfix}[-{stage}.{level}] Repositories Changelog / Release Notes Version 2.7.1 (2023/12/20)