本文整理汇总了PHP中listify_theme_mod函数的典型用法代码示例。如果您正苦于以下问题:PHP listify_theme_mod函数的具体用法?PHP listify_theme_mod怎么用?PHP listify_theme_mod使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了listify_theme_mod函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: register_post_types
public function register_post_types()
{
if (!listify_theme_mod('categories-only')) {
return;
}
register_taxonomy('job_listing_type', array());
}
开发者ID:abdullahrahim,项目名称:shadighar,代码行数:7,代码来源:class-wp-job-manager-categories.php
示例2: __construct
public function __construct()
{
$this->labels = array('singular' => listify_theme_mod('label-singular'), 'plural' => listify_theme_mod('label-plural'));
$this->strings = $this->get_strings();
add_filter('gettext', array($this, 'gettext'), 0, 3);
add_filter('gettext_with_context', array($this, 'gettext_with_context'), 0, 4);
add_filter('ngettext', array($this, 'ngettext'), 0, 5);
}
开发者ID:GaryJones,项目名称:dockerfiles,代码行数:8,代码来源:class-strings.php
示例3: get_facets
public function get_facets($flat = false)
{
$facets = listify_theme_mod('listing-archive-facetwp-defaults');
if ($flat) {
return $facets;
}
$facets = array_map('trim', explode(',', $facets));
return $facets;
}
开发者ID:GaryJones,项目名称:dockerfiles,代码行数:9,代码来源:class-facetwp.php
示例4: position
public function position()
{
global $listify_job_manager;
$position = listify_theme_mod('listing-archive-facetwp-position');
// Force if the map is already on the side
if ('side' == $listify_job_manager->map->position() && $listify_job_manager->map->display() || is_page_template('page-templates/template-home.php')) {
$position = 'top';
}
return $position;
}
开发者ID:GaryJones,项目名称:dockerfiles,代码行数:10,代码来源:class-facetwp-template.php
示例5: position
public function position()
{
global $listify_job_manager;
$position = listify_theme_mod('listing-archive-facetwp-position');
// Force if the map is already on the side
if ('side' == $listify_job_manager->map->template->position() && $listify_job_manager->map->template->display() || listify_is_widgetized_page()) {
$position = 'top';
}
return $position;
}
开发者ID:abdullahrahim,项目名称:shadighar,代码行数:10,代码来源:class-facetwp-template.php
示例6: geolocation_endpoint
public function geolocation_endpoint($url)
{
$key = listify_theme_mod('map-behavior-api-key');
$args = array('language' => get_locale() ? substr(get_locale(), 0, 2) : '');
if ($key && '' != $key) {
$args['key'] = $key;
}
$url = add_query_arg($args, $url);
return esc_url($url);
}
开发者ID:abdullahrahim,项目名称:shadighar,代码行数:10,代码来源:class-wp-job-manager-map.php
示例7: filters
public function filters()
{
$this->labels = array('singular' => listify_theme_mod('label-singular'), 'plural' => listify_theme_mod('label-plural'));
/* print_r( $this->labels ); */
$this->strings = $this->get_strings();
$this->domains = apply_filters('listify_gettext_domains', array('listify', 'wp-job-manager', 'wp-job-manager-tags', 'wp-job-manager-alerts', 'wp-job-manager-locations', 'wp-job-manager-wc-paid-listings', 'wp-job-manager-simple-paid-listings'));
$this->translations = get_translations_for_domain('listify');
add_filter('gettext', array($this, 'gettext'), 0, 3);
add_filter('gettext_with_context', array($this, 'gettext_with_context'), 0, 4);
add_filter('ngettext', array($this, 'ngettext'), 0, 5);
}
开发者ID:abdullahrahim,项目名称:shadighar,代码行数:11,代码来源:class-strings.php
示例8: listify_get_top_level_taxonomy
function listify_get_top_level_taxonomy()
{
$categories_enabled = get_option('job_manager_enable_categories');
$categories_only = listify_theme_mod('categories-only');
if ($categories_enabled && $categories_only) {
$tax = 'job_listing_category';
} else {
$tax = 'job_listing_type';
}
return $tax;
}
开发者ID:abdullahrahim,项目名称:shadighar,代码行数:11,代码来源:template-tags.php
示例9: 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
示例10: markers
public function markers()
{
$terms = get_terms(listify_get_top_level_taxonomy(), array('hide_empty' => 0));
if (is_wp_error($terms)) {
return;
}
foreach ($terms as $term) {
$color = listify_theme_mod('marker-color-' . $term->term_id);
$this->css->add(array('selectors' => array('.map-marker.type-' . $term->term_id . ':after'), 'declarations' => array('border-top-color' => $color)));
$this->css->add(array('selectors' => array('.map-marker.type-' . $term->term_id . ' i:after'), 'declarations' => array('background-color' => $color)));
$this->css->add(array('selectors' => array('.map-marker.type-' . $term->term_id . ' i:before'), 'declarations' => array('color' => $color)));
}
}
开发者ID:GaryJones,项目名称:dockerfiles,代码行数:13,代码来源:class-customizer-output-marker-appearance.php
示例11: __construct
/**
* Constructor
*/
public function __construct()
{
if (listify_theme_mod('categories-only')) {
$this->taxonomy = 'job_listing_category';
} else {
$this->taxonomy = 'job_listing_type';
}
$this->get_terms();
$this->widget_description = __('Display a tabbed layout of listing types', 'listify');
$this->widget_id = 'listify_widget_tabbed_listings';
$this->widget_name = __('Listify - Page: Tabbed Listings', 'listify');
$this->settings = array('title' => array('type' => 'text', 'std' => 'What\'s New', 'label' => __('Title:', 'listify')), 'limit' => array('type' => 'number', 'std' => 3, 'min' => 3, 'max' => 30, 'step' => 3, 'label' => __('Number per tab:', 'listify')), 'featured' => array('type' => 'checkbox', 'std' => 0, 'label' => __('Use Featured listings', 'listify')), 'terms' => array('label' => __('Types to Feature:', 'listify'), 'type' => 'multicheck', 'std' => '', 'options' => $this->get_terms_simple()));
parent::__construct();
}
开发者ID:abdullahrahim,项目名称:shadighar,代码行数:17,代码来源:class-widget-home-tabbed-listings.php
示例12: listify_admin_header_style
/**
* Styles the header image displayed on the Appearance > Header admin panel.
*
* @see listify_custom_header_setup().
*/
function listify_admin_header_style()
{
/* Supplimentary CSS */
wp_enqueue_style('listify-fonts', listify_fonts_url());
$header_image = get_custom_header();
?>
<style type="text/css">
.appearance_page_custom-header #headimg {
border: none;
background-color: <?php
echo listify_theme_mod('colors-header-background');
?>
;
padding: 10px;
width: auto;
}
.appearance_page_custom-header #headimg img {
margin-right: 10px;
}
#headimg h1,
#desc {
}
#headimg h1 {
margin: 0 0 0 40px;
font-family: 'Montserrat', sans-serif;
font-size: 26px;
font-weight: normal;
line-height: <?php
echo get_custom_header()->height;
?>
px
}
#headimg h1 a {
text-decoration: none;
}
#desc {
display: none;
}
#headimg img {
float: left;
}
</style>
<?php
}
开发者ID:GaryJones,项目名称:dockerfiles,代码行数:55,代码来源:custom-header.php
示例13: setup_actions
public function setup_actions()
{
add_action('after_setup_theme', array($this, 'after_setup_theme'));
add_action('widgets_init', array($this, 'widgets_init'));
add_action('pre_get_posts', array($this, 'hide_packages_from_shop'));
add_filter('user_contactmethods', array($this, 'user_contactmethods'), 10, 2);
if ('user' == listify_theme_mod('social-association')) {
add_action('woocommerce_edit_account_form', array($this, 'woocommerce_edit_account_form'));
add_action('woocommerce_save_account_details', array($this, 'woocommerce_save_account_details'));
}
add_filter('woocommerce_localisation_address_formats', array($this, 'address_formats'));
add_filter('woocommerce_localisation_address_formats', array($this, 'address_formats_shim'), 99);
add_filter('woocommerce_formatted_address_replacements', array($this, 'address_replacements'), 10, 2);
add_filter('woocommerce_formatted_address_replacements', array($this, 'address_schema'), 9, 2);
}
开发者ID:durichitayat,项目名称:befolio-wp,代码行数:15,代码来源:class-woocommerce.php
示例14: set_controls
public function set_controls($wp_customize)
{
$this->controls = apply_filters('listify_pre_controls_' . $this->section, $this->controls, $this->section, $wp_customize);
foreach ($this->controls as $key => $control) {
$defaults = array('priority' => $this->priority->next(), 'type' => 'text', 'section' => $this->section);
$control = wp_parse_args($control, $defaults);
$wp_customize->add_setting($key, array('default' => listify_theme_mod($key)));
if (class_exists($control['type'])) {
$type = $control['type'];
unset($control['type']);
$wp_customize->add_control(new $type($wp_customize, $key, $control));
} else {
$wp_customize->add_control($key, $control);
}
}
}
开发者ID:abdullahrahim,项目名称:shadighar,代码行数:16,代码来源:class-customizer-controls.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);
global $post;
$title = apply_filters('widget_title', $instance['title'], $instance, $this->id_base);
$icon = isset($instance['icon']) ? $instance['icon'] : null;
if ($icon) {
$before_title = sprintf($before_title, 'ion-' . $icon);
}
$methods = wp_get_user_contact_methods();
$output = array();
foreach ($methods as $method => $label) {
if ('user' == listify_theme_mod('social-association')) {
$value = get_the_author_meta($method, $post->post_author);
} else {
$value = get_post_meta($post->ID, '_company_' . $method, true);
}
if ('' == $value) {
continue;
}
if ($value && !strstr($value, 'http:') && !strstr($value, 'https:')) {
$value = 'http://' . $value;
}
$output[] = sprintf('<a href="%s" target="_blank" class="ion-social-%s">%s</a>', $value, $method, $label);
}
if (empty($methods) || empty($output)) {
return;
}
ob_start();
echo $before_widget;
if ($title) {
echo $before_title . $title . $after_title;
}
do_action('listify_widget_job_listing_social_before');
echo '<ul class="social-profiles"><li>' . implode('</li><li>', $output) . '</li></ul>';
do_action('listify_widget_job_listing_social_after');
echo $after_widget;
$content = ob_get_clean();
echo apply_filters($this->widget_id, $content);
$this->cache_widget($args, $content);
}
开发者ID:abdullahrahim,项目名称:shadighar,代码行数:53,代码来源:class-widget-job_listing-social-profiles.php
示例16: init
public function init()
{
if (1 != listify_theme_mod('custom-submission')) {
return;
}
global $listify_job_manager;
$listify_job_manager->business_hours = new Listify_WP_Job_Manager_Business_Hours();
add_filter('submit_job_form_fields', array($this, 'remove_company'));
add_filter('submit_job_form_fields', array($this, 'job_category'));
add_filter('submit_job_form_fields', array($this, 'job_tag'));
add_filter('submit_job_form_fields', array($this, 'contact'));
add_filter('submit_job_form_fields', array($this, 'featured_image'));
add_filter('submit_job_form_fields', array($this, 'gallery_images'));
add_filter('submit_job_form_fields', array($this, 'phone'));
add_filter('job_manager_job_listing_data_fields', array($this, 'admin_phone'));
add_filter('job_manager_job_listing_data_fields', array($this, 'admin_remove_company'));
add_filter('submit_job_form_fields_get_job_data', array($this, 'get_job_data'), 10, 2);
add_action('job_manager_update_job_data', array($this, 'save_featured_image'), 10, 2);
add_action('job_manager_update_job_data', array($this, 'save_gallery_images'), 10, 2);
add_filter('the_company_logo', array($this, 'the_company_logo'), 10, 2);
add_filter('submit_job_form_save_job_data', array($this, 'enable_comments'), 10, 5);
}
开发者ID:GaryJones,项目名称:dockerfiles,代码行数:22,代码来源:class-wp-job-manager-submission.php
示例17: 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;
}
global $job_manager, $job_preview, $post;
extract($args);
$title = apply_filters('widget_title', $instance['title'], $instance, $this->id_base);
$icon = isset($instance['icon']) ? $instance['icon'] : null;
$gallery = Listify_WP_Job_Manager_Gallery::get(get_post()->ID);
if (empty($gallery)) {
return;
}
$limit = isset($instance['limit']) ? $instance['limit'] : 8;
$gallery = array_splice($gallery, 0, $limit);
if ($icon) {
$before_title = sprintf($before_title, 'ion-' . $icon);
}
ob_start();
echo $before_widget;
if ($title) {
echo $before_title . sprintf('<a href="%s" class="image-gallery-link">%s</a>', Listify_WP_Job_Manager_Gallery::url(), $title) . $after_title;
}
do_action('listify_widget_job_listing_gallery_slider_before');
?>
<div class="listing-gallery">
<?php
foreach ($gallery as $item) {
?>
<?php
$image = wp_get_attachment_image_src($item, 'fullsize');
?>
<?php
$link = $job_preview || !listify_theme_mod('gallery-comments') ? $image[0] : get_attachment_link($item);
?>
<div class="listing-gallery__item"><a href="<?php
echo esc_url($link);
?>
" class="listing-gallery__item-trigger">
<?php
echo wp_get_attachment_image($item, 'large');
?>
</a></div>
<?php
}
?>
</div>
<div class="listing-gallery-nav">
<?php
foreach ($gallery as $item) {
?>
<div class="listing-gallery-nav__item">
<div class="item__wrapper"><?php
echo wp_get_attachment_image($item, 'thumbnail');
?>
</div>
</div>
<?php
}
?>
</div>
<?php
do_action('listify_widget_job_listing_gallery_slider_after');
echo $after_widget;
$content = ob_get_clean();
echo apply_filters($this->widget_id, $content);
$this->cache_widget($args, $content);
}
开发者ID:durichitayat,项目名称:befolio-wp,代码行数:78,代码来源:class-widget-job_listing-gallery-slider.php
示例18: get_facets
public function get_facets($facets = false)
{
$facets = $facets ? $facets : listify_theme_mod('listing-archive-facetwp-defaults');
$_facets = array();
if (!is_array($facets)) {
$facets = array_map('trim', explode(',', $facets));
}
foreach ($facets as $key => $facet_name) {
$facet = FWP()->helper->get_facet_by_name($facet_name);
if (!$facet) {
continue;
}
$_facets[] = $facet;
}
return $_facets;
}
开发者ID:abdullahrahim,项目名称:shadighar,代码行数:16,代码来源:class-facetwp.php
示例19: foreach
?>
<?php
foreach ($attachments->posts as $id) {
?>
<?php
$thumb = wp_get_attachment_image_src($id, 'thumbnail');
?>
<?php
$full = wp_get_attachment_image_src($id, 'fullsize');
?>
<li class="gallery-preview-image" style="background-image:url(<?php
echo esc_url($thumb[0]);
?>
); ?>">
<?php
if (!listify_theme_mod('gallery-comments')) {
?>
<a href="<?php
echo esc_url($full[0]);
?>
" class="listing-gallery__item-trigger"></a>
<?php
} elseif (!$job_preview) {
?>
<a href="<?php
echo get_attachment_link($id);
?>
"></a>
<?php
}
?>
开发者ID:durichitayat,项目名称:befolio-wp,代码行数:31,代码来源:content-single-job_listing-gallery-overview.php
示例20: enqueue_scripts
public function enqueue_scripts($force = false)
{
$deps = array('jquery', 'jquery-ui-slider', 'google-maps', 'wp-backbone', 'wp-job-manager-ajax-filters');
if (class_exists('WP_Job_Manager_Extended_Location')) {
$deps[] = 'wpjm-extended-location';
}
$deps[] = 'listify';
$bias = strtolower(listify_theme_mod('region-bias'));
$base = '//maps.googleapis.com/maps/api/js';
$args = array('v' => 3, 'libraries' => 'geometry,places', 'key' => listify_theme_mod('map-behavior-api-key'), 'language' => get_locale() ? substr(get_locale(), 0, 2) : '');
if ('' != $bias) {
$args['region'] = $bias;
}
wp_enqueue_script('google-maps', esc_url_raw(add_query_arg($args, $base)));
wp_enqueue_script('listify-app-map', Listify_Integration::get_url() . 'js/map/app.min.js', $deps, '20150213', true);
$settings = array('displayMap' => (bool) $this->display(), 'facetwp' => listify_has_integration('facetwp'), 'useClusters' => (bool) listify_theme_mod('map-behavior-clusters'), 'autoFit' => (bool) listify_theme_mod('map-behavior-autofit'), 'trigger' => listify_theme_mod('map-behavior-trigger'), 'mapOptions' => array('zoom' => listify_theme_mod('map-behavior-zoom'), 'maxZoom' => listify_theme_mod('map-behavior-max-zoom'), 'maxZoomOut' => listify_theme_mod('map-behavior-max-zoom-out'), 'gridSize' => listify_theme_mod('map-behavior-grid-size'), 'scrollwheel' => listify_theme_mod('map-behavior-scrollwheel') == 'on' ? true : false), 'searchRadius' => array('min' => listify_theme_mod('map-behavior-search-min'), 'max' => listify_theme_mod('map-behavior-search-max'), 'default' => listify_theme_mod('map-behavior-search-default')));
if ('' != ($center = listify_theme_mod('map-behavior-center'))) {
$settings['mapOptions']['center'] = array_map('trim', explode(',', $center));
}
if (has_filter('job_manager_geolocation_region_cctld')) {
$settings['autoComplete']['componentRestrictions'] = array('country' => $bias);
}
$settings = apply_filters('listify_map_settings', $settings);
wp_localize_script('listify-app-map', 'listifyMapSettings', apply_filters('listify_map_settings', $settings));
}
开发者ID:abdullahrahim,项目名称:shadighar,代码行数:25,代码来源:class-wp-job-manager-map-template.php
注:本文中的listify_theme_mod函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论