Created
January 10, 2014 15:36
-
-
Save q2amarket/8356498 to your computer and use it in GitHub Desktop.
Hide meta who hook will allows to hide question who meta from everywhere or for the template you specify. For more details read usage in cooment.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* hook: hide meta who from questions | |
* | |
* hook by: Q2A Market | |
* author: Jatin Soni | |
* url: http://www.q2amarket.com | |
* | |
* usage: | |
* Place below code into your theme or plugin layer | |
* if you want to hide from everywhere than just use | |
* | |
* function post_meta_who($post, $class){} | |
* | |
* if you want to display on particular template | |
* than load base method conditionally. In this case | |
* I have set for 'question' (question view page) | |
* | |
* Disclaimer: | |
* This program is distributed in the hope that | |
* it will be useful, but WITHOUT ANY WARRANTY; | |
* without even the implied warranty of MERCHANTABILITY | |
* or FITNESS FOR A PARTICULAR PURPOSE. | |
* | |
* See the GNU General Public License for more details. | |
*/ | |
function post_meta_who($post, $class) | |
{ | |
if($this->template == 'question') | |
qa_html_theme_base::post_meta_who($post, $class); | |
} | |
// end of the hook |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment