Skip to content

Commit

Permalink
Merge branch 'refactoring' of https://github.com/EzioBallarin/game-on
Browse files Browse the repository at this point in the history
…into TheMacLab/master

Conflicts:
	types/tasks/task_shortcode.php
  • Loading branch information
eballarin committed May 10, 2015
2 parents 6030cab + e2c11a5 commit f760448
Show file tree
Hide file tree
Showing 54 changed files with 7,060 additions and 7,706 deletions.
314 changes: 158 additions & 156 deletions game-on.php

Large diffs are not rendered by default.

333 changes: 188 additions & 145 deletions go_admin_bar.php

Large diffs are not rendered by default.

318 changes: 160 additions & 158 deletions go_clipboard.php

Large diffs are not rendered by default.

41 changes: 21 additions & 20 deletions go_comments.php
Original file line number Diff line number Diff line change
@@ -1,59 +1,60 @@
<?php

function go_display_comment_author() {
function go_display_comment_author () {
global $comment;
$author_id = $comment->user_id;
$author = $comment->comment_author;
$author_obj = get_userdata($author_id);
$author_obj = get_userdata( $author_id );
$author_roles = $author_obj->roles;
$is_admin = false;
if (is_array($author_roles)) {
foreach ($author_roles as $role) {
if ($role == "administrator") {
if ( is_array( $author_roles ) ) {
foreach ( $author_roles as $role ) {
if ( $role == "administrator" ) {
$is_admin = true;
break;
}
}
} else {
if ($author_roles == "administrator") {
if ( $author_roles == 'administrator' ) {
$is_admin = true;
}
}
if ($is_admin) {
if ( $is_admin ) {
return $author;
} else {
$points = get_user_meta($author_id, 'go_rank', true);
$focus = get_user_meta($author_id, 'go_focus', true);
if (!empty($focus)) {
if (is_array($focus)) {
for ($i = 0; $i < count($focus); $i++) {
if (!empty($focus[$i])) {
$careers .= $focus[$i];
if (($i + 1) < count($focus)) {
$points = get_user_meta( $author_id, 'go_rank', true );
$focus = get_user_meta( $author_id, 'go_focus', true );
if ( !empty( $focus ) ) {
if ( is_array( $focus ) ) {
for ( $i = 0; $i < count( $focus ); $i++ ) {
if ( !empty( $focus[ $i ] ) ) {
$careers .= $focus[ $i ];
if ( ( $i + 1 ) < count( $focus ) ) {
$careers .= '/';
}
}
}
} else {
$no_focus_str = 'No '.get_option('go_focus_name', 'Profession');
if ($focus != $no_focus_str) {
$no_focus_str = 'No '.get_option( 'go_focus_name', 'Profession' );
if ( $focus != $no_focus_str ) {
$careers = $focus;
}
}
}
if (!empty($careers)) {
if (!empty($points)) {
if ( !empty( $careers ) ) {
if ( !empty( $points ) ) {
return $author.'<br/>'.'('.$careers.', '.$points[0][0].')';
} else {
return $author;
}
} else {
if (!empty($points)) {
if ( !empty( $points ) ) {
return $author.'<br/>'.'('.$points[0][0].')';
} else {
return $author;
}
}
}
}

?>
Loading

0 comments on commit f760448

Please sign in to comment.