コード例 #1
0
/**
 * Display slide Sort admin
 *
 * @author Soul
 **/
function hm_sort_slides()
{
    $slide = new WP_Query('post_type=slide&posts_per_page=-1&orderby=menu_order&order=ASC');
    ?>
	<div class="wrap">
	<h3>Sort Slides <img src="<?php 
    echo home_url();
    ?>
/wp-admin/images/loading.gif" id="loading-animation" /></h3>
	<ul id="video-list">
	<?php 
    while ($slide->have_posts()) {
        $slide->the_post();
        ?>
		<li id="<?php 
        the_id();
        ?>
"><?php 
        echo the_post_thumbnail(array(60, 60));
        ?>
 <?php 
        the_title();
        ?>
 </li>
	<?php 
    }
    ?>
	</div><!-- End div#wrap //-->
 
<?php 
}
コード例 #2
0
function mvm_display_singer_list()
{
    $args = array('post_type' => 'singer', 'posts_per_page' => -1, 'post_status' => 'published');
    $singers = new WP_Query($args);
    if ($singers->have_posts()) {
        ?>
		<ul class="mvm_singers_list">
		<?php 
        while ($singers->have_posts()) {
            $singers->the_post();
            ?>
			<li id="singer-<?php 
            the_id();
            ?>
" class="mvm_singer" singer-id="<?php 
            the_id();
            ?>
">
				<?php 
            the_title();
            ?>
			</li>
		<?php 
        }
        wp_reset_postdata();
        ?>
		</ul>
	<?php 
    }
}
コード例 #3
0
/**
 * Display Sort admin
 *
 * @return void
 * @author Soul
 **/
function mtheme_sort_portfolio()
{
    $portfolio = new WP_Query('post_type=mtheme_portfolio&posts_per_page=-1&orderby=menu_order&order=ASC');
    ?>
	<div class="wrap">
	<h2>Sort portfolio Slides<img src="<?php 
    echo home_url();
    ?>
/wp-admin/images/loading.gif" id="loading-animation" /></h2>
	<div class="description">
	Drag and Drop the slides to order them
	</div>
	<ul id="portfolio-list">
	<?php 
    while ($portfolio->have_posts()) {
        $portfolio->the_post();
        ?>
		<li id="<?php 
        the_id();
        ?>
">
		<div>
		<?php 
        $image_url = wp_get_attachment_thumb_url(get_post_thumbnail_id());
        $custom = get_post_custom(get_the_ID());
        $portfolio_cats = get_the_terms(get_the_ID(), 'types');
        ?>
		<?php 
        if ($image_url) {
            echo '<img class="mtheme_admin_sort_image" src="' . $image_url . '" width="30px" height="30px" alt="" />';
        }
        ?>
		<span class="mtheme_admin_sort_title"><?php 
        the_title();
        ?>
</span>
		<?php 
        if ($portfolio_cats) {
            ?>
		<span class="mtheme_admin_sort_categories"><?php 
            foreach ($portfolio_cats as $taxonomy) {
                echo ' | ' . $taxonomy->name;
            }
            ?>
</span>
		<?php 
        }
        ?>
		</div>

		</li>
	<?php 
    }
    ?>
	</div><!-- End div#wrap //-->
 
<?php 
}
コード例 #4
0
ファイル: custom-post.php プロジェクト: SayenkoDesign/ividf
function omtm_testimonials_sort_page()
{
    $query = new WP_Query('post_type=testimonials&posts_per_page=-1&orderby=menu_order&order=ASC');
    ?>
	<div class="wrap">
		<div id="icon-edit-pages" class="icon32 icon32-posts-page"><br /></div>
		<h2><?php 
    _e('Sort Testimonials', 'om_testimonials');
    ?>
</h2>
		<p><?php 
    _e('Sort Testimonials by drag-n-drop. Items at the top will appear first.', 'om_testimonials');
    ?>
</p>
	
		<ul id="omtm_testimonials_items">
			<?php 
    while ($query->have_posts()) {
        $query->the_post();
        ?>
				<?php 
        if (get_post_status() == 'publish') {
            ?>
					<li id="<?php 
            the_id();
            ?>
" class="menu-item">
						<dl class="menu-item-bar">
							<dt class="menu-item-handle">
								<span class="menu-item-title"><?php 
            the_title();
            ?>
</span>
							</dt>
						</dl>
						<ul class="menu-item-transport"></ul>
					</li>
				<?php 
        }
        ?>
			<?php 
    }
    ?>
		</ul>
	</div>
	<script>
		jQuery(function($){
			omtm_items_sort('#omtm_testimonials_items','omtm_testimonials_apply_sort');
		});
	</script>
	<?php 
    wp_reset_postdata();
    ?>
	<?php 
}
コード例 #5
0
ファイル: functions.php プロジェクト: richardriffraff/Sherpa
function hide_case_studies()
{
    $the_page_id = the_id();
    $ids_to_hide = array(182);
    $should_hide = false;
    foreach ($ids_to_hide as $id) {
        if ($the_page_id == id) {
            $should_hide == true;
        }
    }
    return $should_hide;
}
コード例 #6
0
function reorder_admin_jobs_callback()
{
    $args = array('post_type' => 'job', 'orderby' => 'menu_order', 'order' => 'ASC', 'post_status' => 'publish', 'no_found_rows' => true, 'update_post_term_cache' => false, 'post_per_post' => 50);
    $job_listing = new WP_Query($args);
    ?>
	
	<div id="job-sort" class="wrap">
		<div id="icon-job-admin" class="icon32"><br /></div>
		<h2><?php 
    _e('Sort Job Positions', 'wp-job-listing');
    ?>
<img src="<?php 
    echo esc_url(admin_url() . '/images/loading.gif');
    ?>
" id="loading-animation"></h2> 
			<?php 
    if ($job_listing->have_posts()) {
        ?>
				<p><?php 
        _e('<strong>Note:</strong> this only affects the Jobs listed using the shortcode functions', 'wp-job-listing');
        ?>
</p>
				<ul id="custom-type-list">
					<?php 
        while ($job_listing->have_posts()) {
            $job_listing->the_post();
            ?>
						<li id="<?php 
            esc_attr(the_id());
            ?>
"><?php 
            esc_html(the_title());
            ?>
</li>
					<?php 
        }
        ?>
				</ul>
			<?php 
    } else {
        ?>
				<p><?php 
        _e('You have no Jobs to sort.', 'wp-job-listing');
        ?>
</p>
			<?php 
    }
    ?>
	</div>

	<?php 
}
コード例 #7
0
function theme_portfolio_sort()
{
    $portfolios = new WP_Query('post_type=portfolio&posts_per_page=-1&orderby=menu_order&order=ASC');
    ?>
    <div class="wrap">
        <div id="icon-tools" class="icon32"><br /></div>
        <h2><?php 
    _e('Sort Portfolio Items', 'framework');
    ?>
</h2>
        <p><?php 
    _e('Drag portfolio items to organize.', 'framework');
    ?>
</p>

        <ul id="portfolio_list">
            <?php 
    while ($portfolios->have_posts()) {
        $portfolios->the_post();
        ?>
                <?php 
        if (get_post_status() == 'publish') {
            ?>
                    <li id="<?php 
            the_id();
            ?>
" class="menu-item">
                        <dl class="menu-item-bar">
                            <dt class="menu-item-handle">
                                <span class="menu-item-title"><?php 
            the_title();
            ?>
</span>
                            </dt>
                        </dl>
                        <ul class="menu-item-transport"></ul>
                    </li>
                <?php 
        }
        ?>
            <?php 
    }
    ?>
            <?php 
    wp_reset_postdata();
    ?>
        </ul>
    </div>
<?php 
}
コード例 #8
0
function tpp_posts_widget()
{
    $tpp_posts_query = new WP_Query('&posts_per_page=10&orderby=comment_count&order=DESC');
    ?>
	<h3><?php 
    _e('Top Posts:');
    ?>
</h3>
	<?php 
    if ($tpp_posts_query->have_posts()) {
        while ($tpp_posts_query->have_posts()) {
            $tpp_posts_query->the_post();
            ?>
	<div class="tpp_posts">
		<a href="<?php 
            echo the_permalink();
            ?>
"
		id="<?php 
            echo the_id();
            ?>
"
		title="<?php 
            echo the_title();
            ?>
"
		class="comment_link"><?php 
            echo the_title();
            ?>
</a>
		(<?php 
            echo comments_number();
            ?>
)
	</div>
	<?php 
        }
    }
    ?>
	<?php 
}
コード例 #9
0
ファイル: top-posts-widget.php プロジェクト: sondang86/mySite
function top_post()
{
    $query = new WP_Query(array('posts_per_page' => 5, 'orderby' => 'date', 'order' => 'DESC'));
    ?>
    <h3>Posts on this page</h3>
    <ul>
        <?php 
    if ($query->have_posts()) {
        while ($query->have_posts()) {
            $query->the_post();
            ?>
                <div class="tpp_posts">
                    <a href="<?php 
            echo the_permalink();
            ?>
"
                       id="<?php 
            echo the_id();
            ?>
"
                       title="<?php 
            echo the_title();
            ?>
"
                       class="comment_link"><?php 
            echo the_title();
            ?>
</a>
                    (<?php 
            echo comments_number();
            ?>
)
                </div>
                <?php 
        }
    }
    ?>
    </ul>
    <?php 
}
コード例 #10
0
function rah_get_secret_groups_ajax()
{
    $sg_query = new WP_Query("post_type=groups&orderby=title&order=ASC&posts_per_page=-1&meta_key=_rah_secret_group&meta_value=1");
    if ($sg_query->have_posts()) {
        ?>
		<p id="existing_secret">
			<select id="existing_groups" name="existing_secret_group">
				<option value="-1">Select A Group</option>
				<?php 
        while ($sg_query->have_posts()) {
            $sg_query->the_post();
            ?>
<option value="<?php 
            the_id();
            ?>
"><?php 
            the_title();
            ?>
</option><?php 
        }
        ?>
			</select>&nbsp;<input type="checkbox" id="group_not_listed" name="group_not_listed" value="1">&nbsp;<label for="group_not_listed">My Group Isn't Listed</label>
		</p>
		<p id="new_secret_group" style="display:none;">
			<input type="text" size="50" id="new_secret_group_title" name="new_secret_group_title" value="" placeholder="Your Group Name">
			<textarea name="new_secret_group_description" placeholder="Group Description. You can copy this from your Facebook Group."></textarea>
		</p>
		<?php 
    } else {
        ?>
		<p id="new_secret_group">
			<input type="hidden" name="group_not_listed" value="1" />
			<input type="text" size="50" id="new_secret_group_title" name="new_secret_group_title" value="" placeholder="Your Group Name">
			<textarea name="new_secret_group_description" placeholder="Group Description. You can copy this from your Facebook Group."></textarea>
		</p>
		<?php 
    }
    die;
}
コード例 #11
0
ファイル: sorting.php プロジェクト: WP-Panda/allergenics
function jwt_a_f_p_posts_sort_callback()
{
    $faq = new WP_Query('post_type=faq&posts_per_page=-1&orderby=menu_order&order=ASC');
    ?>
	<div class="wrap">
		<h3>Sort FAQ<img src="<?php 
    echo home_url();
    ?>
/wp-admin/images/loading.gif" id="loading-animation" /></h3>
		<ul id="slide-list">
			<?php 
    if ($faq->have_posts()) {
        ?>
				<?php 
        while ($faq->have_posts()) {
            $faq->the_post();
            ?>
					<li id="<?php 
            the_id();
            ?>
"><?php 
            the_title();
            ?>
</li>			
				<?php 
        }
        ?>
			<?php 
    } else {
        ?>
				<li>There is no FAQ was Created !!!</li>		
			<?php 
    }
    ?>
		</ul>
	</div>
<?php 
}
コード例 #12
0
function client_posts_sort_callback()
{
    $clients = new WP_Query('post_type=client&posts_per_page=-1&orderby=menu_order&order=ASC');
    ?>
	<div class="wrap">
		<h3>Sort Clients<img src="<?php 
    echo home_url();
    ?>
/wp-admin/images/loading.gif" id="loading-animation" /></h3>
		<ul id="slide-list">
			<?php 
    if ($clients->have_posts()) {
        ?>
				<?php 
        while ($clients->have_posts()) {
            $clients->the_post();
            ?>
					<li id="<?php 
            the_id();
            ?>
"><?php 
            the_title();
            ?>
</li>			
				<?php 
        }
        ?>
			<?php 
    } else {
        ?>
				<li>There is no Slide Created</li>		
			<?php 
    }
    ?>
		</ul>
	</div>
<?php 
}
コード例 #13
0
function sort_quotes_custom_1()
{
    $quotes = new WP_Query('post_type=quotes-custom-1&posts_per_page=-1&orderby=menu_order&order=ASC');
    ?>
    <div class="wrap">
    <div id="icon-tools" class="icon32"><br /></div>
    <h2><?php 
    _e('Sort Quote Items', 'nash');
    ?>
 <img src="<?php 
    echo home_url();
    ?>
/wp-admin/images/loading.gif" id="loading-animation" /></h2>
    <p><?php 
    _e('Click, drag, re-order. Repeat as neccessary. Quote item at the top will appear first on your page.', 'nash');
    ?>
</p>
    <ul id="post-list">
    <?php 
    while ($quotes->have_posts()) {
        $quotes->the_post();
        ?>
        <li id="<?php 
        the_id();
        ?>
"><?php 
        the_title();
        ?>
</li>          
    <?php 
    }
    ?>
    </div>
 
<?php 
}
コード例 #14
0
function sort_team()
{
    $team = new WP_Query('post_type=team&posts_per_page=-1&orderby=menu_order&order=ASC');
    ?>
    <div class="wrap">
    <div id="icon-tools" class="icon32"><br /></div>
    <h2><?php 
    _e('Sort Team Members', 'kula');
    ?>
 <img src="<?php 
    echo home_url();
    ?>
/wp-admin/images/loading.gif" id="loading-animation" /></h2>
    <p><?php 
    _e('Click, drag, re-order. Repeat as neccessary. Team Member at the top will appear first on your page.', 'kula');
    ?>
</p>
    <ul id="post-list">
    <?php 
    while ($team->have_posts()) {
        $team->the_post();
        ?>
        <li id="<?php 
        the_id();
        ?>
"><?php 
        the_title();
        ?>
</li>          
    <?php 
    }
    ?>
    </div>
 
<?php 
}
コード例 #15
0
    /**
     * Sort Page
     *
     * @return WP_FAQ_Manager
     */
    public function sort_page()
    {
        $questions = new WP_Query('post_type=question&posts_per_page=-1&orderby=menu_order&order=ASC');
        ?>
		<div id="faq-admin-sort" class="wrap">
		<div id="icon-faq-admin" class="icon32"><br /></div>
		<h2><?php 
        _e('Sort FAQs', 'wpfaq');
        ?>
 <img src=" <?php 
        echo admin_url();
        ?>
/images/loading.gif" id="loading-animation" /></h2>
			<?php 
        if ($questions->have_posts()) {
            ?>
	    	<p><?php 
            _e('<strong>Note:</strong> this only affects the FAQs listed using the shortcode functions', 'wpfaq');
            ?>
</p>
			<ul id="custom-type-list">
				<?php 
            while ($questions->have_posts()) {
                $questions->the_post();
                ?>
					<li id="<?php 
                the_id();
                ?>
"><?php 
                the_title();
                ?>
</li>
				<?php 
            }
            ?>
	    	</ul>
			<?php 
        } else {
            ?>
			<p><?php 
            _e('You have no FAQs to sort.', 'wpfaq');
            ?>
</p>
			<?php 
        }
        ?>
		</div>

	<?php 
    }
コード例 #16
0
ファイル: sidebar.php プロジェクト: pandhu/sharima
											<?php 
    }
    ?>
	
											</div>
											<div class="lp-title-cont left">
												<p class="latest-post-sidebar-title"><a class="a-invert" href="#"><?php 
    the_title();
    ?>
</a></p>
												<p class="latest-post-sidebar-date"><?php 
    zerif_posted_on();
    ?>
</p>
												<p class="latest-post-sidebar-comm"><?php 
    wp_count_comments(the_id());
    ?>
 comments</p>
											</div>	
										</li>
									<?php 
}
?>
 	
								</ul>
							</div>
						</div>
					</div>				

					<!-- TAGS WIDGET -->
					<div class="title-lines-sidebar m-bot-30">
コード例 #17
0
ファイル: method-feed.php プロジェクト: rmccue/Lilina
    public static function rss2()
    {
        header('Content-Type: application/rss+xml; charset=' . get_option('encoding', 'utf-8'), true);
        echo '<?xml version="1.0" encoding="' . get_option('encoding', 'utf-8') . '"?' . '>';
        ?>

<!-- Generated by Lilina/<?php 
        echo LILINA_CORE_VERSION;
        ?>
 -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	<?php 
        do_action('rss2_ns');
        ?>
>

<channel>
	<title><?php 
        echo get_option('sitename');
        ?>
</title>
	<link><?php 
        echo get_option('baseurl');
        ?>
</link>
	<description><?php 
        echo get_option('sitename');
        ?>
</description>
	<atom:link href="<?php 
        echo get_option('baseurl');
        ?>
rss.php" rel="self" type="application/rss+xml" />
	<?php 
        //Need to fix this
        ?>
	<pubDate><?php 
        echo date('D, d M Y H:i:s +0000');
        ?>
</pubDate>
	<generator>http://getlilina.org/?v=<?php 
        echo LILINA_CORE_VERSION;
        ?>
</generator>
	<language><?php 
        echo get_option('lang');
        ?>
</language>
	<?php 
        do_action('rss2_head');
        if (has_items()) {
            while (has_items()) {
                the_item();
                ?>
	<item>
		<title><![CDATA[<?php 
                the_title();
                ?>
]]></title>
		<link><?php 
                the_link();
                ?>
</link>
		<pubDate><?php 
                the_date(array('format' => 'D, d M Y H:i:s +0000'));
                ?>
</pubDate>
		<?php 
                //Not entirely accurate; uses the feed name, not the author
                ?>
		<dc:creator><?php 
                the_feed_name();
                ?>
</dc:creator>

		<guid isPermaLink="false"><?php 
                the_id();
                ?>
</guid>
		<description><![CDATA[<?php 
                the_summary();
                ?>
]]></description>
		<content:encoded><![CDATA[<?php 
                the_content();
                ?>
]]></content:encoded>
		<?php 
                do_action('rss2_item');
                ?>
	</item>
	<?php 
            }
        }
        ?>
</channel>
</rss>
<?php 
    }
コード例 #18
0
    /**
     * Post Row Output
     *
     * @author Ronald Huereca <*****@*****.**>
     * @since Reorder 2.1.0
     * @access private
     * @param stdclass $post object to post
     */
    private function output_row($post)
    {
        global $post;
        setup_postdata($post);
        ?>
		<li id="list_<?php 
        the_id();
        ?>
" data-id="<?php 
        the_id();
        ?>
" data-menu-order="<?php 
        echo absint($post->menu_order);
        ?>
" data-parent="<?php 
        echo absint($post->post_parent);
        ?>
" data-post-type="<?php 
        echo esc_attr($post->post_type);
        ?>
">
			<?php 
        //Get the children
        $args = array('post_type' => $this->post_type, 'post_status' => $this->post_status, 'posts_per_page' => 100, 'post_parent' => get_the_ID(), 'orderby' => 'menu_order', 'order' => $this->order);
        $children = new WP_Query($args);
        //Output parent title
        if ($children->have_posts()) {
            ?>
				<div><?php 
            the_title();
            echo defined('REORDER_DEBUG') && REORDER_DEBUG == true ? ' - Menu Order:' . absint($post->menu_order) : '';
            ?>
<a href='#' style="float: right"><?php 
            esc_html_e('Expand', 'metronet-reorder-posts');
            ?>
</a></div>
				<?php 
        } else {
            ?>
				<div><?php 
            the_title();
            echo defined('REORDER_DEBUG') && REORDER_DEBUG == true ? ' - Menu Order:' . absint($post->menu_order) : '';
            ?>
</div>
				<?php 
        }
        if ($children->have_posts()) {
            echo '<ul class="children">';
            while ($children->have_posts()) {
                global $post;
                $children->the_post();
                $this->output_row($post);
            }
            echo '</ul>';
        }
        ?>
		</li>
		<?php 
    }
コード例 #19
0
    /**
     * Outputs the content of the widget
     *
     * @param array $args
     * @param array $instance
     */
    public function widget($args, $instance)
    {
        // outputs the content of the widget
        extract($args, EXTR_SKIP);
        $title = apply_filters('widget_title', $instance['title']);
        if (isset($args['before_widget'])) {
            echo $args['before_widget'];
        }
        if (!empty($title)) {
            echo $args['before_title'] . $title . $args['after_title'];
        }
        $queryargs = array('post_type' => 'rotary_projects', 'posts_per_page' => -1, 'order' => 'DESC', 'orderby' => 'meta_value', 'meta_key' => 'rotary_project_date');
        $query = new WP_Query($queryargs);
        if ($query->have_posts()) {
            ?>
			<select id="projectwidget" name="projectwidget">
			<option value=""><?php 
            echo _e('Select Project', 'Rotary');
            ?>
</option>
			<?php 
            while ($query->have_posts()) {
                $query->the_post();
                ?>
			
				<option value="<?php 
                echo get_site_url();
                ?>
/posts/?projectid=<?php 
                the_id();
                ?>
" <?php 
                echo get_the_id() == $_REQUEST['projectid'] ? 'selected="selected"' : '';
                ?>
><?php 
                the_title();
                ?>
</option>  				
			<?php 
            }
            ?>
			</select>	
			<?php 
            // Reset Post Data
            wp_reset_postdata();
            ?>
		   	
		<?php 
        }
        if (isset($args['after_widget'])) {
            echo $args['after_widget'];
        }
    }
コード例 #20
0
ファイル: box.php プロジェクト: ghahremany/linkam
-->
</style><head>
<title>لینکدونی پرشین اسکریپت</title>
</head>
<body dir="rtl" link="#000000" vlink="#333300" alink="#216269">

<div style="text-align:right; direction:rtl">

<img border="0" src="<?php 
echo theme_dir();
?>
img/linkdump.gif" width="11" height="9"> لینکدونی - مطالب جالب 
و خواندنی از سراسر وب
<br>
<br>

<?php 
if (have_link()) {
    while (have_link()) {
        the_link();
        echo "<a href='link-" . the_id() . ".html' target='_blank' title='" . the_title() . "'>" . the_title() . " [" . the_count() . "]</a><br>";
    }
}
?>
<br><a href="<?php 
echo site_url();
?>
" target="_blank">:: ادامه - آرشیو لینکدونی</a>
</div>
</body>
</html>
コード例 #21
0
        /**
         * Append the document feedback form to the document
         * We're using ob_*() functions to maintain readability of the form
         *
         * @since 1.0
         */
        function filter_the_content_append_feedback_form($the_content)
        {
            global $post;
            if (!is_singular() || !in_array($post->post_type, $this->post_types) || !is_user_logged_in()) {
                return $the_content;
            }
            // @todo Show a message if the user submitted a response in the last X minutes
            $current_user = wp_get_current_user();
            $post_id = $post->ID;
            $current_user_id = $current_user->ID;
            // get transient if the user already sent the feedback
            $transient_option = $this->options['transient_prefix'] . $current_user_id . '_' . $post_id;
            $transient = get_transient($transient_option);
            // display the form if transient is empty
            if (!$transient) {
                // Javascript for the form
                ob_start();
                ?>
			<script type="text/javascript">
				jQuery(document).ready(function(){
					jQuery('#document-feedback .document-feedback-form input.button').click(function(){
						var button_id = jQuery(this).attr('id');
						var comment_id = jQuery('#document-feedback-comment-id').val();
						var post_id = jQuery('#document-feedback-post-id').val();
						var nonce = jQuery('#document-feedback-nonce').val();
							
						if ( button_id == 'document-feedback-accept-button' ) {
							var form = 'prompt';
							var response = 'accept';
						} else if ( button_id == 'document-feedback-decline-button' ) {
							var form = 'prompt';
							var response = 'decline';
						} else {
							var form = 'response';
							var response = jQuery(this).siblings('.document-feedback-response').val();
						}
						var df_data = {
							action: 'document_feedback_form_submission',
							form: form,
							nonce: nonce,
							response: response,
							post_id: post_id,
							comment_id: comment_id,
						};
						jQuery.post( ajaxurl, df_data, function( response ) {
							var comment_id = response.comment_id;
							if( comment_id === undefined || isNaN( parseInt( comment_id ) ) ) {
								comment_id = 0;
							}
							if( df_data.response === 'accept' ) {
								jQuery('#document-feedback-comment-id').val( comment_id );
								jQuery('#document-feedback .document-feedback-form').hide();
								jQuery('#document-feedback-accept').show();
								jQuery('#document-feedback-decline').hide();
							} else if( df_data.response === 'decline' ) {
								jQuery('#document-feedback-comment-id').val( comment_id );
								jQuery('#document-feedback .document-feedback-form').hide();
								jQuery('#document-feedback-accept').hide();
								jQuery('#document-feedback-decline').show();
							} else if( response.message === 'final_response' ) {
								jQuery('#document-feedback-accept').hide();
								jQuery('#document-feedback-decline').hide();
								jQuery('#document-feedback-success').show();
							}
							return false;
						});
						return false;
					});
				});
			</script>
			<?php 
                $script = ob_get_contents();
                ob_end_clean();
                // Styles for the form
                ob_start();
                ?>
			<style type="text/css">
				#document-feedback {
					border-top: 1px solid #EEE;
					margin-top: 10px;
					padding-top: 10px;
				}
				#document-feedback #document-feedback-accept,
				#document-feedback #document-feedback-decline,
				#document-feedback #document-feedback-success {
					display: none;
				}
				#document-feedback label.block {
					display:block;
				}
				#document-feedback input.medium {
					width: 70%;
				}
				#document-feedback #document-feedback-prompt label {
					margin-right: 20px;
				}
			</style>
			<?php 
                $styles = ob_get_contents();
                ob_end_clean();
                // Initial prompt
                ob_start();
                ?>
			<div id="document-feedback-success"><?php 
                echo esc_html($this->strings['final_response']);
                ?>
</div>
			<form id="document-feedback-prompt" class="document-feedback-form" method="POST" action="">
				<label><?php 
                echo esc_html($this->strings['prompt']);
                ?>
</label>
				<input type="submit" class="button" id="document-feedback-accept-button" name="document-feedback-accept-button" value="<?php 
                echo esc_attr($this->strings['accept']);
                ?>
" />
				<input type="submit" class="button" id="document-feedback-decline-button" name="document-feedback-decline-button" value="<?php 
                echo esc_attr($this->strings['decline']);
                ?>
" />
			</form>
			<?php 
                $prompt = ob_get_contents();
                ob_end_clean();
                // Follow-up accept question
                ob_start();
                ?>
			<form id="document-feedback-accept" class="document-feedback-form" method="POST" action="">
				<label class="block" for="document-feedback-accept-response"><?php 
                echo esc_html($this->strings['prompt_response'] . ' ' . $this->strings['accept_prompt']);
                ?>
</label>
				<input type="text" class="medium document-feedback-response" id="document-feedback-accept-response" name="document-feedback-accept-response" />
				<input type="submit" class="button document-feedback-submit-response" name="submit" value="<?php 
                _e('Send feedback', 'document-feedback');
                ?>
" />
			</form>
			<?php 
                $accept = ob_get_contents();
                ob_end_clean();
                // Follow-up decline question
                ob_start();
                ?>
			<form id="document-feedback-decline" class="document-feedback-form" method="POST" action="">
				<label class="block" for="document-feedback-decline-response"><?php 
                echo esc_html($this->strings['prompt_response'] . ' ' . $this->strings['decline_prompt']);
                ?>
</label>
				<input type="text" class="medium document-feedback-response" id="document-feedback-decline-response" name="document-feedback-decline-response" />
				<input type="submit" class="button document-feedback-submit-response" name="submit" value="<?php 
                _e('Send feedback', 'document-feedback');
                ?>
" />
			</form>
			<?php 
                $decline = ob_get_contents();
                ob_end_clean();
                // Other data to store in a hidden fashion
                ob_start();
                ?>
			<input type="hidden" id="document-feedback-post-id" value="<?php 
                the_id();
                ?>
" />
			<input type="hidden" id="document-feedback-comment-id" value="0" />
			<?php 
                wp_nonce_field('document-feedback', 'document-feedback-nonce');
                ?>
			<?php 
                $data = ob_get_contents();
                ob_end_clean();
                return $the_content . $script . $styles . '<div id="document-feedback">' . $prompt . $accept . $decline . $data . '</div>';
            } else {
                ob_start();
                ?>
			<div id="document-feedback-success-sent"><?php 
                echo esc_html($this->strings['final_response']);
                ?>
</div>
			
			<?php 
                $data = ob_get_contents();
                ob_end_clean();
                return $the_content . '<div id="document-feedback">' . $data . '</div>';
            }
        }
コード例 #22
0
                    </span> <span style="padding-left:10px;">
                    <button class="button-secondary" value="" onclick="listPost(<?php echo $dset->id;?>)">List</button>
                    </span> <span class="ajx-loaderp" style="padding-left:12px; display:none;"><img src="<?php echo advps_url;?>/images/ajax-loader.gif" /></span></td>
                </tr>
                <tr>
                  <th scope="row">Select post from list</th>
                  <td><select name="advps_plist[]" multiple="multiple" style="min-height:250px; min-width:300px;" id="advps-plist-field<?php echo $dset->id;?>">
                      <?php 
						$lpargs = array(
								'post_type'      => ($plist['advps_post_stypes']) ? $plist['advps_post_stypes'] : 'post',
								'posts_per_page' => ($plist['advps_plistmax']) ? $plist['advps_plistmax'] : 99,
								'orderby'		 => ($plist['advps_plistorder_by']) ? $plist['advps_plistorder_by'] : 'date',
								'order'			 => ($plist['advps_plistorder']) ? $plist['advps_plistorder'] : 'DESC'
						);
					 	$pl_query = new WP_Query($lpargs); while ($pl_query->have_posts()) : $pl_query->the_post();?>
                      <option value="<?php the_id();?>" <?php if(isset($plist['advps_plist']) && in_array(get_the_id(),$plist['advps_plist'])){echo 'selected="selected"';}?>>
                      <?php the_title();?>
                      </option>
                      <?php endwhile;wp_reset_query();?>
                    </select>
                    <span style="padding-left:10px; font-size:10px; font-style:italic; vertical-align:top;">[ * You can select multiple ]</span></td>
                </tr>
                <tr>
                  <th scope="row">&nbsp;</th>
                  <td><input type="submit" name="advps_submit" value="Save changes" class="button-primary" onclick="updateOptionSet('plist<?php echo $dset->id;?>')" />
                    <span class="ajx-loader" style="padding-left:15px; display:none;"><img src="<?php echo advps_url;?>/images/ajax-loader.gif" /></span><span class="ajx-sts"></span></td>
                </tr>
              </table>
              <input type="hidden" name="opt_field" value="plist" />
              <input type="hidden" value="<?php echo $dset->id;?>" name="opt_id" />
            </form>
コード例 #23
0
ファイル: page-list.php プロジェクト: richardriffraff/Sherpa
	
	<?php 
get_sidebar('head');
?>
	
<!-- START LAYOUT (ID: Template) [All Content always sits inside the template] -->
<!-- START WP, page-list.php -->
		
	<div id="template" class="three1 clearfix">
		<div id="clm1">
			
			<article class="article2">
				<h1 class="hide"></h1>
			
			<?php 
$this_page_id = get_post(the_id())->ID;
$this_child_pages = get_pages('child_of=' . $this_page_id . '&parent=' . $this_page_id);
foreach ($this_child_pages as $child_page) {
    ?>
				
				<section class="item">
					<a href="<?php 
    echo bloginfo('url');
    ?>
/?page_id=<?php 
    echo $child_page->ID;
    ?>
" title="View: <?php 
    echo $child_page->post_title;
    ?>
">
コード例 #24
0
function tm_widget_asides($args)
{
    extract($args);
    $options = get_option('tm_widget_asides');
    $title = $options['title'];
    $category = $options['category'];
    $count = $options['count'];
    $siteuri = get_category_link($category);
    $feeduri = $siteuri . 'rss';
    $output = '';
    query_posts('cat=' . $category . '&posts_per_page=' . $count);
    echo $before_widget . $before_title . '<a href="' . $siteuri . '" title="' . $title . '">' . $title . '</a><!--<a href="' . $feeduri . '"><img src="' . get_bloginfo('stylesheet_directory') . '/images/02.png"></a>-->' . $after_title;
    if (have_posts()) {
        while (have_posts()) {
            the_post();
            ?>
                
                <div id="post-<?php 
            the_id();
            ?>
"> 
                    <?php 
            the_content();
            ?>
                    <span><a href="<?php 
            the_permalink();
            ?>
" rel="bookmark" title="Permalink to <?php 
            the_title();
            ?>
">#</a></span>&nbsp;<span>(<?php 
            comments_popup_link('0', '1', '%', '', '0');
            ?>
)</span>&nbsp;<span><?php 
            edit_post_link('e', '(', ')');
            ?>
</span>
                </div>
<?php 
        }
    } else {
        ?>
        
            <p><?php 
        _e('Sorry, no posts matched your criteria.');
        ?>
</p>
<?php 
    }
    echo $after_widget;
}
コード例 #25
0
function mtphr_gallery_archive_display($atts, $content = null)
{
    // Set the defaults
    $defaults = array('posts_per_page' => 6, 'columns' => 3, 'order' => 'DESC', 'orderby' => 'menu_order', 'categories' => false, 'tags' => false, 'operator' => 'IN', 'excerpt_length' => 140, 'excerpt_more' => '&hellip;', 'assets' => 'thumbnail,like,title,excerpt', 'responsive' => false);
    $defaults = apply_filters('mtphr_gallery_archive_default_args', $defaults);
    $args = shortcode_atts($defaults, $atts);
    extract($args);
    // Set the responsiveness of the grid
    $row = apply_filters('mtphr_galleries_responsive_grid', $responsive);
    $row_class = $row ? 'mtphr-galleries-row-responsive' : 'mtphr-galleries-row';
    // Filter the container
    $container = apply_filters('mtphr_gallery_container', 'article');
    // Set the span
    $span = intval(12 / intval($columns));
    // Create an array of the order
    $asset_order = explode(',', $assets);
    $page = get_query_var('paged') ? get_query_var('paged') : 1;
    $args = array('post_type' => 'mtphr_gallery', 'order' => sanitize_text_field($order), 'orderby' => sanitize_text_field($orderby), 'paged' => $page, 'posts_per_page' => intval($posts_per_page));
    // Check for query var filters
    if (isset($_GET['category'])) {
        $categories = $_GET['category'];
    }
    if (isset($_GET['tag'])) {
        $tags = $_GET['tag'];
    }
    if ($categories || $tags) {
        $args['tax_query'] = array();
    }
    if ($categories) {
        $category_array = explode(',', $categories);
        $args['tax_query'][] = array('taxonomy' => 'mtphr_gallery_category', 'field' => 'slug', 'terms' => $category_array, 'operator' => $operator);
    }
    if ($tags) {
        $tag_array = explode(',', $tags);
        $args['tax_query'][] = array('taxonomy' => 'mtphr_gallery_tag', 'field' => 'slug', 'terms' => $tag_array, 'operator' => $operator);
    }
    // Save the original query & create a new one
    global $wp_query;
    $original_query = $wp_query;
    $wp_query = null;
    $wp_query = new WP_Query();
    $wp_query->query($args);
    ?>

	<?php 
    ob_start();
    ?>

	<div class="mtphr-galleries-archive">

	<?php 
    if ($wp_query->have_posts()) {
        while ($wp_query->have_posts()) {
            $wp_query->the_post();
            ?>

		<?php 
            // Get the count
            $count = $wp_query->current_post;
            if ($count % intval($columns) == 0) {
                echo '<div class="' . $row_class . '">';
            }
            ?>

		<div class="mtphr-galleries-grid<?php 
            echo $span;
            ?>
">

			<?php 
            do_action('mtphr_gallery_before');
            ?>
			<<?php 
            echo $container;
            ?>
 id="post-<?php 
            the_id();
            ?>
" <?php 
            post_class('mtphr-clearfix');
            ?>
>
				<?php 
            do_action('mtphr_gallery_top');
            ?>

				<?php 
            $permalink = $categories ? esc_url(add_query_arg(array('taxonomy' => 'mtphr_gallery_category', 'terms' => $categories), get_permalink())) : esc_url(remove_query_arg(array('taxonomy', 'terms'), get_permalink()));
            foreach ($asset_order as $asset) {
                switch (trim($asset)) {
                    case 'thumbnail':
                        // Display the gallery thumb
                        if ($thumbnail = get_mtphr_gallery_thumbnail()) {
                            echo apply_filters('mtphr_gallery_thumbnail', $thumbnail, $permalink);
                        }
                        break;
                    case 'like':
                        echo get_mtphr_gallery_likes();
                        break;
                    case 'title':
                        // Display the gallery title
                        $title = '<h2 class="mtphr-gallery-title"><a href="' . $permalink . '" title="' . sprintf(esc_attr__('Permalink to %s', 'mtphr-galleries'), the_title_attribute('echo=0')) . '" rel="bookmark">' . get_the_title() . '</a></h2>';
                        echo apply_filters('mtphr_gallery_archive_title', $title);
                        break;
                    case 'excerpt':
                        if ($excerpt_length > 0) {
                            $excerpt = wp_html_excerpt(get_the_excerpt(), intval($excerpt_length));
                            $links = array();
                            preg_match('/{(.*?)\\}/s', $excerpt_more, $links);
                            if (isset($links[0])) {
                                $more_link = '<a href="' . $permalink . '">' . $links[1] . '</a>';
                                $more = preg_replace('/{(.*?)\\}/s', $more_link, $excerpt_more);
                                $excerpt .= $more;
                            }
                            // Display the member excerpt
                            echo '<p class="mtphr-gallery-excerpt">' . apply_filters('mtphr_gallery_excerpt', $excerpt, $excerpt_length, $excerpt_more) . '</p>';
                        }
                        break;
                }
            }
            ?>

				<?php 
            do_action('mtphr_gallery_bottom');
            ?>
			</<?php 
            echo $container;
            ?>
><!-- #post-<?php 
            the_ID();
            ?>
 -->
			<?php 
            do_action('mtphr_gallery_after');
            ?>

		</div>

		<?php 
            // Get the count
            $count = $count + 1;
            if ($count % intval($columns) == 0 || $count == $wp_query->post_count) {
                echo '</div>';
            }
            ?>

	<?php 
        }
    } else {
    }
    ?>

	<?php 
    if ($wp_query->max_num_pages > 1) {
        ?>

		<?php 
        ob_start();
        ?>
		<nav class="mtphr-galleries-content-nav clearfix">
			<?php 
        if ($prev = get_previous_posts_link(__('Newer', 'mtphr-galleries'))) {
            ?>
			<div class="mtphr-galleries-nav-next"><?php 
            echo $prev;
            ?>
</div>
			<?php 
        }
        ?>
			<?php 
        if ($next = get_next_posts_link(__('Older', 'mtphr-galleries'))) {
            ?>
			<div class="mtphr-galleries-nav-previous"><?php 
            echo $next;
            ?>
</div>
			<?php 
        }
        ?>
		</nav>

		<?php 
        echo apply_filters('mtphr_galleries_archive_navigation', ob_get_clean());
        ?>

	<?php 
    }
    ?>

	<?php 
    $wp_query = null;
    $wp_query = $original_query;
    wp_reset_postdata();
    ?>

	</div><!-- .mtphr-gallery-archive -->

	<?php 
    // Return the output
    return ob_get_clean();
}
コード例 #26
0
function easy_ads_control_section()
{
    global $get_value;
    ?>
<div class="wrap repeater-container">
    <div class="repeater-header">
        <h2><?php 
    _e('Easy Adverts', 'easy-ads-manager');
    ?>
</h2>
        <small><?php 
    _e('Adverts Control ', 'easy-ads-manager');
    ?>
</small>
    </div>
<?php 
    if (isset($_POST['easy_ads_update'])) {
        /// if update ads
        $post_information = array('ID' => wp_strip_all_tags($_POST['easy_ads_id']), 'post_title' => wp_strip_all_tags($_POST['easy_ads_title']), 'post_content' => '');
        $the_post_id = wp_update_post($post_information);
        easy_ads_update_post_meta($the_post_id, 'main_easy_ads_array', $_POST['main_easy_ads_array']);
        $txo_santa = sanitize_text_field($_POST['main_easy_ads_taxonomy_custom_field']);
        $date_santa = sanitize_text_field($_POST['main_easy_ads_date_custom_field']);
        $date_santa = substr($date_santa, 6, 4) . '-' . substr($date_santa, 3, 2) . '-' . substr($date_santa, 0, 2);
        easy_ads_update_post_meta($the_post_id, 'main_easy_ads_taxonomy_custom_field', $txo_santa);
        easy_ads_update_post_meta($the_post_id, 'main_easy_ads_date_custom_field', $date_santa);
        $added = "true";
        $message = __('the advert has been updated', 'easy-ads-manager');
        echo '<meta http-equiv="refresh" content="1">';
    }
    if (isset($_POST['easy_ads_submit'])) {
        /// if add ads
        $post_information = array('post_title' => sanitize_text_field($_POST['easy_ads_title']), 'post_content' => '', 'post_type' => 'easy_ads', 'post_status' => 'publish');
        $the_post_id = wp_insert_post($post_information);
        easy_ads_update_post_meta($the_post_id, 'main_easy_ads_array', $_POST['main_easy_ads_array']);
        $txo_santa = sanitize_text_field($_POST['main_easy_ads_taxonomy_custom_field']);
        $date_santa = sanitize_text_field($_POST['main_easy_ads_date_custom_field']);
        $date_santa = substr($date_santa, 6, 4) . '-' . substr($date_santa, 3, 2) . '-' . substr($date_santa, 0, 2);
        easy_ads_update_post_meta($the_post_id, 'main_easy_ads_taxonomy_custom_field', $txo_santa);
        easy_ads_update_post_meta($the_post_id, 'main_easy_ads_date_custom_field', $date_santa);
        $added = "true";
        $message = __('the advert has been added', 'easy-ads-manager');
        echo '<meta http-equiv="refresh" content="1">';
    }
    if (isset($_POST['easy_remove_submit'])) {
        /// if remove ads
        $id_to_remove = $_POST['removed_ads_id'];
        wp_delete_post($id_to_remove, true);
        $added = "true";
        $message = __('the advert was successfully removed', 'easy-ads-manager');
        echo '<meta http-equiv="refresh" content="1">';
    }
    if (isset($_POST['easy_edite_submit'])) {
        /// if update ads
        $post_id = $_POST['edite_ads_id'];
        $args = array('post_type' => array('easy_ads'), 'p' => $post_id, 'posts_per_page' => '1');
        $get_single_ads = new WP_Query($args);
        if ($get_single_ads->have_posts()) {
            while ($get_single_ads->have_posts()) {
                $get_single_ads->the_post();
                $modify = 'true';
                $advert_title = get_the_title();
                $id = get_the_id();
                $get_data = get_post_meta($id, 'main_easy_ads_array');
                $get_taxnomy = get_post_meta($id, 'main_easy_ads_taxonomy_custom_field');
                $get_date = get_post_meta($id, 'main_easy_ads_date_custom_field');
            }
        } else {
        }
        wp_reset_postdata();
    }
    if (isset($added)) {
        $added = $added;
    } else {
        $added = '';
    }
    if (isset($modify)) {
        $modify = $modify;
    } else {
        $modify = '';
    }
    ?>
			<form action="" id="easy-main-form-add-ads" method="POST">
				<div class="main-options-cc">
					<div class="headline-option">
					<?php 
    if ($modify == "true") {
        ?>
						<?php 
        _e('edite Advert', 'easy-ads-manager');
        ?>
					<?php 
    } else {
        ?>
						<?php 
        _e('Add New Advert', 'easy-ads-manager');
        ?>
					<?php 
    }
    ?>
					</div>
					<?php 
    if ($added == "true") {
        ?>
					<div class="alert alert-success" role="alert"><i class="fa fa-check"></i> <?php 
        echo $message;
        ?>
</div>
					<?php 
    }
    ?>
					<div class="row-option">
					<?php 
    $get_ads_value = '';
    if ($modify == "true") {
        $get_value = $advert_title;
    }
    ?>
						<div class="col-1">
							<?php 
    _e('Add Name', 'easy-ads-manager');
    ?>
						</div>
						<div class="col-2">
						<input type="text" name="easy_ads_title" id="easy_ads_title" class="required" placeholder="<?php 
    _e('Add Name', 'easy-ads-manager');
    ?>
" value="<?php 
    echo $get_value;
    ?>
" required="required" />
						<p class="desc"><?php 
    _e('the name of your advert', 'easy-ads-manager');
    ?>
</p>
						</div>
					</div>
					
					<div class="row-option"><!-- option image or code -->
						<div class="col-1">
							<?php 
    _e('advert type', 'easy-ads-manager');
    ?>
						</div>
						<div class="col-2">
						<?php 
    $get_ads_value = '';
    if ($modify == "true") {
        $get_ads_value = $get_data[0]['type']['value'];
        $get_ads_main_type = $get_ads_value;
    } else {
        $get_ads_main_type = '';
        $get_ads_value = '';
    }
    ?>
                        <input type="hidden" name="main_easy_ads_array[type][key]" value="type">
						<input type="hidden" value="image" name="main_easy_ads_array[type][value]" />
						<input type="checkbox" <?php 
    if ($get_ads_value == "code") {
        echo 'checked="checked"';
    }
    ?>
 id="type_choose_check_id" class="inline-inner type-choose" value="code" name="main_easy_ads_array[type][value]" />
						<label for="type_choose_check_id" id="easy_ads_toggle-check"><span></span></label>
							<p class="desc"><?php 
    _e('choose advert type ( click to change )', 'easy-ads-manager');
    ?>
</p>
						</div>
					</div>
					
					<div class="row-option imagewcode <?php 
    if ($get_ads_main_type == "code") {
        echo 'remove-ss';
    }
    ?>
" id="easy-image-select-section"><!-- option image -->
						<div class="col-1">
							<?php 
    _e('advert Image', 'easy-ads-manager');
    ?>
						</div>
						<div class="col-2">
						<?php 
    $get_ads_value = '';
    if ($modify == "true") {
        $get_ads_value = $get_data[0]['image']['value'];
    }
    ?>
						<?php 
    if (empty($get_ads_value)) {
        $get_ads_value = plugin_dir_url(__FILE__) . 'imgs/no.png';
    }
    ?>
                        <input type="hidden" name="main_easy_ads_array[image][key]" value="Image">
                        <img src="<?php 
    echo $get_ads_value;
    ?>
" id="previmg" class="prv-image" alt="img" />
                        <input type="hidden" name="main_easy_ads_array[image][value]" id="easy_ads_image_url" class="inline-fields" value="<?php 
    echo $get_ads_value;
    ?>
">
                        <button type="button" class="easy_ads_upload-btn inline-fields"><i class="fa fa-plus"></i> <span><?php 
    _e('add / change image', 'easy-ads-manager');
    ?>
</button>
                        <button type="button" class="easy_ads_remove-btn inline-fields"><i class="fa fa-close"></i> <span><?php 
    _e('remove image', 'easy-ads-manager');
    ?>
</button>
                    <p class="desc"><?php 
    _e('choose image to be the advert', 'easy-ads-manager');
    ?>
</p>
						</div>
					</div>
					
					<div class="row-option imagewcode <?php 
    if ($get_ads_main_type == "image" or empty($get_ads_main_type)) {
        echo 'remove-ss';
    }
    ?>
" id="easy-code-select-section"><!-- option image -->
						<div class="col-1">
							<?php 
    _e('advert Code', 'easy-ads-manager');
    ?>
						</div>
						<div class="col-2">
						<?php 
    $get_ads_value = '';
    if ($modify == "true") {
        $get_ads_value = $get_data[0]['code']['value'];
    }
    ?>
						<?php 
    if (empty($get_ads_value)) {
        $get_ads_value = '';
    }
    ?>
                        <input type="hidden" name="main_easy_ads_array[code][key]" value="Image">
						<textarea id="easy_code_easy_editor" name="main_easy_ads_array[code][value]"><?php 
    echo $get_ads_value;
    ?>
</textarea>
                    <p class="desc"><?php 
    _e('choose code to be the advert', 'easy-ads-manager');
    ?>
</p>
						</div>
					</div>
							
					<div class="row-option"><!-- option link -->
						<div class="col-1">
							<?php 
    _e('advert link', 'easy-ads-manager');
    ?>
						</div>
						<div class="col-2">
						<?php 
    $get_ads_value = '';
    if ($modify == "true") {
        $get_ads_value = $get_data[0]['link']['value'];
    }
    ?>
						<?php 
    if (empty($get_ads_value)) {
        $get_ads_value = '#';
    }
    ?>
                        <input type="hidden" name="main_easy_ads_array[link][key]" value="width">
						<input type="text" name="main_easy_ads_array[link][value]" value="<?php 
    echo $get_ads_value;
    ?>
" placeholder="<?php 
    _e('link', 'easy-ads-manager');
    ?>
" />
                    	<p class="desc"><?php 
    _e('the link that open when click the ads', 'easy-ads-manager');
    ?>
</p>
						</div>
					</div>

					<div class="row-option"><!-- option target -->
						<div class="col-1">
							<?php 
    _e('new windows link', 'easy-ads-manager');
    ?>
						</div>
						<div class="col-2">
						<?php 
    $get_ads_value = '';
    if ($modify == "true") {
        $get_ads_value = $get_data[0]['target']['value'];
    }
    ?>
						<?php 
    if (empty($get_ads_value)) {
        $get_ads_value = '';
    }
    ?>
                        <input type="hidden" name="main_easy_ads_array[target][key]" value="target">
						<input type="hidden" value="false" name="main_easy_ads_array[target][value]" />
						<input <?php 
    if ($get_ads_value == "true") {
        echo 'checked="checked"';
    }
    ?>
 type="checkbox" id="is_new-windows_check_id" class="inline-inner megacheackbox" value="true" name="main_easy_ads_array[target][value]" />
						<label for="is_new-windows_check_id" id="new-windows-check"><span></span></label>
							<p class="desc"><?php 
    _e('open the link in new windows choose true or false', 'easy-ads-manager');
    ?>
</p>
						</div>
					</div>
							
					<div class="row-option"><!-- option width -->
						<div class="col-1">
							<?php 
    _e('image size ( width )', 'easy-ads-manager');
    ?>
						</div>
						<div class="col-2">
						<?php 
    $get_ads_value = '';
    if ($modify == "true") {
        $get_ads_value = $get_data[0]['width']['value'];
    }
    ?>
						<?php 
    if (empty($get_ads_value)) {
        $get_ads_value = '';
    }
    ?>
                        <input type="hidden" name="main_easy_ads_array[width][key]" value="width">
						<input type="number" name="main_easy_ads_array[width][value]" value="<?php 
    echo $get_ads_value;
    ?>
" placeholder="<?php 
    _e('width', 'easy-ads-manager');
    ?>
" />
                    	<p class="desc"><?php 
    _e('leave it blank if responsive', 'easy-ads-manager');
    ?>
</p>
						</div>
					</div>
							
					<div class="row-option"><!-- option height -->
						<div class="col-1">
							<?php 
    _e('image size ( height )', 'easy-ads-manager');
    ?>
						</div>
						<div class="col-2">
						<?php 
    $get_ads_value = '';
    if ($modify == "true") {
        $get_ads_value = $get_data[0]['height']['value'];
    }
    ?>
						<?php 
    if (empty($get_ads_value)) {
        $get_ads_value = '';
    }
    ?>
                        <input type="hidden" name="main_easy_ads_array[height][key]" value="height">
						<input type="number" name="main_easy_ads_array[height][value]" value="<?php 
    echo $get_ads_value;
    ?>
" placeholder="<?php 
    _e('height', 'easy-ads-manager');
    ?>
" />
                    	<p class="desc"><?php 
    _e('leave it blank if responsive', 'easy-ads-manager');
    ?>
</p>
						</div>
					</div>

					<div class="row-option"><!-- option date -->
						<div class="col-1">
							<?php 
    _e('advert end date', 'easy-ads-manager');
    ?>
						</div>
						<div class="col-2">
						<?php 
    $get_ads_value = $modify == 'true' ? date('d-m-Y', strtotime($get_date[0])) : date('d-m-Y', strtotime('+1 month'));
    ?>
						<input type="text" id="easy-ads-date-start" name="main_easy_ads_date_custom_field" value="<?php 
    echo $get_ads_value;
    ?>
" />
                    	<p class="desc"><?php 
    _e('choose the date that the advert end ', 'easy-ads-manager');
    ?>
</p>
						</div>
					</div>

					<div class="row-option"><!-- option section -->
						<div class="col-1">
							<?php 
    _e('advert section & place', 'easy-ads-manager');
    ?>
						</div>
						<div class="col-2">

						<?php 
    $get_ads_value = '';
    if ($modify == "true") {
        $get_ads_value = $get_taxnomy[0];
    }
    ?>
						<?php 
    if (empty($get_ads_value)) {
        $get_ads_value = '';
    }
    $args = array('hide_empty' => 0);
    $terms = get_terms('easy_ads_taxnomy_sections', $args);
    ?>
						<select name="main_easy_ads_taxonomy_custom_field">
							<?php 
    if (!empty($terms) && !is_wp_error($terms)) {
        foreach ($terms as $term) {
            if ($get_ads_value == $term->term_id) {
                $o = 'selected="selected"';
            } else {
                $o = '';
            }
            echo '<option ' . $o . '  value="' . $term->term_id . '">' . $term->name . '</option>';
        }
    }
    ?>
						</select>
                    	<p class="desc"><?php 
    _e('link advert to section ( choose ) ', 'easy-ads-manager');
    ?>
</p>
						</div>
					</div>
					<?php 
    if ($modify == "true") {
        ?>
						<input type="hidden" name="easy_ads_id" value="<?php 
        echo get_the_id();
        ?>
" />
					<?php 
    }
    ?>
				<fieldset class="easy-ads-submits">
					<?php 
    wp_nonce_field('post_nonce', 'post_nonce_field');
    ?>
					<?php 
    if ($modify == "true") {
        ?>
					<input type="hidden" name="easy_ads_update" id="easy_ads_submit" value="true" />
					<button type="submit" class="save_field_button"><i class="fa fa-save"></i> <span><?php 
        _e('Save The advert', 'easy-ads-manager');
        ?>
</span></button>
					<?php 
    } else {
        ?>
					<input type="hidden" name="easy_ads_submit" id="easy_ads_submit" value="true" />
					<button type="submit" class="save_field_button"><i class="fa fa-plus"></i> <span><?php 
        _e('Add The advert', 'easy-ads-manager');
        ?>
</span></button>
					<?php 
    }
    ?>
				</fieldset>
							
				</div>
			</form>
			<br />
			<div class="headline-option">
				<?php 
    _e('Adverts Control', 'easy-ads-manager');
    ?>
			</div>
					
			<div class="easy-ads-container-all">
			<?php 
    $args = array('post_type' => array('easy_ads'));
    $get_ads = new WP_Query($args);
    if ($get_ads->have_posts()) {
        while ($get_ads->have_posts()) {
            $get_ads->the_post();
            $id = get_the_id();
            $get_typez = get_post_meta($id, 'main_easy_ads_array');
            $get_type = $get_typez[0]['type']['value'];
            $get_typex = get_post_meta($id, 'main_easy_ads_taxonomy_custom_field');
            $get_term_d = get_term($get_typex[0], 'easy_ads_taxnomy_sections', '', '');
            if (!empty($get_term_d)) {
                $get_term_n = $get_term_d->name;
            } else {
                $get_term_n = __('no section selected', 'easy-ads-manager');
            }
            ?>
				<div class="advert-item">
					<div class="easy-ads-remove inline-tools-ads"><form action="" method="POST">
					<input type="hidden" value="<?php 
            the_id();
            ?>
" name="removed_ads_id" />
					<button type="submit" name="easy_remove_submit" class="easy-ads-remove-advert"><i class="fa fa-close"></i></button>
					</form></div>
					<div class="easy-ads-edite inline-tools-ads"><form action="" method="POST">
					<input type="hidden" value="<?php 
            the_id();
            ?>
" name="edite_ads_id" />
					<button type="submit" name="easy_edite_submit" class="easy-ads-edite-advert"><i class="fa fa-pencil"></i></button>
					</form></div>
					<?php 
            $id = get_the_id();
            $img_or_code = get_post_meta($id, 'main_easy_ads_array');
            $sec_id = $get_typex;
            ?>
					<div class="easy-ads-title inline-tools-ads"><?php 
            the_title();
            ?>
<br /><b><?php 
            echo $get_term_n;
            ?>
<span><i class="fa fa-eye"></i> : <?php 
            echo get_easy_ads_views_count($id);
            ?>
</span></b></div>
					<div class="easy-ads-image">
						<?php 
            if ($get_type == "code") {
                ?>
						<?php 
                echo $img_or_code[0]['code']['value'];
                ?>
						<?php 
            } else {
                ?>
						<img src="<?php 
                echo $img_or_code[0]['image']['value'];
                ?>
" alt="<?php 
                the_title();
                ?>
" />
						<?php 
            }
            ?>
					</div>
				</div>
			<?php 
        }
    } else {
        ?>
				<div class="alert alert-danger" role="alert"><i class="fa fa-close"></i> <?php 
        _e('there is no adverts for now', 'easy-ads-manager');
        ?>
</div>
			<?php 
    }
    wp_reset_postdata();
    ?>
			</div>
					
	<?php 
    echo easy_ads_footer();
    ?>
	</div>
	<?php 
}
コード例 #27
0
        <div class="look-thumb-picture">
          <a href="<?php 
        echo the_permalink();
        ?>
" class="look-thumb-button">Voir</a>
          <img title="image title" alt="thumb image" src="<?php 
        echo wp_get_attachment_url(get_post_thumbnail_id(), 'post_size');
        ?>
">
        </div>
        <div class="look-thumb-infos">
          <a href="<?php 
        echo the_permalink();
        ?>
" class="look-thumb-subtitle">Recette #<?php 
        echo the_id();
        ?>
</a>
          <a href="<?php 
        echo the_permalink();
        ?>
" class="look-thumb-title"><?php 
        echo the_title();
        ?>
</a>
        </div>
      </div>
      <?php 
    }
    wp_reset_postdata();
}
コード例 #28
0
                                <?php 
    if (!$share) {
        ?>
                                <li class="share"><strong><?php 
        _e('Share:', GETTEXT_DOMAIN);
        ?>
</strong>
                                    <ul>
                                        <li><iframe src="//www.facebook.com/plugins/like.php?href=<?php 
        the_permalink(the_id());
        ?>
&amp;send=false&amp;layout=button_count&amp;width=450&amp;show_faces=false&amp;action=like&amp;colorscheme=light&amp;font&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:150; height:21px;" allowTransparency="true"></iframe></li>
                                        <li>
                                            <!-- Place this tag where you want the +1 button to render -->
                                            <div class="g-plusone" data-size="medium" data-annotation="none" data-href="<?php 
        the_permalink(the_id());
        ?>
"></div>
                                            <!-- Place this render call where appropriate -->
                                            <script type="text/javascript">
                                              (function() {
                                                var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
                                                po.src = 'https://apis.google.com/js/plusone.js';
                                                var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
                                              })();
                                            </script>
                                        </li>
                                    </ul>
                                </li>
                                <?php 
    }
コード例 #29
0
ファイル: entry-single.php プロジェクト: jiteshp/upstart
<article id="entry-<?php 
the_id();
?>
" <?php 
post_class();
?>
>
	<header class="entry-header">
		<h1 class="entry-title"><?php 
the_title();
?>
</h1>
		
		<div class="entry-meta">
			<span class="entry-author">
				by <?php 
the_author_link();
?>
			</span>
			
			<span class="entry-time">
				on <?php 
the_time('F j, Y');
?>
			</span>
			
			<span class="entry-category">
				in <?php 
the_category(', ');
?>
			</span>
コード例 #30
0
ファイル: class-reorder.php プロジェクト: coollog/theboola
    /**
     * Post Row Output for Hierarchical posts
     *
     * @author Ronald Huereca <*****@*****.**>
     * @since Reorder 1.0.1
     * @access private
     * @param stdclass $post object to post
     * @param array $all_children - array of children 
     */
    private function output_row_hierarchical($the_post, $post_children, $all_children)
    {
        global $post;
        $post = $the_post;
        $post_id = $the_post->ID;
        setup_postdata($post);
        ?>
		<li id="list_<?php 
        the_id();
        ?>
">
			<div><?php 
        the_title();
        ?>
 <a href='#' style="float: right"><?php 
        esc_html_e('Expand', 'reorder');
        ?>
</a></div>
			<ul class='children'>
			<?php 
        $this->output_row_children($post_children, $all_children);
        ?>
			</ul>
		</li>
		<?php 
        ?>
		<?php 
    }