Пример #1
0
									<div class="span12">
									<?php 
            }
            ?>


										<div class="carousel-caption">


											<?php 
            $permalink_url = bre_get_carousel_link($post_id);
            if (strlen($permalink_url) == 0) {
                $permalink_url = function_exists('tcp_get_permalink') ? tcp_get_permalink($post_id) : get_permalink($post_id);
            }
            $bre_carousel_external_link = bre_get_carousel_external_link($post_id);
            $title = bre_get_carousel_title($post_id);
            if (strlen($title) == 0) {
                $title = function_exists('tcp_get_the_title') ? tcp_get_the_title($post_id) : get_the_title($post_id);
            }
            ?>
											<h2 class="carousel-title"><a href="<?php 
            echo $permalink_url;
            ?>
" <?php 
            if ($bre_carousel_external_link) {
                ?>
target="_blank"<?php 
            }
            ?>
><?php 
            echo $title;
    static function bre_carousel_meta_box($post)
    {
        $bre_add_to_home_carousel = bre_is_added_to_home_carousel($post->ID);
        $bre_image_for_carousel = bre_get_image_for_carousel($post->ID);
        $bre_carousel_title = bre_get_carousel_title($post->ID);
        $bre_carousel_link = bre_get_carousel_link($post->ID);
        $bre_carousel_external_link = bre_get_carousel_external_link($post->ID);
        $bre_carousel_slogan = bre_get_carousel_slogan($post->ID);
        ?>
		<?php 
        wp_nonce_field('bre_carousel_noncename', 'bre_carousel_noncename');
        ?>
		<table class="form-table">
		<tbody>
		<tr>
		<th scope="row">
			<label for="bre_add_to_home_carousel"><?php 
        _e('Add to carousel', 'boot-ecommerce');
        ?>
</label>
		</th>
		<td>
			<input type="checkbox" name="bre_add_to_home_carousel" id="bre_add_to_home_carousel" value="yes" <?php 
        checked($bre_add_to_home_carousel);
        ?>
 />
			<span class="description"><?php 
        _e('Recommended size 1170px * 320px.', 'boot-ecommerce');
        ?>
</span>
			<p class="description"><?php 
        _e('Background img has cover value, preserving the image’s original proportions the carousel area is completely covered by the image', 'boot-ecommerce');
        ?>
</p>
		</td>
		</tr>
		<tr>
		<th scope="row">
			<label for="bre_add_to_home_carousel"><?php 
        _e('Background image', 'boot-ecommerce');
        ?>
:</label>
		</th>
		<td>
			<?php 
        if (isset($bre_image_for_carousel['url'])) {
            ?>
			<a href="<?php 
            echo $bre_image_for_carousel['url'];
            ?>
" target="_blank">
				<img width="266" height="207" alt="" class="attachment-post-thumbnail" src="<?php 
            echo $bre_image_for_carousel['url'];
            ?>
">
			</a>
			<label><?php 
            _e('Delete Image', 'boot-ecommerce');
            ?>
 <input type="checkbox" name="bre_image_for_carousel-remove" value="yes" /></label><br/>
			<?php 
        }
        ?>
			<input name="bre_image_for_carousel" id="bre_image_for_carousel" type="file" />
			<p class="description"><?php 
        _e('If you upload a new file, existing one will be deleted.', 'boot-ecommerce');
        ?>
</p>
			<p class="description"><?php 
        _e('Remember to Save or Update to upload or delete the image.', 'boot-ecommerce');
        ?>
</p>
		</td>
		</tr>
		<tr>
		<th scope="row">
			<label for="bre_carousel_title"><?php 
        _e('Carousel title', 'bre-bootstrap-ecommerce');
        ?>
</label>
		</th>
		<td>
			<input type="text" name="bre_carousel_title" value="<?php 
        echo stripslashes($bre_carousel_title);
        ?>
" class="large-text"/>
			<p class="description"><?php 
        _e('If blank current title will be used', 'bre-bootstrap-ecommerce');
        ?>
</p>
		</td>
		</tr>
		<tr>
		<th scope="row">
			<label for="bre_carousel_link"><?php 
        _e('Carousel link', 'bre-bootstrap-ecommerce');
        ?>
</label>
		</th>
		<td>
			<input type="text" name="bre_carousel_link" value="<?php 
        echo $bre_carousel_link;
        ?>
" class="large-text"/>
			<p class="description"><?php 
        _e('If blank current post link will be used', 'bre-bootstrap-ecommerce');
        ?>
</p>
			<br/>
			<label for="bre_carousel_external_link"><?php 
        _e('Carousel external link', 'bre-bootstrap-ecommerce');
        ?>
</label>
			<input type="checkbox" name="bre_carousel_external_link" id="bre_carousel_external_link" value="yes" <?php 
        checked($bre_carousel_external_link);
        ?>
 />
			<p class="description"><?php 
        _e('If checked, link will be Opened in a new window or tab', 'bre-bootstrap-ecommerce');
        ?>
</p>
		</td>
		</tr>
		<tr>
		<th scope="row">
			<label for="bre_carousel_slogan"><?php 
        _e('Carousel slogan', 'bre-bootstrap-ecommerce');
        ?>
</label>
		</th>
		<td>
			<textarea name="bre_carousel_slogan" class="large-text" rows="8"><?php 
        echo stripslashes($bre_carousel_slogan);
        ?>
</textarea>
			<p class="description"><?php 
        _e('If blank current excerpt will be used', 'bre-bootstrap-ecommerce');
        ?>
</p>
		</td>
		</tr>
		</tbody>
		</table>
	<?php 
    }