{"id":116940,"date":"2020-02-04T22:23:44","date_gmt":"2020-02-04T22:23:44","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/free-canvas\/"},"modified":"2022-06-23T22:58:46","modified_gmt":"2022-06-23T22:58:46","slug":"free-canvas","status":"closed","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/free-canvas\/","author":12387480,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.10","stable_tag":"1.10","tested":"6.0.12","requires":"4.7","requires_php":"5.6","requires_plugins":"","header_name":"Free Canvas","header_author":"Katsushi Kawamori","header_description":"Provide a canvas. Various cooperation is possible by shortcode and filter.","assets_banners_color":"","last_updated":"2022-06-23 22:58:46","external_support_url":"","external_repository_url":"","donate_link":"https:\/\/shop.riverforest-wp.info\/donate\/","header_plugin_uri":"https:\/\/wordpress.org\/plugins\/free-canvas\/","header_author_uri":"https:\/\/riverforest-wp.info\/","rating":0,"author_block_rating":0,"active_installs":30,"downloads":3913,"num_ratings":0,"support_threads":1,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.00":{"tag":"1.00","author":"Katsushi Kawamori","date":"2020-02-04 22:23:58"},"1.01":{"tag":"1.01","author":"Katsushi Kawamori","date":"2020-02-04 22:29:19"},"1.02":{"tag":"1.02","author":"Katsushi Kawamori","date":"2020-02-04 23:25:47"},"1.03":{"tag":"1.03","author":"Katsushi Kawamori","date":"2020-02-09 06:57:29"},"1.04":{"tag":"1.04","author":"Katsushi Kawamori","date":"2020-02-11 16:27:11"},"1.05":{"tag":"1.05","author":"Katsushi Kawamori","date":"2020-03-12 22:58:27"},"1.06":{"tag":"1.06","author":"Katsushi Kawamori","date":"2020-04-07 04:46:15"},"1.07":{"tag":"1.07","author":"Katsushi Kawamori","date":"2020-08-06 13:01:24"},"1.08":{"tag":"1.08","author":"Katsushi Kawamori","date":"2020-08-12 12:02:09"},"1.09":{"tag":"1.09","author":"Katsushi Kawamori","date":"2020-12-07 12:14:52"},"1.10":{"tag":"1.10","author":"Katsushi Kawamori","date":"2022-06-23 22:58:46"}},"upgrade_notice":{"1.00":"<p>Initial release.<\/p>"},"ratings":[],"assets_icons":{"icon-256x256.png":{"filename":"icon-256x256.png","revision":2238700,"resolution":"256x256","location":"assets","locale":""}},"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.00","1.01","1.02","1.03","1.04","1.05","1.06","1.07","1.08","1.09","1.10"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":2238700,"resolution":"1","location":"assets","locale":""}},"screenshots":{"1":"Canvas"}},"plugin_section":[],"plugin_tags":[864,19591],"plugin_category":[],"plugin_contributors":[79586],"plugin_business_model":[],"class_list":["post-116940","plugin","type-plugin","status-closed","hentry","plugin_tags-canvas","plugin_tags-handwriting","plugin_contributors-katsushi-kawamori","plugin_committers-katsushi-kawamori"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/free-canvas.svg","icon_2x":false,"generated":true},"screenshots":[{"src":"https:\/\/ps.w.org\/free-canvas\/assets\/screenshot-1.png?rev=2238700","caption":"Canvas"}],"raw_content":"<!--section=description-->\n<h4>Integrates Canvas into WordPress.<\/h4>\n\n<ul>\n<li>Provide canvas shortcode.<\/li>\n<li>Provides a filter hook when saving the canvas.<\/li>\n<li>It supports both mouse and touch.<\/li>\n<li>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.<\/li>\n<\/ul>\n\n<h4>How to use the canvas<\/h4>\n\n<p>[youtube https:\/\/youtu.be\/_9XWJJbY6mQ]<\/p>\n\n<h4>Sample of how to use the filter hook<\/h4>\n\n<ul>\n<li>Shortcode for canvas display<\/li>\n<\/ul>\n\n<pre><code>echo do_shortcode( '[freecanvas height=500]' );\n<\/code><\/pre>\n\n<ul>\n<li>shortcode\nAttribute : Default : Description\nwidth : 700 : Canvas width\nheight : 700 : Canvas height\nname : The date and time string when the canvas was loaded : Unique name for this canvas\nform_name: null : The name of the form value you want to get\nform_name2: null : The name of the form value you want to get\nform_name3: null : The name of the form value you want to get<\/li>\n<li>Filter hook &amp; Function<\/li>\n<\/ul>\n\n<pre><code>\/**\n * Filter hook &amp; function for outputs a PNG image file *\/\n *\n * @param string $image_data  image_data.\n * @param string $name  name.\n * @param string $form_value  form_value.\n * @param string $form_value2  form_value2.\n * @param string $form_value3  form_value3.\n *\/\nfunction canvas_save( $image_data, $name, $form_value, $form_value2, $form_value3 ) {\n    $wp_uploads = wp_upload_dir();\n    $relation_path_true = strpos( $wp_uploads['baseurl'], '..\/' );\n    if ( $relation_path_true &gt; 0 ) {\n        $upload_dir = wp_normalize_path( realpath( $wp_uploads['basedir'] ) );\n    } else {\n        $upload_dir = wp_normalize_path( $wp_uploads['basedir'] );\n    }\n    $filename = $upload_dir . '\/' . $name . '.png';\n    $image = imagecreatefromstring( $image_data );\n    imagepng( $image, $filename );\n}\nadd_filter( 'free_canvas_save', 'canvas_save', 10, 5 );\n<\/code><\/pre>\n\n<ul>\n<li>Filter hook\nVariable : Description : From\n$image_data : PNG image data by Base64 : Value of Canvas\n$name : Unique name for this canvas : Value of Free Canvas\n$form_value : Form value obtained from form_name : Value of Form\n$form_value2 : Form value obtained from form_name2 : Value of Form\n$form_value3 : Form value obtained from form_name3 : Value of Form<\/li>\n<\/ul>\n\n<!--section=installation-->\n<ol>\n<li>Upload <code>free-canvas<\/code> directory to the <code>\/wp-content\/plugins\/<\/code> directory<\/li>\n<li>Activate the plugin through the 'Plugins' menu in WordPress<\/li>\n<\/ol>\n\n<!--section=faq-->\n<p>none<\/p>\n\n<!--section=changelog-->\n<h4>1.10<\/h4>\n\n<p>Modified admin screen.<\/p>\n\n<h4>1.09<\/h4>\n\n<p>Supported WordPress 5.6.<\/p>\n\n<h4>1.08<\/h4>\n\n<p>Fixed ajax.<\/p>\n\n<h4>1.07<\/h4>\n\n<p>Fixed sample code.<\/p>\n\n<h4>1.06<\/h4>\n\n<p>Add shortcode attributes of form name.<\/p>\n\n<h4>1.05<\/h4>\n\n<p>Modified documentation.<\/p>\n\n<h4>1.04<\/h4>\n\n<p>Add shortcode attributes of form name.<\/p>\n\n<h4>1.03<\/h4>\n\n<p>Suppress screen transition when clicking save button in form.<\/p>\n\n<h4>1.02<\/h4>\n\n<p>Corrected the description.<\/p>\n\n<h4>1.01<\/h4>\n\n<p>Change readme.txt.<\/p>\n\n<h4>1.00<\/h4>\n\n<p>Initial release.<\/p>","raw_excerpt":"Provide a canvas. Various cooperation is possible by shortcode and filter.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/116940","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=116940"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/katsushi-kawamori"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=116940"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=116940"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=116940"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=116940"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=116940"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=116940"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}