Пример #1
0
 function meta_description()
 {
     $location = Rewrite::newInstance()->get_location();
     $section = Rewrite::newInstance()->get_section();
     $text = '';
     switch ($location) {
         case 'item':
             switch ($section) {
                 case 'item_add':
                     $text = '';
                     break;
                 case 'item_edit':
                     $text = '';
                     break;
                 case 'send_friend':
                     $text = '';
                     break;
                 case 'contact':
                     $text = '';
                     break;
                 default:
                     $text = osc_item_category() . ', ' . osc_highlight(strip_tags(osc_item_description()), 140) . '..., ' . osc_item_category();
                     break;
             }
             break;
         case 'page':
             $text = osc_highlight(strip_tags(osc_static_page_text()), 140);
             break;
         case 'search':
             $result = '';
             if (osc_count_items() == 0) {
                 $text = '';
             }
             if (osc_has_items()) {
                 $result = osc_item_category() . ', ' . osc_highlight(strip_tags(osc_item_description()), 140) . '..., ' . osc_item_category();
             }
             osc_reset_items();
             $text = $result;
         case '':
             // home
             $result = '';
             if (osc_count_latest_items() == 0) {
                 $text = '';
             }
             if (osc_has_latest_items()) {
                 $result = osc_item_category() . ', ' . osc_highlight(strip_tags(osc_item_description()), 140) . '..., ' . osc_item_category();
             }
             osc_reset_items();
             $text = $result;
             break;
     }
     $text = str_replace('"', "'", $text);
     return $text;
 }
Пример #2
0
        <div class="section">
        	<div class="latestListing">
            <div class="container">
                <div class="row">
                    <div class="col-md-12">
                    <h3><!--<i class="fa fa-bullhorn hidden-xs"></i> --><?php 
_e('Latest listings', 'flatter');
?>
</h3>
                </div>
                </div>
                <div class="row">
                    <div class="col-md-12">
                    <div id="owl-popular" class="owl-carousel">
                        <?php 
if (osc_count_latest_items() == 0) {
    ?>
                            <?php 
    _e('No listings', 'flatter');
    ?>
                        <?php 
} else {
    ?>
                        <?php 
    while (osc_has_latest_items()) {
        ?>
                        <div class="item wow fadeInUp animated">
                            <div class="list">
                                <?php 
        if (osc_images_enabled_at_items()) {
            ?>
Пример #3
0
            ?>
</p>
                            <?php 
        }
        ?>
                            <p><?php 
        echo osc_highlight(strip_tags(osc_item_description()));
        ?>
</p>
                        </div>
                    </div>
                    <?php 
    }
    ?>
                    <?php 
    if (osc_count_latest_items() == osc_max_latest_items()) {
        ?>
                    <div class="row show-all-ads">
                        <div class="span12 columns">
                            <a class="btn primary" href="<?php 
        echo osc_search_show_all_url();
        ?>
"><strong><?php 
        _e("See all offers", 'twitter_bootstrap');
        ?>
 &raquo;</strong></a>
                        </div>
                    </div>
                    <?php 
    }
    ?>