<div dir="ltr">I still see what&#39;s being done here as the creation of an entirely separate abstraction layer from the Template Hierarchy.<div><br></div><div style>The canvas() function basically re-invents the wheel already found in wp-includes/template-loader.php. The canvas_{context}.php files re-invent the wheels already found in wp-includes/template.php.</div>
<div style><br></div><div style>Instead of going that route, just add the following template files to the Theme:</div><div style><br></div><div style>home.php</div><div style>single.php</div><div style>archive.php</div><div style>
search.php</div><div style>404.php</div><div style>page.php</div><div style>index.php</div><div style><br></div><div style>Then, inside of each of those files, call the appropriate code inside your canvas_{context}.php files.</div>
<div style><br></div><div style>e.g. home.php would look like:</div><div style><br></div><div style>/**</div><div style> * Blog posts index template</div><div style> */</div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px">
<div style><pre style="color:rgb(0,0,0);word-wrap:break-word;white-space:pre-wrap">canvas_header(); </pre></div><div style><pre style="color:rgb(0,0,0);word-wrap:break-word;white-space:pre-wrap">do_action(&#39;canvas_nine&#39;);</pre>
</div><div style><pre style="color:rgb(0,0,0);word-wrap:break-word;white-space:pre-wrap">do_action(&#39;canvas_masthead&#39;); </pre></div><div style><pre style="color:rgb(0,0,0);word-wrap:break-word;white-space:pre-wrap">
do_action(&#39;canvas_site_title&#39;);</pre></div><div style><pre style="color:rgb(0,0,0);word-wrap:break-word;white-space:pre-wrap">do_action(&#39;canvas_description&#39;); </pre></div><div style><pre style="color:rgb(0,0,0);word-wrap:break-word;white-space:pre-wrap">
do_action(&#39;canvas_headerimage&#39;); </pre></div><div style><pre style="color:rgb(0,0,0);word-wrap:break-word;white-space:pre-wrap">do_action(&#39;canvas_header_close&#39;); </pre></div><div style><pre style="color:rgb(0,0,0);word-wrap:break-word;white-space:pre-wrap">
if ( have_posts() ) : while ( have_posts() ) : the_post();</pre></div><div style><pre style="color:rgb(0,0,0);word-wrap:break-word;white-space:pre-wrap"><span style="font-family:arial">        </span>do_action(&#39;canvas_article_postclass&#39;);</pre>
</div><div style><pre style="color:rgb(0,0,0);word-wrap:break-word;white-space:pre-wrap"><span style="font-family:arial">        </span>the_post_thumbnail();                          </pre></div><div style><pre style="color:rgb(0,0,0);word-wrap:break-word;white-space:pre-wrap">
<span style="font-family:arial">        </span>do_action(&#39;canvas_permalink&#39;); </pre></div><div style><pre style="color:rgb(0,0,0);word-wrap:break-word;white-space:pre-wrap"><span style="font-family:arial">        </span>the_content( __( &#39;&lt;span class=&quot;clear&quot;&gt;Continue reading &amp;rarr;&lt;/span&gt;&#39;, &#39;canvas&#39; ) );        </pre>
</div><div style><pre style="color:rgb(0,0,0);word-wrap:break-word;white-space:pre-wrap"><span style="font-family:arial">        </span>canvas_info();                                                                        </pre></div><div style><pre style="color:rgb(0,0,0);word-wrap:break-word;white-space:pre-wrap">
<span style="font-family:arial">        </span>do_action(&#39;canvas_close_articletag&#39;);</pre></div><div style><pre style="color:rgb(0,0,0);word-wrap:break-word;white-space:pre-wrap"><span style="font-family:arial">        </span>do_action(&#39;canvas_clearfix&#39;);</pre>
</div><div style><pre style="color:rgb(0,0,0);word-wrap:break-word;white-space:pre-wrap"><span style="font-family:arial">        </span>endwhile; </pre></div><div style><pre style="color:rgb(0,0,0);word-wrap:break-word;white-space:pre-wrap">
else:</pre></div><div style><pre style="color:rgb(0,0,0);word-wrap:break-word;white-space:pre-wrap"><span style="font-family:arial">        </span>canvas_post_notfound();        </pre></div><div style><pre style="color:rgb(0,0,0);word-wrap:break-word;white-space:pre-wrap">
endif;</pre></div><div style><pre style="color:rgb(0,0,0);word-wrap:break-word;white-space:pre-wrap">canvas_content_navi();</pre></div><div style><pre style="color:rgb(0,0,0);word-wrap:break-word;white-space:pre-wrap">do_action(&#39;canvas_closediv&#39;); </pre>
</div><div style><pre style="color:rgb(0,0,0);word-wrap:break-word;white-space:pre-wrap">do_action(&#39;canvas_thre&#39;); </pre></div><div style><pre style="color:rgb(0,0,0);word-wrap:break-word;white-space:pre-wrap">do_action(&#39;canvas_asidebar&#39;); </pre>
</div><div style><pre style="color:rgb(0,0,0);word-wrap:break-word;white-space:pre-wrap">do_action(&#39;canvas_closediv&#39;);</pre></div><div style><pre style="color:rgb(0,0,0);word-wrap:break-word;white-space:pre-wrap">
do_action(&#39;canvas_closediv&#39;);</pre></div><div style><pre style="color:rgb(0,0,0);word-wrap:break-word;white-space:pre-wrap">do_action(&#39;canvas_footer_sidebar&#39;);</pre></div><div style><pre style="color:rgb(0,0,0);word-wrap:break-word;white-space:pre-wrap">
canvas_footer(); </pre></div></blockquote><div style><br></div><div style>Along the same lines, take the code from canvas_header(), put it into header.php, and include it via get_header(). Do likewise with canvas_footer(). Include the main sidebar via get_sidebar().</div>
<div style><br></div><div style>I think, at that point, you&#39;d have everything back within the core-defined abstraction layer (i.e. the template hierarchy), and you&#39;d be using template files and including template parts as specified in the Guidelines.</div>
<div style><br></div><div style>(Suggestion, though: many of those blocks of do_action() calls are repeated, and it might be a good idea to put them into template-part files of their own, called via get_template_part().)</div>
<div style><br></div><div style>Regards,</div><div style><br></div><div style>Chip</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Feb 26, 2013 at 1:46 AM, hal-android <span dir="ltr">&lt;<a href="mailto:hasilent00@gmail.com" target="_blank">hasilent00@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Thanks otto,<br>
Maybe I can only suggest to avoid confusion wordpress themes<br>
development at this point:<br>
<br>
<a href="http://codex.wordpress.org/Theme_Review#Theme_Template_Files" target="_blank">http://codex.wordpress.org/Theme_Review#Theme_Template_Files</a><br>
<br>
In this theme I was just trying to introduce something different, or<br>
maybe this is normal. I understand this theme is difficult but the<br>
user needs to know the different themes, here the user to learn about<br>
and how.<br>
<br>
I am aware of is the number one user must be given a strict assertion<br>
that we should not confuse to make a wordpress theme I was just trying<br>
to follow what is given here:<br>
<br>
<a href="http://codex.wordpress.org/Theme_Review#Theme_Template_Files" target="_blank">http://codex.wordpress.org/Theme_Review#Theme_Template_Files</a><br>
<div class="HOEnZb"><div class="h5">_______________________________________________<br>
theme-reviewers mailing list<br>
<a href="mailto:theme-reviewers@lists.wordpress.org">theme-reviewers@lists.wordpress.org</a><br>
<a href="http://lists.wordpress.org/mailman/listinfo/theme-reviewers" target="_blank">http://lists.wordpress.org/mailman/listinfo/theme-reviewers</a><br>
</div></div></blockquote></div><br></div>