• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP govintranetpress_custom_title函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中govintranetpress_custom_title函数的典型用法代码示例。如果您正苦于以下问题:PHP govintranetpress_custom_title函数的具体用法?PHP govintranetpress_custom_title怎么用?PHP govintranetpress_custom_title使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了govintranetpress_custom_title函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: wp_reset_postdata

            echo "</div></div></div></div></a>";
            $counter++;
        }
    }
}
?>
				</div>
			</div>
		</div>

		<div class="col-md-4 col-sm-12">
			<?php 
wp_reset_postdata();
$terms = get_posts('post_type=team&posts_per_page=-1&orderby=title&order=ASC&post_parent=' . $post->ID);
if ($terms) {
    $teamstr = '';
    foreach ((array) $terms as $taxonomy) {
        $themeid = $taxonomy->ID;
        $themeURL = $taxonomy->post_name;
        $teamstr .= "<li><a href='/team/" . $themeURL . "/'>" . govintranetpress_custom_title($taxonomy->post_title) . "</a></li>";
    }
    echo "<div class='widget-box'><h3 class='widget-title'>Sub-teams</h3><ul>" . $teamstr . "</ul></div>";
}
?>
		
		</div>
	</div>
</div>

<?php 
get_footer();
开发者ID:ryanlfoster,项目名称:govintranet,代码行数:31,代码来源:single-team.php


示例2: twentyten_filter_wp_title

/**
 * Makes some changes to the <title> tag, by filtering the output of wp_title().
 *
 * If we have a site description and we're viewing the home page or a blog posts
 * page (when using a static front page), then we will add the site description.
 *
 * If we're viewing a search result, then we're going to recreate the title entirely.
 * We're going to add page numbers to all titles as well, to the middle of a search
 * result title and the end of all other titles.
 *
 * The site title also gets added to all titles.
 *
 * @since Twenty Ten 1.0
 *
 * @param string $title Title generated by wp_title()
 * @param string $separator The separator passed to wp_title(). Twenty Ten uses a
 * 	vertical bar, "|", as a separator in header.php.
 * @return string The new title, ready for the <title> tag.
 */
