Пример #1
0
        if ($snippet->post_type != 'snippet') {
            continue;
        }
        ?>
				<tr class="post-<?php 
        echo $snippet->ID;
        ?>
">
					<td><a href="<?php 
        echo get_permalink($snippet_id);
        ?>
" title="پیوند یکتا به <?php 
        echo $snippet->post_title;
        ?>
"><?php 
        if (snihub_is_private($snippet->ID)) {
            echo '<span class="icon-private snippet-title-icon"></span> ';
        }
        ?>
 <?php 
        echo $snippet->post_title;
        ?>
</a></td>
					<td><a href="<?php 
        echo get_permalink($snippet_id);
        ?>
" class="btn btn-primary"><span class="icon-snippets"></span> مشاهده</a></td>
					<td><?php 
        snippet_like_btn($snippet_id);
        ?>
</td>
Пример #2
0
" placeholder="مثال: وردپرس,کاربردی,افزونه">
	</div>

	<div class="form-group">
		<label for="snippet_code">کد مربوطه <small>آن را Paste کنید</small></label>
		<textarea name="submit_snippet[code]" style="width: 100%;direction: ltr;text-align: left;font-family: monospace" rows="10" class="form-control" id="snippet_code"><?php 
if ($edit) {
    echo get_post_meta($edit, 'code', true);
}
?>
</textarea>
	</div>

	<div class="form-group">
		<label for="snippet_priv"><input type="checkbox" name="submit_snippet[no_index]" id="snippet_priv"<?php 
if ($edit != false && snihub_is_private($edit)) {
    echo ' checked';
}
?>
> عدم نمایش در لیست تکه&zwnj;کدها</label>
	</div>

	<div class="form-group">
		<?php 
if ($edit) {
    ?>
			<button type="submit" name="submit_snippet[ok]" value="yes" class="btn btn-success"><span class="icon-edit"></span> ویرایش</button>
		<?php 
} else {
    ?>
			<button type="submit" name="submit_snippet[ok]" value="yes" class="btn btn-primary"><span class="icon-ok"></span> انتشار</button>
Пример #3
0
}
?>
					<?php 
if (have_posts()) {
    while (have_posts()) {
        the_post();
        ?>
							<article class="post" name="snippet-<?php 
        the_ID();
        ?>
" id="snippet-<?php 
        the_ID();
        ?>
">
								<h3><?php 
        if (snihub_is_private(get_the_ID())) {
            echo '<span class="icon-private snippet-title-icon"></span> ';
        }
        ?>
<a href="<?php 
        the_permalink();
        ?>
" title="پیوند یکتا به <?php 
        the_title();
        ?>
"><?php 
        the_title();
        ?>
</a></h3>
								<p><?php 
        the_content();