function render($args, $instance) { global $gantry; ob_start(); ?> <div id="rt-accessibility"> <div class="rt-desc"><?php _ge($instance['text']); ?> </div> <div id="rt-buttons"> <a href="<?php echo $gantry->addQueryStringParams($gantry->getCurrentUrl(array('reset-settings')), array('font-size' => 'smaller')); ?> " title="<?php echo _g('Decrease Font Size'); ?> " class="small"><span class="button"></span></a> <a href="<?php echo $gantry->addQueryStringParams($gantry->getCurrentUrl(array('reset-settings')), array('font-size' => 'larger')); ?> " title="<?php echo _g('Increase Font Size'); ?> " class="large"><span class="button"></span></a> </div> </div> <div class="clear"></div> <?php echo ob_get_clean(); }
function render($args, $instance) { global $gantry; $platform = $gantry->browser->platform; if ($gantry->get($platform . '-enabled')) { $prefix = $gantry->get('template_prefix'); $cookiename = $prefix . $gantry->browser->platform . '-switcher'; $cls = !$gantry->retrieveTemp('platform', $cookiename) ? 'off' : 'on'; ob_start(); ?> <div class="clear"></div> <a href="#" id="gantry-viewswitcher" class="<?php echo $cls; ?> "><span><?php _ge('Switcher'); ?> </span></a> <?php echo ob_get_clean(); } }
function render($params = array()) { global $wp_query, $withcomments, $post, $wpdb, $id, $comment, $user_login, $user_ID, $user_identity, $overridden_cpage; global $gantry; $fparams = $this->_getParams($params); $comment_layout_name = 'comment_' . $fparams->commentLayout; $layout = $gantry->_getLayout($comment_layout_name); $className = 'GantryLayout' . ucfirst($comment_layout_name); // Do not delete these lines ob_start(); if (post_password_required()) { ?> <span class="alert"><?php _ge('This post is password protected. Enter the password to view comments.'); ?> </span> <?php return ob_get_clean(); } ?> <!-- You can start editing here. --> <?php if (have_comments()) { ?> <br/> <div class="comment-section"> <div class="contentheading"><?php comments_number(_g('No Comments'), _g('1 Comment'), _g('% Comments')); ?> </div> </div> <ol class="commentlist"> <?php wp_list_comments(array('style' => 'ol', 'callback' => array($className, 'render_comment'), 'reply_text' => _g('Reply'))); ?> </ol> <div class="rt-pagination nav"> <div class="alignleft"><?php next_comments_link('« ' . _g('Older Comments')); ?> </div> <div class="alignright"><?php previous_comments_link(_g('Newer Comments') . ' »'); ?> </div> <div class="clear"></div> </div> <?php } else { // this is displayed if there are no comments so far ?> <?php if (comments_open()) { ?> <!-- If comments are open, but there are no comments. --> <?php } else { // comments are closed ?> <!-- If comments are closed. --> <div class="attention"> <div class="icon"><?php _ge('Comments are closed.'); ?> </div> </div> <?php } ?> <?php } ?> <!-- RESPOND --> <?php if (comments_open()) { ?> <div id="respond"> <div class="comment-section"> <div class="contentheading"><?php comment_form_title(_g('Leave a Reply'), _g('Leave a Reply to %s')); ?> </div> </div> <div class="cancel-comment-reply"> <small><?php cancel_comment_reply_link(); ?> </small> </div> <?php if (get_option('comment_registration') && !is_user_logged_in()) { ?> <div class="attention"> <div class="icon"><?php _ge('You must be'); ?> <a href="<?php echo wp_login_url(get_permalink()); ?> "><?php _ge('logged in'); ?> </a> <?php _ge('to post a comment.'); ?> </div> </div> <?php } else { ?> <!-- Begin Form --> <form action="<?php echo get_option('siteurl'); ?> /wp-comments-post.php" method="post" id="commentform"> <?php if (is_user_logged_in()) { ?> <p><?php _ge('Logged in as'); ?> <a href="<?php echo get_option('siteurl'); ?> /wp-admin/profile.php"><?php echo $user_identity; ?> </a>. <a href="<?php echo wp_logout_url(get_permalink()); ?> " title="<?php _ge('Log out of this account'); ?> "><?php _ge('Log out'); ?> »</a></p> <?php } else { ?> <p> <input type="text" name="author" id="author" onblur="if(this.value=='') this.value='<?php _ge('Name (Required)'); ?> ';" onfocus="if(this.value=='<?php _ge('Name (Required)'); ?> ') this.value='';" value="Name (Required)" size="22" tabindex="1" <?php if ($req) { echo "aria-required='true'"; } ?> /> </p> <p> <input type="text" name="email" id="email" onblur="if(this.value=='') this.value='<?php _ge('E-mail (Required)'); ?> ';" onfocus="if(this.value=='<?php _ge('E-mail (Required)'); ?> ') this.value='';" value="E-mail (Required)" size="22" tabindex="2" <?php if ($req) { echo "aria-required='true'"; } ?> /> </p> <p> <input type="text" name="url" id="url" onblur="if(this.value=='') this.value='<?php _ge('Website'); ?> ';" onfocus="if(this.value=='<?php _ge('Website'); ?> ') this.value='';" value="Website" size="22" tabindex="3"/> </p> <?php } ?> <!--<p><small><strong>XHTML:</strong> You can use these tags: <code><?php echo allowed_tags(); ?> </code></small></p>--> <p style="margin: 0;"> <textarea name="comment" id="comment" cols="100%" rows="10" tabindex="4"></textarea> </p><br/> <input class="button" name="submit" type="submit" id="submit" tabindex="5" value="<?php _ge('Submit'); ?> "/> <div class="clear"></div> <?php comment_id_fields(); ?> <?php do_action('comment_form', $post->ID); ?> </form> <!-- End Form --> <?php } // If registration required and not logged in ?> </div> <?php } // if you delete this the sky will fall on your head ?> <?php return ob_get_clean(); }
function render($args, $instance) { global $gantry, $post; ob_start(); $menu_class = $instance['menu_class']; if ($menu_class != '') { $menu_class = ' class="' . $menu_class . '"'; } else { $menu_class = ''; } ?> <ul<?php echo $menu_class; ?> > <?php $out = wp_register('<li>', '</li>', '0'); $out = preg_replace('@\\<a([^>]*)>(.*?)\\<\\/a\\>@', '<a$1><span>$2</span></a>', $out); echo $out; ?> <?php if (is_user_logged_in()) { ?> <li><a href="<?php echo wp_logout_url(); ?> " title="<?php _ge('Logout'); ?> "><span><?php _ge('Logout'); ?> </span></a></li> <?php } else { ?> <li><a href="<?php echo wp_login_url(); ?> " title="<?php _ge('Login'); ?> "><span><?php _ge('Login'); ?> </span></a></li> <?php } ?> <li><a href="<?php bloginfo('rss2_url'); ?> " title="<?php echo esc_attr(_g('Syndicate this site using RSS 2.0')); ?> "><span><?php _ge('Entries <abbr title="Really Simple Syndication">RSS</abbr>'); ?> </span></a></li> <li><a href="<?php bloginfo('comments_rss2_url'); ?> " title="<?php echo esc_attr(_g('The latest comments to all posts in RSS')); ?> "><span><?php _ge('Comments <abbr title="Really Simple Syndication">RSS</abbr>'); ?> </span></a></li> <li><a href="http://wordpress.org/" title="<?php echo esc_attr(_g('Powered by WordPress, state-of-the-art semantic personal publishing platform.')); ?> "><span>WordPress.org</span></a></li> <?php wp_meta(); ?> </ul> <?php echo ob_get_clean(); }
$classes .= "first"; } if ($i == count($fieldSets)) { $classes .= "last"; } if ($i == $activeTab) { $classes .= " active "; } ?> <li class="<?php echo $classes; ?> "> <span class="outer"> <span class="inner"><span style="float:left;"><?php _ge($fieldSet->label); ?> </span> <span class="presets-involved"><span>0</span></span></span> </span> </li> <?php $i++; } ?> </ul> <?php $panels = array(); $positions = array('hiddens' => array(), 'top' => array(), 'left' => array(), 'right' => array(), 'bottom' => array()); foreach ($fieldSets as $name => $fieldSet) { if ($name == 'toolbar-panel') {
public function render($callback) { ob_start(); ?> <div class="innertabs-panel"> <div class="gantry-field <?php echo $this->type; ?> -field"> <div> <div class="inner-tabs"> <ul> <?php $i = 0; foreach ($this->fields as $field) { $classes = ''; if (!$i) { $classes .= "first active"; } if ($i == count($this->fields) - 1) { $classes .= ' last'; } ?> <li class="<?php echo $classes; ?> "><span><?php _ge($field->getLabel()); ?> </span></li> <?php $i++; } ?> </ul> </div> <div class="inner-panels"> <?php $i = 0; foreach ($this->fields as $field) { $i++; ?> <div class="inner-panel inner-panel-<?php echo $i; ?> "> <?php if ($field->type == 'hidden') { ?> <?php echo $field->getInput(); ?> <?php } else { ?> <?php echo $field->render($callback); ?> <?php } ?> </div> <?php } ?> </div> <div class="clear"></div> </div> </div> </div> <?php $buffer = ob_get_clean(); return $buffer; }
</li> <?php $i++; } } ?> <li class="last <?php if ($activeTab == $i) { echo "active"; } ?> "> <span class="outer"> <span class="inner"><span style="float:left;"><?php _ge('Assignments'); ?> </span> <span class="presets-involved"> <span>0</span></span></span> </span> </li> </ul> <?php $output = ""; $output .= "<div id=\"gantry-panel\">\n"; if (count($panels) > 0) { for ($i = 0; $i < count($panels); $i++) { $panel = $panels[$i]['name']; $width = ''; if (@count($positions['left'][$panels[$i]['name']]) && !@count($positions['right'][$panels[$i]['name']]) || !@count($positions['left'][$panels[$i]['name']]) && @count($positions['right'][$panels[$i]['name']])) { $width = 'width-auto'; }
function render_comment($comment, $args, $depth) { ob_start(); $GLOBALS['comment'] = $comment; ?> <li <?php comment_class(); ?> id="li-comment-<?php comment_ID(); ?> "> <div id="comment-<?php comment_ID(); ?> " class="comment-div-wrapper"> <div class="comment-author vcard" style="line-height: 50px;"> <div class="comment_gravatar_wrapper"> <?php echo get_avatar($comment, $size = 50); ?> </div> <div class="comment-meta commentmetadata"> <?php printf(_g('<cite class="fn">%s</cite>'), get_comment_author_link()); ?> <div class="comment-meta-time"> <a href="<?php echo htmlspecialchars(get_comment_link($comment->comment_ID)); ?> "><?php printf(_g('%1$s at %2$s'), get_comment_date(), get_comment_time()); ?> </a> <?php edit_comment_link(_g('(Edit)'), ' ', ''); ?> </div> </div> <div class="clear"></div> </div> <?php if ($comment->comment_approved == '0') { ?> <span class="attention"><?php _ge('Your comment is awaiting moderation.'); ?> </span> <?php } ?> <?php comment_text(); ?> <div class="reply"> <?php comment_reply_link(array_merge($args, array('depth' => $depth, 'max_depth' => $args['max_depth']))); ?> </div> <div class="clear"></div> </div> <?php echo ob_get_clean(); return; }
/** * Action to add template detail defined widget styles to all widgets that have options * @param $instance * @param $return * @param $values * @return void */ function gantry_add_widget_styles_action(&$instance, &$return, $values) { if ($return != "noform") { global $gantry; $widget_styles = $gantry->getWidgetStyles(); foreach ($widget_styles as $style_info) { if (!array_key_exists($style_info['name'], $values)) { $values[$style_info['name']] = ''; } ?> <p> <label for="<?php echo $instance->get_field_id($style_info['name']); ?> "><?php _ge($style_info['label']); ?> </label> <select id="<?php echo $instance->get_field_id($style_info['name']); ?> " name="<?php echo $instance->get_field_name($style_info['name']); ?> "> <option value="" <?php if (empty($values[$style_info['name']])) { ?> selected="selected"<?php } ?> >- </option> <?php foreach ($style_info['styles'] as $style_name => $style_label) { ?> <option value="<?php echo $style_name; ?> " <?php if ($values[$style_info['name']] == $style_name) { ?> selected="selected"<?php } ?> ><?php _re($style_label); ?> </option> <?php } ?> </select> </p> <?php } if ($gantry->get('custom_widget_variations')) { ?> <p> <label for="<?php echo $instance->get_field_id('custom-variations'); ?> "><?php _ge('Custom Variations'); ?> </label> <input type="text" id="<?php echo $instance->get_field_id('custom-variations'); ?> " name="<?php echo $instance->get_field_name('custom-variations'); ?> " value="<?php echo $values['custom-variations']; ?> " size="25" /> </p> <?php } } }