Changeset 2830826
- Timestamp:
- 12/08/2022 10:03:08 PM (3 years ago)
- Location:
- jinx-fast-cache/trunk
- Files:
-
- 4 edited
-
index.php (modified) (1 diff)
-
readme.txt (modified) (5 diffs)
-
src/Admin.php (modified) (1 diff)
-
src/Front.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
jinx-fast-cache/trunk/index.php
r2726594 r2830826 5 5 * Plugin URI: https://wordpress.org/plugins/jixn-fast-cache/ 6 6 * Description: Blazing fast full page cache. 7 * Version: 0. 3.87 * Version: 0.4.1 8 8 * Author: SquareFlower Websolutions (Lukas Rydygel) <hallo@squareflower.de> 9 9 * Author URI: http://squareflower.de -
jinx-fast-cache/trunk/readme.txt
r2726150 r2830826 3 3 Tags: cache, fullpage, pagecache, filecache, rewrite, htaccess 4 4 Requires at least: 5.0 5 Tested up to: 5.9.35 Tested up to: 6.0 6 6 Requires PHP: 7.0 7 7 Stable tag: 0.3.6 … … 14 14 15 15 Jinx Fast-Cache provides a very simple but efficient way of full page caching to WordPress. 16 It will generate static HTML files which will be called using your apaches rewrite rules.16 It will generate static HTML files which will be called using your servers rewrite rules. 17 17 This feature will bypass the whole PHP process and render only a simple HTML file without the whole overhead. 18 18 … … 51 51 The warm process will create a queue which will be handled in a scheduled task (cron). When warming up a single post, it will skip the queue. 52 52 53 The plugin will automatically flush and warm the cache after an update has been completed. 54 53 55 == Developers == 54 56 … … 77 79 Inject a template: 78 80 79 do_action('jinx_fast_cache_inject_template', null,'user');81 do_action('jinx_fast_cache_inject_template', 'user'); 80 82 81 83 This has the same result as: 82 84 83 do_action('jinx_fast_cache_inject', null,'get_template_part', ['user']);85 do_action('jinx_fast_cache_inject', 'get_template_part', ['user']); 84 86 85 87 You may call every public function of PHP, your theme or plugin: 86 88 87 do_action('jinx_fast_cache_inject', null, 'date', ['Y']); 88 do_action('jinx_fast_cache_inject', null, 'my_function', ['param1', 'param2']); 89 do_action('jinx_fast_cache_inject', null, 'namespace\MyClass::myMethod', ['param1', 'param2']); 90 do_action('jinx_fast_cache_inject', null, ['namespace\MyClass', 'myMethod'], ['param1', 'param2']); 89 do_action('jinx_fast_cache_inject', 'date', ['Y']); 90 do_action('jinx_fast_cache_inject', 'my_function', ['param1', 'param2']); 91 do_action('jinx_fast_cache_inject', 'namespace\MyClass::myMethod', ['param1', 'param2']); 92 do_action('jinx_fast_cache_inject', ['namespace\MyClass', 'myMethod'], ['param1', 'param2']); 93 94 Inside the editor, you may also use shortcodes to inject content. 95 96 [jinx_fast_cache_inject]My dynamic content or other shortcodes can be used here[/jinx_fast_cache_inject] 91 97 92 98 == Roadmap == … … 100 106 - [ ] Provide exclude option for posts and terms in backend 101 107 - [x] Add multisite support 108 - [x] Flush and warm after update complete 102 109 - [ ] Provide cache timeout 103 110 - [ ] Provide admin panel to change options 111 - [x] Add shortcode for injects -
jinx-fast-cache/trunk/src/Admin.php
r2726594 r2830826 21 21 add_action('admin_enqueue_scripts', function() { 22 22 wp_enqueue_style('jinx-fast-cache', plugin_dir_url(__FILE__).'../assets/css/admin.css'); 23 }); 24 25 add_action('upgrader_process_complete', function($object, $options) { 26 self::actionRefresh(); 23 27 }); 24 28 -
jinx-fast-cache/trunk/src/Front.php
r2726150 r2830826 40 40 }); 41 41 42 add_action('jinx_fast_cache_inject', function($ placeholder, $function, array $args = []) {42 add_action('jinx_fast_cache_inject', function($function, array $args = [], $placeholder = null) { 43 43 echo self::inject($function, $args, $placeholder); 44 44 }, 10, 3); 45 45 46 add_action('jinx_fast_cache_inject_template', function( $placeholder, string $template) {46 add_action('jinx_fast_cache_inject_template', function(string $template, $placeholder = null) { 47 47 echo self::inject('get_template_part', [$template], $placeholder); 48 48 }, 10, 2); … … 50 50 add_filter('jinx_fast_cache_output', function($html) { 51 51 return apply_filters('jinx_fast_cache_minify', true) ? Helper::minify($html) : $html; 52 }); 53 54 add_shortcode('jinx_fast_cache_inject', function($attr, $content) { 55 return self::inject('do_shortcode', [$content]); 52 56 }); 53 57
Note: See TracChangeset
for help on using the changeset viewer.