function twentyten_filter_wp_title($title, $separator)
{
    // Don't affect wp_title() calls in feeds.
    if (is_feed()) {
        return $title;
    }
    // The $paged global variable contains the page number of a listing of posts.
    // The $page global variable contains the page number of a single post that is paged.
    // We'll display whichever one applies, if we're not looking at the first page.
    global $paged, $page;
    if (is_search()) {
        // If we're a search, let's start over:
        $title = sprintf(__('Search results for %s', 'twentyten'), '"' . get_search_query() . '"');
        // Add a page number if we're on page 2 or more:
        if ($paged >= 2) {
            $title .= " {$separator} " . sprintf(__('Page %s', 'twentyten'), $paged);
        }
        // Add the site name to the end:
        //$title .= " $separator " . get_bloginfo( 'name', 'display' );
        // We're done. Let's send the new title back to wp_title():
        return $title;
    }
    // Otherwise, let's start by adding the site name to the end:
    if (is_front_page()) {
        $title .= get_bloginfo('name', 'display');
    }
    $slug = pods_url_variable(0);
    $slug2 = pods_url_variable(1);
    if ($slug == "task") {
        $taskpod = new Pod('task', pods_url_variable(1));
        $taskparent = $taskpod->get_field('parent_guide');
        $title_context = '';
        if ($taskparent) {
            $parent_guide_id = $taskparent[0]['ID'];
            $taskparent = get_post($parent_guide_id);
            $title_context = " (" . govintranetpress_custom_title($taskparent->post_title) . ")";
        }
        $title .= $title_context . " - tasks and guides";
    } else {
        if ($slug2 == "projects") {
            $title .= " - projects";
        } else {
            if ($slug2 == "vacancies") {
                $title .= " - job vacancies";
            } else {
                if ($slug == "staff") {
                    global $post;
                    $u = $post->post_title;
                    $title .= $u . " - staff profile";
                } else {
                    if ($slug == "events") {
                        $title .= " - events";
                    } else {
                        if ($slug == "glossary") {
                            $title .= " - jargon buster";
                        } else {
                            if ($slug == "atoz") {
                                $title .= " - A to Z";
                            } else {
                                if ($slug == "forums") {
                                    $title .= " - forums";
                                } else {
                                    if ($slug == "topics") {
                                        $title .= " - forum topics";
                                    } else {
                                        if ($slug == "replies") {
                                            $title .= " - forum replies";
                                        } else {
                                            if ($slug == "news") {
                                                $title .= " - news";
                                            } else {
                                                if ($slug == "blog") {
                                                    $title .= " - blog";
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
//.........这里部分代码省略.........
开发者ID:MrBoy31,项目名称:helpful-intranet,代码行数:101,代码来源:functions.php


示例3: unset

 unset($poduser);
 foreach ($terms as $taxonomy) {
     //print_r($taxonomy);
     //echo $taxonomy['name'];
     $themeid = $taxonomy['term_id'];
     $themeparent = $taxonomy['parent'];
     if ($themeparent == 0) {
         $teamlist = govintranetpress_custom_title($taxonomy['name']);
         $html .= "" . $teamlist . "<br>";
         //echo $teamlist;
     } else {
         while ($themeparent != 0) {
             $newteam = get_term_by('id', $themeparent, 'team');
             $themeparent = $newteam->parent;
         }
         $teamlist = govintranetpress_custom_title($newteam->name);
         $html .= "" . $teamlist . "<br>";
     }
 }
 if (get_user_meta($userid, 'user_job_title', true)) {
     $meta = get_user_meta($userid, 'user_job_title', true);
     $meta = str_replace(" ", "&nbsp;", $meta);
     $html .= '<span class="small">' . $meta . "</span><br>";
 }
 if (get_user_meta($userid, 'user_telephone', true)) {
     $html .= '<span class="small"><i class="glyphicon glyphicon-earphone"></i> ' . get_user_meta($userid, 'user_telephone', true) . "</span><br>";
 }
 if (get_user_meta($userid, 'user_mobile', true) && $showmobile) {
     $html .= '<span class="small"><i class="glyphicon glyphicon-phone"></i> ' . get_user_meta($userid, 'user_mobile', true) . "</span>";
 }
 $html .= "</div></div></a></div></div>";
开发者ID:MrBoy31,项目名称:helpful-intranet,代码行数:31,代码来源:page-staff-directory-grid.php


示例4: __

     echo '<h3 class="contacthead">' . __('Team', 'govintranet') . '</h3>';
     $teamlist = array();
     //build array of hierarchical teams
     foreach ((array) $teams as $t) {
         $team = get_post($t);
         $teamid = $team->ID;
         $teamurl = $team->post_name;
         $teamparent = $team->post_parent;
         while ($teamparent != 0) {
             $parentteam = get_post($teamparent);
             $parentURL = $parentteam->post_name;
             $parentname = govintranetpress_custom_title($parentteam->post_title);
             $teamlist[] = " <a href='" . get_permalink($teamparent) . "'>" . $parentname . "</a>";
             $teamparent = $parentteam->post_parent;
         }
         $teamlist[] = " <a href='" . get_permalink($team->ID) . "'>" . govintranetpress_custom_title($team->post_title) . "</a>";
         echo "<p><strong>" . __('Team', 'govintranet') . ":</strong> " . implode(" &raquo; ", $teamlist) . "</p>";
         $teamlist = array();
     }
 }
 $jt = get_user_meta($user_id, 'user_job_title', true);
 $ug = get_user_meta($user_id, 'user_grade', true);
 if (!$teams && ($jt || $ug)) {
     echo '<h3 class="contacthead">' . __("Role", "govintranet") . '</h3>';
 }
 if ($jt) {
     echo "<p><strong>" . __('Job title', 'govintranet') . ": </strong>" . $jt . "</p>";
 }
 if ($ug) {
     $ug = get_term($ug, 'grade', ARRAY_A);
     if ($ug['name']) {
开发者ID:meowrika,项目名称:govintranet,代码行数:31,代码来源:user-profile.php


示例5: govintranet_filter_wp_title

/**
 * Makes some changes to the <title> tag, by filtering the output of wp_title().
 *
 * If we have a site description and we're viewing the home page or a blog posts
 * page (when using a static front page), then we will add the site description.
 *
 * If we're viewing a search result, then we're going to recreate the title entirely.
 * We're going to add page numbers to all titles as well, to the middle of a search
 * result title and the end of all other titles.
 *
 * The site title also gets added to all titles.
 *
 * @since Twenty Ten 1.0
 *
 * @param string $title Title generated by wp_title()
 * @param string $separator The separator passed to wp_title(). Twenty Ten uses a
 * 	vertical bar, "|", as a separator in header.php.
 * @return string The new title, ready for the <title> tag.
 */
function govintranet_filter_wp_title($title, $separator)
{
    // Don't affect wp_title() calls in feeds.
    if (is_feed()) {
        return $title;
    }
    // The $paged global variable contains the page number of a listing of posts.
    // The $page global variable contains the page number of a single post that is paged.
    // We'll display whichever one applies, if we're not looking at the first page.
    global $paged, $page, $post;
    if (is_search()) {
        // If we're a search, let's start over:
        $title = sprintf(__('Search results for %s', 'govintranet'), '"' . get_search_query() . '"');
        // Add a page number if we're on page 2 or more:
        if ($paged >= 2) {
            $title .= " {$separator} " . sprintf(__('Page %s', 'govintranet'), $paged);
        }
        // Add the site name to the end:
        //$title .= " $separator " . get_bloginfo( 'name', 'display' );
        // We're done. Let's send the new title back to wp_title():
        return $title;
    }
    // Otherwise, let's start by adding the site name to the end:
    if (is_front_page()) {
        $title .= get_bloginfo('name', 'display');
    }
    global $wp_query;
    $view = $wp_query->get_queried_object();
    if (isset($view) && isset($view->taxonomy)) {
        if ($view->taxonomy == "a-to-z") {
            $title = _x("Letter", "alphabet", "govintranet") . " " . $title;
        } else {
            if (isset($view) && $view->taxonomy == "category") {
                $title .= " " . __("tasks and guides category", "govintranet");
            } else {
                if (isset($view) && $view->taxonomy) {
                    return $title;
                } else {
                    if ($post->post_type == "task") {
                        $taskparent = $post->post_parent;
                        $title_context = '';
                        if ($taskparent) {
                            $parent_guide_id = $taskparent;
                            $taskparent = get_post($parent_guide_id);
                            $title_context = " (" . govintranetpress_custom_title($taskparent->post_title) . ")";
                        }
                        $title .= $title_context . " - " . __('tasks and guides', 'govintranet');
                    } else {
                        if ($post->post_type == "project") {
                            $title .= " - " . __('project', 'govintranet');
                        } else {
                            if ($post->post_type == "vacancy") {
                                $title .= " - " . __('job vacancies', 'govintranet');
                            } else {
                                if ($post->post_type == "event") {
                                    $title .= " - " . __('events', 'govintranet');
                                } else {
                                    if ($post->post_type == "jargon-buster") {
                                        $title .= " - " . __('jargon buster', 'govintranet');
                                    } else {
                                        if ($post->post_type == "forums") {
                                            $title .= " - " . __('forums', 'govintranet');
                                        } else {
                                            if ($post->post_type == "topics") {
                                                $title .= " - " . __('forum topics', 'govintranet');
                                            } else {
                                                if ($post->post_type == "replies") {
                                                    $title .= " - " . __('forum replies', 'govintranet');
                                                } else {
                                                    if ($post->post_type == "news") {
                                                        $title .= " - " . __('news', 'govintranet');
                                                    } else {
                                                        if ($post->post_type == "news-update") {
                                                            $title .= " - " . __('news update', 'govintranet');
                                                        } else {
                                                            if ($post->post_type == "blog") {
                                                                $title .= " - " . __('blog', 'govintranet');
                                                            } else {
                                                                if (!$post->post_type) {
                                                                    global $post;
                                                                    $u = $post->post_title;
//.........这里部分代码省略.........
开发者ID:meowrika,项目名称:govintranet,代码行数:101,代码来源:functions.php


示例6: get_permalink

            if ($chapter_header) {
                // if on chapter 1
                echo '<div class="col-lg-12 chapterr"><a href="' . get_permalink($carray[2]["id"]) . '" title="' . __("Navigate to next part", "govintranet") . '">' . $carray[2]["name"] . '&nbsp;<span class="dashicons dashicons-arrow-right-alt2"></span></a></div>';
            } elseif ($current_chapter == 2) {
                // if on chapter 2
                echo '<div class="col-lg-6 col-md-6 chapterl"><a href="' . get_permalink($parent_guide_id) . '" title="' . __("Navigate to previous part", "govintranet") . '"><span class="dashicons dashicons-arrow-left-alt2"></span>&nbsp;' . __("Overview", "govintranet") . '</a></div>';
                if ($carray[3]['slug']) {
                    echo '<div class="col-lg-6 col-md-6 chapterr"><a href="' . get_permalink($carray[3]["id"]) . '" title="' . __("Navigate to next part", "govintranet") . '">' . $carray[3]["name"] . '&nbsp;<span class="dashicons dashicons-arrow-right-alt2"></span></a></div>';
                }
            } else {
                // we're deep in the middle somewhere
                $previous_chapter = $current_chapter - 1;
                $next_chapter = $current_chapter + 1;
                echo '<div class="col-lg-6 col-md-6 chapterl"><a href="' . get_permalink($carray[$previous_chapter]["id"]) . '" title="' . __("Navigate to previous part", "govintranet") . '"><span class="dashicons dashicons-arrow-left-alt2"></span>&nbsp;' . govintranetpress_custom_title($carray[$previous_chapter]["name"]) . '</a></div>';
                if ($carray[$next_chapter]['slug']) {
                    echo '<div class="col-lg-6 col-md-6 chapterr"><a href="' . get_permalink($carray[$next_chapter]["id"]) . '" title="' . __("Navigate to next part", "govintranet") . '">' . govintranetpress_custom_title($carray[$next_chapter]["name"]) . '&nbsp;<span class="dashicons dashicons-arrow-right-alt2"></span></a></div>';
                }
            }
            echo "</div>";
            echo "</div>";
        } else {
            ?>
			<h1><?php 
            echo $guidetitle;
            ?>
 <small><span class="dashicons dashicons-<?php 
            echo $icon;
            ?>
"></span> <?php 
            echo _x('Project', 'noun', 'govintranet');
            ?>
开发者ID:meowrika,项目名称:govintranet,代码行数:31,代码来源:single-project.php


示例7: widget


//.........这里部分代码省略.........
     if ($news == 'on') {
         if ($donefilter) {
             $filter .= " or ";
         }
         $filter .= "post_type = 'news'";
         $donefilter = true;
     }
     if ($blog == 'on') {
         if ($donefilter) {
             $filter .= " or ";
         }
         $filter .= "post_type = 'blog'";
         $donefilter = true;
     }
     if ($events == 'on') {
         if ($donefilter) {
             $filter .= " or ";
         }
         $filter .= "post_type = 'event'";
         $donefilter = true;
     }
     if ($lastupdated == 'on') {
         $checkdate = 'post_modified';
     } else {
         $checkdate = 'post_date';
     }
     $stoppages = array('how-do-i', 'task-by-category', 'news-by-category', 'newspage', 'tagged', 'atoz', 'about', 'home', 'blogs', 'events', 'category', 'news-type');
     foreach ($stoppages as $sp) {
         $stop = get_page_by_path($sp, ARRAY_A, 'page');
         if ($stop) {
             $exclude[] = $stop['ID'];
         }
     }
     $getitems = $items + count($exclude);
     global $wpdb;
     $q = "\n\t\tselect ID, post_parent, post_type, post_title, post_name, post_date, post_modified, post_status  \n\t\tfrom {$wpdb->posts} \n\t\twhere (" . $filter . ") and post_status = 'publish'";
     if ($exclude) {
         $q .= " and ID NOT IN ('" . implode('\',\' ', $exclude) . "') ";
     }
     $q .= "\n\t\torder by " . $checkdate . " desc\n\t\tlimit " . $getitems . ";\n\t\t";
     $rpublished = $wpdb->get_results($q);
     $k = 0;
     $alreadydone = array();
     if ($rpublished) {
         echo $before_widget;
         if ($title) {
             echo $before_title . $title . $after_title;
         }
         echo "<ul>";
         foreach ($rpublished as $r) {
             if (in_array($r->ID, $alreadydone)) {
                 continue;
             }
             $alert = '';
             if ($lastupdated == 'on' && $r->post_date == $r->post_modified) {
                 $alert = " <span class='badge'>" . __('NEW', 'govintranet') . "</span>";
             }
             if ($r->post_type == 'page') {
                 $k++;
                 echo "<li><a href='" . get_permalink($r->ID) . "'>" . govintranetpress_custom_title(get_the_title($r->ID)) . "</a>" . $alert . "</li>";
                 $alreadydone[] = $r->ID;
             } elseif ($r->post_type == 'task') {
                 $title_context = '';
                 if ($r->post_parent) {
                     // child chapter
                     $icon = "book";
                     $taskparent = get_post($r->post_parent);
                     $title_context = '';
                     if ($taskparent) {
                         $parent_guide_id = $taskparent->ID;
                         $title_context = " <small>(" . govintranetpress_custom_title($taskparent->post_title) . ")</small>";
                     }
                 } elseif (get_posts("post_type=task&posts_per_page=-1&post_status=publish&post_parent=" . $r->ID . "&orderby=menu_order&order=ASC")) {
                     $icon = "book";
                 } else {
                     $icon = "question-sign";
                 }
                 $k++;
                 echo "<li><a href='" . get_permalink($r->ID) . "'>" . govintranetpress_custom_title($r->post_title) . "</a>" . $title_context . $alert . "</li>";
                 $alreadydone[] = $r->ID;
             } elseif ($r->post_type == 'project') {
                 if (!$r->post_parent) {
                     $k++;
                     echo "<li><a href='" . get_permalink($r->ID) . "'>" . govintranetpress_custom_title($r->post_title) . "</a>" . $alert . "</li>";
                     $alreadydone[] = $r->ID;
                 }
             } else {
                 $k++;
                 echo "<li><a href='" . get_permalink($r->ID) . "'>" . govintranetpress_custom_title($r->post_title) . "</a>" . $alert . "</li>";
                 $alreadydone[] = $r->ID;
             }
             if ($k == $items) {
                 break;
             }
         }
         echo "</ul>";
         wp_reset_query();
         echo $after_widget;
     }
 }
开发者ID:openterengganu,项目名称:govintranet,代码行数:101,代码来源:ht_most_recent.php


示例8: array

$sortedlist = array();
if (!$postslist->have_posts()) {
    echo "<h1>";
    _e('Not found', 'govintranet');
    echo "</h1>";
    echo "<p>";
    _e('There\'s nothing to show', 'govintranet');
    echo ".</p>";
    get_search_form();
}
while ($postslist->have_posts()) {
    $postslist->the_post();
    //highlight words that begin with this letter in the standard post title
    $foundkey = false;
    //set a flag to see if we get a match
    $oldtitle = govintranetpress_custom_title($post->post_title);
    if (strpos($oldtitle, " ")) {
        $otwords = explode(" ", $oldtitle);
    } else {
        $otwords = array($oldtitle);
    }
    $newwords = array();
    $newtitle = '';
    $tempot = '';
    foreach ($otwords as $ot) {
        $orig_ot = $ot;
        $ot = preg_replace('/[^a-z\\d]+/i', '', $ot);
        $ot = str_replace(',', '', $ot);
        if (strtolower(substr($ot, 0, 1)) == strtolower($slug) && (strlen($ot) > 2 || in_array(strtolower($ot), $gowords)) && !in_array(strtolower($ot), $stopwords)) {
            $newwords[] = "<strong>" . $orig_ot . "</strong>";
            $foundkey = true;
开发者ID:openterengganu,项目名称:govintranet,代码行数:31,代码来源:taxonomy-a-to-z.php


示例9: get_post

                 $taskparent = $taskpod->get_field('parent_guide');
                 $title_context = "";
                 if ($taskparent) {
                     $tparent_guide_id = $taskparent[0]['ID'];
                     $taskparent = get_post($tparent_guide_id);
                     $title_context = " (" . govintranetpress_custom_title($taskparent->post_title) . ")";
                 }
                 $html .= "<li><a href='" . site_url() . "/task/" . $rlink['post_name'] . "'>" . govintranetpress_custom_title($rlink['post_title']) . $title_context . "</a></li>";
             }
         }
     }
     if ($related_pages) {
         foreach ($related_pages as $rlink) {
             if ($rlink['post_status'] == 'publish' && $rlink['ID'] != $id) {
                 $taskpod = new Pod('page', $rlink['ID']);
                 $html .= "<li><a href='" . $rlink['guid'] . "'>" . govintranetpress_custom_title($rlink['post_title']) . $title_context . "</a></li>";
             }
         }
     }
     if ($relatedteams) {
         foreach ($relatedteams as $r) {
             $html .= "<li><a href='" . site_url() . "/team/" . $r->slug . "'>" . $r->name . "</a>&nbsp;<span class='glyphicon glyphicon-list-alt'></span></li>";
         }
     }
     echo "<div class='widget-box list'>";
     echo "<h3 class='widget-title'>Related</h3>";
     echo "<ul>";
     echo $html;
     echo "</ul></div>";
 }
 $post_categories = wp_get_post_categories($post->ID);
开发者ID:MrBoy31,项目名称:helpful-intranet,代码行数:31,代码来源:single-task.php


示例10: esc_attr

echo "<div class='widget-box'>";
if ($title) {
    echo "<h3>" . esc_attr($title) . "</h3>";
}
add_filter('pre_get_posts', 'filter_tasks');
$listquery = new wp_query($query);
if ($listquery->have_posts()) {
    while ($listquery->have_posts()) {
        $listquery->the_post();
        if (!$compact) {
            $excerpt = get_the_excerpt();
            $taskparent = get_post($post->post_parent);
            $title_context = '';
            if ($taskparent) {
                $parent_guide_id = $taskparent->ID;
                $title_context = govintranetpress_custom_title($taskparent->post_title);
            }
            echo "<h3 class='postlist'><a href='" . get_permalink($post->ID) . "' title='" . get_the_title($post->ID) . $title_context;
            echo "' rel='bookmark'>" . get_the_title($post->ID) . "</a></h3>";
            echo wpautop($excerpt);
        } else {
            $larray[] = "<li><a href='" . get_permalink($post->ID) . "'>" . get_the_title($post->ID) . "</a> <span class='small'>" . $title_context . "</span></li>";
        }
    }
}
if ($compact) {
    echo "<ul>" . implode('', $larray) . "</ul>";
}
echo "</div>";
remove_filter('pre_get_posts', 'filter_tasks');
wp_reset_postdata();
开发者ID:ryanlfoster,项目名称:govintranet,代码行数:31,代码来源:part-task-listing.php


示例11: get_user_meta

            echo '<span class="small"><i class="glyphicon glyphicon-phone"></i> ' . get_user_meta($userid, 'user_mobile', true) . "</span>";
        }
        echo "</div></div></div></div></a>";
        $counter++;
    }
}
foreach ((array) $searchmasterteam as $post) {
    ?>
		<div>
			<div class="col-lg-12"><br>
				<h3 class='postlist'>				
				<a href="<?php 
    echo get_permalink($post['ID']);
    ?>
" rel="bookmark"><?php 
    echo govintranetpress_custom_title($post['post_title']);
    ?>
 (<?php 
    _e('Team', 'govintranet');
    ?>
)</a></h3>
				<div class='media'>
					<div class='media-body'>
					<?php 
    echo $post['post_content'];
    ?>
					</div>
				</div>
			</div>
		</div>
		<br class="clearfix">
开发者ID:meowrika,项目名称:govintranet,代码行数:31,代码来源:search-staff.php


示例12: get_pages

        $children = get_pages("child_of=" . $id . "&parent=" . $id . "&hierarchical=0&posts_per_page=-1&post_type=page&sort_column=menu_order&sort_order=ASC");
        echo "<div class='row white'>";
        foreach ((array) $children as $c) {
            if ($c->post_excerpt) {
                $excerpt = $c->post_excerpt;
            } else {
                if (strlen($c->post_content) > 128) {
                    $excerpt = substr(strip_tags($c->post_content), 0, 128) . "&hellip;";
                } elseif (!$c->post_content) {
                    $excerpt = "";
                } else {
                    $excerpt = strip_tags($c->post_content);
                }
            }
            $excerpt = str_replace('[bbp-forum-index]', '', $excerpt);
            if (get_post_meta($id, 'ht_about_restrict', true)) {
                echo "<div class='col-lg-4 col-md-6 col-sm-6 white'>";
            } else {
                echo "<div class='col-lg-3 col-md-6 col-sm-6 white'>";
            }
            echo "\n\t\t\t\t<div class='category-block'>\n\t\t\t\t\t<h2><a href='" . get_permalink($c->ID) . "'>" . govintranetpress_custom_title($c->post_title) . "</a></h2>\n\t\t\t\t\t<p>" . $excerpt . "</p>\n\t\t\t\t</div>\n\t\t\t</div>";
        }
        echo '</div>';
        ?>

	</div>

<?php 
    }
}
get_footer();
开发者ID:meowrika,项目名称:govintranet,代码行数:31,代码来源:page-about.php


示例13: get_terms

$term_query = get_terms('team', array('hide_empty' => false, 'parent' => $termid));
$iteams = array();
$iteams[] = $termid;
$multipleteams = false;
foreach ($term_query as $tq) {
    $iteams[] = $tq->term_id;
    $multipleteams = true;
}
//custom sql query returns users in the current team sorted by grade
$chevron = 0;
foreach ($iteams as $tq) {
    $gradehead = '';
    $newteam = get_term_by('id', $tq, 'team');
    //print_r($newteam);
    if ($chevron != 0) {
        echo "<div class='col-lg-12 col-md-12 col-sm-12  home page'><div class='category-block'><h3>" . govintranetpress_custom_title($newteam->name);
        echo " <a href='#teamtop'><span class='glyphicon glyphicon-chevron-up'></span></a>";
        echo "<a id='{$newteam->slug}' name='{$newteam->slug}'>&nbsp;</a></h3></div></div>";
    }
    $chevron = 1;
    $q = "select user_id from wp_usermeta join wp_terms on wp_terms.term_id = wp_usermeta.meta_value where user_id in (select user_id from wp_usermeta as a where a.meta_key = 'user_team' and a.meta_value = " . $tq . " ) and meta_key = 'user_grade' ;\n ";
    $user_query = $wpdb->get_results($q);
    $counter = 0;
    $tcounter = 0;
    $uid = array();
    $ugrade = array();
    $uorder = array();
    $ulastname = array();
    foreach ($user_query as $u) {
        //print_r($u);
        $uid[] = $u->user_id;
开发者ID:MrBoy31,项目名称:helpful-intranet,代码行数:31,代码来源:taxonomy-team.php


示例14: foreach

    //build array of hierarchical teams
    foreach ($terms as $taxonomy) {
        $themeid = $taxonomy['term_id'];
        $themeURL = $taxonomy['slug'];
        $themeparent = $taxonomy['parent'];
        if ($themeURL == 'uncategorized') {
            continue;
        }
        while ($themeparent != 0) {
            $parentteam = get_term_by('id', $themeparent, 'team');
            $parentURL = $parentteam->slug;
            $parentname = govintranetpress_custom_title($parentteam->name);
            $teamlist[] = " <a href='" . site_url() . "/team/{$parentURL}'>" . $parentname . "</a>";
            $themeparent = $parentname['parent'];
        }
        $teamlist[] = " <a href='" . site_url() . "/team/{$themeURL}'>" . govintranetpress_custom_title($taxonomy['name']) . "</a>";
        echo "<strong>Team:</strong> " . implode(" &raquo; ", $teamlist) . "<br>";
        $teamlist = array();
    }
}
$jt = get_user_meta($user_id, 'user_job_title', true);
if ($jt) {
    echo "<strong>Job title: </strong>" . $jt . "<br>";
}
$jt = get_user_meta($user_id, 'user_grade');
//print_r($jt);
if ($jt[0]['name']) {
    echo "<strong>Grade: </strong>" . $jt[0]['name'] . "";
}
?>
		<h3 class="contacthead" >Contact</h3>
开发者ID:MrBoy31,项目名称:helpful-intranet,代码行数:31,代码来源:user-profile.php


示例15: widget


//.........这里部分代码省略.........
     }
     $siteurl = site_url();
     //manual override news stories
     //display sticky top news stories
     $num_top_slots = count($top_slot);
     $to_fill = $totalstories - $num_top_slots;
     $k = -1;
     $alreadydone = array();
     if ($num_top_slots > 0) {
         foreach ((array) $top_slot as $thisslot) {
             if (!$thisslot) {
                 continue;
             }
             $slot = get_post($thisslot);
             if ($slot->post_status != 'publish') {
                 continue;
             }
             $k++;
             $alreadydone[] = $slot->ID;
             if (function_exists('get_video_thumbnail')) {
                 $videostill = get_video_thumbnail($slot->ID);
             }
             $thistitle = $slot->post_title;
             $thisURL = get_permalink($slot->ID);
             $video = 0;
             if (has_post_format('video', $slot->ID)) {
                 $video = apply_filters('the_content', get_post_meta($slot->ID, 'news_video_url', true));
             }
             if ($newsgrid[$k] == "L") {
                 $image_uri = wp_get_attachment_image_src(get_post_thumbnail_id($slot->ID), 'newshead');
                 if ($video) {
                     echo $video;
                 } elseif ($image_uri != "") {
                     echo "<a href='{$thisURL}'><img class='img img-responsive' src='{$image_uri[0]}' width='{$image_uri[1]}' height='{$image_uri[2]}' alt='" . govintranetpress_custom_title($slot->post_title) . "' /></a>";
                 }
             }
             if ($newsgrid[$k] == "M") {
                 $image_uri = wp_get_attachment_image_src(get_post_thumbnail_id($slot->ID), 'newsmedium');
                 if ($image_uri != "") {
                     echo "<a href='{$thisURL}'><img class='img img-responsive' src='{$image_uri[0]}' width='{$image_uri[1]}' height='{$image_uri[2]}' alt='" . govintranetpress_custom_title($slot->post_title) . "' /></a>";
                 }
             }
             if ($newsgrid[$k] == "T") {
                 $image_uri = "<a class='pull-right' href='" . $thisURL . "'>" . get_the_post_thumbnail($slot->ID, 'thumbnail', array('class' => 'media-object hidden-xs')) . "</a>";
                 if ($image_uri != "") {
                     $image_url = $image_uri;
                 }
             }
             $thisdate = $slot->post_date;
             $post = get_post($slot->ID);
             setup_postdata($post);
             $thisexcerpt = get_the_excerpt();
             $thisdate = date("j M Y", strtotime($thisdate));
             $ext_icon = '';
             if (get_post_format($slot->ID) == 'link') {
                 $ext_icon = "<span class='dashicons dashicons-migrate'></span> ";
             }
             if ($newsgrid[$k] == "T") {
                 echo "<div class='media'>" . $image_url;
             }
             echo "<div class='media-body'>";
             echo "<h3 class='noborder'>" . $ext_icon . "<a href='" . $thisURL . "'>" . $thistitle . "</a>" . $ext_icon . "</h3>";
             if ($newsgrid[$k] == "Li") {
                 echo "<p>";
                 echo '<span class="listglyph">' . get_the_date("j M Y");
                 comments_number('', ' <span class="dashicons dashicons-admin-comments"></span> 1 comment', ' <span class="dashicons dashicons-admin-comments"></span> % comments');
开发者ID:ryanlfoster,项目名称:govintranet,代码行数:67,代码来源:ht_feature_news.php


示例16: foreach

     foreach ((array) $team as $t) {
         //print_r($taxonomy);
         //echo $taxonomy['name'];
         $themeid = $t;
         $theme = get_post($t);
         $themeparent = $theme->post_parent;
         if ($themeparent == 0) {
             $teamlist = govintranetpress_custom_title($theme->post_title);
             $html .= "" . $teamlist . "<br>";
             //echo $teamlist;
         } else {
             while ($themeparent != 0) {
                 $newteam = get_post($themeparent);
                 $themeparent = $newteam->post_parent;
             }
             $teamlist = govintranetpress_custom_title($newteam->post_title);
             $html .= "" . $teamlist . "<br>";
         }
     }
 }
 if (get_user_meta($userid, 'user_job_title', true)) {
     $meta = get_user_meta($userid, 'user_job_title', true);
     //$meta = str_replace(" ", "&nbsp;", $meta);
     $html .= '<span class="small">' . $meta . "</span><br>";
 }
 if (get_user_meta($userid, 'user_telephone', true)) {
     $html .= '<span class="small"><i class="dashicons dashicons-phone"></i> ' . get_user_meta($userid, 'user_telephone', true) . "</span><br>";
 }
 if (get_user_meta($userid, 'user_mobile', true) && $showmobile) {
     $html .= '<span class="small"><i class="dashicons dashicons-smartphone"></i> ' . get_user_meta($userid, 'user_mobile', true) . "</span>";
 }
开发者ID:ryanlfoster,项目名称:govintranet,代码行数:31,代码来源:page-staff-directory-masonry.php


示例17: widget

    function widget($args, $instance)
    {
        extract($args);
        $title = apply_filters('widget_title', $instance['title']);
        $largeitems = intval($instance['largeitems']);
        $mediumitems = intval($instance['mediumitems']);
        $thumbnailitems = intval($instance['thumbnailitems']);
        $listitems = intval($instance['listitems']);
        global $post;
        echo $before_widget;
        if ($title) {
            echo $before_title . $title . $after_title;
        }
        echo "<div id='ht-feature-news'>";
        //load manual sticky news stories
        $hc = new Pod('homepage_control');
        $top_slot = $hc->get_field('top_news_story');
        //forumalate grid of news stories and formats
        $totalstories = $largeitems + $mediumitems + $thumbnailitems + $listitems;
        $newsgrid = array();
        for ($i = 1; $i <= $totalstories; $i++) {
            if ($i <= $largeitems) {
                $newsgrid[] = "L";
            } elseif ($i <= $largeitems + $mediumitems) {
                $newsgrid[] = "M";
            } elseif ($i <= $largeitems + $mediumitems + $thumbnailitems) {
                $newsgrid[] = "T";
            } elseif ($i <= $largeitems + $mediumitems + $thumbnailitems + $listitems) {
                $newsgrid[] = "Li";
            }
        }
        $siteurl = site_url();
        //manual override news stories
        //display sticky top news stories
        $num_top_slots = count($top_slot);
        $to_fill = $totalstories - $num_top_slots;
        $k = -1;
        $alreadydone = array();
        if ($num_top_slots > 0) {
            foreach ((array) $top_slot as $slot) {
                $newspod = new Pod('news', $slot['ID']);
                if ($newspod->get_field('post_status') != 'publish') {
                    continue;
                }
                $k++;
                $alreadydone[] = $slot['ID'];
                if (function_exists('get_video_thumbnail')) {
       

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP gp函数代码示例发布时间:2022-05-15
下一篇:
PHP goto_url函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap