inc2734 / wp-oembed-blog-card
WordPress oEmbed Blog Card 的库。
13.0.10
2024-09-02 23:41 UTC
Requires
- php: >=7.4
Requires (Dev)
- dev-master
- 13.0.10
- 13.0.9
- 13.0.8
- 13.0.7
- 13.0.6
- 13.0.5
- 13.0.4
- 13.0.3
- 13.0.2
- 13.0.1
- 13.0.0
- 12.0.4
- 12.0.3
- 12.0.2
- 12.0.1
- 12.0.0
- 11.1.1
- 11.1.0
- 11.0.1
- 11.0.0
- 10.0.0
- 9.1.1
- 9.1.0
- 9.0.7
- 9.0.6
- 9.0.5
- 9.0.4
- 9.0.3
- 9.0.2
- 8.0.14
- 8.0.13
- 8.0.12
- 8.0.11
- 8.0.10
- 8.0.9
- 8.0.8
- 8.0.7
- 8.0.6
- 8.0.5
- 8.0.2
- 8.0.1
- 8.0.0
- 7.0.0
- 6.0.1
- 6.0.0
- 5.1.3
- 5.1.2
- 5.1.1
- 5.1.0
- 5.0.3
- 5.0.2
- 5.0.1
- 4.0.4
- 4.0.3
- 4.0.2
- 4.0.1
- 4.0.0
- 3.0.2
- 3.0.1
- 3.0.0
- 2.1.0
- 2.0.1
- 2.0.0
- 1.0.4
- 1.0.3
- 1.0.2
- 1.0.1
- 1.0.0
- 0.2.4
- 0.2.3
- 0.2.2
- 0.2.1
- 0.2.0
- 0.1.0
- dev-dependabot/npm_and_yarn/webpack-5.76.1
- dev-dependabot/npm_and_yarn/sideway/formula-3.0.1
- dev-dependabot/npm_and_yarn/http-cache-semantics-4.1.1
- dev-dependabot/npm_and_yarn/simple-git-3.16.0
- dev-dependabot/npm_and_yarn/json5-1.0.2
This package is auto-updated.
Last update: 2024-09-02 23:46:22 UTC
README
安装
$ composer require inc2734/wp-oembed-blog-card
如何使用
<?php
new \Inc2734\WP_OEmbed_Blog_Card\Bootstrap();
然后只需将URL复制并粘贴到文章中即可!
- 用于博客卡的将数据缓存。
- 在打开帖子编辑屏幕时更新缓存。
- 在显示屏幕上,URL将通过ajax转换为博客卡。
过滤钩子
inc2734_wp_oembed_blog_card_block_editor_template
/**
* Customize template for block editor
*
* @param string $template
* @param string $url
* @return string
*/
add_filter(
'inc2734_wp_oembed_blog_card_block_editor_template',
function( $template, $url ) {
return $template;
},
10,
2
);
inc2734_wp_oembed_blog_card_loading_template
/**
* Customize template for loading
*
* @param string $template
* @param string $url
* @return string
*/
add_filter(
'inc2734_wp_oembed_blog_card_loading_template',
function( $template, $url ) {
return $template;
},
10,
2
);
inc2734_wp_oembed_blog_card_url_template
/**
* Customize url template
*
* @param string $template
* @param string $url
* @return string
*/
add_filter(
'inc2734_wp_oembed_blog_card_url_template',
function( $template, $url ) {
return $template;
},
10,
2
);
inc2734_wp_oembed_blog_card_blog_card_template
/**
* Customize blog card template
*
* @param string $template
* @param array $cache
* @return string
*/
add_filter(
'inc2734_wp_oembed_blog_card_blog_card_template',
function( $template, $cache ) {
return $template;
},
10,
2
);
inc2734_wp_oembed_blog_card_cache_directory
/**
* Customize cache directory
*
* @param string $directory
* @return string
*/
add_filter(
'inc2734_wp_oembed_blog_card_cache_directory',
function( $directory ) {
return $directory;
}
);
inc2734_wp_oembed_blog_card_cache_object
/**
* Change cache system.
*
* @param string $cache_object_class_name
* @return string
*/
add_filter(
'inc2734_wp_oembed_blog_card_cache_object',
function( $cache_object_class_name ) {
return $cache_object_class_name;
}
);