本文整理汇总了PHP中setClass函数的典型用法代码示例。如果您正苦于以下问题:PHP setClass函数的具体用法?PHP setClass怎么用?PHP setClass使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了setClass函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: esc_attr
$data_color = ' data-bg-btn="' . $button_master_color . '" data-tx-btn="' . $button_master_color_text . '" data-hv-btn="' . $button_master_color_hover . '" data-hv-tx-btn="' . $button_master_color_hover_text . '"';
$style_color = ' style="background: ' . $button_master_color . '; color: ' . $button_master_color_text . ';"';
}
}
// Animation Setup
$animation_loading_class = null;
if ($animation_loading == "yes") {
$animation_loading_class = 'start-animated-content';
}
$animation_effect_class = null;
if ($animation_loading == "yes") {
$animation_effect_class = $animation_loading_effects;
} else {
$animation_effect_class = '';
}
$animation_delay_class = null;
if ($animation_loading == "yes" && !empty($animation_delay)) {
$animation_delay_class = ' data-delay="' . esc_attr($animation_delay) . '"';
}
$css_class = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'az-button' . $el_class, $this->settings['base']);
$class = setClass(array($css_class, $button_colors_mode, $inverted_to, $responsive_lg, $animation_loading_class, $animation_effect_class, $responsive_md, $responsive_sm, $responsive_xs));
if ($button_alignment == "noalign") {
$output .= '
<a ' . $class . $style_color . $data_color . $animation_delay_class . ' href="' . esc_url($button_link_url) . '"' . $button_link_target . '>' . $icon_output . $button_output . '</a>';
} else {
$output .= '
<div class="position-btn ' . $button_alignment . '"' . $animation_delay_class . '>
<a ' . $class . $style_color . $data_color . ' href="' . esc_url($button_link_url) . '"' . $button_link_target . '>' . $icon_output . $button_output . '</a>
</div>';
}
echo $output . $this->endBlockComment('az_button');
示例2: extract
<?php
extract(shortcode_atts(array('class' => '', 'id' => '', 'css_animation' => '', 'css_animation_delay' => '', 'color_scheme' => ''), $atts));
$animated = $css_animation ? 'animate' : '';
$css_animation_delay = $css_animation ? ' data-delay="' . $css_animation_delay . '"' : '';
$class = setClass(array('md-tabs md-tours', $animated, $css_animation, $class, $color_scheme));
$id = setId($id);
$output = '<div' . $class . $id . $css_animation_delay . '>';
$output .= '<ul class="nav nav-tabs">';
$GLOBALS['tabs'] = 'nav';
$output .= wpb_js_remove_wpautop($content);
$output .= '</ul>';
$GLOBALS['tabs'] = 'content';
$output .= '<div class="tab-content">';
$output .= wpb_js_remove_wpautop($content, true);
$output .= '</div>';
$output .= '</div>';
echo $output;
示例3: vc_map_get_attributes
<?php
$output = '';
$atts = vc_map_get_attributes($this->getShortcode(), $atts);
extract($atts);
$el_class = $this->getExtraClass($el_class);
$animation_loading_class = null;
if ($animation_loading == "yes") {
$animation_loading_class = 'animated-content';
}
$animation_effect_class = null;
if ($animation_loading == "yes") {
$animation_effect_class = $animation_loading_effects;
}
$animation_delay_class = null;
if ($animation_loading == "yes" && !empty($animation_delay)) {
$animation_delay_class = ' data-delay="' . $animation_delay . '"';
}
$icon_output = null;
if ($icon_mode == 'yes-icon') {
$iconClass = isset(${"icon_" . $icon_type}) ? esc_attr(${"icon_" . $icon_type}) : 'font-icon-phone';
$icon_output = '<div class="count-number-icon textaligncenter"><i class="' . $iconClass . '"></i></div>';
} else {
$icon_output = '';
}
$class = setClass(array('counter-number', $el_class, $animation_loading_class, $animation_effect_class, $responsive_lg, $responsive_md, $responsive_sm, $responsive_xs));
$output .= '<div' . $class . '' . $animation_delay_class . '>' . $icon_output . '';
$output .= '<span class="number-value timer" data-from="' . $number_value_from . '" data-to="' . $number_value_to . '" data-speed="' . $number_speed . '"></span>';
$output .= '<span class="number-field">' . $number_field . '</span>';
$output .= '</div>';
echo $output . $this->endBlockComment('az_count_number');
示例4: extract
<?php
extract(shortcode_atts(array('class' => '', 'id' => '', 'css_animation' => '', 'css_animation_delay' => '', 'bgcolor' => '', 'bordercolor' => ''), $atts));
$animated = $css_animation ? 'animate' : '';
$css_animation_delay = $css_animation ? ' data-delay="' . $css_animation_delay . '"' : '';
$class = setClass(array('md-box-content', $animated, $css_animation, $class));
$id = setId($id);
$style = ' style="background-color:' . $bgcolor . '; border-color:' . $bordercolor . '"';
$output .= '<div' . $class . $id . $style . $css_animation_delay . '>';
$output .= wpb_js_remove_wpautop($content, true);
$output .= '</div>';
echo $output;
示例5: vc_map_get_attributes
$atts = vc_map_get_attributes($this->getShortcode(), $atts);
extract($atts);
$el_class = $this->getExtraClass($el_class);
$img_id = preg_replace('/[^\\d]/', '', $image);
$thumb_widht_to = !empty($thumb_widht) ? ' style="width:' . $thumb_widht . 'px; display: table-cell;"' : '';
$thumb_display_to = !empty($thumb_widht) ? ' style="display: inline-block;"' : '';
$thumb_width_img = !empty($thumb_widht) ? ' width=' . $thumb_widht . ' ' : '';
$fancy_gallery = !empty($gallery_name) ? ' data-fancybox-group="' . $gallery_name . '" ' : '';
$image_string = wp_get_attachment_image_src($img_id, 'full');
$image_string = $image_string[0];
$animation_loading_class = null;
if ($animation_loading == "yes") {
$animation_loading_class = 'animated-content';
}
$animation_effect_class = null;
if ($animation_loading == "yes") {
$animation_effect_class = $animation_loading_effects;
}
$animation_delay_class = null;
if ($animation_loading == "yes" && !empty($animation_delay)) {
$animation_delay_class = ' data-delay="' . $animation_delay . '"';
}
$css_class = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'lightbox' . $el_class, $this->settings['base']);
$class = setClass(array($css_class, $animation_loading_class, $animation_effect_class, $responsive_lg, $responsive_md, $responsive_sm, $responsive_xs));
$output .= '<div' . $class . '' . $animation_delay_class . '' . $thumb_display_to . '>';
$output .= '<a class="fancy-wrap fancybox-media" title="' . $title . '" href="' . $link_url . '" ' . $fancy_gallery . $thumb_widht_to . '>';
$output .= '<img class="img-full-responsive" alt="' . $title . '" src="' . $image_string . '" ' . $thumb_width_img . ' />';
$output .= '<span class="overlay"><span class="circle"><i class="font-icon-play"></i></span></span>';
$output .= '</a>';
$output .= '</div>' . $this->endBlockComment('az_lightbox_video') . "\n";
echo $output;
示例6: extract
<?php
extract(shortcode_atts(array('class' => '', 'id' => '', 'css_animation' => '', 'css_animation_delay' => '', 'items_cols' => '', 'posts_per_page' => '-1', 'orderby' => '', 'order' => '', 'category' => '', 'show_image' => ''), $atts));
$animated = $css_animation ? 'animate' : '';
$css_animation_delay = $css_animation ? ' data-delay="' . $css_animation_delay . '"' : '';
$show_image = $show_image ? 'show-image' : false;
$class = setClass(array('md-recent-posts md-blog', $animated, $css_animation, $class, $show_image));
$id = setId($id);
$orderby = $orderby ? $orderby : '-1';
if ($category == "All") {
$category = '';
}
if ($category == "all") {
$category = '';
}
$args = array('post_status' => 'publish', 'order' => $order, 'orderby' => $orderby, 'posts_per_page' => $posts_per_page, 'cat' => $category, 'tax_query' => array(array('taxonomy' => 'post_format', 'field' => 'slug', 'terms' => 'post-format-quote', 'operator' => 'NOT IN'), array('taxonomy' => 'post_format', 'field' => 'slug', 'terms' => 'post-format-link', 'operator' => 'NOT IN'), array('taxonomy' => 'post_format', 'field' => 'slug', 'terms' => 'post-format-aside', 'operator' => 'NOT IN'), array('taxonomy' => 'post_format', 'field' => 'slug', 'terms' => 'post-format-chat', 'operator' => 'NOT IN')));
$items = new WP_Query($args);
$output = '';
$item_class = 'col-md-' . $items_cols;
$output .= '<div class="row">';
$output .= '<div' . $class . $id . $css_animation_delay . '>';
while ($items->have_posts()) {
$items->the_post();
$post_id = $items->post->ID;
$format = get_post_format($post_id) ? get_post_format($post_id) : 'standard';
$output .= '<div class="' . $item_class . '">';
$output .= '<article class="post-' . $post_id . ' post format-' . $format . '">';
if ($show_image) {
$output .= '<div class="featured-image"><a href="' . get_permalink() . '" title="' . esc_attr(get_the_title()) . '">' . get_the_post_thumbnail($post_id, 'md-two-thirds') . '</a></div>';
}
$output .= '<div class="post-body">';
示例7: setClass
<?php
function setClass($array)
{
$class = new stdClass();
foreach ($array as $key => $value) {
$class->{$key} = $value;
}
return $class;
}
return array(279506955 => setClass(array('id' => 279506955, 'resource_state' => 2, 'external_id' => 'ca6703c405b3645ea3be99938f09c67c', 'upload_id' => 315812711, 'athlete' => setClass(array('id' => 573245, 'resource_state' => 1)), 'name' => '3Down Audax', 'distance' => 311218, 'moving_time' => 63023, 'elapsed_time' => 71738, 'total_elevation_gain' => 2318.3, 'type' => 'Ride', 'start_date' => '2015-04-04T05:04:02Z', 'start_date_local' => '2015-04-04T06:04:02Z', 'timezone' => '(GMT+00:00) Europe/London', 'start_latlng' => array(0 => 51.61, 1 => -0.5600000000000001), 'end_latlng' => array(0 => 51.61, 1 => -0.5600000000000001), 'location_city' => 'Chalfont Saint Peter', 'location_state' => NULL, 'location_country' => 'United Kingdom', 'start_latitude' => 51.61, 'start_longitude' => -0.5600000000000001, 'achievement_count' => 37, 'kudos_count' => 3, 'comment_count' => 0, 'athlete_count' => 1, 'photo_count' => 0, 'map' => setClass(array('id' => 'a279506955', 'summary_polyline' => 'k`_zHvykB`XpXy[zwAnE`vBzdAryAqXroC`QvpFbyBn_Ct]npBj{AqPlKliAxz@bdAdeArHvWjzCjv@v~A}gBplEvVhzQl}AkCvChmCt`@pgAoTncCd_@ph@}a@`dApe@~gAuQdpBzf@x}Bwv@biBfpB~zCta@wIbSzuC~`A_CxpDvsHzZoc@dfB~eA|x@njFz{@P~K`aAzwAmqAtt@aH|f@lq@lnAsSdqAhbCl~@la@~uCvlGjcEpoBjY~oAti@jQfvCf{GlgFxfAdPpw@txB~yBvl@fqF~cAfg@`qA|iE~xBvxB`PjkB~hE`}AlkAfjArgAvFf\\j_Ah|A|v@~`Dpj@`XqsAlc@sHze@`~At`B~p@wRheAby@dy@zR|nBj]e@fJh{@voBrgAnsBdhEtjBbvAemA|xF`YlzExjA|vA`u@deCaB~gC~~@mbBvgGdA{s@ubDgBkeBgt@odB[_aCaeBwoBsq@efCmkAp^o_@u^aj@cnH_`CkpDwGmo@ydFyoBun@_bHcu@zD|h@a`BfCeyAyfBwa@bHa`CoVy`Bcm@gs@|MumAsb@qpBc`GisAj]a|DepAeyAvCywD}k@a~D?esH|v@iwFua@ykCsnIuy@qyAgfBav@zSgcAsaA}jA~Uev@sw@ufAdOi~@im@g{C}jDk_@qiA|^kiHaaAs~Awl@|CfAgfBq`AaFoz@edBm_Aub@ag@hd@}`@wmCyeAirAmPucAgl@DcpB}rBsFmaBub@anA{\\wBmf@paAcr@wcBc^~c@usAwgAwvByM{tAx|@ieGupFMeiBccBuoCkVynCyg@mfAgnDau@{`@igGvAqwGib@wkCsj@{|@eGaoB_qBmb@}e@muBdKidBkx@oWug@y|AioAgqAi_Cn_@', 'resource_state' => 2)), 'trainer' => false, 'commute' => false, 'manual' => false, 'private' => false, 'flagged' => false, 'gear_id' => 'b267883', 'average_speed' => 4.938, 'max_speed' => 16.7, 'device_watts' => false, 'average_heartrate' => 132.9, 'max_heartrate' => 165, 'elev_high' => 209.8, 'elev_low' => 15, 'total_photo_count' => 0, 'has_kudoed' => false, 'workout_type' => NULL)), 478737831 => setClass(array('id' => 478737831, 'resource_state' => 2, 'external_id' => 'Severn Across .gpx', 'upload_id' => 530138115, 'athlete' => setClass(array('id' => 573245, 'resource_state' => 1)), 'name' => 'Severn Across', 'distance' => 408151, 'moving_time' => 83478, 'elapsed_time' => 95892, 'total_elevation_gain' => 3120, 'type' => 'Ride', 'start_date' => '2015-05-09T05:15:58Z', 'start_date_local' => '2015-05-09T06:15:58Z', 'timezone' => '(GMT+00:00) Europe/London', 'start_latlng' => array(0 => 51.61, 1 => -0.5600000000000001), 'end_latlng' => array(0 => 51.61, 1 => -0.5600000000000001), 'location_city' => NULL, 'location_state' => NULL, 'location_country' => 'United Kingdom', 'start_latitude' => 51.61, 'start_longitude' => -0.5600000000000001, 'achievement_count' => 262, 'kudos_count' => 0, 'comment_count' => 0, 'athlete_count' => 1, 'photo_count' => 0, 'map' => setClass(array('id' => 'a478737831', 'summary_polyline' => '_`_zHvykBkfC|l@sjDvaDiiBzbHwaAzqHs~Bd{Cmr@~hHgdBfpC{HxcCabAj}Cvx@jkCcpA~zBeg@`hEiApqCrw@zfGs]~yAxWx{AgJ|xBkoEvbL}h@pnGpl@l_Gsz@|rD{qElpFdFzgB{Vf_@zx@tsAsRpxA|Zp_@`NvdCatBrnA{fBfkEayAvw@gw@vrD|g@ngNeKbo@{e@zGTlgFfuAfrEgmBxaCf\\zi@qb@ndA_oC~`ByGbpAb_@bbBm`DlaHk_@rpCpE~yFcs@|iGvY~yE|`B~bDaeAv~CrGj|@oq@|wDucAjdA{l@r}Ee{BbyA|ApdFde@td@iPx|ArZbsAC`cGc_@~YxGjyDv\\rvAeSpqBqzA{Maj@~s@{u@at@g_@ph@pYdyJdhDvqDrjAf~Dxt@z_Af]jvDte@QaQvoLxq@xkBxj@viFflAl_@zp@jiDdpA`tA_d@ddEjq@`lCoJvtAbd@rwBsOz~@vjB``B~QtzAteCxhCz|@ow@zvLcsChwC~kAtu@xyBf|Dat@h~KhcHzfByi@bwCgnKfa@gyL_u@sfFdw@g~Cia@ydAvg@g{A}~@ct@v`@}eDwYi}EbmAarH`xA_vCg\\shAbd@efE_PmvHe{AquEuHwwHte@y|Dp_@kUt{AieG{KoyDfk@}uF{i@{mBlc@geIlzAqmEqD_|Clr@e_ATkkEb|AycBzE{dDfUkOo@ecDdX_VhE{_B_gB}`ItaBenC|DaqAfoD_hNbQpDcH}]l{FihVpoDojInm@_lGgGibBp_@seA}NwoCj_AwdO?{~Fuy@urDqfDkxFuv@q`EcmBa`ZafEkuJsfAoxFknAypBw}@a|OfYqwNj|@yeG_zIioA{nCq|D}~B|_@', 'resource_state' => 2)), 'trainer' => false, 'commute' => false, 'manual' => false, 'private' => false, 'flagged' => false, 'gear_id' => 'b267883', 'average_speed' => 4.889, 'max_speed' => 16, 'average_watts' => 79.3, 'kilojoules' => 6616.9, 'device_watts' => false, 'average_heartrate' => 153.8, 'max_heartrate' => 183, 'elev_high' => 299, 'elev_low' => 0.1, 'total_photo_count' => 0, 'has_kudoed' => false, 'workout_type' => NULL)), 316089905 => setClass(array('id' => 316089905, 'resource_state' => 2, 'external_id' => 'all.gpx', 'upload_id' => 357634984, 'athlete' => setClass(array('id' => 573245, 'resource_state' => 1)), 'name' => 'Windsor-Chester-Windsor Audax - DNF', 'distance' => 479060, 'moving_time' => 96456, 'elapsed_time' => 122526, 'total_elevation_gain' => 3460.3, 'type' => 'Ride', 'start_date' => '2015-05-30T06:28:07Z', 'start_date_local' => '2015-05-30T07:28:07Z', 'timezone' => '(GMT+00:00) Europe/London', 'start_latlng' => array(0 => 51.46, 1 => -0.58), 'end_latlng' => array(0 => 52.1, 1 => -1.95), 'location_city' => 'Old Windsor', 'location_state' => NULL, 'location_country' => 'United Kingdom', 'start_latitude' => 51.46, 'start_longitude' => -0.58, 'achievement_count' => 46, 'kudos_count' => 1, 'comment_count' => 1, 'athlete_count' => 1, 'photo_count' => 0, 'map' => setClass(array('id' => 'a316089905', 'summary_polyline' => 'wjbyHfcqBcs@hjC~AzoCow@xoElV|zAeq@xbIfe@dmDeuFxxJul@blEwnAfgB]tfF_jErpE_hD}@mdBbiI{wDz}AwJtk@pdBxdEytFvdF_jAblCu^xsFsdAzc@}h@cgAqvArSag@_o@{oAl~@_}Amd@kiD~qDmgA`hEonD`~EidEhjCodBnaPsyCbfFeMfqByrFfsQaqB`uDwdB|hAuzBpoGuz@tk@pNrcG{gB`eAgbCrwFc`Af_Jk`AxlBEbaDejAjm@k|@drBjQryB}nP`tD_|@l|Amo@kGnD~cCq_AflDcvCrc@{{@`sDwTryGyb@xwBee@jFew@lkH{wA|p@is@`yLad@`pBwmAzi@qo@tbGevBkZ{y@x~@kC`kBqkArWsbAuz@esCtuBo~AeiA{nA~Rih@i~@uqBpm@wgC{~@sdBpeBkfF|@qjF~bDwyBrwDiuDf`@{w@tgAgoEulA_xEr}LmrIqzBwL~rD_gA~nD}_FajEimBvl@gvEbeEuRb}E}nBdaAylC|_Ec~EtlLqf@|bB|]fqDe]brCcgH`qFqpAn{E{uAnBykAt}AcuAgx@maChp@eaD|}G{}BxiAmmElLoeBbhD{dFvl@khDd{CtgDi{CvdFwl@|eBchDljEyKz_CmiAp`De~GpcCeq@ztAzw@fkA_aBduAZ~kAeyEblHksFl]}sC}^koDld@a_B`bFsqLnoCgcErkBu}@rRk|Etz@iWtdAynBpcEskBn`FhjErfAooDfLwrDtrItzB~wEm}L~nErlAhq@wdAb|Dmc@dyBwvD`mFidDzdFMhcBefBfhCp~@`pBko@zg@h~@voA{Qb`BpdAprCwpBzjBpw@pbBk_EdwBxYnn@abGj~AgeAdhA{nOh`@zG~kAaoBlb@uwFtd@_Exc@a{B~SowGl{@yrDdvCec@`c@_qA~_JluFvfDhb@', 'resource_state' => 2)), 'trainer' => false, 'commute' => false, 'manual' => false, 'private' => false, 'flagged' => false, 'gear_id' => 'b267883', 'average_speed' => 4.967, 'max_speed' => 15.7, 'average_watts' => 77.90000000000001, 'kilojoules' => 7516.7, 'device_watts' => false, 'elev_high' => 232.9, 'elev_low' => 16.8, 'total_photo_count' => 0, 'has_kudoed' => false, 'workout_type' => NULL)), 330251139 => setClass(array('id' => 330251139, 'resource_state' => 2, 'external_id' => '52ecbdd476a1d2031f9508a4f3c931ac', 'upload_id' => 373962988, 'athlete' => setClass(array('id' => 573245, 'resource_state' => 1)), 'name' => 'The Buzzard Audax (partial) ', 'distance' => 319167, 'moving_time' => 67628, 'elapsed_time' => 82389, 'total_elevation_gain' => 2915.8, 'type' => 'Ride', 'start_date' => '2015-06-20T06:24:37Z', 'start_date_local' => '2015-06-20T07:24:37Z', 'timezone' => '(GMT+00:00) Europe/London', 'start_latlng' => array(0 => 51.91, 1 => -0.68), 'end_latlng' => array(0 => 50.72, 1 => -3.47), 'location_city' => 'Leighton Buzzard', 'location_state' => NULL, 'location_country' => 'United Kingdom', 'start_latitude' => 51.91, 'start_longitude' => -0.68, 'achievement_count' => 36, 'kudos_count' => 2, 'comment_count' => 1, 'athlete_count' => 1, 'photo_count' => 0, 'map' => setClass(array('id' => 'a330251139', 'summary_polyline' => 'esy{HbrdCjkA~zD|aBnqB~l@xvBbxChgC|kAiCvVdv@b^kR~M|`@d}Ac|@tw@blBhjAomAfYfkA`}Byc@xuDhcKz~A~}CpfB`yFhUeYjc@jp@n{AvtE|d@l[flAtbEdsBzzBpwA{oAjoB}MtqAvgAbmAxNzm@f`EdsBp\\v]m[nT}eB{IjiAtfAlrAbPr`AnsAql@za@so@leAxhA|i@bqAva@}IhShvCt{JfNn{A|jDrnApeBxs@lgDoHlcBht@kHtg@tq@lnAiSds@|w@l[tgA`_Anb@nvCnmGdmDzdBrr@{[vfNTr~A}i@tkFbmB|sBalBvoK~oJtc@zEzGe^`Ivf@nrFl{ApfBngAnyCfwFieCr|@rDzvAuc@hbBfPtw@}W|pDzFlaDyh@zbBc~@hm@q\\puA|d@zvAet@~n@xKn|AyTzlAg`@p`@fEjiHgPb{@sNhwG{MnDhEndAqd@taBO`jBxi@tfAslCjaG}XrvFkr@bgCkK|eBhe@tgAaAdkDyV`qA~eB~sGfFzjCtu@zrBl_@faFt_A|vAvcArmFtyAlwBjOxkBzn@pfB~LluDgIx`Cgc@fzAgKzxAjNdoAgZbaCpXxyB`B`}CxvAbrIdElaB`zA``H~g@b~Anr@xl@`AxpA{Z`bB`_@`tDnbA~cEz@iX`YiEqYdGnC|hAxg@`oAbv@~eEddAbmAv[`bE}]txAvIru@cOfh@vaAt`Bof@~iErUtfCf\\li@~K|nBjz@pjAxhBpgGuJjuAfLnq@g^bnAjIpcEznAl}H{FxaGzLhaBmmAn{Ft\\p`CxnArlArIr~CeTda@dI|rAd[hR|Bb{B|pJl~KjqA~gFeNdLdw@ncEbgBfzGbd@tzDfg@~xA_EtqArh@prIdcBrjEhc@x|Dp}@oR', 'resource_state' => 2)), 'trainer' => false, 'commute' => false, 'manual' => false, 'private' => false, 'flagged' => false, 'gear_id' => 'b267883', 'average_speed' => 4.719, 'max_speed' => 15.4, 'average_watts' => 81.3, 'kilojoules' => 5500.2, 'device_watts' => false, 'elev_high' => 268.1, 'elev_low' => 7.9, 'total_photo_count' => 0, 'has_kudoed' => false, 'workout_type' => NULL)), 369095149 => setClass(array('id' => 369095149, 'resource_state' => 2, 'external_id' => '9eb5426f67ecb85dfa3252ca7941a2c2', 'upload_id' => 416898220, 'athlete' => setClass(array('id' => 573245, 'resource_state' => 1)), 'name' => 'Midnight Ride', 'distance' => 17697.2, 'moving_time' => 3442, 'elapsed_time' => 3819, 'total_elevation_gain' => 11.7, 'type' => 'Ride', 'start_date' => '2015-08-14T22:40:41Z', 'start_date_local' => '2015-08-14T23:40:41Z', 'timezone' => '(GMT+00:00) Europe/London', 'start_latlng' => array(0 => 51.37, 1 => -0.21), 'end_latlng' => array(0 => 51.46, 1 => -0.32), 'location_city' => 'Sutton', 'location_state' => NULL, 'location_country' => 'United Kingdom', 'start_latitude' => 51.37, 'start_longitude' => -0.21, 'achievement_count' => 0, 'kudos_count' => 0, 'comment_count' => 0, 'athlete_count' => 1, 'photo_count' => 0, 'map' => setClass(array('id' => 'a369095149', 'summary_polyline' => 'y{oxHnrg@{LtG~Ozt@{Pbo@bAzJqRha@wPjVcAtHkOr_@oFpGwKtWwVn`@eJgFcUe@wKvA}BtFaDoAgHnFiIhAkJjr@mUxhAyIpYeRhc@iEdPoAhPyCfDv@vPmAdd@n@~DrIbJ?vMiLbC}@|ZmDmAiC~AepA`iA{MhA}\\|d@uLjAcXbQqK}@aGcGmQgGsEqIkRbKsE|HiJgI', 'resource_state' => 2)), 'trainer' => false, 'commute' => false, 'manual' => false, 'private' => false, 'flagged' => false, 'gear_id' => 'b267883', 'average_speed' => 5.142, 'max_speed' => 8.9, 'average_watts' => 63, 'kilojoules' => 216.7, 'device_watts' => false, 'elev_high' => 44, 'elev_low' => 7.9, 'total_photo_count' => 0, 'has_kudoed' => false, 'workout_type' => NULL)), 485651710 => setClass(array('id' => 485651710, 'resource_state' => 2, 'external_id' => '649001790.gpx', 'upload_id' => 537178270, 'athlete' => setClass(array('id' => 573245, 'resource_state' => 1)), 'name' => 'Night Ride', 'distance' => 1863.5, 'moving_time' => 478, 'elapsed_time' => 8051, 'total_elevation_gain' => 0, 'type' => 'Ride', 'start_date' => '2015-12-27T21:56:00Z', 'start_date_local' => '2015-12-27T21:56:00Z', 'timezone' => '(GMT+00:00) Europe/London', 'start_latlng' => array(0 => 51.46, 1 => -0.32), 'end_latlng' => array(0 => 51.46, 1 => -0.32), 'location_city' => 'Twickenham', 'location_state' => 'England', 'location_country' => 'United Kingdom', 'start_latitude' => 51.46, 'start_longitude' => -0.32, 'achievement_count' => 0, 'kudos_count' => 0, 'comment_count' => 0, 'athlete_count' => 1, 'photo_count' => 0, 'map' => setClass(array('id' => 'a485651710', 'summary_polyline' => 'wmcyHrs~@WyD', 'resource_state' => 2)), 'trainer' => false, 'commute' => false, 'manual' => false, 'private' => false, 'flagged' => false, 'gear_id' => 'b267883', 'average_speed' => 3.899, 'max_speed' => 7, 'average_watts' => 30, 'kilojoules' => 14.3, 'device_watts' => false, 'elev_high' => 11, 'elev_low' => 8.800000000000001, 'total_photo_count' => 0, 'has_kudoed' => false, 'workout_type' => NULL)), 460347901 => setClass(array('id' => 460347901, 'resource_state' => 2, 'external_id' => '20151231_225322.gpx', 'upload_id' => 511477273, 'athlete' => setClass(array('id' => 573245, 'resource_state' => 1)), 'name' => 'Last and First', 'distance' => 23402.1, 'moving_time' => 4938, 'elapsed_time' => 6980, 'total_elevation_gain' => 97.59999999999999, 'type' => 'Ride', 'start_date' => '2015-12-31T22:53:22Z', 'start_date_local' => '2015-12-31T22:53:22Z', 'timezone' => '(GMT+00:00) Europe/London', 'start_latlng' => array(0 => 51.46, 1 => -0.32), 'end_latlng' => array(0 => 51.46, 1 => -0.32), 'location_city' => 'Twickenham', 'location_state' => 'England', 'location_country' => 'United Kingdom', 'start_latitude' => 51.46, 'start_longitude' => -0.32, 'achievement_count' => 1, 'kudos_count' => 1, 'comment_count' => 0, 'athlete_count' => 1, 'photo_count' => 0, 'map' => setClass(array('id' => 'a460347901', 'summary_polyline' => 'ai`yH`n_AzI|G~HsJ`PqH|DlHdPzGzFzFlK|ApGlPz_@xPbGkB~[eXpDvCb[r@vC{Hpz@zN~G_FdEjItKtBp@cI}EkmAgWygAd@eU_D_K{C}BDmG{H}OqObBeLoj@A}K{Dgc@eImAkFab@kPgLen@c`AqGcCaAq[cEsK}BuRac@_Hm`@?_RoDoJzB{EpGnHbf@jDbdAdOt`Au@~`@iErb@dFh@zI`JaMtEaRxOyUvGwJfKZ|DnQz`@tBnV', 'resource_state' => 2)), 'trainer' => false, 'commute' => false, 'manual' => false, 'private' => false, 'flagged' => false, 'gear_id' => 'b267883', 'average_speed' => 4.739, 'max_speed' => 8.800000000000001, 'average_watts' => 59.4, 'kilojoules' => 293.5, 'device_watts' => false, 'elev_high' => 58.1, 'elev_low' => 6.2, 'total_photo_count' => 0, 'has_kudoed' => false, 'workout_type' => NULL)));
示例8: extract
<?php
extract(shortcode_atts(array('title' => '', 'el_color' => '', 'cat_tab' => '', 'el_class' => ''), $atts));
$el_class = $this->getExtraClass($el_class);
var_dump($el_class);
$output = '';
$output .= '<div class="' . setClass($el_class) . '">';
$output .= '</div>';
echo $output;
示例9: extract
<?php
$output = $testimonials_color = $testimonials_type = $testimonials_categories = $orderby = $order = $el_class = '';
extract(shortcode_atts(array('testimonials_color' => 'dark-mode', 'testimonials_type' => 'slide', 'testimonials_categories' => '', 'orderby' => '', 'order' => '', 'el_class' => ''), $atts));
$el_class = $this->getExtraClass($el_class);
global $post;
// Argumnets
$args = array('posts_per_page' => -1, 'post_type' => 'testimonial', 'testimonial-category' => esc_attr($testimonials_categories), 'orderby' => $orderby, 'order' => $order);
// Run query
$my_query = new WP_Query($args);
$css_class = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'az-testimonial-output' . $el_class, $this->settings['base']);
$class = setClass(array('flexslider', $css_class, $testimonials_color));
// Get Uniq Id
$uniq_self = uniqid();
$output .= '
<div id="testimonial-section-' . $uniq_self . '"' . $class . ' data-slide-type="' . $testimonials_type . '" data-slide-easing="swing" data-slide-loop="false" data-slideshow="false">
<ul class="slides">';
// Output Testimonial Posts
while ($my_query->have_posts()) {
$my_query->the_post();
$post_id = $my_query->post->ID;
// Get post ID
// Testimonial Caption
$testimonial_caption = get_post_meta($post->ID, 'az_testimonial_caption', true);
if (!empty($testimonial_caption)) {
$testimonial_caption = get_post_meta($post->ID, 'az_testimonial_caption', true);
} else {
$testimonial_caption = '';
}
// Testimonial Quote Text
$testimonial_quote_text = get_post_meta($post->ID, 'az_testimonial_quote', true);
示例10: extract
<?php
extract(shortcode_atts(array('class' => '', 'id' => '', 'css_animation' => '', 'css_animation_delay' => '', 'container_type' => '', 'shadow' => '', 'padding' => '', 'padding_top' => '', 'padding_bottom' => '', 'fixed_height' => '', 'fullscreen' => false, 'fullscreen_arrow' => false, 'bgtype' => 'bg-default', 'bgcolor' => '', 'section_arrow' => '', 'bgimage' => '', 'bgvideo' => '', 'video_mp4' => '', 'video_webm' => '', 'video_ogv' => '', 'video_poster' => '', 'slider_images' => '', 'map_type' => '', 'map_latitude' => '', 'map_longitude' => '', 'map_zoom' => '', 'map_pin' => '', 'map_title' => '', 'map_info' => '', 'map_height' => '', 'map_scroll' => '', 'map_drag' => '', 'map_zoom_control' => '', 'map_disable_doubleclick' => '', 'map_streetview' => '', 'bgparallax' => '', 'bgmask' => '', 'bgmask_color' => '', 'bgmask_color_opacity' => '', 'bgmask_image' => '', 'bgimage_position' => '', 'bgimage_repeat' => '', 'bgimage_size' => '', 'bgimage_attach' => ''), $atts));
$animated = $css_animation ? 'animate' : '';
$css_animation_delay = $css_animation ? ' data-delay="' . $css_animation_delay . '"' : '';
$bgparallax = $bgparallax == 'bg-parallax' && $bgtype == 'bg-image' ? 'bg-parallax' : '';
if ($container_type == 'container') {
$container_type = '';
}
$class = setClass(array('page-section', $class, $animated, $css_animation, $container_type, $shadow, $padding, $fullscreen, $bgtype, $bgparallax, $section_arrow));
$id = setId($id);
$s_height = $fixed_height ? 'height:' . $fixed_height . 'px; ' : '';
$s_padding = '';
if ($padding == 'padding-custom') {
$s_padding = 'padding-top:' . $padding_top . 'px; padding-bottom:' . $padding_bottom . 'px;';
}
$s_bgimage = '';
$s_parallax = '';
$s_bgposition = '';
$s_bgrepeat = '';
$s_bgsize = '';
$s_bgattachment = '';
if ($bgtype == 'bg-image') {
$bgimage = wp_get_attachment_image_src($bgimage, 'full');
$s_bgimage = 'background-image:url(' . $bgimage[0] . ');';
if ($bgparallax) {
$s_parallax = ' data-type="background" data-speed="3"';
} else {
$s_bgposition = 'background-position:' . $bgimage_position . ';';
$s_bgrepeat = 'background-repeat:' . $bgimage_repeat . ';';
$s_bgsize = 'background-size:' . $bgimage_size . ';';
示例11: uniqid
// Get Uniq Id
$uniq_self = uniqid();
// Slider Full Screen
$slider_f = null;
if ($az_slider_module_h == "full_screen_slider") {
$slider_f = ' full-area';
}
// Overlay
$az_slider_mask_output = null;
if ($az_slider_overlay == "yes_mask_overlay") {
$az_slider_mask_output = '
<div class="az-slider-overlay-mask" style="background-color: ' . $az_slider_overaly_color . ';"></div>
';
}
$css_class = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'az-slider-output flexslider' . $el_class, $this->settings['base']);
$class = setClass(array($css_class, $slider_f, $az_slider_nav_color));
$slider_output = null;
if ($az_slider_module_h == "full_screen_slider") {
$slider_output = '
<div id="az-slider-images-flexslider-' . $uniq_self . '"' . $class . ' data-slide-type="' . $az_slider_animations . '" data-slide-easing="swing" data-slide-loop="false" data-slideshow="false">';
}
if ($az_slider_module_h == "normal_height_slider") {
$slider_output = '
<div id="az-slider-images-flexslider-' . $uniq_self . '"' . $class . ' data-slide-type="' . $az_slider_animations . '" data-slide-easing="swing" data-slide-loop="false" data-slideshow="false" style="height: ' . esc_attr($az_slider_height) . 'px;">';
}
$output .= $slider_output;
$output .= '
' . $az_slider_mask_output . '
<ul class="slides">';
if (!empty($az_images_gallery)) {
foreach ($images as $image) {
示例12: setClass
$color_icon = ' style="color: ' . $custom_icon_color . ';"';
}
// Check Field Color
$color_field = null;
if ($field_color == "custom") {
$color_field = ' style="color: ' . $custom_field_color . ';"';
}
// Check Counter Color
$color_number = null;
if ($number_color == "custom") {
$color_number = ' style="color: ' . $custom_number_color . ';"';
}
$icon_output = null;
if ($checkicon == "custom_icon") {
$icon_output = '<div class="count-number-icon textaligncenter"><i class="' . $icon . '"' . $color_icon . '></i></div>';
} else {
$icon_output = "";
}
$counter_output = null;
if (!empty($number_field)) {
$counter_output = '<span class="number-value timer" data-from="' . $number_value_from . '" data-to="' . $number_value_to . '" data-speed="' . $number_speed . '"' . $color_number . '></span><span class="number-field"' . $color_field . '>' . $number_field . '</span>';
} else {
$counter_output = '<span class="number-value timer" data-from="' . $number_value_from . '" data-to="' . $number_value_to . '" data-speed="' . $number_speed . '"' . $color_number . '></span>';
}
$class = setClass(array('counter-number', $el_class, $animation_loading_class, $animation_effect_class));
$output .= '<div' . $class . '' . $animation_delay_class . '>' . $icon_output . '';
$output .= '<div class="output-number" data-delay="' . $number_delay . '">';
$output .= $counter_output;
$output .= '</div>';
$output .= '</div>';
echo $output . $this->endBlockComment('az_count_number');
示例13: extract
<?php
extract(shortcode_atts(array('class' => '', 'id' => '', 'css_animation' => '', 'css_animation_delay' => '', 'images' => '', 'effect' => '', 'navigation' => '', 'pagination' => '', 'size' => 'large'), $atts));
$animated = $css_animation ? 'animate' : '';
$css_animation_delay = $css_animation ? ' data-delay="' . $css_animation_delay . '"' : '';
$class = setClass(array('md-slider', $animated, $css_animation, $class));
$id = setId($id);
$images = explode(',', $images);
$output = '<div' . $class . $id . $css_animation_delay . '>';
$output .= '<div class="flexslider" data-effect="' . $effect . '" data-navigation="' . $navigation . '" data-pagination="' . $pagination . '"><ul class="slides">';
foreach ($images as $image) {
$image_big = wp_get_attachment_image_src($image, $size);
$alt = get_post_meta($image, '_wp_attachment_image_alt', true) ? get_post_meta($image, '_wp_attachment_image_alt', true) : '';
$output .= '<li><img src="' . $image_big[0] . '" alt="' . esc_attr($alt) . '" /></li>';
}
$output .= '</ul></div>';
$output .= '</div>';
echo $output;
示例14: extract
<?php
extract(shortcode_atts(array('class' => '', 'id' => '', 'alias' => ''), $atts));
$class = setClass(array('md-revslider', $class));
$id = setId($id);
echo '<div' . $class . $id . '>' . do_shortcode("[rev_slider " . $alias . "]") . '</div>';
示例15: extract
<?php
extract(shortcode_atts(array('class' => '', 'id' => '', 'css_animation' => '', 'css_animation_delay' => '', 'kind' => '', 'text_align' => '', 'special_font' => '', 'color' => '', 'fontsize' => '', 'lineheight' => '', 'fontweight' => ''), $atts));
$animated = $css_animation ? 'animate' : '';
$css_animation_delay = $css_animation ? ' data-delay="' . $css_animation_delay . '"' : '';
$class = setClass(array('md-heading', $animated, $css_animation, $class, $text_align, $special_font));
$id = setId($id);
$css_animation = setAnimation($css_animation);
$style = ' style="color:' . $color . '; font-size:' . $fontsize . 'px; line-height:' . $lineheight . 'px; font-weight:' . $fontweight . ';"';
$output .= '<' . $kind . $class . $id . $css_animation_delay . $style . '>';
$output .= wpb_js_remove_wpautop($content);
$output .= '</' . $kind . '>';
echo $output;