Пример #1
0
    if ($nav_menu_item->menu_item_parent == 0) {
        array_push($g_main_nav_menu_items, $nav_menu_item);
        $g_main_nav_menu_items_by_parent_id[$nav_menu_item->ID] = array();
    } else {
        array_push($g_main_nav_menu_items_by_parent_id[$nav_menu_item->menu_item_parent], $nav_menu_item);
    }
}
$g_theme_options = get_option(IKIT_TWO_THEME_OPTION_GROUP_GENERAL);
?>

<head>

<?php 
$page_title = null;
global $page, $paged;
$page_title = ikit_get_blog_title();
$page_title .= wp_title('|', false);
$page_slug = null;
// Add the blog description for the home/front page.
$site_description = get_bloginfo('description', 'display');
if ($site_description && (is_home() || is_front_page())) {
    $page_title .= " | {$site_description}";
}
// If page, set the page slug
if (is_singular(array('page'))) {
    $page_slug = $post->post_name;
}
// If post or event, add open graph tags for sharing
if (is_singular(array('post', IKIT_POST_TYPE_IKIT_EVENT))) {
    $page_slug = $post->post_name;
    $feed_image_url = null;
Пример #2
0
    xmlns:dc="http://purl.org/dc/elements/1.1/"
    xmlns:ikit="http://aiga.org/ikit/elements/1.0/"
    xmlns:atom="http://www.w3.org/2005/Atom"
    xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
    xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
    xmlns:media="http://search.yahoo.com/mrss/"
    <?php 
do_action('rss2_ns');
?>
>

<channel>

    <title>
    <?php 
$feed_title = ikit_get_blog_title();
echo $feed_title;
?>
    </title>
    <atom:link href="<?php 
self_link();
?>
" rel="self" type="application/rss+xml" />
    <link><?php 
echo get_permalink($post->ID);
if (empty($type) == false) {
    echo '?type=' . $type;
}
?>
</link>
    <description><?php 
Пример #3
0
/**
 * Currently takes no parameters, just returns list of posts
 */
function ikit_api_v1_post_search()
{
    global $g_options;
    $imus_chapter = $g_options[IKIT_PLUGIN_OPTION_FILTER_IKIT_IMUS_CHAPTER];
    $args = array();
    $args['posts_per_page'] = 20;
    $args['order'] = 'DESC';
    $args['orderby'] = 'meta_value_num';
    $args['meta_key'] = IKIT_CUSTOM_FIELD_GENERIC_ORDERING_DISPLAY_PRIORITY;
    query_posts($args);
    ?>

    <result>
    <site>
        <code><?php 
    echo $imus_chapter;
    ?>
</code>
        <title><![CDATA[<?php 
    echo ikit_get_blog_title();
    ?>
]]></title>
        <linkUrl><![CDATA[<?php 
    echo get_bloginfo('url');
    ?>
]]></linkUrl>
    </site>
    <posts>

    <?php 
    while (have_posts()) {
        the_post();
        global $id;
        $post = get_post($id);
        $post_image_url = ikit_post_get_image_url($id, 'full', null);
        ?>
        <post>
            <id><?php 
        echo $id;
        ?>
</id>
            <title><![CDATA[<?php 
        the_title();
        ?>
]]></title>
            <publishedDate><?php 
        echo mysql2date('Y-m-d H:i:s +0000', get_gmt_from_date($post->post_date), false);
        ?>
</publishedDate>
            <linkUrl><![CDATA[<?php 
        the_permalink();
        ?>
]]></linkUrl>
            <imageUrl><![CDATA[<?php 
        echo $post_image_url;
        ?>
]]></imageUrl>
            <description><![CDATA[<?php 
        echo get_post_meta($id, IKIT_CUSTOM_FIELD_POST_PREVIEW_DESCRIPTION, true);
        ?>
]]></description>
            <author><![CDATA[<?php 
        echo ikit_post_get_author($id, get_the_author());
        ?>
]]></author>
        </post>

        <?php 
    }
    ?>

    </posts>
    </result>

    <?php 
    die;
}