diff --git a/linuxfoo-gitlab.php b/linuxfoo-gitlab.php index 03cf0b0..44e0a02 100644 --- a/linuxfoo-gitlab.php +++ b/linuxfoo-gitlab.php @@ -28,6 +28,14 @@ class LinuxfooGitlab { ''; } + static function project_header($atts, $project) { + return + ''. + __('Gitlab project', 'linuxfoo-gitlab').' '. + ''.$project->name.''. + ''; + } + static function format_since($since) { preg_match('/^([0-9]+)\s+(.*)$/', $since, $m); $num = $m[1]; @@ -243,12 +251,7 @@ class LinuxfooGitlab { $out .= self::error('Project information not readable.'); } else { - $out .= - ''. - __('Gitlab project', 'linuxfoo-gitlab').' '. - ''.$project->name.''. - ''; - + $out .= self::project_header($atts, $project); $out .= self::commits_list($atts, $project_url); $out .= self::releases_list($atts, $project_url); }