Skip to content

Instantly share code, notes, and snippets.

@q2amarket
Created September 18, 2015 05:01
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/66e59f39eaf34f6ee425 to your computer and use it in GitHub Desktop.
Save q2amarket/66e59f39eaf34f6ee425 to your computer and use it in GitHub Desktop.
Remove + sign from upvote
<?php
/**
* The hook allows to remove + sing from upvote count
*
* How to use it:
* Nothing complicated, just place 'output_split' method into your theme file or plugin layer and done.
*
* Important:
* Make sure your theme should not have this function already. If there is than add this code
* to that function and modify as needed
*
* @category Hook
* @since 1.7
* @author Q2A Market <dev@q2amarket.com>
* @link http://www.q2amarket.com Q2A Market
*/
public function output_split($parts, $class, $outertag='span', $innertag='span', $extraclass=null)
{
$parts['data'] = str_replace('+', '', $parts['data']);
parent::output_split($parts, $class, $outertag='span', $innertag='span', $extraclass=null);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment