当前位置: 首页>>代码示例>>PHP>>正文


PHP listify_has_integration函数代码示例

本文整理汇总了PHP中listify_has_integration函数的典型用法代码示例。如果您正苦于以下问题:PHP listify_has_integration函数的具体用法?PHP listify_has_integration怎么用?PHP listify_has_integration使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了listify_has_integration函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: pre_get_comments

 public function pre_get_comments($query)
 {
     if (!is_singular('job_listing')) {
         return;
     }
     $sort = isset($_GET['sort-comments']) ? esc_attr($_GET['sort-comments']) : false;
     $allowed_keys = array_keys(self::get_sort_options());
     if (!($sort && in_array($sort, $allowed_keys))) {
         return;
     }
     $args = array('post_id' => get_post()->ID);
     if (listify_has_integration('wp-job-manager-reviews')) {
         $key = 'review_average';
     } else {
         $key = 'rating';
     }
     if ('date-desc' == $sort) {
     } elseif ('date-asc' == $sort) {
         $query->query_vars['order'] = 'asc';
     } elseif ('rating-desc' == $sort) {
         $query->query_vars['meta_key'] = $key;
         $query->query_vars['orderby'] = array($key);
     } elseif ('rating-asc' == $sort) {
         $query->query_vars['meta_key'] = $key;
         $query->query_vars['orderby'] = array($key);
         $query->query_vars['order'] = 'asc';
     } elseif ('popular' == $sort) {
     }
     // Run the meta query again because for some reason the hook fires too late.
     $query->meta_query = new WP_Meta_Query();
     $query->meta_query->parse_query_vars($query->query_vars);
 }
开发者ID:GaryJones,项目名称:dockerfiles,代码行数:32,代码来源:class-comments.php

示例2: add_controls

 public function add_controls($wp_customize)
 {
     $this->controls = array('label-singular' => array('label' => __('Singular Label', 'listify')), 'label-plural' => array('label' => __('Plural Label', 'listify')), 'region-bias' => array('label' => __('Base Country', 'listify'), 'type' => 'select', 'description' => __('This controls autocomplete priority, distance units, and more.', 'listify'), 'choices' => listify_has_integration('woocommerce') ? array_merge(array('' => __('None', 'listify')), WC()->countries->get_countries()) : array()), 'social-association' => array('label' => __('Social Profiles', 'listify'), 'type' => 'select', 'description' => __('If associated with a listing the fields will appear on the submission form', 'listify'), 'choices' => array('listing' => __('Associate with listing', 'listify'), 'user' => __('Associate with user', 'listify'))), 'custom-submission' => array('label' => __('Use "directory" submission fields', 'listify'), 'type' => 'checkbox'), 'gallery-comments' => array('label' => __('Allow comments on gallery images', 'listify'), 'type' => 'checkbox'), 'categories-only' => array('label' => __('Use categories only', 'listify'), 'type' => 'checkbox', 'description' => __('Categories will be used to create map markers, and types will
             be hidden from all other areas. Categories must be enabled in Listings > Settings.
             <br /><br />Refresh this page in your browser after saving.', 'listify')));
     return $wp_customize;
 }
开发者ID:durichitayat,项目名称:befolio-wp,代码行数:7,代码来源:class-controls-labels.php

示例3: visual_composer

 public function visual_composer($page_templates)
 {
     if (listify_has_integration('visual-composer')) {
         return $page_templates;
     }
     unset($page_templates['page-templates/template-home-vc.php']);
     return $page_templates;
 }
开发者ID:abdullahrahim,项目名称:shadighar,代码行数:8,代码来源:class-template-page-templates.php

示例4: add_controls

 public function add_controls($wp_customize)
 {
     $this->controls = array('nav-cart' => array('label' => __('Display cart icon', 'listify'), 'type' => 'checkbox'), 'nav-search' => array('label' => __('Display search icon', 'listify'), 'type' => 'checkbox'), 'nav-megamenu' => array('label' => __('Secondary Mega Menu Taxonomy', 'listify'), 'type' => 'select', 'choices' => array_merge(array('none' => __('None', 'listify')), $this->get_taxonomies())));
     if (listify_has_integration('facetwp')) {
         unset($this->controls['nav-search']);
     }
     return $wp_customize;
 }
开发者ID:abdullahrahim,项目名称:shadighar,代码行数:8,代码来源:class-controls-nav.php

示例5: add_controls

 public function add_controls($wp_customize)
 {
     $this->controls = array('map-behavior-api-key' => array('label' => __('Google Maps API Key (optional)', 'listify')), 'map-behavior-trigger' => array('label' => __('Info Bubble Trigger', 'listify'), 'type' => 'select', 'choices' => array('mouseover' => __('Hover', 'listify'), 'click' => __('Click', 'listify'))), 'map-behavior-clusters' => array('label' => __('Use Clusters', 'listify'), 'type' => 'checkbox'), 'map-behavior-grid-size' => array('label' => __('Cluster Grid Size (px)', 'listify')), 'map-behavior-autofit' => array('label' => __('Autofit on load', 'listify'), 'type' => 'checkbox'), 'map-behavior-center' => array('label' => __('Default Center Coordinate', 'listify')), 'map-behavior-zoom' => array('label' => __('Default Zoom Level', 'listify'), 'type' => 'select', 'choices' => array('1' => '1', '2' => '2', '3' => '3', '4' => '4', '5' => '5', '6' => '6', '7' => '7', '8' => '8', '9' => '9', '10' => '10', '11' => '11', '12' => '12', '13' => '13', '14' => '14', '15' => '15', '16' => '16', '17' => '17', '18' => '18')), 'map-behavior-max-zoom' => array('label' => __('Max Zoom In Level', 'listify'), 'type' => 'select', 'choices' => array('1' => '1', '2' => '2', '3' => '3', '4' => '4', '5' => '5', '6' => '6', '7' => '7', '8' => '8', '9' => '9', '10' => '10', '11' => '11', '12' => '12', '13' => '13', '14' => '14', '15' => '15', '16' => '16', '17' => '17', '18' => '18')), 'map-behavior-max-zoom-out' => array('label' => __('Max Zoom Out Level', 'listify'), 'type' => 'select', 'choices' => array('1' => '1', '2' => '2', '3' => '3', '4' => '4', '5' => '5', '6' => '6', '7' => '7', '8' => '8', '9' => '9', '10' => '10', '11' => '11', '12' => '12', '13' => '13', '14' => '14', '15' => '15', '16' => '16', '17' => '17', '18' => '18')), 'map-behavior-scrollwheel' => array('label' => __('Zoom with Scrollwheel', 'listify'), 'type' => 'checkbox'));
     if (!listify_has_integration('facetwp')) {
         global $listify_job_manager;
         $this->controls['map-behavior-search-min'] = array('label' => sprintf(__('Search Radius Min (%s)', 'listify'), $listify_job_manager->map->template->unit()));
         $this->controls['map-behavior-search-max'] = array('label' => sprintf(__('Search Radius Max (%s)', 'listify'), $listify_job_manager->map->template->unit()));
         $this->controls['map-behavior-search-default'] = array('label' => sprintf(__('Search Radius Default (%s)', 'listify'), $listify_job_manager->map->template->unit()));
     }
     return $wp_customize;
 }
开发者ID:abdullahrahim,项目名称:shadighar,代码行数:11,代码来源:class-controls-map-behavior.php

示例6: setup_actions

 public function setup_actions()
 {
     if (!listify_has_integration('wp-job-manager-reviews')) {
         add_action('comment_form_top', array($this, 'comment_form_top'));
         add_action('comment_post', array($this, 'comment_post'));
         add_action('wp_set_comment_status', array($this, 'wp_set_comment_status'), 10, 2);
         add_action('submit_job_form_save_job_data', array($this, 'open_comments'));
         add_action('single_job_listing_meta_start', array($this, 'the_rating'), 40);
         add_action('listify_content_job_listing_footer', array($this, 'the_rating'));
         add_action('listify_listings_by_term_after', array($this, 'the_rating'));
         add_action('listify_comment_author_end', array($this, 'output_rating'));
     }
 }
开发者ID:GaryJones,项目名称:dockerfiles,代码行数:13,代码来源:class-ratings.php

示例7: enqueue_scripts

 public function enqueue_scripts($force = false)
 {
     if (!$this->page_needs_map($force)) {
         return;
     }
     wp_enqueue_script('google-maps', '//maps.googleapis.com/maps/api/js?v=3&libraries=geometry,places');
     wp_enqueue_script('listify-job-manager-map', Listify_Integration::get_url() . 'js/wp-job-manager-map.min.js', array('jquery', 'jquery-ui-slider', 'google-maps', 'underscore'), 20141204);
     $settings = array('facetwp' => listify_has_integration('facetwp'), 'canvas' => 'job_listings-map-canvas', 'useClusters' => listify_theme_mod('map-behavior-clusters'), 'gridSize' => listify_theme_mod('map-behavior-grid-size'), 'autoFit' => listify_theme_mod('map-behavior-autofit'), 'mapOptions' => array('zoom' => listify_theme_mod('map-behavior-zoom'), 'maxZoom' => listify_theme_mod('map-behavior-max-zoom')), 'searchRadius' => array('min' => listify_theme_mod('map-behavior-search-min'), 'max' => listify_theme_mod('map-behavior-search-max')));
     if ('' != ($center = listify_theme_mod('map-behavior-center'))) {
         $settings['mapOptions']['center'] = $center;
     }
     wp_localize_script('listify-job-manager-map', 'listifyMapSettings', apply_filters('listify_map_settings', $settings));
 }
开发者ID:GaryJones,项目名称:dockerfiles,代码行数:13,代码来源:class-wp-job-manager-map.php

示例8: listify_job_listing_archive_has_sidebar

function listify_job_listing_archive_has_sidebar()
{
    global $listify_job_manager;
    $sidebar = is_active_sidebar('archive-job_listing');
    $map = 'side' == $listify_job_manager->map->template->position();
    $facetwp = false;
    if (listify_has_integration('facetwp')) {
        global $listify_facetwp;
        if ('side' == $listify_facetwp->template->position()) {
            $facetwp = true;
        }
    }
    if ($sidebar || $facetwp || has_action('listify_sidebar_archive_job_listing_after') && !$map) {
        return true;
    }
    return false;
}
开发者ID:abdullahrahim,项目名称:shadighar,代码行数:17,代码来源:template-tags.php

示例9: listify_get_theme_menu_name

				<a href="#" class="navigation-bar-toggle">
					<i class="ion-navicon-round"></i>
					<?php 
echo listify_get_theme_menu_name('primary');
?>
				</a>

				<div class="navigation-bar-wrapper">
					<?php 
wp_nav_menu(array('theme_location' => 'primary', 'container_class' => 'primary nav-menu', 'menu_class' => 'primary nav-menu'));
wp_nav_menu(array('theme_location' => 'secondary', 'container_class' => 'secondary nav-menu', 'menu_class' => 'secondary nav-menu'));
?>
				</div>

				<?php 
if (!listify_has_integration('facetwp') && listify_theme_mod('nav-search')) {
    ?>
					<a href="#search-navigation" data-toggle="#search-navigation" class="ion-search search-overlay-toggle"></a>

					<div id="search-navigation" class="search-overlay">
						<?php 
    locate_template(array('searchform-header.php', 'searchform.php'), true, false);
    ?>
						<a href="#search-navigation" data-toggle="#search-navigation" class="ion-close search-overlay-toggle"></a>
					</div>
				<?php 
}
?>
			</div>
		</nav><!-- #site-navigation -->
	</header><!-- #masthead -->
开发者ID:Hobbygaze,项目名称:wp,代码行数:31,代码来源:header.php

示例10: get_template_part

    get_template_part('content', 'none');
    ?>

					<?php 
}
wp_reset_query();
?>

				</section>

				<?php 
do_action('listify_author_profile_after_listings');
?>

				<?php 
if (listify_has_integration('wp-job-manager-bookmarks')) {
    ?>

					<?php 
    global $job_manager_bookmarks;
    $bookmarks = $job_manager_bookmarks->get_user_bookmarks($author->ID);
    if (!empty($bookmarks)) {
        $bookmarks = wp_list_pluck($bookmarks, 'post_id');
        $wp_query = new WP_Query(array('post_type' => 'job_listing', 'post__in' => $bookmarks, 'post_status' => 'publish', 'posts_per_page' => 6, 'is_author' => true));
        ?>

					<section id="bookmarks">

						<h3 class="section-title"><?php 
        printf(__('%s\'s
						Favorites (%d)', 'listify'), $display, $wp_query->found_posts);
开发者ID:durichitayat,项目名称:befolio-wp,代码行数:31,代码来源:author.php

示例11: search_icon

 public function search_icon($items, $args)
 {
     if ('primary' != $args->theme_location || !listify_theme_mod('nav-search')) {
         return $items;
     }
     if (listify_has_integration('facetwp')) {
         return '<li class="menu-item menu-type-link"><a href="' . get_post_type_archive_link('job_listing') . '" class="search-overlay-toggle"></a></li>' . $items;
     } else {
         return '<li class="menu-item menu-type-link"><a href="#search-header" data-toggle="#search-header" class="search-overlay-toggle"></a></li>' . $items;
     }
 }
开发者ID:abdullahrahim,项目名称:shadighar,代码行数:11,代码来源:class-navigation.php

示例12: style_switcher

    /**
     * Add a title and display switcher below the filters and above the listings.
     *
     * @since Listify 1.0.0
     *
     * @return void
     */
    public function style_switcher()
    {
        global $wp_query;
        $style = $this->get_archive_display_style();
        ?>
        <div class="archive-job_listing-filter-title">
            <div class="archive-job_listing-layout-wrapper">
                <?php 
        do_action('archive_job_listing_layout_before');
        ?>

                <a href="#" data-style="grid" class="archive-job_listing-layout button<?php 
        echo 'grid' == $style ? ' active' : '';
        ?>
"><span class="ion-grid"></span></a>
                <a href="#" data-style="list" class="archive-job_listing-layout button<?php 
        echo 'list' == $style ? ' active' : '';
        ?>
"><span class="ion-navicon-round"></span></a>

                <?php 
        do_action('archive_job_listing_layout_after');
        ?>
            </div>

            <h3 class="archive-job_listing-found">
                <?php 
        printf(__('<span class="results-found">%s</span> Results Found', 'listify'), listify_has_integration('facetwp') ? do_shortcode('[facetwp counts="true"]') : apply_filters('listify_results_found_default', 0));
        ?>
            </h3>
        </div>
    <?php 
    }
开发者ID:durichitayat,项目名称:befolio-wp,代码行数:40,代码来源:class-wp-job-manager-template.php

示例13: add_submit_button

 /**
  * Add a submit button to the bottom of the Job Manager filters
  *
  * @since Listify 1.0.0
  *
  * @return void
  */
 public function add_submit_button()
 {
     if (listify_has_integration('facetwp')) {
         return;
     }
     $label = 'Update Results';
     if (is_front_page()) {
         $label = 'Search';
     }
     $refreshing = __('Loading...', 'listify');
     echo '<button type="submit" data-refresh="' . $refreshing . '" data-label="' . $label . '" name="update_results" class="update_results">' . $label . '</button>';
 }
开发者ID:Hobbygaze,项目名称:wp,代码行数:19,代码来源:class-wp-job-manager-template.php

示例14: do_action

		<?php 
    do_action('listify_page_before');
    ?>

		<div id="primary" class="container">
			<div class="content-area">

				<main id="main" class="site-main" role="main">

					<?php 
    get_template_part('content', 'page');
    ?>

					<?php 
    if (listify_has_integration('wp-job-manager-wc-paid-listings')) {
        $defaults = array('before_widget' => '<aside class="listify_widget_wcpl">', 'after_widget' => '</aside>', 'before_title' => '<div class="home-widget-section-title"><h3 class="home-widget-title">', 'after_title' => '%s</h3></div>', 'widget_id' => '');
        the_widget('Listify_Widget_WCPL_Pricing_Table', array('title' => '', 'description' => ''), $defaults);
    }
    ?>

				</main>

			</div>
		</div>

	<?php 
}
?>

<?php 
开发者ID:abdullahrahim,项目名称:shadighar,代码行数:30,代码来源:template-plans-pricing.php

示例15: widget

    /**
     * widget function.
     *
     * @see WP_Widget
     * @access public
     * @param array $args
     * @param array $instance
     * @return void
     */
    function widget($args, $instance)
    {
        if ($this->get_cached_widget($args)) {
            return;
        }
        extract($args);
        $title = apply_filters('widget_title', $instance['title'], $instance, $this->id_base);
        $description = isset($instance['description']) ? esc_attr($instance['description']) : false;
        $after_title = '<h2 class="home-widget-description">' . $description . '</h2>' . $after_title;
        ob_start();
        echo $before_widget;
        if ($title) {
            echo $before_title . $title . $after_title;
        }
        if (listify_has_integration('facetwp')) {
            global $listify_facetwp;
            $facets = isset($instance['facets']) ? array_map('trim', explode(',', $instance['facets'])) : listify_theme_mod('listing-archive-facetwp-defaults');
            $_facets = $listify_facetwp->get_homepage_facets($facets);
            $count = count($_facets);
            $column = 0 == $count ? 12 : round(12 / $count);
            if ($count > 4) {
                $column = 4;
            }
            $done = 0;
            ?>
			<div class="job_search_form">
				<div class="row">
					<?php 
            foreach ($_facets as $facet) {
                ?>
						<?php 
                if ($count > 4 && $done == 3) {
                    ?>
							</div><div class="row">
						<?php 
                }
                ?>

						<div class="search_<?php 
                echo $facet['name'];
                ?>
 col-xs-12 col-sm-4 col-md-<?php 
                echo $column;
                ?>
">
							<?php 
                echo do_shortcode('[facetwp facet="' . $facet['name'] . '"]');
                ?>
						</div>
					<?php 
                $done++;
            }
            ?>
				</div>

				<div class="facetwp-submit row">
					<div class="col-xs-12">
						<input type="submit" value="<?php 
            _e('Search', 'listify');
            ?>
" onclick="fwp_redirect()" />
					</div>
		  		</div>

				<div style="display: none;">
					<?php 
            echo do_shortcode('[facetwp template="listings"]');
            ?>
				</div>

			</div>

			<script>
			function fwp_redirect() {
				if ('get' == FWP.permalink_type) {
					var query_string = FWP.build_query_string();
					if ('' != query_string) {
						query_string = '?' + query_string;
					}
					var url = query_string;
				}
				else {
					var url = window.location.hash;
				}
				window.location.href = '<?php 
            echo get_post_type_archive_link('job_listing');
            ?>
' + url;
			}
			</script>
		<?php 
//.........这里部分代码省略.........
开发者ID:abdullahrahim,项目名称:shadighar,代码行数:101,代码来源:class-widget-home-search-listings.php


注:本文中的listify_has_integration函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。