Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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.
<?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