Advertisement
Guest User

Untitled

a guest
Feb 23rd, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.18 KB | None | 0 0
  1. function printTags($tags){
  2. if ($tags!=false) {
  3. $return = '';
  4. foreach ($tags as $i){
  5. $return .= '<li><a href="' . home_url() . "/tag/" . $i->slug . '">' . $i->name . '</a></li>';
  6. }
  7. return $return;
  8. }
  9. }
  10.  
  11.  
  12.  
  13.  
  14. function getTags($tagData){
  15. $tagArray = [];
  16. if($tagData!=false){
  17. foreach ($tagData as $i){
  18. array_push($tagArray, $i->name);
  19. }
  20. }
  21. return $tagArray;
  22. }
  23.  
  24. if (!get_user_meta($user_id, $meta_key['order'], true)) {
  25. $meta_value = array(
  26. 'side' => 'submitdiv,formatdiv,categorydiv,tagsdiv-post_tag,postimagediv',
  27. 'normal' => 'postexcerpt,postcustom,commentstatusdiv,commentsdiv,trackbacksdiv,slugdiv,authordiv,revisionsdiv',
  28. 'advanced' => '',
  29. );
  30. update_user_meta($user_id, $meta_key['order'], $meta_value);
  31. }
  32.  
  33. <div class='myclass'>
  34. <div class='categories-container'>
  35. <strong><a href='". home_url() ."/category/". $sectionSlug."'>{$section}</a></strong>
  36. </div>
  37. <div class='tags-container'>
  38. <ul class='tags'>". printTags($tags) ."</ul>
  39. </div>
  40. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement