| 1 |
<?php |
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 9 |
|
|---|
| 10 |
|
|---|
| 11 |
|
|---|
| 12 |
|
|---|
| 13 |
|
|---|
| 14 |
|
|---|
| 15 |
|
|---|
| 16 |
|
|---|
| 17 |
|
|---|
| 18 |
|
|---|
| 19 |
|
|---|
| 20 |
function get_category_children( $id, $before = '/', $after = '', $visited = array() ) { |
|---|
| 21 |
if ( 0 == $id ) |
|---|
| 22 |
return ''; |
|---|
| 23 |
|
|---|
| 24 |
$chain = ''; |
|---|
| 25 |
|
|---|
| 26 |
$cat_ids = get_all_category_ids(); |
|---|
| 27 |
foreach ( (array) $cat_ids as $cat_id ) { |
|---|
| 28 |
if ( $cat_id == $id ) |
|---|
| 29 |
continue; |
|---|
| 30 |
|
|---|
| 31 |
$category = get_category( $cat_id ); |
|---|
| 32 |
if ( is_wp_error( $category ) ) |
|---|
| 33 |
return $category; |
|---|
| 34 |
if ( $category->parent == $id && !in_array( $category->term_id, $visited ) ) { |
|---|
| 35 |
$visited[] = $category->term_id; |
|---|
| 36 |
$chain .= $before.$category->term_id.$after; |
|---|
| 37 |
$chain .= get_category_children( $category->term_id, $before, $after ); |
|---|
| 38 |
} |
|---|
| 39 |
} |
|---|
| 40 |
return $chain; |
|---|
| 41 |
} |
|---|
| 42 |
|
|---|
| 43 |
|
|---|
| 44 |
|
|---|
| 45 |
|
|---|
| 46 |
|
|---|
| 47 |
|
|---|
| 48 |
|
|---|
| 49 |
|
|---|
| 50 |
|
|---|
| 51 |
|
|---|
| 52 |
function get_category_link( $category_id ) { |
|---|
| 53 |
global $wp_rewrite; |
|---|
| 54 |
$catlink = $wp_rewrite->get_category_permastruct(); |
|---|
| 55 |
|
|---|
| 56 |
if ( empty( $catlink ) ) { |
|---|
| 57 |
$file = get_option( 'home' ) . '/'; |
|---|
| 58 |
$catlink = $file . '?cat=' . $category_id; |
|---|
| 59 |
} else { |
|---|
| 60 |
$category = &get_category( $category_id ); |
|---|
| 61 |
if ( is_wp_error( $category ) ) |
|---|
| 62 |
return $category; |
|---|
| 63 |
$category_nicename = $category->slug; |
|---|
| 64 |
|
|---|
| 65 |
if ( $category->parent == $category_id ) |
|---|
| 66 |
$category->parent = 0; |
|---|
| 67 |
elseif ($category->parent != 0 ) |
|---|
| 68 |
$category_nicename = get_category_parents( $category->parent, false, '/', true ) . $category_nicename; |
|---|
| 69 |
|
|---|
| 70 |
$catlink = str_replace( '%category%', $category_nicename, $catlink ); |
|---|
| 71 |
$catlink = get_option( 'home' ) . user_trailingslashit( $catlink, 'category' ); |
|---|
| 72 |
} |
|---|
| 73 |
return apply_filters( 'category_link', $catlink, $category_id ); |
|---|
| 74 |
} |
|---|
| 75 |
|
|---|
| 76 |
|
|---|
| 77 |
|
|---|
| 78 |
|
|---|
| 79 |
|
|---|
| 80 |
|
|---|
| 81 |
|
|---|
| 82 |
|
|---|
| 83 |
|
|---|
| 84 |
|
|---|
| 85 |
|
|---|
| 86 |
|
|---|
| 87 |
|
|---|
| 88 |
function get_category_parents( $id, $link = false, $separator = '/', $nicename = false, $visited = array() ) { |
|---|
| 89 |
$chain = ''; |
|---|
| 90 |
$parent = &get_category( $id ); |
|---|
| 91 |
if ( is_wp_error( $parent ) ) |
|---|
| 92 |
return $parent; |
|---|
| 93 |
|
|---|
| 94 |
if ( $nicename ) |
|---|
| 95 |
$name = $parent->slug; |
|---|
| 96 |
else |
|---|
| 97 |
$name = $parent->cat_name; |
|---|
| 98 |
|
|---|
| 99 |
if ( $parent->parent && ( $parent->parent != $parent->term_id ) && !in_array( $parent->parent, $visited ) ) { |
|---|
| 100 |
$visited[] = $parent->parent; |
|---|
| 101 |
$chain .= get_category_parents( $parent->parent, $link, $separator, $nicename, $visited ); |
|---|
| 102 |
} |
|---|
| 103 |
|
|---|
| 104 |
if ( $link ) |
|---|
| 105 |
$chain .= '<a href="' . get_category_link( $parent->term_id ) . '" title="' . sprintf( __( "View all posts in %s" ), $parent->cat_name ) . '">'.$name.'</a>' . $separator; |
|---|
| 106 |
else |
|---|
| 107 |
$chain .= $name.$separator; |
|---|
| 108 |
return $chain; |
|---|
| 109 |
} |
|---|
| 110 |
|
|---|
| 111 |
|
|---|
| 112 |
|
|---|
| 113 |
|
|---|
| 114 |
|
|---|
| 115 |
|
|---|
| 116 |
|
|---|
| 117 |
|
|---|
| 118 |
|
|---|
| 119 |
|
|---|
| 120 |
function get_the_category( $id = false ) { |
|---|
| 121 |
global $post; |
|---|
| 122 |
|
|---|
| 123 |
$id = (int) $id; |
|---|
| 124 |
if ( !$id ) |
|---|
| 125 |
$id = (int) $post->ID; |
|---|
| 126 |
|
|---|
| 127 |
$categories = get_object_term_cache( $id, 'category' ); |
|---|
| 128 |
if ( false === $categories ) |
|---|
| 129 |
$categories = wp_get_object_terms( $id, 'category' ); |
|---|
| 130 |
|
|---|
| 131 |
if ( !empty( $categories ) ) |
|---|
| 132 |
usort( $categories, '_usort_terms_by_name' ); |
|---|
| 133 |
else |
|---|
| 134 |
$categories = array(); |
|---|
| 135 |
|
|---|
| 136 |
foreach ( (array) array_keys( $categories ) as $key ) { |
|---|
| 137 |
_make_cat_compat( $categories[$key] ); |
|---|
| 138 |
} |
|---|
| 139 |
|
|---|
| 140 |
return $categories; |
|---|
| 141 |
} |
|---|
| 142 |
|
|---|
| 143 |
|
|---|
| 144 |
|
|---|
| 145 |
|
|---|
| 146 |
|
|---|
| 147 |
|
|---|
| 148 |
|
|---|
| 149 |
|
|---|
| 150 |
|
|---|
| 151 |
|
|---|
| 152 |
|
|---|
| 153 |
|
|---|
| 154 |
|
|---|
| 155 |
|
|---|
| 156 |
function _usort_terms_by_name( $a, $b ) { |
|---|
| 157 |
return strcmp( $a->name, $b->name ); |
|---|
| 158 |
} |
|---|
| 159 |
|
|---|
| 160 |
|
|---|
| 161 |
|
|---|
| 162 |
|
|---|
| 163 |
|
|---|
| 164 |
|
|---|
| 165 |
|
|---|
| 166 |
|
|---|
| 167 |
|
|---|
| 168 |
|
|---|
| 169 |
|
|---|
| 170 |
|
|---|
| 171 |
|
|---|
| 172 |
|
|---|
| 173 |
function _usort_terms_by_ID( $a, $b ) { |
|---|
| 174 |
if ( $a->term_id > $b->term_id ) |
|---|
| 175 |
return 1; |
|---|
| 176 |
elseif ( $a->term_id < $b->term_id ) |
|---|
| 177 |
return -1; |
|---|
| 178 |
else |
|---|
| 179 |
return 0; |
|---|
| 180 |
} |
|---|
| 181 |
|
|---|
| 182 |
|
|---|
| 183 |
|
|---|
| 184 |
|
|---|
| 185 |
|
|---|
| 186 |
|
|---|
| 187 |
|
|---|
| 188 |
|
|---|
| 189 |
|
|---|
| 190 |
function get_the_category_by_ID( $cat_ID ) { |
|---|
| 191 |
$cat_ID = (int) $cat_ID; |
|---|
| 192 |
$category = &get_category( $cat_ID ); |
|---|
| 193 |
if ( is_wp_error( $category ) ) |
|---|
| 194 |
return $category; |
|---|
| 195 |
return $category->name; |
|---|
| 196 |
} |
|---|
| 197 |
|
|---|
| 198 |
|
|---|
| 199 |
|
|---|
| 200 |
|
|---|
| 201 |
|
|---|
| 202 |
|
|---|
| 203 |
|
|---|
| 204 |
|
|---|
| 205 |
|
|---|
| 206 |
|
|---|
| 207 |
|
|---|
| 208 |
function get_the_category_list( $separator = '', $parents='', $post_id = false ) { |
|---|
| 209 |
global $wp_rewrite; |
|---|
| 210 |
$categories = get_the_category( $post_id ); |
|---|
| 211 |
if ( empty( $categories ) ) |
|---|
| 212 |
return apply_filters( 'the_category', __( 'Uncategorized' ), $separator, $parents ); |
|---|
| 213 |
|
|---|
| 214 |
$rel = ( is_object( $wp_rewrite ) && $wp_rewrite->using_permalinks() ) ? 'rel="category tag"' : 'rel="category"'; |
|---|
| 215 |
|
|---|
| 216 |
$thelist = ''; |
|---|
| 217 |
if ( '' == $separator ) { |
|---|
| 218 |
$thelist .= '<ul class="post-categories">'; |
|---|
| 219 |
foreach ( $categories as $category ) { |
|---|
| 220 |
$thelist .= "\n\t<li>"; |
|---|
| 221 |
switch ( strtolower( $parents ) ) { |
|---|
| 222 |
case 'multiple': |
|---|
| 223 |
if ( $category->parent ) |
|---|
| 224 |
$thelist .= get_category_parents( $category->parent, true, $separator ); |
|---|
| 225 |
$thelist .= '<a href="' . get_category_link( $category->term_id ) . '" title="' . sprintf( __( "View all posts in %s" ), $category->name ) . '" ' . $rel . '>' . $category->name.'</a></li>'; |
|---|
| 226 |
break; |
|---|
| 227 |
case 'single': |
|---|
| 228 |
$thelist .= '<a href="' . get_category_link( $category->term_id ) . '" title="' . sprintf( __( "View all posts in %s" ), $category->name ) . '" ' . $rel . '>'; |
|---|
| 229 |
if ( $category->parent ) |
|---|
| 230 |
$thelist .= get_category_parents( $category->parent, false, $separator ); |
|---|
| 231 |
$thelist .= $category->name.'</a></li>'; |
|---|
| 232 |
break; |
|---|
| 233 |
case '': |
|---|
| 234 |
default: |
|---|
| 235 |
$thelist .= '<a href="' . get_category_link( $category->term_id ) . '" title="' . sprintf( __( "View all posts in %s" ), $category->name ) . '" ' . $rel . '>' . $category->cat_name.'</a></li>'; |
|---|
| 236 |
} |
|---|
| 237 |
} |
|---|
| 238 |
$thelist .= '</ul>'; |
|---|
| 239 |
} else { |
|---|
| 240 |
$i = 0; |
|---|
| 241 |
foreach ( $categories as $category ) { |
|---|
| 242 |
if ( 0 < $i ) |
|---|
| 243 |
$thelist .= $separator . ' '; |
|---|
| 244 |
switch ( strtolower( $parents ) ) { |
|---|
| 245 |
case 'multiple': |
|---|
| 246 |
if ( $category->parent ) |
|---|
| 247 |
$thelist .= get_category_parents( $category->parent, true, $separator ); |
|---|
| 248 |
$thelist .= '<a href="' . get_category_link( $category->term_id ) . '" title="' . sprintf( __( "View all posts in %s" ), $category->name ) . '" ' . $rel . '>' . $category->cat_name.'</a>'; |
|---|
| 249 |
break; |
|---|
| 250 |
case 'single': |
|---|
| 251 |
$thelist .= '<a href="' . get_category_link( $category->term_id ) . '" title="' . sprintf( __( "View all posts in %s" ), $category->name ) . '" ' . $rel . '>'; |
|---|
| 252 |
if ( $category->parent ) |
|---|
| 253 |
$thelist .= get_category_parents( $category->parent, false, $separator ); |
|---|
| 254 |
$thelist .= "$category->cat_name</a>"; |
|---|
| 255 |
break; |
|---|
| 256 |
case '': |
|---|
| 257 |
default: |
|---|
| 258 |
$thelist .= '<a href="' . get_category_link( $category->term_id ) . '" title="' . sprintf( __( "View all posts in %s" ), $category->name ) . '" ' . $rel . '>' . $category->name.'</a>'; |
|---|
| 259 |
} |
|---|
| 260 |
++$i; |
|---|
| 261 |
} |
|---|
| 262 |
} |
|---|
| 263 |
return apply_filters( 'the_category', $thelist, $separator, $parents ); |
|---|
| 264 |
} |
|---|
| 265 |
|
|---|
| 266 |
|
|---|
| 267 |
|
|---|
| 268 |
|
|---|
| 269 |
|
|---|
| 270 |
|
|---|
| 271 |
|
|---|
| 272 |
|
|---|
| 273 |
|
|---|
| 274 |
|
|---|
| 275 |
|
|---|
| 276 |
|
|---|
| 277 |
|
|---|
| 278 |
|
|---|
| 279 |
function in_category( $category ) { |
|---|
| 280 |
global $post; |
|---|
| 281 |
|
|---|
| 282 |
if ( empty( $category ) ) |
|---|
| 283 |
return false; |
|---|
| 284 |
|
|---|
| 285 |
|
|---|
| 286 |
if ( ! is_int( $category ) ) { |
|---|
| 287 |
$cat_ID = get_cat_ID( $category ); |
|---|
| 288 |
if ( $cat_ID ) |
|---|
| 289 |
$category = $cat_ID; |
|---|
| 290 |
} |
|---|
| 291 |
|
|---|
| 292 |
$categories = get_object_term_cache( $post->ID, 'category' ); |
|---|
| 293 |
if ( false !== $categories ) { |
|---|
| 294 |
if ( array_key_exists( $category, $categories ) ) |
|---|
| 295 |
return true; |
|---|
| 296 |
else |
|---|
| 297 |
return false; |
|---|
| 298 |
} |
|---|
| 299 |
|
|---|
| 300 |
$categories = wp_get_object_terms( $post->ID, 'category', 'fields=ids' ); |
|---|
| 301 |
if ( is_array($categories) && in_array($category, $categories) ) |
|---|
| 302 |
return true; |
|---|
| 303 |
else |
|---|
| 304 |
return false; |
|---|
| 305 |
|
|---|
| 306 |
} |
|---|
| 307 |
|
|---|
| 308 |
|
|---|
| 309 |
|
|---|
| 310 |
|
|---|
| 311 |
|
|---|
| 312 |
|
|---|
| 313 |
|
|---|
| 314 |
|
|---|
| 315 |
|
|---|
| 316 |
|
|---|
| 317 |
function the_category( $separator = '', $parents='', $post_id = false ) { |
|---|
| 318 |
echo get_the_category_list( $separator, $parents, $post_id ); |
|---|
| 319 |
} |
|---|
| 320 |
|
|---|
| 321 |
|
|---|
| 322 |
|
|---|
| 323 |
|
|---|
| 324 |
|
|---|
| 325 |
|
|---|
| 326 |
|
|---|
| 327 |
|
|---|
| 328 |
|
|---|
| 329 |
function category_description( $category = 0 ) { |
|---|
| 330 |
global $cat; |
|---|
| 331 |
if ( !$category ) |
|---|
| 332 |
$category = $cat; |
|---|
| 333 |
|
|---|
| 334 |
return get_term_field( 'description', $category, 'category' ); |
|---|
| 335 |
} |
|---|
| 336 |
|
|---|
| 337 |
|
|---|
| 338 |
|
|---|
| 339 |
|
|---|
| 340 |
|
|---|
| 341 |
|
|---|
| 342 |
|
|---|
| 343 |
|
|---|
| 344 |
|
|---|
| 345 |
|
|---|
| 346 |
|
|---|
| 347 |
|
|---|
| 348 |
|
|---|
| 349 |
|
|---|
| 350 |
|
|---|
| 351 |
|
|---|
| 352 |
|
|---|
| 353 |
|
|---|
| 354 |
|
|---|
| 355 |
|
|---|
| 356 |
|
|---|
| 357 |
|
|---|
| 358 |
|
|---|
| 359 |
|
|---|
| 360 |
|
|---|
| 361 |
|
|---|
| 362 |
|
|---|
| 363 |
|
|---|
| 364 |
|
|---|
| 365 |
|
|---|
| 366 |
|
|---|
| 367 |
|
|---|
| 368 |
|
|---|
| 369 |
|
|---|
| 370 |
function wp_dropdown_categories( $args = '' ) { |
|---|
| 371 |
$defaults = array( |
|---|
| 372 |
'show_option_all' => '', 'show_option_none' => '', |
|---|
| 373 |
'orderby' => 'ID', 'order' => 'ASC', |
|---|
| 374 |
'show_last_update' => 0, 'show_count' => 0, |
|---|
| 375 |
'hide_empty' => 1, 'child_of' => 0, |
|---|
| 376 |
'exclude' => '', 'echo' => 1, |
|---|
| 377 |
'selected' => 0, 'hierarchical' => 0, |
|---|
| 378 |
'name' => 'cat', 'class' => 'postform', |
|---|
| 379 |
'depth' => 0, 'tab_index' => 0 |
|---|
| 380 |
); |
|---|
| 381 |
|
|---|
| 382 |
$defaults['selected'] = ( is_category() ) ? get_query_var( 'cat' ) : 0; |
|---|
| 383 |
|
|---|
| 384 |
$r = wp_parse_args( $args, $defaults ); |
|---|
| 385 |
$r['include_last_update_time'] = $r['show_last_update']; |
|---|
| 386 |
extract( $r ); |
|---|
| 387 |
|
|---|
| 388 |
$tab_index_attribute = ''; |
|---|
| 389 |
if ( (int) $tab_index > 0 ) |
|---|
| 390 |
$tab_index_attribute = " tabindex=\"$tab_index\""; |
|---|
| 391 |
|
|---|
| 392 |
$categories = get_categories( $r ); |
|---|
| 393 |
|
|---|
| 394 |
$output = ''; |
|---|
| 395 |
if ( ! empty( $categories ) ) { |
|---|
| 396 |
$output = "<select name='$name' id='$name' class='$class' $tab_index_attribute>\n"; |
|---|
| 397 |
|
|---|
| 398 |
if ( $show_option_all ) { |
|---|
| 399 |
$show_option_all = apply_filters( 'list_cats', $show_option_all ); |
|---|
| 400 |
$output .= "\t<option value='0'>$show_option_all</option>\n"; |
|---|
| 401 |
} |
|---|
| 402 |
|
|---|
| 403 |
if ( $show_option_none ) { |
|---|
| 404 |
$show_option_none = apply_filters( 'list_cats', $show_option_none ); |
|---|
| 405 |
$output .= "\t<option value='-1'>$show_option_none</option>\n"; |
|---|
| 406 |
} |
|---|
| 407 |
|
|---|
| 408 |
if ( $hierarchical ) |
|---|
| 409 |
$depth = $r['depth']; |
|---|
| 410 |
else |
|---|
| 411 |
$depth = -1; |
|---|
| 412 |
|
|---|
| 413 |
$output .= walk_category_dropdown_tree( $categories, $depth, $r ); |
|---|
| 414 |
$output .= "</select>\n"; |
|---|
| 415 |
} |
|---|
| 416 |
|
|---|
| 417 |
$output = apply_filters( 'wp_dropdown_cats', $output ); |
|---|
| 418 |
|
|---|
| 419 |
if ( $echo ) |
|---|
| 420 |
echo $output; |
|---|
| 421 |
|
|---|
| 422 |
return $output; |
|---|
| 423 |
} |
|---|
| 424 |
|
|---|
| 425 |
|
|---|
| 426 |
|
|---|
| 427 |
|
|---|
| 428 |
|
|---|
| 429 |
|
|---|
| 430 |
|
|---|
| 431 |
|
|---|
| 432 |
|
|---|
| 433 |
|
|---|
| 434 |
|
|---|
| 435 |
|
|---|
| 436 |
|
|---|
| 437 |
|
|---|
| 438 |
|
|---|
| 439 |
|
|---|
| 440 |
|
|---|
| 441 |
|
|---|
| 442 |
|
|---|
| 443 |
|
|---|
| 444 |
|
|---|
| 445 |
|
|---|
| 446 |
|
|---|
| 447 |
|
|---|
| 448 |
|
|---|
| 449 |
|
|---|
| 450 |
|
|---|
| 451 |
|
|---|
| 452 |
|
|---|
| 453 |
|
|---|
| 454 |
|
|---|
| 455 |
|
|---|
| 456 |
|
|---|
| 457 |
function wp_list_categories( $args = '' ) { |
|---|
| 458 |
$defaults = array( |
|---|
| 459 |
'show_option_all' => '', 'orderby' => 'name', |
|---|
| 460 |
'order' => 'ASC', 'show_last_update' => 0, |
|---|
| 461 |
'style' => 'list', 'show_count' => 0, |
|---|
| 462 |
'hide_empty' => 1, 'use_desc_for_title' => 1, |
|---|
| 463 |
'child_of' => 0, 'feed' => '', 'feed_type' => '', |
|---|
| 464 |
'feed_image' => '', 'exclude' => '', 'current_category' => 0, |
|---|
| 465 |
'hierarchical' => true, 'title_li' => __( 'Categories' ), |
|---|
| 466 |
'echo' => 1, 'depth' => 0 |
|---|
| 467 |
); |
|---|
| 468 |
|
|---|
| 469 |
$r = wp_parse_args( $args, $defaults ); |
|---|
| 470 |
|
|---|
| 471 |
if ( !isset( $r['pad_counts'] ) && $r['show_count'] && $r['hierarchical'] ) { |
|---|
| 472 |
$r['pad_counts'] = true; |
|---|
| 473 |
} |
|---|
| 474 |
|
|---|
| 475 |
if ( isset( $r['show_date'] ) ) { |
|---|
| 476 |
$r['include_last_update_time'] = $r['show_date']; |
|---|
| 477 |
} |
|---|
| 478 |
|
|---|
| 479 |
extract( $r ); |
|---|
| 480 |
|
|---|
| 481 |
$categories = get_categories( $r ); |
|---|
| 482 |
|
|---|
| 483 |
$output = ''; |
|---|
| 484 |
if ( $title_li && 'list' == $style ) |
|---|
| 485 |
$output = '<li class="categories">' . $r['title_li'] . '<ul>'; |
|---|
| 486 |
|
|---|
| 487 |
if ( empty( $categories ) ) { |
|---|
| 488 |
if ( 'list' == $style ) |
|---|
| 489 |
$output .= '<li>' . __( "No categories" ) . '</li>'; |
|---|
| 490 |
else |
|---|
| 491 |
$output .= __( "No categories" ); |
|---|
| 492 |
} else { |
|---|
| 493 |
global $wp_query; |
|---|
| 494 |
|
|---|
| 495 |
if( !empty( $show_option_all ) ) |
|---|
| 496 |
if ( 'list' == $style ) |
|---|
| 497 |
$output .= '<li><a href="' . get_bloginfo( 'url' ) . '">' . $show_option_all . '</a></li>'; |
|---|
| 498 |
else |
|---|
| 499 |
$output .= '<a href="' . get_bloginfo( 'url' ) . '">' . $show_option_all . '</a>'; |
|---|
| 500 |
|
|---|
| 501 |
if ( empty( $r['current_category'] ) && is_category() ) |
|---|
| 502 |
$r['current_category'] = $wp_query->get_queried_object_id(); |
|---|
| 503 |
|
|---|
| 504 |
if ( $hierarchical ) |
|---|
| 505 |
$depth = $r['depth']; |
|---|
| 506 |
else |
|---|
| 507 |
$depth = -1; |
|---|
| 508 |
|
|---|
| 509 |
$output .= walk_category_tree( $categories, $depth, $r ); |
|---|
| 510 |
} |
|---|
| 511 |
|
|---|
| 512 |
if ( $title_li && 'list' == $style ) |
|---|
| 513 |
$output .= '</ul></li>'; |
|---|
| 514 |
|
|---|
| 515 |
$output = apply_filters( 'wp_list_categories', $output ); |
|---|
| 516 |
|
|---|
| 517 |
if ( $echo ) |
|---|
| 518 |
echo $output; |
|---|
| 519 |
else |
|---|
| 520 |
return $output; |
|---|
| 521 |
} |
|---|
| 522 |
|
|---|
| 523 |
|
|---|
| 524 |
|
|---|
| 525 |
|
|---|
| 526 |
|
|---|
| 527 |
|
|---|
| 528 |
|
|---|
| 529 |
|
|---|
| 530 |
|
|---|
| 531 |
|
|---|
| 532 |
|
|---|
| 533 |
|
|---|
| 534 |
|
|---|
| 535 |
|
|---|
| 536 |
|
|---|
| 537 |
|
|---|
| 538 |
|
|---|
| 539 |
|
|---|
| 540 |
|
|---|
| 541 |
|
|---|
| 542 |
|
|---|
| 543 |
|
|---|
| 544 |
|
|---|
| 545 |
|
|---|
| 546 |
|
|---|
| 547 |
|
|---|
| 548 |
|
|---|
| 549 |
|---|