Personally, I think action/filter hooks are Teh Awesome. <a href="https://github.com/chipbennett/oenology/blob/master/functions/hooks.php">I also use them, quite extensively</a>.<div><br></div><div>But I'm not really sure what you're asking?</div>
<div><br></div><div>Are they acceptable? Of course; provided they are implemented properly, per the appropriate API conventions.</div><div><br></div><div>Are they best practice? In my personal opinion, they are; I prefer them to, e.g. pluggable functions. But at least currently, the Guidelines are silent on custom hooks.</div>
<div><br></div><div>(p.s. you should prefix your hooks with theme_slug, or at the very least, make sure your hook-name prefixes are consistent with the rest of the Theme - which, IIRC, is Chip Life, or "chip_life" as a prefix?)</div>
<div><br></div><div>Chip<br><br><div class="gmail_quote">On Tue, Jul 26, 2011 at 8:08 AM, Qamar Ashraf <span dir="ltr"><<a href="mailto:life.object@gmail.com">life.object@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hello,<div><br></div><div>I am going to share my WordPress Theme development logic for an expert opinion. So it will help me and others in the WP theme development, Here is a sample code of header template,</div><div><br>
</div>
<div><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204, 204, 204);border-left-style:solid;padding-left:1ex">
<?php do_action( 'chip_header_pre' ); ?><br> <div id="header"><br> <div id="header-data"><br> <?php do_action( 'chip_header' ); ?> <span style="white-space:pre-wrap">        </span> <br>
</div> <!-- end #header-data --><br> </div> <!-- end #header --><br><?php do_action( 'chip_header_post' ); ?></blockquote></div><div><br></div><div><br></div><div>- I have written different modules like, Primary Menu, Secondary Menu etc.</div>
<div>- So i can easily attach these modules to any hook with add_action(), depending on the requirement/presentation of a them/child theme. </div><div><br></div><div><b>Child Theme A Example</b></div><div><br></div><div>
add_action('chip_header_pre', 'chip_primary_menu_init');</div>
<div>add_action('chip_header_post', 'chip_secondary_menu_init');</div><div><br></div><div><div><b>Child Theme B Example</b></div><div><br></div><div><span>add_action('chip_header_pre', '</span>chip_secondary_menu_init<span>');</span></div>
<div>add_action('chip_header_post', 'chip_primary_menu_init');</div></div><div><br></div><div>Both of above child themes will have different presentation of menus, with just a single line of code, and there may any other combination as well.</div>
<div><br></div><div><b>So what is the recommendation of experts to have this logic ?</b></div><div><br>-- <br><font color="#666666">Regards</font><div><font color="#666666">Qamar Ashraf</font></div><div><font color="#666666"><a href="http://www.tutorialchip.com" target="_blank">www.tutorialchip.com</a></font></div>
<div><font color="#666666">@lifeobject1</font></div><br>
</div>
<br>_______________________________________________<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>
<br></blockquote></div><br></div>