"><?php _e('Logout', 'framework'); ?> </a></li> </ul> <?php } else { ?> <ul class="dropdown-menu"> <?php $agent_favourite_properties = imic_get_template_url('template-favorite-properties.php'); echo '<li><a href="' . $agent_favourite_properties . '" title="' . __('Favorite Properties', 'framework') . '">' . __('Favorite Properties', 'framework') . '</a></li>'; $agent_favourite_searches = imic_get_template_url('template-favorite-search.php'); echo '<li><a href="' . $agent_favourite_searches . '" title="' . __('Saved Searches', 'framework') . '">' . __('Saved Searches', 'framework') . '</a></li>'; //Agent Profile page link $agent_profile = imic_get_template_url('template-agent-profile.php'); echo '<li class="register"><a href="' . $agent_profile . '" title="' . __('My Profile', 'framework') . '">' . __('My Profile', 'framework') . '</a></li>'; ?> <li class="login"><a href="<?php echo wp_logout_url(home_url()); ?> " title="<?php _e('Logout', 'framework'); ?> "><?php _e('Logout', 'framework'); ?> </a></li> </ul> <?php }
$plan_price = get_post_meta($plan_id, 'imic_plan_price', true); $plan_price = floor($plan_price); $plan_listings_count = get_post_meta($plan_id, 'imic_plan_validity_listings', true); $plan_listings_count = esc_attr($plan_listings_count); } $transaction_id = isset($_REQUEST['tx']) ? esc_attr($_REQUEST['tx']) : ''; if ($transaction_id != '') { $paypal_details = imic_validate_payment($transaction_id); if (!empty($paypal_details)) { $st = $paypal_details['payment_status']; $payment_gross = $paypal_details['payment_gross']; $payment = floor($payment_gross); } } $ad_listing = imic_get_template_url('template-add-listing.php'); $listings = imic_get_template_url('template-listing.php'); global $current_user; get_currentuserinfo(); $user_id = get_current_user_id(); $current_user = wp_get_current_user(); $user_info_id = get_user_meta($user_id, 'imic_user_info_id', true); $confirm = $plan_price == $payment ? 1 : ''; $st = $confirm == 1 ? $st : __('Not Verified', 'framework'); $data = array(); if ($confirm == 1) { $all_plans_user = get_post_meta($user_info_id, 'imic_user_plan_' . $plan_id, true); if (!empty($all_plans_user)) { foreach ($all_plans_user as $key => $value) { $data[date('U')] = $value; } } else {
function imi_causes_template_choose($template) { $listing_id = imic_get_template_url('template-causes-list.php'); $grid_id = imic_get_template_url('template-causes-grid.php'); $listing = get_option('causes_list_id') != '' ? get_option('causes_list_id') : $listing_id; $grid = get_option('causes_grid_id') != '' ? get_option('causes_grid_id') : $grid_id; if ($listing != '') { if (is_page($listing)) { return imic_causes_template_selector('template-causes-list'); } } if ($grid != '') { if (is_page($grid)) { return imic_causes_template_selector('template-causes-grid'); } } if (is_tax('causes-category')) { return imic_causes_template_selector('taxonomy-causes-category'); } if (is_singular('causes')) { return imic_causes_template_selector('single-causes'); } else { return $template; } }
<?php /* Template Name:Saved Searches */ get_header(); include_once ABSPATH . 'wp-admin/includes/plugin.php'; if (is_plugin_active('favorite_property/favorite_property.php')) { if (is_user_logged_in()) { /* Site Showcase */ imic_page_banner($pageID = get_the_ID()); /* End Site Showcase */ $paged = get_query_var('paged') ? get_query_var('paged') : 1; global $imic_options, $current_user; $currency_symbol = imic_get_currency_symbol($imic_options['currency-select']); get_currentuserinfo(); $edit_url = imic_get_template_url('template-submit-property.php'); $sidebar = get_post_meta(get_the_ID(), 'imic_select_sidebar_from_list', false); $class = empty($sidebar) || !is_active_sidebar($sidebar[0]) ? 12 : 9; ?> <!-- Start Content --> <div class="main" role="main"> <div id="content" class="content full"> <div class="container"> <div class="page"> <div class="row"> <div class="col-md-<?php echo $class; ?> "> <div class="block-heading" id="details"> <h4><span class="heading-icon"><i class="fa fa-search"></i></span><?php _e('Saved Searches', 'framework');
$this_user = get_user_meta($post_author_id, 'imic_user_info_id', true); $add = get_post_meta($this_user, 'imic_user_zip_code', true); $highlighted_specs = isset($imic_options['highlighted_specs']) ? $imic_options['highlighted_specs'] : ''; $new_highlighted_specs = imic_filter_lang_specs_admin($highlighted_specs, get_the_ID()); $highlighted_specs = $new_highlighted_specs; $unique_specs = $imic_options['unique_specs']; $specifications = get_post_meta(get_the_ID(), 'feat_data', true); $unique_value = imic_vehicle_price(get_the_ID(), $unique_specs, $specifications); $highlight_value = imic_vehicle_title(get_the_ID(), $highlighted_specs, $specifications); $video = get_post_meta(get_the_ID(), 'imic_plugin_video_url', true); $featured_specifications = isset($imic_options['side_specifications']) ? $imic_options['side_specifications'] : array(); $normal_specifications = isset($imic_options['normal_specifications']) ? $imic_options['normal_specifications'] : array(); $normal_specification = array(); $related_specifications = isset($imic_options['related_specifications']) ? $imic_options['related_specifications'] : array(); $browse_specification_switch = get_post_meta(get_the_ID(), 'imic_browse_by_specification_switch', true); $browse_listing = imic_get_template_url("template-listing.php"); $download_pdf = get_post_meta(get_the_ID(), 'imic_plugin_car_manual', true); $plan = get_post_meta(get_the_ID(), 'imic_plugin_car_plan', true); $plan_premium = get_post_meta($plan, 'imic_pricing_premium_badge', true); $userFirstName = get_the_author_meta('first_name', $post_author_id); $userLastName = get_the_author_meta('last_name', $post_author_id); $user_data = get_userdata(intval($post_author_id)); $userName = $user_data->display_name; if (!empty($userFirstName) || !empty($userLastName)) { $userName = $userFirstName . ' ' . $userLastName; } if ($browse_specification_switch == 1) { get_template_part('bar', 'one'); } elseif ($browse_specification_switch == 2) { get_template_part('bar', 'two'); } elseif ($browse_specification_switch == 3) {
<div class="col-md-12"> <h1><?php echo single_term_title("", false); ?> </h1> </div> </div> </div> </div> <!-- End Page Header --> </div> <?php } global $imic_options; $currency_symbol = imic_get_currency_symbol($imic_options['currency-select']); $listing_url = imic_get_template_url('template-property-listing.php'); ?> <!-- Start Content --> <div class="main" role="main"> <div id="content" class="content full"> <div class="container"> <div class="row"> <?php if (is_active_sidebar('')) { ?> <div class="col-md-9"><?php } else { ?> <div class="col-md-12"><?php } ?>
<?php global $imic_options; $listing_url = imic_get_template_url("template-listing.php"); $listing_id = imic_get_template_id('template-listing.php'); $container = $imic_options['search_position'] == 1 ? "container" : ""; $search_type = isset($imic_options['search_form_type']) ? $imic_options['search_form_type'] : 0; $numeric_specs_type = isset($imic_options['integer_specs_type']) ? $imic_options['integer_specs_type'] : 0; ?> <div class="search-form"> <div class="search-form-inner"> <form class="<?php echo esc_attr($container); ?> searchoneform" method="get" action="<?php echo esc_url($listing_url); ?> "> <input type="hidden" value="<?php echo esc_attr($listing_id); ?> " name="page_id"> <h3><?php echo esc_attr_e('Find a Yacht with our Quick Search', 'framework'); ?> </h3> <div class="row parent-category-row"> <?php if ($search_type == 0) { $search_fields = isset($imic_options['search_form']) ? $imic_options['search_form'] : array(); $count = 1;
function widget($args, $instance) { $cache = array(); if (!$this->is_preview()) { $cache = wp_cache_get('sermon_speakers', 'widget'); } if (!is_array($cache)) { $cache = array(); } if (!isset($args['widget_id'])) { $args['widget_id'] = $this->id; } if (isset($cache[$args['widget_id']])) { echo $cache[$args['widget_id']]; return; } ob_start(); extract($args); // these are the widget options $post_title = apply_filters('widget_title', $instance['title']); $number = apply_filters('widget_number', $instance['number']); $numberEvent = !empty($number) ? $number : 4; $category = apply_filters('widget-category', empty($instance['category']) ? '' : $instance['category'], $instance, $this->id_base); $EventHeading = !empty($post_title) ? $post_title : __('Sermon Speakers', 'imic-framework-admin'); echo $args['before_widget']; if (!empty($instance['title'])) { echo $args['before_title']; echo apply_filters('widget_title', $EventHeading, $instance, $this->id_base); echo $args['after_title']; } $url = imic_get_template_url('template-speakers-sermon.php'); query_posts(array('post_type' => 'speaker', 'posts_per_page' => $numberEvent, 'speaker-category' => $category)); if (have_posts()) { echo '<ul>'; while (have_posts()) { the_post(); $position = get_post_meta(get_the_ID(), 'imic_staff_position', true); echo '<li>'; if ('' != get_the_post_thumbnail()) { echo get_the_post_thumbnail(get_the_ID(), '100x100'); } echo '<div class="people-info"> <h5 class="people-name"><a data-toggle="modal" data-target="#team-modal-' . (get_the_ID() + 2648) . '" href="#" class="">' . get_the_title() . '</a></h5> <span class="meta-data">' . $position . '</span> </div> '; echo '</li><div class="modal fade team-modal" id="team-modal-' . (get_the_ID() + 2648) . '" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> <div class="modal-dialog modal-lg"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> <h4 class="modal-title" id="myModalLabel">' . __('Team Members', 'framework') . '</h4> </div> <div class="modal-body"> <div class="staff-item"> <div class="row"> <div class="col-md-5 col-sm-6"> ' . get_the_post_thumbnail(get_the_ID(), '600x400', array('class' => 'img-thumbnail')) . ' </div> <div class="col-md-7 col-sm-6"> <h3>' . get_the_title() . '</h3> <span class="meta-data">' . get_post_meta(get_the_ID(), 'imic_staff_position', true) . '</span>'; $post_id = get_post(get_the_ID()); $content = $post_id->post_content; $content = apply_filters('the_content', $content); $content = str_replace(']]>', ']]>', $content); echo $content; if (get_post_meta(get_the_ID(), 'imic_display_sermon_url', true) == 1) { if ($url != '') { echo '<a class="btn btn-primary" href="' . esc_url(add_query_arg('speakers', get_the_ID(), $url)) . '">' . __('View all Sermons', 'framework') . '</a>'; } } echo '</div> </div> </div> </div> </div> </div> </div>'; } echo '</ul>'; wp_reset_query(); } else { _e('No Team Member Found', 'imic-framework-admin'); } echo $args['after_widget']; if (!$this->is_preview()) { $cache[$args['widget_id']] = ob_get_flush(); wp_cache_set('sermon_speakers', $cache, 'widget'); } else { ob_end_flush(); } }
<div class="input-group"> <span class="input-group-addon"><i class="fa fa-user"></i></span> <input class="form-control input1" id="loginname" type="text" name="loginname"> </div> <br> <div class="input-group"> <span class="input-group-addon"><i class="fa fa-lock"></i></span> <input class="form-control input1" id="password" type="password" name="password"> </div> <div class="checkbox"> <input type="checkbox" checked="checked" value="true" name="rememberme" id="rememberme" class="checkbox"> <?php _e('Remember Me!', 'framework'); ?> <?php echo '<a href="' . imic_get_template_url('template-reset_password.php') . '" title="' . __('Forget Password', 'framework') . '">' . __('Forget Password', 'framework') . '</a>'; ?> </div> <input class="submit_button btn btn-primary button2" type="submit" value="<?php _e('Login Now', 'framework'); ?> " name="submit"> <?php wp_nonce_field('ajax-login-nonce', 'security'); ?> <p class="status"></p> </form> </div> <?php } /* Manage Register For
function imic_get_cats_list($id, $type = "list") { global $imic_options; $listing_page_url = imic_get_template_url('template-listing.php'); $list = ''; $separator = " > "; $start = 1; $args = array('orderby' => 'name', 'fields' => 'all', 'hierarchical' => true, 'child_of' => 0); $terms = wp_get_object_terms($id, 'listing-category'); if ($type == "list") { $list .= '<div class="category-rail">'; foreach ($terms as $term) { $list .= '<a href="' . esc_url(add_query_arg('list-cat', $term->slug, $listing_page_url)) . '">' . $term->name . '</a>'; if ($start < count($terms)) { $list .= $separator; } $start++; } $list .= '</div>'; } if ($type == "dropdown") { if (count($terms) > 1) { $list .= '<div class="btn-group pull-right category-rail"> <button type="button" class="btn btn-default listing-sort-btn">' . __('Categories', 'framework') . '</button> <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-expanded="false"> <span class="caret"></span> <span class="sr-only">' . __('Toggle Dropdown', 'framework') . '</span> </button> <ul class="dropdown-menu sorter">'; foreach ($terms as $term) { $list .= '<li><a href="' . esc_url(add_query_arg('list-cat', $term->slug, $listing_page_url)) . '">' . $term->name . '</a></li>'; } $list .= '</ul> </div>'; } else { $list .= '<div class="category-rail">'; foreach ($terms as $term) { $list .= '<a href="' . esc_url(add_query_arg('list-cat', $term->slug, $listing_page_url)) . '">' . $term->name . '</a>'; } $list .= '</div>'; } } $list .= ''; return $list; }
function imic_staff($atts, $content = null) { extract(shortcode_atts(array("title" => "", "type" => 1, "order" => "", "number" => "", "column" => 4, "cat" => ""), $atts)); $output = ''; if ($order == "no") { $orderby = "ID"; $sort_order = "DESC"; } else { $orderby = "menu_order"; $sort_order = "ASC"; } $url = imic_get_template_url('template-speakers-sermon.php'); query_posts(array('post_type' => 'speaker', 'speaker-category' => $cat, 'posts_per_page' => $number, 'orderby' => $orderby, 'order' => $sort_order)); $output .= '<h3>' . $title . '</h3> <hr class="sm">'; if ($type == 1) { $output .= '<div class="row">'; if (have_posts()) { while (have_posts()) { the_post(); $staff_position = get_post_meta(get_the_ID(), 'imic_staff_position', true); $social = imic_social_staff_icon(); $output .= '<div class="col-md-' . $column . ' col-sm-6"> <div class="grid-item staff-item format-standard"> <div class="grid-item-inner"> ' . get_the_post_thumbnail(get_the_ID(), '600x400') . ' <div class="grid-content"> <div class="staff-item-name"> <h5><a data-toggle="modal" data-target="#team-modal-' . (get_the_ID() + 2648) . '" href="#" class="">' . get_the_title() . '</a></h5> <span class="meta-data">' . $staff_position . '</span> </div> ' . $social . imic_excerpt(10) . ' </div></div> </div> </div>'; $output .= '<div class="modal fade team-modal" id="team-modal-' . (get_the_ID() + 2648) . '" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> <div class="modal-dialog modal-lg"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> <h4 class="modal-title" id="myModalLabel">' . __('Team Members', 'framework') . '</h4> </div> <div class="modal-body"> <div class="staff-item"> <div class="row"> <div class="col-md-5 col-sm-6"> ' . get_the_post_thumbnail(get_the_ID(), '600x400', array('class' => 'img-thumbnail')) . ' </div> <div class="col-md-7 col-sm-6"> <h3>' . get_the_title() . '</h3> <span class="meta-data">' . get_post_meta(get_the_ID(), 'imic_staff_position', true) . '</span>'; $post_id = get_post(get_the_ID()); $content = $post_id->post_content; $content = apply_filters('the_content', $content); $content = str_replace(']]>', ']]>', $content); $output .= $content; if (get_post_meta(get_the_ID(), 'imic_display_sermon_url', true) == 1) { if ($url != '') { $output .= '<a class="btn btn-primary" href="' . add_query_arg('speakers', get_the_ID(), $url) . '">' . __('View all Sermons', 'framework') . '</a>'; } } $output .= '</div> </div> </div> </div> </div> </div> </div>'; } } $output .= '</div>'; } else { $output .= '<ul class="members-list row">'; if (have_posts()) { while (have_posts()) { the_post(); $staff_position = get_post_meta(get_the_ID(), 'imic_staff_position', true); $social = imic_social_staff_icon(); $output .= '<li class="col-md-' . $column . ' col-sm-4 col-xs-6"> ' . get_the_post_thumbnail(get_the_ID(), '100x100') . ' <h5>' . get_the_title() . '</h5> <span class="meta-data">' . $staff_position . '</span> ' . $social . ' </li>'; } } $output .= '</ul>'; } wp_reset_query(); return $output; }
?> </a> <span class="price"><?php echo esc_attr($unique_value); ?> </span> </div> <div id="nine" class="delete session-save-car"><a href="#"><i class="icon-delete"></i></a></div> </li><?php } ?> </ul> </div> <div class="tool-box-foot"> <a href="<?php echo imic_get_template_url("template-compare.php"); ?> " class="btn btn-xs btn-info compare-viewed-box" disabled><?php _e('Compare', 'framework'); ?> ()</a> </div> </div> </li> </ul> </div> <div class="col-md-9 col-sm-9"> <div class="btn-group pull-right results-sorter"> <button type="button" class="btn btn-default listing-sort-btn"><?php _e('Sort by', 'framework'); ?>
function imic_enqueue_child_scripts() { wp_register_script('imic_jquery_child_init', get_stylesheet_directory_uri() . '/js/init.js', array(), '', true); wp_enqueue_script('imic_jquery_child_init'); wp_localize_script('imic_jquery_child_init', 'urlajax', array('url' => admin_url('admin-ajax.php'), 'tmpurl' => get_template_directory_uri(), 'is_property' => is_singular('property'), 'sticky' => $sticky_menu, 'is_contact' => is_page_template('template-contact.php'), 'home_url' => site_url(), 'is_payment' => is_page_template('template-payment.php'), 'register_url' => imic_get_template_url('template-register.php'), 'is_register' => is_page_template('template-register.php'), 'is_login' => is_user_logged_in(), 'is_submit_property' => is_page_template('template-submit-property.php'), 'basic' => $basic, 'advanced' => $advanced)); }
<div class="modal-body"> <div class="staff-item"> <div class="row"> <div class="col-md-5 col-sm-6"> ' . get_the_post_thumbnail($speaker, '600x400', array('class' => 'img-thumbnail')) . ' </div> <div class="col-md-7 col-sm-6"> <h3>' . get_the_title($speaker) . '</h3> <span class="meta-data">' . get_post_meta($speaker, 'imic_staff_position', true) . '</span>'; $post_id = get_post($speaker); $content = $post_id->post_content; $content = apply_filters('the_content', $content); $content = str_replace(']]>', ']]>', $content); echo $content; if (get_post_meta($speaker, 'imic_display_sermon_url', true) == 1) { $url = imic_get_template_url('template-speakers-sermon.php'); if ($url != '') { echo '<a class="btn btn-primary" href="' . esc_url(add_query_arg('speakers', $speaker, $url)) . '">' . __('View all Sermons', 'framework') . '</a>'; } } echo '</div> </div> </div> </div> </div> </div> </div>'; } ?> </ul> </div><?php
<?php $listing_page_url = imic_get_template_url('template-listing.php'); $output = ''; $output .= '<div class="search-form"> <div class="search-form-inner"> <div class="row parent-category-row"> <div class="container"> <div class="listing-header"> <h3>' . __('Browse our categories', 'framework') . '</h3> </div><div class="categorty-browse-cols">'; $list_cats = get_terms('listing-category', array('parent' => 0, 'number' => 10, 'hide_empty' => false)); foreach ($list_cats as $cat) { $listing_sub_cats = array(); $output .= '<div class="categorty-browse-col"><ul>'; $output .= '<li><a href="' . esc_url(add_query_arg('list-cat', $cat->slug, $listing_page_url)) . '">' . $cat->name . '</a></li>'; $listing_sub_cats = get_terms('listing-category', array('parent' => $cat->term_id)); if (!empty($listing_sub_cats)) { $output .= '<ul>'; foreach ($listing_sub_cats as $cats) { $listing_sub_cats_third = array(); $output .= '<li><a href="' . esc_url(add_query_arg('list-cat', $cats->slug, $listing_page_url)) . '">' . $cats->name . '</a></li>'; $listing_sub_cats_third = get_terms('listing-category', array('parent' => $cats->term_id)); if (!empty($listing_sub_cats_third)) { $output .= '<ul>'; foreach ($listing_sub_cats_third as $cats_t) { $output .= '<li><a href="' . esc_url(add_query_arg('list-cat', $cats_t->slug, $listing_page_url)) . '">' . $cats_t->name . '</a></li>'; } $output .= '</ul>'; } }
if ($p_flag != 1 && isset($_POST['user_login'])) { $user_login = $_POST['user_login']; $password = $_POST['pass1']; global $wpdb; $wpdb->update($wpdb->users, array('user_pass' => md5($password)), array('user_login' => $user_login)); echo '<div class="alert">'; _e('Your password succefully updated', 'framework'); echo ' <a href ="' . imic_get_template_url('template-register.php') . '" class ="class="submit_button btn btn-primary button2">' . __('Login Here', 'framework') . '</a>'; echo '</div>'; } } } if (isset($_GET['login']) || $p_flag == 1) { ?> <form name="resetpassform" id="register-form" action="<?php echo imic_get_template_url('template-reset_password.php'); ?> ?action=resetpass" method="post" autocomplete="off"> <input type="hidden" id="user_login" name ="user_login" value="<?php echo $_GET['login']; ?> " autocomplete="off"> <div class="input-group"> <span class="input-group-addon"><i class="fa fa-lock"></i></span> <input type="password" name="pass1" id="pwd1" class="form-control" value ="<?php echo isset($_POST['pass1']) ? $_POST['pass1'] : ''; ?> " placeholder="<?php _e('Password', 'framework'); ?> ">
<a data-toggle="modal" data-target="#' . $plan . '-PaypalModal" href="" class="text-success" title="' . __('Renew Plan', 'framework') . '"> <i class="fa fa-refresh"></i> </a> </td> </tr>'; $plan_price = get_post_meta($plan, 'imic_plan_price', true); $paypal_currency = $imic_options['paypal_currency']; $paypal_email = $imic_options['paypal_email']; $paypal_site = $imic_options['paypal_site']; global $current_user; get_currentuserinfo(); $user_id = get_current_user_id(); $current_user = wp_get_current_user(); $user_info_id = get_user_meta($user_id, 'imic_user_info_id', true); $thanks_url = imic_get_template_url('template-thanks.php'); $paypal_site = $paypal_site == "1" ? "https://www.paypal.com/cgi-bin/webscr" : "https://www.sandbox.paypal.com/cgi-bin/webscr"; echo '<div id="' . $plan . '-PaypalModal" class="modal fade" aria-hidden="true" aria-labelledby="mymodalLabel" role="dialog" tabindex="-1"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button class="close" aria-hidden="true" data-dismiss="modal" type="button">' . esc_attr__('×', 'framework') . '</button> <h4 id="mymodalLabel" class="modal-title">' . esc_attr__('Payment Information', 'framework') . '</h4> </div> <div class="modal-body"> <form method="post" id="planpaypalform" name="planpaypalform" class="clearfix" action="' . esc_url($paypal_site) . '"> <div class="row"> <div class="col-md-6"> <div class="form-group"> <input type="text" value="' . get_the_title($user_info_id) . '" id="paypal-title" disabled name="First Name" class="form-control input-lg" placeholder="' . __('Name', 'framework') . '*"> </div>
<?php global $id, $imic_options; $spec_browse = get_post_meta($id, 'imic_browse_by_specification', true); $browse_listing = imic_get_template_url('template-listing.php'); $auto_scroll = get_post_meta($id, 'imic_browse_by_auto_scroll', true); $scroll_speed = get_post_meta($id, 'imic_browse_by_auto_scroll_speed', true); $scroll_speed = $scroll_speed == '' ? 5000 : $scroll_speed; $scroll = $auto_scroll == 1 ? $scroll_speed : ''; ?> <!-- Utiity Bar --> <div class="utility-bar"> <div class="container"> <div class="row"> <div class="col-md-4 col-sm-6"> <?php if (!empty($spec_browse)) { $specification_img = get_post_meta($spec_browse, 'specifications_value', true); $browse_title = get_post_meta($id, 'imic_browse_by_specification_title', true); $spec_int = get_post_meta($spec_browse, 'imic_plugin_spec_char_type', true); if ($spec_int == 0) { $slug = imic_the_slug($spec_browse); } elseif ($spec_int == 1) { $slug = "int_" . imic_the_slug($spec_browse); } else { $slug = "char_" . imic_the_slug($spec_browse); } ?> <div class="toggle-make"> <a href="#"><i class="fa fa-navicon"></i></a> <span><?php
</div> <div class="text-align-center" id="submit-property"> <?php $current_user_id = $current_user->ID; $total_property = get_user_meta($current_user_id, 'property_value', true); $check_for_update = get_query_var('site'); if (isset($imic_options['plan_show_option']) && $imic_options['plan_show_option'] == '1') { if ($total_property > 0 || !empty($check_for_update)) { ?> <input type="submit" value="<?php _e('Submit Now', 'framework'); ?> " name="submit" class="btn btn-primary btn-lg"/> <?php } else { $pay_for_plan_url = imic_get_template_url('template-price-listing.php'); if (!empty($pay_for_plan_url)) { $pay_for_plan_url = '<a href="' . $pay_for_plan_url . '">' . __('Buy another plan', 'framework') . '</a>'; } echo "<div id=\"message\"><div class=\"alert alert-success\">" . __('You have reached your maximum limit for property addition with current plan ', 'framework') . $pay_for_plan_url . "</div></div>"; } } else { echo '<input type="submit" value="' . __('Submit Now', 'framework') . '" name="submit" class="btn btn-primary btn-lg"/>'; } ?> <input type="hidden" name="post_type" id="post_type" value="domande" /> <input type="hidden" name="action" value="post" /> <?php wp_nonce_field('new-post'); ?> </div>
function imic_plan($atts, $content = null) { extract(shortcode_atts(array("title" => "", "number" => 1, "term" => ""), $atts)); global $imic_options; $output = ''; if (is_plugin_active("imithemes-listing/listing.php")) { $add_listing = imic_get_template_url('template-add-listing.php'); $output .= '<div class="spacer-30"></div> <div class="pricing-table three-cols margin-0">'; $args_plan = array('post_type' => 'plan', 'post_status' => 'publish', 'posts_per_page' => $number, 'plan-category' => $term); $plan_listing = new WP_Query($args_plan); if ($plan_listing->have_posts()) { while ($plan_listing->have_posts()) { $plan_listing->the_post(); $plan_period = get_post_meta(get_the_ID(), 'imic_plan_validity', true); $plan_period_time = get_post_meta(get_the_ID(), 'imic_plan_validity_weeks', true); $plan_period_listing = get_post_meta(get_the_ID(), 'imic_plan_validity_listings', true); $plan_listing_draft = get_post_meta(get_the_ID(), 'imic_plan_validity_expire_listing', true); if ($plan_period != '0' && is_user_logged_in() && $plan_period != '') { $plan_btn_val = __('Pay Now', 'framework'); $plan_url = ''; $modal = 'data-toggle="modal" data-target="#' . get_the_ID() . '-PaypalModal"'; } elseif ($plan_period != '0' && !is_user_logged_in() && $plan_period != '') { $plan_btn_val = __('Log In/Register', 'framework'); $plan_url = ''; $modal = 'data-toggle="modal" data-target="#PaymentModal"'; } else { $plan_btn_val = __('Create Ad Now', 'framework'); $plan_url = add_query_arg('plans', get_the_ID(), $add_listing); $modal = ''; } $highlight = get_post_meta(get_the_ID(), 'imic_pricing_highlight', true); $highlight_class = $highlight == 1 ? "highlight accent-color" : ""; $advantage = get_post_meta(get_the_ID(), 'imic_plan_advantage', true); $plan_currency = get_post_meta(get_the_ID(), 'imic_plan_currency', true); $plan_currency_position = get_post_meta(get_the_ID(), 'imic_plan_currency_position', true); $output .= '<div class="pricing-column ' . $highlight_class . '">'; $output .= '<h3>' . get_the_title() . '<span class="highlight-reason">' . $advantage . '</span></h3>'; $output .= '<div class="pricing-column-content">'; if ($plan_currency_position == 1) { $output .= '<h4><span class="dollar-sign">' . $plan_currency . '</span>' . get_post_meta(get_the_ID(), 'imic_plan_price', true) . '</h4>'; } else { $output .= '<h4>' . get_post_meta(get_the_ID(), 'imic_plan_price', true) . '<span class="dollar-sign">' . $plan_currency . '</span></h4>'; } $output .= '<span class="interval">' . __('Until Sold', 'framework') . '</span>'; $post_id = get_post(get_the_ID()); $content = $post_id->post_content; $content = apply_filters('the_content', $content); $output .= str_replace(']]>', ']]>', $content); $output .= '<a ' . $modal . ' class="btn btn-primary" href="' . esc_url($plan_url) . '">' . $plan_btn_val . '</a>'; $output .= '</div>'; if ($plan_period != '0' && is_user_logged_in() && $plan_period != '') { $plan_price = get_post_meta(get_the_ID(), 'imic_plan_price', true); $paypal_currency = $imic_options['paypal_currency']; $paypal_email = $imic_options['paypal_email']; $paypal_site = $imic_options['paypal_site']; global $current_user; get_currentuserinfo(); $user_id = get_current_user_id(); $current_user = wp_get_current_user(); $user_info_id = get_user_meta($user_id, 'imic_user_info_id', true); $thanks_url = imic_get_template_url('template-thanks.php'); $paypal_site = $paypal_site == "1" ? "https://www.paypal.com/cgi-bin/webscr" : "https://www.sandbox.paypal.com/cgi-bin/webscr"; $output .= '<div id="' . get_the_ID() . '-PaypalModal" class="modal fade" aria-hidden="true" aria-labelledby="mymodalLabel" role="dialog" tabindex="-1"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button class="close" aria-hidden="true" data-dismiss="modal" type="button">' . esc_attr__('×', 'framework') . '</button> <h4 id="mymodalLabel" class="modal-title">' . esc_attr__('Payment Information', 'framework') . '</h4> </div> <div class="modal-body"> <form method="post" id="planpaypalform" name="planpaypalform" class="clearfix" action="' . esc_url($paypal_site) . '"> <div class="row"> <div class="col-md-6"> <div class="form-group"> <input type="text" value="' . get_the_title($user_info_id) . '" id="paypal-title" disabled name="First Name" class="form-control input-lg" placeholder="' . __('Name', 'framework') . '*"> </div> </div> <div class="col-md-6"> <div class="form-group"> <input type="text" value="' . $current_user->user_email . '" id="paypal-email" disabled name="email" class="form-control input-lg" placeholder="' . __('Email', 'framework') . '*"> </div> </div> <div class="col-md-12"> <div class="form-group"> <div id="messages"></div> </div> </div> <input type="hidden" name="rm" value="2"> <input type="hidden" name="amount" value="' . esc_attr($plan_price) . '"> <input type="hidden" name="cmd" value="_xclick"> <input type="hidden" name="business" value="' . esc_attr($paypal_email) . '"> <input type="hidden" name="currency_code" value="' . esc_attr($paypal_currency) . '"> <input type="hidden" name="item_name" value="' . get_the_title(get_the_ID()) . '"> <input type="hidden" name="item_number" value="' . esc_attr(get_the_ID()) . '"> <input type="hidden" name="return" value="' . esc_url($thanks_url) . '" /> <div class="col-md-12"> <div class="form-group"> <input id="paypal-plan" name="submit" type="submit" class="btn btn-default" value="' . __('Proceed to Payment', 'framework') . '"> </div> </div> </div> </form> </div> <div class="modal-footer"> </div> </div> </div> </div>'; } $output .= '</div>'; } } wp_reset_postdata(); $output .= '</div>'; } return $output; }
<div class="container"> <div class="page"> <div class="row"> <div class="col-md-<?php echo $class; ?> "> <?php global $imic_options; if (isset($imic_options['plan_group'])) { $plan_group = $imic_options['plan_group']; } else { $plan_group = ''; } if (!empty($plan_group) && isset($imic_options['plan_show_option']) && !empty($imic_options['plan_show_option'])) { $payment_url = imic_get_template_url('template-payment.php'); $count_words = array("zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten"); ?> <div class="pricing-table <?php echo $count_words[count($plan_group)]; ?> -cols margin-40"> <?php foreach ($plan_group as $new_plan_group) { $payment_url = esc_url(add_query_arg('payment', str_replace(' ', '-', $new_plan_group['title']), $payment_url)); echo '<div class="pricing-column "> <h3>' . $new_plan_group['title'] . '</h3> <div class="pricing-column-content">'; if (!empty($new_plan_group['property_price'])) { $currency_symbol = imic_get_currency_symbol(get_option('paypal_currency_options')); echo '<h4> <span class="dollar-sign">' . $currency_symbol . '</span> ' . $new_plan_group['property_price'] . ' </h4>';
</div> </div><?php } } ?> <?php if ($make_search_switch == 1) { if (is_plugin_active("imithemes-listing/listing.php")) { $specification_scroll = get_post_meta($id, 'imic_home_search_specification_auto_scroll', true); $specification_vehicle_scroll_speed = get_post_meta($id, 'imic_home_search_specification_auto_scroll_speed', true); $specification_vehicle_scroll_speed = $specification_vehicle_scroll_speed == '' ? 5000 : $specification_vehicle_scroll_speed; $specification_speed = $specification_scroll == 1 ? $specification_vehicle_scroll_speed : ''; $search_by_spec_value = get_post_meta(get_the_ID(), 'imic_search_by_specification', true); $title = get_post_meta(get_the_ID(), 'imic_search_by_specification_title', true); $url = get_post_meta(get_the_ID(), 'imic_search_by_specification_url', true); $search_listing = imic_get_template_url("template-listing.php"); $spec_int = get_post_meta($search_by_spec_value, 'imic_plugin_spec_char_type', true); if ($spec_int == 0) { $slug = imic_the_slug($search_by_spec_value); } else { $slug = "int_" . imic_the_slug($search_by_spec_value); } if (!empty($search_by_spec_value)) { ?> <div class="lgray-bg make-slider"> <div class="container"> <!-- Search by make --> <div class="row"> <div class="col-md-3 col-sm-4"> <h3><?php echo esc_attr($title);
function widget($args, $instance) { extract($args); // these are the widget options $post_title = apply_filters('widget_title', $instance['title']); $post_title = $post_title == '' ? __('Latest Added', 'imic-framework-admin') : $post_title; $category = apply_filters('widget-category', empty($instance['category']) ? '' : $instance['category'], $instance, $this->id_base); $number = apply_filters('widget-number', $instance['number']); echo $args['before_widget']; global $imic_options; if (!empty($instance['title'])) { echo $args['before_title']; echo apply_filters('widget_title', $post_title, $instance, $this->id_base); echo $args['after_title']; } if (isset($imic_options['enable_rtl']) && $imic_options['enable_rtl'] == 1) { $DIR = 'data-rtl="rtl"'; } else { $DIR = 'data-rtl="ltr"'; } echo ' <div class="carousel-wrapper"> <div class="row"> <ul class="owl-carousel single-carousel" id="vehicle-slider" data-columns="1" data-autoplay="" data-pagination="no" data-arrows="no" data-single-item="no" data-items-desktop="1" data-items-desktop-small="1" data-items-tablet="2" data-items-mobile="1" ' . $DIR . '>'; $badges_type = isset($imic_options['badges_type']) ? $imic_options['badges_type'] : '0'; $specification_type = isset($imic_options['short_specifications']) ? $imic_options['short_specifications'] : '0'; if ($badges_type == "0") { $badge_ids = $imic_options['badge_specs']; } else { $badge_ids = array(); } $img_src = ''; if ($specification_type == 0) { $detailed_specs = isset($imic_options['specification_list']) ? $imic_options['specification_list'] : array(); } else { $detailed_specs = array(); } $additional_specs = isset($imic_options['additional_specs']) ? $imic_options['additional_specs'] : ''; //$detailed_specs = $imic_options['vehicle_specs']; $additional_specs_all = get_post_meta($additional_specs, 'specifications_value', true); $highlighted_specs = isset($imic_options['highlighted_specs']) ? $imic_options['highlighted_specs'] : ''; $unique_specs = $imic_options['unique_specs']; $listing_page_url = imic_get_template_url('template-listing.php'); $args_cars = array('post_type' => 'cars', 'posts_per_page' => $number, 'post_status' => 'publish', 'meta_query' => array(array('key' => 'imic_plugin_ad_payment_status', 'value' => $category, 'compare' => '='))); $cars_listing = new WP_Query($args_cars); if ($cars_listing->have_posts()) { while ($cars_listing->have_posts()) { $cars_listing->the_post(); if (is_plugin_active("imi-classifieds/imi-classified.php")) { $badge_ids = imic_classified_badge_specs(get_the_ID(), $badge_ids); $detailed_specs = imic_classified_short_specs(get_the_ID(), $detailed_specs); } $post_author_id = get_post_field('post_author', get_the_ID()); $user_info_id = get_user_meta($post_author_id, 'imic_user_info_id', true); $author_role = get_option('blogname'); if (!empty($user_info_id)) { $term_list = wp_get_post_terms($user_info_id, 'user-role', array("fields" => "names")); if (!empty($term_list)) { $author_role = $term_list[0]; } else { $author_role = get_option('blogname'); } } $specifications = get_post_meta(get_the_ID(), 'feat_data', true); $unique_value = imic_vehicle_price(get_the_ID(), $unique_specs, $specifications); $new_highlighted_specs = imic_filter_lang_specs_admin($highlighted_specs, get_the_ID()); $highlighted_specs = $new_highlighted_specs; $highlight_value = imic_vehicle_title(get_the_ID(), $highlighted_specs, $specifications); $highlight_value = $highlight_value != '' ? $highlight_value : get_the_title(); $details_value = imic_vehicle_all_specs(get_the_ID(), $detailed_specs, $specifications); if (!empty($additional_specs)) { if ($imic_options['specification_fields_type'] == "0") { $image_key = array_search($additional_specs, $specifications['sch_title']); $additional_specs_value = $specifications['start_time'][$image_key]; } else { $img_char = imic_the_slug($additional_specs); $additional_specs_value = get_post_meta(get_the_ID(), 'char_' . $img_char, true); } $this_key = find_car_with_position($additional_specs_all, $additional_specs_value); $img_src = $additional_specs_all[$this_key]['imic_plugin_spec_image']; } ?> <li class="item"> <div class="vehicle-block format-standard"> <?php if (has_post_thumbnail()) { if ($category == 1) { ?> <a href="<?php echo esc_url(get_permalink()); ?> " class="media-box"><?php the_post_thumbnail('600x400'); ?> </a><?php } else { ?> <a href="javascript:void(0);" class="media-box"><?php the_post_thumbnail('600x400'); ?> </a><?php } } ?> <div class="vehicle-block-content"> <?php if ($category == 1) { ?> <h5 class="vehicle-title"><a href="<?php echo esc_url(get_permalink()); ?> "><?php echo esc_attr($highlight_value); ?> </a></h5><?php } else { ?> <h5 class="vehicle-title"><?php echo esc_attr($highlight_value); ?> </h5><?php } ?> <span class="vehicle-meta"><?php if (!empty($details_value)) { foreach ($details_value as $value) { echo esc_attr($value) . ', '; } } echo esc_attr_e(' by ', 'framework'); ?> <abbr class="user-type" title="<?php echo esc_attr_e('Listed by', 'framework'); echo esc_attr($author_role); ?> "><?php echo esc_attr($author_role); ?> </abbr></span> <?php if ($img_src != '') { ?> <a href="<?php echo esc_url($listing_page_url); ?> " title="<?php echo esc_attr_e('View all ', 'framework'); echo esc_attr($additional_specs_all[$this_key]['imic_plugin_specification_values']); ?> " class="vehicle-body-type"><img src="<?php echo esc_url($additional_specs_all[$this_key]['imic_plugin_spec_image']); ?> " alt=""></a><?php } ?> <span class="vehicle-cost"><?php echo esc_attr($unique_value); ?> </span> </div> </div> </li> <?php } } wp_reset_postdata(); echo '</ul> </div> </div>'; echo $args['after_widget']; }
function imic_enqueue_scripts() { global $imic_options; $theme_info = wp_get_theme(); $sticky_menu = $imic_options['enable-header-stick']; $basic = __('Basic', 'framework'); $advanced = __('Advanced', 'framework'); //**register script**// wp_register_script('imic_jquery_modernizr', IMIC_THEME_PATH . '/js/modernizr.js', $theme_info->get('Version'), 'jquery'); wp_register_script('imic_jquery_prettyphoto', IMIC_THEME_PATH . '/plugins/prettyphoto/js/prettyphoto.js', array(), $theme_info->get('Version'), true); wp_register_script('imic_jquery_owl_carousel', IMIC_THEME_PATH . '/plugins/owl-carousel/js/owl.carousel.min.js', array(), $theme_info->get('Version'), true); wp_register_script('imic_jquery_flexslider', IMIC_THEME_PATH . '/plugins/flexslider/js/jquery.flexslider.js', array(), $theme_info->get('Version'), true); wp_register_script('imic_jquery_helper_plugins', IMIC_THEME_PATH . '/js/helper-plugins.js', array(), $theme_info->get('Version'), true); wp_register_script('imic_jquery_bootstrap', IMIC_THEME_PATH . '/js/bootstrap.js', array(), $theme_info->get('Version'), true); wp_register_script('imic_jquery_waypoints', IMIC_THEME_PATH . '/js/waypoints.js', array(), $theme_info->get('Version'), true); wp_register_script('imic_jquery_init', IMIC_THEME_PATH . '/js/init.js', array(), $theme_info->get('Version'), true); wp_register_script('imic_google_map', 'http://maps.google.com/maps/api/js?sensor=false', array(), $theme_info->get('Version'), true); wp_register_script('imic_profile_validate', IMIC_THEME_PATH . '/js/profile_validate.js', array(), $theme_info->get('Version'), true); wp_register_script('imic_jquery_mediaelement_and_player', IMIC_THEME_PATH . '/plugins/mediaelement/mediaelement-and-player.min.js', array(), $theme_info->get('Version'), true); //**End register script**// //**Enqueue script**// wp_enqueue_script('imic_jquery_modernizr'); wp_enqueue_script('jquery'); wp_enqueue_script('imic_jquery_prettyphoto'); wp_enqueue_script('imic_jquery_owl_carousel'); wp_enqueue_script('imic_jquery_flexslider'); wp_enqueue_script('imic_jquery_helper_plugins'); wp_enqueue_script('imic_jquery_bootstrap'); wp_enqueue_script('imic_jquery_waypoints'); wp_enqueue_script('imic_google_map'); wp_enqueue_script('imic_jquery_init'); wp_enqueue_script('imic_profile_validate'); wp_localize_script('imic_jquery_init', 'urlajax', array('url' => admin_url('admin-ajax.php'), 'tmpurl' => get_template_directory_uri(), 'is_property' => is_singular('property'), 'sticky' => $sticky_menu, 'is_contact' => is_page_template('template-contact.php'), 'home_url' => site_url(), 'is_payment' => is_page_template('template-payment.php'), 'register_url' => imic_get_template_url('template-register.php'), 'is_register' => is_page_template('template-register.php'), 'is_login' => is_user_logged_in(), 'is_submit_property' => is_page_template('template-submit-property.php'), 'basic' => $basic, 'advanced' => $advanced)); if (is_singular() && comments_open() && get_option('thread_comments')) { wp_enqueue_script('comment-reply'); } //**End Enqueue script**// if (is_page_template('template-register.php')) { wp_enqueue_script('agent-register', IMIC_THEME_PATH . '/js/agent-register.js', '', '', true); wp_localize_script('agent-register', 'agent_register', array('ajaxurl' => admin_url('admin-ajax.php'))); } }
</li> </ul> </div> </div><?php } else { $default_image = isset($imic_options['default_dealer_image']) ? $imic_options['default_dealer_image'] : array('url' => ''); global $current_user; $user_id = get_current_user_id(); $user_info_id = get_user_meta($user_id, 'imic_user_info_id', true); $userFirstName = $current_user->user_firstname; $userLastName = $current_user->user_lastname; $userName = get_the_author_meta('display_name', $user_id); if (!empty($userFirstName) || !empty($userLastName)) { $userName = $userFirstName . ' ' . $userLastName; } $dashboard = imic_get_template_url('template-dashboard.php'); ?> <?php if (!empty($dashboard)) { ?> <div class="user-login-panel logged-in-user"> <a href="#" class="user-login-btn" id="userdropdown" data-toggle="dropdown"> <?php if (has_post_thumbnail($user_info_id)) { echo get_the_post_thumbnail($user_info_id, '100x100'); } else { ?> <img src="<?php echo esc_url($default_image['url']); ?> " alt=""><?php
<div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button class="close" aria-hidden="true" data-dismiss="modal" type="button"><?php echo esc_attr_e('×', 'framework'); ?> </button> <h4 id="mymodalLabel" class="modal-title"><?php echo esc_attr_e('Plans', 'framework'); ?> </h4> </div> <div class="modal-body"> <div class="pricing-table three-cols margin-0"> <?php $add_listing = imic_get_template_url('template-add-listing.php'); $args_plan = array('post_type' => 'plan', 'post_status' => 'publish', 'posts_per_page' => -1); $plan_listing = new WP_Query($args_plan); if ($plan_listing->have_posts()) { while ($plan_listing->have_posts()) { $plan_listing->the_post(); $highlight = get_post_meta(get_the_ID(), 'imic_pricing_highlight', true); $highlight_class = $highlight == 1 ? "highlight accent-color" : ""; $price = get_post_meta(get_the_ID(), 'imic_plan_price', true); $currency = isset($imic_options['paypal_currency']) ? $imic_options['paypal_currency'] : 'USD'; $currency = imic_get_currency_symbol($currency); $plan_currency = get_post_meta(get_the_ID(), 'imic_plan_currency', true); $plan_currency_position = get_post_meta(get_the_ID(), 'imic_plan_currency_position', true); if ($price != 0 || $price != 'free') { $paypal_site = $paypal_site == "1" ? "https://www.paypal.com/cgi-bin/webscr" : "https://www.sandbox.paypal.com/cgi-bin/webscr"; } else {