inc2734 / wp-oembed-blog-card
A library for WordPress oEmbed Blog Card.
Installs: 8 342
Dependents: 1
Suggesters: 0
Security: 0
Stars: 2
Watchers: 1
Forks: 0
Open Issues: 5
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-11-03 00:22:56 UTC
README
Install
$ composer require inc2734/wp-oembed-blog-card
How to use
<?php
new \Inc2734\WP_OEmbed_Blog_Card\Bootstrap();
Then just copy and paste the URL into the article!
- Data used for blog cards will be cached.
- The cache is updated when you open the post edit screen.
- On the display screen url is converted to blog card with ajax.
Filter hooks
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;
}
);