Free Canvas
Provide a canvas. Various cooperation is possible by shortcode and filter.
Maintenance 10/1001287d since update
Active installs
50
Downloads
1,938
Reviews
0
Age
5.9y
Tagscanvashandwriting
Plugin info
Total downloads: 1,938
Active installs: 50
Total reviews: 0
Average rating: 0
Support threads opened: 1
Support threads resolved: 0 (0%)
Available in: 2 language(s)
Contributors: 1
Last updated: 6/23/2022 (1287 days ago)
Added to WordPress: 2/4/2020 (5 years old)
Minimum WordPress version: 4.7
Tested up to WordPress version: 6.0.5
Minimum PHP version: 5.6
Maintenance & Compatibility
Maintenance score
Possibly abandoned • Last updated 1287 days ago • Support resolved 0%
10/100
Is Free Canvas abandoned?
Possibly abandoned (last update 1287 days ago).
Compatibility
Requires WordPress: 4.7
Tested up to: 6.0.5
Requires PHP: 5.6
Similar & Alternatives
Explore plugins with similar tags, and compare key metrics like downloads, ratings, updates, support, and WP/PHP compatibility.
Whiteboard4Animations Free
Rating 0.0/5 (0 reviews) • Active installs 0
Description
Integrates Canvas into WordPress.
- Provide canvas shortcode.
- Provides a filter hook when saving the canvas.
- It supports both mouse and touch.
- It supports both the management screen and the public screen. The appearance of buttons and select boxes on the public screen depends on the CSS of the theme.
How to use the canvas
Sample of how to use the filter hook
- Shortcode for canvas display
echo do_shortcode( '[freecanvas height=500]' );
- shortcode
Attribute : Default : Description
width : 700 : Canvas width
height : 700 : Canvas height
name : The date and time string when the canvas was loaded : Unique name for this canvas
form_name: null : The name of the form value you want to get
form_name2: null : The name of the form value you want to get
form_name3: null : The name of the form value you want to get - Filter hook & Function
/**
* Filter hook & function for outputs a PNG image file */
*
* @param string $image_data image_data.
* @param string $name name.
* @param string $form_value form_value.
* @param string $form_value2 form_value2.
* @param string $form_value3 form_value3.
*/
function canvas_save( $image_data, $name, $form_value, $form_value2, $form_value3 ) {
$wp_uploads = wp_upload_dir();
$relation_path_true = strpos( $wp_uploads['baseurl'], '../' );
if ( $relation_path_true > 0 ) {
$upload_dir = wp_normalize_path( realpath( $wp_uploads['basedir'] ) );
} else {
$upload_dir = wp_normalize_path( $wp_uploads['basedir'] );
}
$filename = $upload_dir . '/' . $name . '.png';
$image = imagecreatefromstring( $image_data );
imagepng( $image, $filename );
}
add_filter( 'free_canvas_save', 'canvas_save', 10, 5 );
- Filter hook
Variable : Description : From
$image_data : PNG image data by Base64 : Value of Canvas
$name : Unique name for this canvas : Value of Free Canvas
$form_value : Form value obtained from form_name : Value of Form
$form_value2 : Form value obtained from form_name2 : Value of Form
$form_value3 : Form value obtained from form_name3 : Value of Form
Installation
- Upload
free-canvasdirectory to the/wp-content/plugins/directory - Activate the plugin through the ‘Plugins’ menu in WordPress
Frequently Asked Questions
none
Review feed
No reviews available
Changelog
1.10
Modified admin screen.
1.09
Supported WordPress 5.6.
1.08
Fixed ajax.
1.07
Fixed sample code.
1.06
Add shortcode attributes of form name.
1.05
Modified documentation.
1.04
Add shortcode attributes of form name.
1.03
Suppress screen transition when clicking save button in form.
1.02
Corrected the description.
1.01
Change readme.txt.
1.00
Initial release.
