@@ 115-122 (lines=8) @@ | ||
112 | $output = ''; |
|
113 | ||
114 | switch( $target ) { |
|
115 | case 'view': |
|
116 | $getter = get_the_github_view_url(); |
|
117 | if(!empty( $text )) { |
|
118 | $linktext = $text; |
|
119 | } else { |
|
120 | $linktext = 'View this post on GitHub'; |
|
121 | } |
|
122 | break; |
|
123 | case 'edit': |
|
124 | $getter = get_the_github_edit_url(); |
|
125 | if( !empty( $text ) ) { |
|
@@ 123-130 (lines=8) @@ | ||
120 | $linktext = 'View this post on GitHub'; |
|
121 | } |
|
122 | break; |
|
123 | case 'edit': |
|
124 | $getter = get_the_github_edit_url(); |
|
125 | if( !empty( $text ) ) { |
|
126 | $linktext = $text; |
|
127 | } else { |
|
128 | $linktext = 'Edit this post on GitHub'; |
|
129 | } |
|
130 | break; |
|
131 | default: |
|
132 | $getter = get_the_github_view_url(); |
|
133 | $linktext = 'View this post on GitHub'; |