Canvas Blocks
Jun 4th, 2006 by Brian A. Thomas
EDIT: The issue below will be fixed in Canvas.
Just a quick little thing I learned while making some blocks for Canvas today.
When putting in the description, if you use an apostrophe, you will need to escape it. That is, you will need to put a backslash in front of it.
For example, I made a block so I could use the Now Reading plugin without having to edit the sidebar.php file.:
-
<?php
-
-
/*
-
Block Name: Now Reading
-
Version: 1.0
-
Block URI: http://robm.me.uk/projects/plugins/wordpress/now-reading/
-
Author: Rob Miller
-
Description: Uses Rob Miller's Now Reading Plugin
-
Group: Wordpres
-
*/
-
-
?>
-
<div class="Now_Reading">
-
<h3>Now Reading</h3>
-
<?php nr_display(); ?>
-
</div>
Notice line 8 has the backslash apostrophe (') so the block will load and be available.
Thanks to Yas over at the Canvas forums for letting me know the apostrophe was the likely problem when the blocks wouldn't load (in this thread).






