Skip to content

Commit

Permalink
allow any function to be filtered in for comments too
Browse files Browse the repository at this point in the history
  • Loading branch information
alexkingorg committed Jan 7, 2010
1 parent 1f557ef commit 0a89a94
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.txt
Expand Up @@ -3,7 +3,7 @@
## 3.0

- Support for child themes (including adding templates in child themes that do not exist in the parent theme)
- Allow custom functions to be filtered into the Single template selection process (already supported in General context selection)
- Allow custom functions to be filtered into the Single and Comment template selection process (already supported in General context selection)
- make the posts_per_page setting work as intended (only on initial query)
- Added changelog

Expand Down
18 changes: 10 additions & 8 deletions utility.php
Expand Up @@ -477,16 +477,18 @@ function cfct_choose_content_template($type = 'content') {

function cfct_choose_comment_template() {
$exec_order = array(
'ping'
, 'author'
, 'user'
, 'role'
, 'default'
'ping',
'author',
'user',
'role',
'default',
);
$new_exec_order = apply_filters('cfct_comment_match_order', $exec_order);
$exec_order = apply_filters('cfct_comment_match_order', $exec_order);
$files = cfct_files(CFCT_PATH.'comment');
foreach ($new_exec_order as $func) {
$func_name = 'cfct_choose_comment_template_'.$func;
foreach ($exec_order as $func_name) {
if (!function_exists($func_name)) {
$func_name = 'cfct_choose_comment_template_'.$func_name;
}
if (function_exists($func_name)) {
$filename = $func_name($files);
if ($filename != false) {
Expand Down

0 comments on commit 0a89a94

Please sign in to comment.