/** * Processes a Bank Transfer Order to display * instructions to the user * @param APP_Order $order Order to display information for * @param array $options User entered options * @return void */ public function process($order, $options) { $sent = get_post_meta($order->get_ID(), 'bt-sentemail', true); if (empty($sent)) { appthemes_bank_transfer_pending_email(get_post($order->get_ID())); update_post_meta($order->get_ID(), 'bt-sentemail', true); } $templates = appthemes_payments_get_args('templates'); $template_name = $templates['bank-transfer']; $located = appthemes_locate_template($template_name); if ($located) { // load theme template $order = appthemes_get_order($order->get_ID()); appthemes_load_template($template_name, array('order' => $order)); } else { // load bundled template require_once dirname(__FILE__) . '/template/' . $template_name; } }
function display() { $template_path = appthemes_locate_template(basename($this->template)); // retrieve the user meta for each gateway field foreach (self::get_fields_names() as $field) { $user_meta[$field] = get_user_option($field); } // prepare the vars to pass to the escrow settings template $vars = array('fields' => $this->fields, 'formdata' => $user_meta, 'user' => wp_get_current_user()); ob_start(); if (!$template_path) { extract($vars); require $this->template; } else { appthemes_load_template($template_path, $vars); } $output = ob_get_clean(); $output .= html('input', array('type' => 'hidden', 'name' => 'action', 'value' => 'manage-escrow')); $output .= html('input', array('type' => 'submit', 'value' => esc_attr__('Save Changes', APP_TD), 'class' => 'button')); $output = scbForms::form_wrap($output, 'app-manage-escrow'); echo apply_filters('appthemes_escrow_settings_form', $output, $vars); do_action('appthemes_escrow_after_settings_form', $vars); }
/** * Sends email with standardized headers * */ function appthemes_send_email($address, $subject, $content) { // Strip 'www.' from URL $domain = preg_replace('#^www\\.#', '', strtolower($_SERVER['SERVER_NAME'])); $headers = array('from' => sprintf('From: %1$s <%2$s', get_bloginfo('name'), "wordpress@{$domain}"), 'mime' => 'MIME-Version: 1.0', 'type' => 'Content-Type: text/html; charset="' . get_bloginfo('charset') . '"', 'reply_to' => "Reply-To: noreply@{$domain}"); ob_start(); appthemes_load_template(APP_FRAMEWORK_DIR_NAME . '/templates/email-template.php', array('address' => $address, 'subject' => $subject, 'content' => $content)); $body = ob_get_clean(); wp_mail($address, $subject, $body, implode("\n", $headers)); }
function widget($args, $instance) { global $post; extract($args); $title = apply_filters('widget_title', $instance['title']); $count = $instance['count']; if (!is_numeric($count)) { $count = 5; } echo $before_widget; if ($title) { echo $before_title . $title . $after_title; } // include the main blog loop appthemes_load_template('includes/sidebar-blog-posts.php', array('count' => $count)); echo $after_widget; }
<?php /** * Order Checkout template. * * @package ClassiPress\Templates * @author AppThemes * @since ClassiPress 3.3 */ ?> <?php $order = get_order(); if ($order && APPTHEMES_ORDER_PENDING == $order->get_status() && get_query_var('bt_end')) { appthemes_load_template('order-summary.php'); return; } ?> <div class="content"> <div class="content_botbg"> <div class="content_res"> <div id="breadcrumb"><?php cp_breadcrumb(); ?> </div> <div class="shadowblock_out">
<th class="listing-options" data-hide="phone"><?php _e('Options', APP_TD); ?> </th> </tr> </thead> <tbody> <?php while ($listings->have_posts()) { $listings->the_post(); $i++; ?> <?php appthemes_load_template('content-dashboard-' . get_post_type() . '.php', array('i' => $i)); ?> <?php } ?> </tbody> </table> <?php appthemes_pagination('', '', $listings); ?> <?php
/** * Displays form. * * @param object $order * @param object $checkout * * return void */ public function display($order, $checkout) { appthemes_add_template_var(array('app_order' => $order)); appthemes_load_template('order-summary.php'); }
public function content($instance) { $instance = array_merge($this->defaults, (array) $instance); if (empty($instance['count']) || !($count = absint($instance['count']))) { $count = 5; } // include the main blog loop appthemes_load_template('includes/sidebar-blog-posts.php', array('count' => $count)); }