Hello Bruce
Contributors: bastho, florianlecocq, leroysabrina, agencenous
Tags: png, image, generator, social media
Requires at least: 5.3
Requires PHP: 7.4
Tested up to: 5.9
Stable tag: 1.3
License: GPLv2
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Generate your social media images from your posts
Description
This plugin will allow you to generate quickly social media images from your posts, without having to master any photo editing tools.
Installation
- Upload into the
/wp-content/plugins/ directory
- Activate the plugin through the ‘Plugins’ menu in WordPress admin
- You can start generating in Tools > Banner Generator
Screenshots
- Generator page
- Generated PNG with changes
Frequently asked questions
- Can I generate PNG with my own service ?
Of course, If your service takes HTML as its input. You can use the filter "brucebanner_service_generator" and return the URL of your serveice.
- Can I list Custom Type Posts in the select ?
Yes, you can user this filter "brucebanner_posts_args" to change the arguments of the query that retrieves the posts.
Example :
add_filter('brucebanner_posts_args', 'mytheme_brucebanner_all_posts_args');
function brucebanner_all_posts_args($initial_args){
// ask for all the posts on the site
return array_merge($initial_args, [
'post_type' => 'any',
]);
}
- Can I list the colors of my theme by default in the palettes ?
Yes, you can add to or replace the palettes with the hooks brucebanner_default_bg_colors and brucebanner_default_text_colors
For the background :
add_action( 'brucebanner_default_bg_colors', 'mytheme_brucebanner_default_bg_colors' );
function mytheme_brucebanner_default_bg_colors() {
return [
'#6d1e84',
'#54366f',
'#e40043',
'#92BFC5',
'#000000',
'#ffffff',
];
}
For the text :
add_action( 'brucebanner_default_text_colors', 'mytheme_brucebanner_default_text_colors' );
function mytheme_brucebanner_default_text_colors() {
return [
'#6d1e84',
'#54366f',
'#e40043',
'#92BFC5',
'#000000',
'#ffffff',
];
}
- Can I change the style applied on the banner ?
Yes, you can override the CSS, by adding some CSS with this hook :
add_action('brucebanner_banner_head', 'mytheme_brucebanner_add_generated_styles', 11,1);
function mytheme_brucebanner_add_generated_styles($sanitized_get){
echo '<style>
/* your style here */
</style>';
}
You can also remove the style given with this plugin by doing this :
remove_action('brucebanner_banner_head', 'brucebanner_add_generated_styles', 10, 1);