Skip to content

Commit

Permalink
[+]: prepend private methods with "__ v2
Browse files Browse the repository at this point in the history
  • Loading branch information
Lars Moelleken committed Jan 28, 2015
1 parent 2df00b9 commit 08925d2
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/voku/helper/Hooks.php
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ public function apply_filters($tag, $value)
if (isset($this->filters['all'])) {
$this->current_filter[] = $tag;
$args = func_get_args();
$this->_call_all_hook($args);
$this->__call_all_hook($args);
}

if (!isset($this->filters[$tag])) {
Expand Down Expand Up @@ -380,7 +380,7 @@ public function apply_filters_ref_array($tag, $args)
if (isset($this->filters['all'])) {
$this->current_filter[] = $tag;
$all_args = func_get_args();
$this->_call_all_hook($all_args);
$this->__call_all_hook($all_args);
}

if (!isset($this->filters[$tag])) {
Expand Down Expand Up @@ -537,7 +537,7 @@ public function do_action($tag, $arg = '')
if (isset($this->filters['all'])) {
$this->current_filter[] = $tag;
$all_args = func_get_args();
$this->_call_all_hook($all_args);
$this->__call_all_hook($all_args);
}

if (!isset($this->filters[$tag])) {
Expand Down Expand Up @@ -619,7 +619,7 @@ public function do_action_ref_array($tag, $args)
if (isset($this->filters['all'])) {
$this->current_filter[] = $tag;
$all_args = func_get_args();
$this->_call_all_hook($all_args);
$this->__call_all_hook($all_args);
}

if (!isset($this->filters[$tag])) {
Expand Down Expand Up @@ -771,7 +771,7 @@ private function __filter_build_unique_id($tag, $function, $priority)
* @access public
* @since 1.0.0
*/
public function _call_all_hook($args)
public function __call_all_hook($args)
{
reset($this->filters['all']);

Expand Down Expand Up @@ -942,7 +942,7 @@ public function do_shortcode($content)
return preg_replace_callback(
"/$pattern/s", array(
$this,
'do_shortcode_tag'
'__do_shortcode_tag'
), $content
);
}
Expand Down Expand Up @@ -971,7 +971,7 @@ public function get_shortcode_regex()
$tagnames = array_keys(self::$shortcode_tags);
$tagregexp = join('|', array_map('preg_quote', $tagnames));

// WARNING! Do not change this regex without changing do_shortcode_tag() and strip_shortcode_tag()
// WARNING! Do not change this regex without changing __do_shortcode_tag() and __strip_shortcode_tag()
// Also, see shortcode_unautop() and shortcode.js.
return
'\\[' // Opening bracket
Expand Down Expand Up @@ -1016,7 +1016,7 @@ public function get_shortcode_regex()
*
* @return mixed False on failure.
*/
private function do_shortcode_tag($m)
private function __do_shortcode_tag($m)
{
// allow [[foo]] syntax for escaping a tag
if ($m[1] == '[' && $m[6] == ']') {
Expand Down Expand Up @@ -1148,7 +1148,7 @@ public function strip_shortcodes($content)
return preg_replace_callback(
"/$pattern/s", array(
$this,
'strip_shortcode_tag'
'__strip_shortcode_tag'
), $content
);
}
Expand All @@ -1162,7 +1162,7 @@ public function strip_shortcodes($content)
*
* @return string
*/
private function strip_shortcode_tag($m)
private function __strip_shortcode_tag($m)
{
// allow [[foo]] syntax for escaping a tag
if ($m[1] == '[' && $m[6] == ']') {
Expand Down

0 comments on commit 08925d2

Please sign in to comment.