Skip to content

Instantly share code, notes, and snippets.

@q2amarket
Created January 10, 2014 15:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save q2amarket/8356498 to your computer and use it in GitHub Desktop.
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.
<?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