function flipping_team_display_one($member, $flipping_effect) { if (!$flipping_effect) { // No flip display $output = "<li class=\"team-member\">"; // Show image if set if (isset($member['image']) && $member['image'] != "") { $output .= "<img class=\"team-member-photo\" src=\""; $output .= $member['image'] . '" alt="' . $member['name'] . '" />'; } // Show name and if set website $output .= "<h2 class=\"team-member-name\">" . $member['name'] . "</h2>"; if (isset($member['website']) && $member['website'] != "") { $url = $member['website']; if (substr($url, 0, 7) != "http://") { $url = "http://" . $url; } $output .= '<div class="team-member-website">'; $output .= '<a href="' . $url . '">' . $member['website'] . '</a>'; $output .= '</div>'; } // Show description $output .= '<div class="team-member-info">'; $output .= nxtautop($member['info']); $output .= '</div>'; $output .= "<div style=\"clear:both;\"></div>"; $output .= '</li>'; return $output; } else { // Flip display $output = '<li class="team-member team-member-flip" data-id="' . $member['id'] . '" title="' . __('Click to flip', 'flpt') . '">'; if (isset($member['image']) && $member['image'] != "") { $output .= "<img class=\"team-member-photo\" src=\""; $output .= $member['image'] . '" alt="' . $member['name'] . '" />'; } // Show name and if set website $output .= "<h2 class=\"team-member-name\">" . $member['name'] . "</h2>"; if (isset($member['website']) && $member['website'] != "") { $url = $member['website']; if (substr($url, 0, 7) != "http://") { $url = "http://" . $url; } $output .= '<div class="team-member-website">'; $output .= '<a href="' . $url . '">' . $member['website'] . '</a>'; $output .= '</div>'; } $output .= "<div style=\"clear:both;\"></div>"; $output .= "</li>"; // Set back display (flip data) $output .= '<div class="team-member-data" data-id="' . $member['id'] . '" style="display:none;">'; $output .= '<div class="team-member-info">' . nxtautop($member['info']) . '</div>'; $output .= "<div style=\"clear:both;\"></div>"; $output .= '</div>'; return $output; } }
function huddle_shortcode_formatter($content) { $new_content = ''; $pattern_full = '{(\\[raw\\].*?\\[/raw\\])}is'; $pattern_contents = '{\\[raw\\](.*?)\\[/raw\\]}is'; $pieces = preg_split($pattern_full, $content, -1, PREG_SPLIT_DELIM_CAPTURE); foreach ($pieces as $piece) { if (preg_match($pattern_contents, $piece, $matches)) { $new_content .= $matches[1]; } else { $new_content .= nxttexturize(nxtautop($piece)); } } return $new_content; }
/** * Outputs the widget based on the arguments input through the widget controls. * * @since 0.1.0 */ function widget($args, $instance) { global $user_identity, $user_ID; extract($args); /* Set up the arguments for nxt_login_form(). */ $args = array('form_id' => !empty($instance['form_id']) ? esc_attr($instance['form_id']) : 'loginform', 'label_username' => esc_html($instance['label_username']), 'label_password' => esc_html($instance['label_password']), 'label_remember' => esc_html($instance['label_remember']), 'label_log_in' => esc_html($instance['label_log_in']), 'id_username' => esc_attr($instance['id_username']), 'id_password' => esc_attr($instance['id_password']), 'id_remember' => esc_attr($instance['id_submit']), 'id_submit' => esc_attr($instance['remember']), 'remember' => !empty($instance['remember']) ? true : false, 'value_username' => esc_attr($instance['value_username']), 'value_remember' => !empty($instance['value_remember']) ? true : false, 'echo' => false); if (!empty($instance['redirect'])) { $args['redirect'] = esc_url($instance['redirect']); } /* Get the logged in/out text. */ $logged_in_text = apply_filters('widget_text', $instance['logged_in_text']); $logged_out_text = apply_filters('widget_text', $instance['logged_out_text']); $show_avatar = !empty($instance['show_avatar']) ? true : false; /* Output the theme's $before_widget wrapper. */ echo $before_widget; /* If a title was input by the user, display it. */ if (!empty($instance['title'])) { echo $before_title . apply_filters('widget_title', $instance['title'], $instance, $this->id_base) . $after_title; } /* If the current user is logged in. */ if (is_user_logged_in()) { /* Show avatar if enabled. */ if (!empty($show_avatar)) { echo get_avatar($user_ID); } /* Show logged in text if any is written. */ if (!empty($logged_in_text)) { echo do_shortcode(shortcode_unautop(nxtautop($logged_in_text))); } } else { /* Show avatar if enabled. */ if ($show_avatar) { echo get_avatar($user_ID); } /* Show logged out text if any is written. */ if ($logged_out_text) { echo do_shortcode(shortcode_unautop(nxtautop($logged_out_text))); } /* Output the login form. */ echo '<div class="members-login-form">' . nxt_login_form($args) . '</div>'; } /* Close the theme's widget wrapper. */ echo $after_widget; }
function of_sanitize_allowedposttags($input) { global $allowedposttags; $output = nxtautop(nxt_kses($input, $allowedposttags)); return $output; }
function wiki_parser($content) { global $post; $wiki_parser = new nxtW_WikiParser(); $wiki_parser->reference_wiki = get_bloginfo('url') . '/wiki/'; $wiki_parser->suppress_linebreaks = true; $content = $wiki_parser->parse($content, $post->post_title); $content = nxtautop($content); return $content; unset($wiki_parser); }
function widget($args, $instance) { extract($args); $title = apply_filters('widget_title', empty($instance['title']) ? '' : $instance['title'], $instance, $this->id_base); $text = apply_filters('widget_text', empty($instance['text']) ? '' : $instance['text'], $instance); echo $before_widget; if (!empty($title)) { echo $before_title . $title . $after_title; } ?> <div class="textwidget"><?php echo !empty($instance['filter']) ? nxtautop($text) : $text; ?> </div> <?php echo $after_widget; }
while (have_posts()) { the_post(); $count++; ?> <?php $custom_values = array('icon' => 'mini', 'excerpt' => 'mini_excerpt', 'button' => 'mini_readmore'); $meta = get_post_custom($post->ID); foreach ($custom_values as $k => $v) { ${$k} = ''; // Declare an empty variable to start with. if (isset($meta[$v]) && $meta[$v][0] != '') { ${$k} = $meta[$v][0]; } } if ($excerpt != '') { $excerpt = nxtautop(stripslashes($excerpt)); } // If we have an excerpt, add the paragraph tags. ?> <div class="block"> <?php if ($icon) { ?> <img src="<?php echo $icon; ?> " alt="" class="home-icon" /> <?php } ?> <div class="feature">
/** * Formats text for the rich text editor. * * The filter 'richedit_pre' is applied here. If $text is empty the filter will * be applied to an empty string. * * @since 2.0.0 * * @param string $text The text to be formatted. * @return string The formatted text after filter is applied. */ function nxt_richedit_pre($text) { // Filtering a blank results in an annoying <br />\n if (empty($text)) { return apply_filters('richedit_pre', ''); } $output = convert_chars($text); $output = nxtautop($output); $output = htmlspecialchars($output, ENT_NOQUOTES); return apply_filters('richedit_pre', $output); }