Commit 4dde1942 by Muhammad Usman

summary page added (static content)

parent f0fbe4f7
......@@ -12,20 +12,40 @@ define('NEWSLETTER_PAGE', 'Newsletter Page');
define('BLOG_PAGE', 'Blog');
if (isset($_GET['activated']) && is_admin()){
$defaultPagesBanner = [BANNER_PAGE, HOSTING_REVIEW_PAGE, ABOUT_US_PAGE, RECENT_REVIEWS_PAGE, TOP_BLOG_PAGE, NEWSLETTER_PAGE, BLOG_PAGE];
for ($i = 0; $i < count($defaultPagesBanner); $i++) {
$new_page_title = $defaultPagesBanner[$i];
$page_check = get_page_by_title($new_page_title);
$new_page = array(
'post_type' => 'page',
'post_title' => $new_page_title,
'post_content' => '',
'post_status' => 'publish',
'post_author' => 1,
);
if(!isset($page_check->ID)){
$new_page_id = wp_insert_post($new_page);
}
}
$defaultPagesBanner = [BANNER_PAGE, HOSTING_REVIEW_PAGE, ABOUT_US_PAGE, RECENT_REVIEWS_PAGE, TOP_BLOG_PAGE, NEWSLETTER_PAGE, BLOG_PAGE];
for ($i = 0; $i < count($defaultPagesBanner); $i++) {
$new_page_title = $defaultPagesBanner[$i];
$page_check = get_page_by_title($new_page_title);
$new_page = array(
'post_type' => 'page',
'post_title' => $new_page_title,
'post_content' => '',
'post_status' => 'publish',
'post_author' => 1,
);
if(!isset($page_check->ID)){
$new_page_id = wp_insert_post($new_page);
}
}
function vq_set_default_data()
{
global $wpdb;
$table_name = $wpdb->prefix . "speed_results";
$sql = "CREATE TABLE $table_name (";
$sql .= "id int(10) unsigned NOT NULL AUTO_INCREMENT,";
$sql .= "domain_addr varchar(255) NOT NULL,";
$sql .= "timestamp varchar(255) NOT NULL,";
$sql .= "video varchar(255) NOT NULL,";
$sql .= "screen_shot varchar(255) DEFAULT NULL,";
$sql .= "server_response_time varchar(255) DEFAULT NULL,";
$sql .= "page_load_time varchar(255) DEFAULT NULL,";
$sql .= "PRIMARY KEY (id)";
$sql .= ") ENGINE=InnoDB DEFAULT CHARSET=utf8;";
require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
dbDelta( $sql );
}
add_action("after_switch_theme", "vq_set_default_data");
......@@ -30,7 +30,7 @@ function vq_save_hosting_review($post_id)
function vq_hosting_company_metabox($post, $metabox)
{
$selected = get_post_meta( get_the_ID(), 'vq_review_hosting_company', true );
$hosting_companies = json_decode(get_option('vq_hosting_companies'));
$hosting_companies = json_decode(get_option('vq_hosting_companies_details'));
if (!isset($hosting_companies)) {
$hosting_companies = [];
}
......@@ -58,7 +58,7 @@ function vq_hosting_company_metabox($post, $metabox)
<label>Hosting Company: </label>
<select name="vq_review_hosting_company" id="voodoo_dropdown">
<?php foreach ($hosting_companies as $company): ?>
<option value="<?php echo $company->slug;?>" <?php echo $selected === $company->slug ? 'selected' : '' ?> ><?php echo $company->title; ?></option>
<option value="<?php echo $company->slug;?>" <?php echo $selected === $company->slug ? 'selected' : '' ?> ><?php echo $company->name; ?></option>
<?php endforeach; ?>
</select>
</div>
......
<?php
function vq_theme_settings_page()
{
?>
......@@ -11,6 +9,12 @@ function vq_theme_settings_page()
<?php
settings_fields("section");
do_settings_sections("hosting-review-theme-options");
settings_fields("server-locations-section");
do_settings_sections("hosting-server-locations");
submit_button();
?>
</form>
......@@ -23,137 +27,82 @@ add_action('admin_menu', 'vq_add_theme_setting_page');
function display_hosting_companies_table()
{
?>
<input style="display: none;" type="text" name="vq_hosting_companies" id="vq_hosting_companies" value="" />
<style>
.hosting-companies {
border-collapse: collapse;
text-align: center;
}
.hosting-companies th, .hosting-companies td {
padding: 5px;
text-align: center;
}
.hosting-companies tbody tr:nth-child(even) {
background: #fff;
}
.hosting-companies tbody tr:nth-child(odd) {
background: #ddd;
}
.hosting-companies tr.in-edit {
background: #b4b9be !important;
}
#cancel-company-btn {
display: none;
}
</style>
<table>
<tr>
<td>Title: <input type="text" id="new-company-title"></td>
<td>Slug: <input type="text" id="new-company-slug"></td>
<td><button onclick="saveCompany()" type="button" id="add-company-btn">Add</button></td>
<td><button onclick="resetData()" type="button" id="cancel-company-btn">Cancel</button></td>
</tr>
<tr>
</tr>
</table>
<table class="hosting-companies">
<table class="hosting-companies-listing mb-3">
<thead>
<tr>
<th>Title</th>
<th>Slug</th>
<th>Hosting</th>
<th>Locations</th>
<th></th>
</tr>
</thead>
<tbody id="hosting-companies-body">
</tbody>
</table>
<div class="hosting-company-data" id="hosting-data-wrapper">
<div class="row align-items-center">
<div class ="col-md-3"><label>Name</label></div>
<div class="col-md-9"><input type="text" id="hosting-company-name"></div>
</div>
<div class="row mt-2 align-items-center">
<div class ="col-md-3"><label>Organization</label></div>
<div class="col-md-9"><input type="text" id="hosting-company-slug"></div>
</div>
<div>
<h4 class="mb-2">Hosting Packages</h4>
<div id="hosting-packages-wrapper">
</div>
</div>
<a style="cursor: pointer;" onclick="addHostingPackages()">+ Add Package</a>
<div class="mt-3">
<h4 class="mb-2">Server Locations</h4>
<div id="hosting-locations-wrapper">
</div>
</div>
<a style="cursor: pointer;" onclick="addHostingLocation()">+ Add Location</a>
<div class="d-flex justify-content-between mt-4">
<button type="button" class="button button-primary" onclick="saveHostingCompany()">Add</button>
<button type="button" class="button" onclick="resetChanges()">Cancel</button>
</div>
</div>
<input style="display: none;" type="text" name="vq_hosting_companies_details" id="vq_hosting_companies_details" value="" />
<script>
var hostingCompaniesData = <?php echo get_option('vq_hosting_companies'); ?>;
if (!hostingCompaniesData) {
hostingCompaniesData = [];
}
var inEditIndex = -1;
var titleEl = document.getElementById('new-company-title');
var slugEl = document.getElementById('new-company-slug');
var cancelEl = document.getElementById('cancel-company-btn');
function saveCompany() {
if (!titleEl.value || !slugEl.value) {
return alert('Please fill all fields');
}
if (inEditIndex > -1) {
hostingCompaniesData[inEditIndex].title = titleEl.value;
hostingCompaniesData[inEditIndex].slug = slugEl.value;
} else {
hostingCompaniesData.push({title: titleEl.value, slug: slugEl.value});
}
populateTable();
resetData();
}
function editCompany(index) {
resetData();
inEditIndex = index;
titleEl.value = hostingCompaniesData[index].title;
slugEl.value = hostingCompaniesData[index].slug;
document.getElementById('add-company-btn').innerText = 'Update';
document.getElementById(`hosting-company-${index}`).classList.add('in-edit');
document.getElementById('cancel-company-btn').style.display = 'block';
}
function deleteCompany(index) {
if (confirm('Are you you want to remove this company?')) {
hostingCompaniesData.splice(index, 1);
populateTable();
resetData();
}
}
function resetData() {
if (inEditIndex > -1) {
document.getElementById(`hosting-company-${inEditIndex}`).classList.remove('in-edit');
}
titleEl.value = '';
slugEl.value = '';
inEditIndex = -1;
document.getElementById('cancel-company-btn').style.display = 'none';
}
function populateTable() {
var tableBody = document.getElementById('hosting-companies-body');
tableBody.innerHTML = '';
hostingCompaniesData.forEach(function(company, index) {
var row = `<tr id="hosting-company-${index}">`;
row += `<td>${company.title}</td>`;
row += `<td>${company.slug}</td>`;
row += `<td><a style="cursor:pointer;" onclick="editCompany(${index})">Edit</a> &nbsp;&nbsp; <a style="cursor:pointer;" onclick="deleteCompany(${index})"> Delete</a></td>`;
row += `</tr>`;
tableBody.innerHTML += row;
});
resetData();
document.getElementById('vq_hosting_companies').value = JSON.stringify(hostingCompaniesData);
}
populateTable();
var hostingCompaniesDetails = <?php echo get_option('vq_hosting_companies_details') ? get_option('vq_hosting_companies_details') : '[]'; ?>;
</script>
<?php
}
function display_server_locations()
{
?>
<?php
}
function vq_display_theme_panel_fields()
{
add_settings_section("section", "Hosting Companies", null, "hosting-review-theme-options");
add_settings_field("vq_hosting_companies", "", "display_hosting_companies_table", "hosting-review-theme-options", "section");
register_setting("section", "vq_hosting_companies_details");
add_settings_field("vq_hosting_companies", "Add Hosting Company", "display_hosting_companies_table", "hosting-review-theme-options", "section");
register_setting("section", "vq_hosting_companies");
add_settings_section("server-locations-section", "Server Locations", null, "hosting-server-locations");
add_settings_field("vq_hosting_locations", "", "display_server_locations", "hosting-server-locations", "server-locations-section");
register_setting("server-locations-section", "vq_hosting_server_locations");
}
......
.hosting-companies-listing {
border-collapse: collapse;
background: #fff;
}
.hosting-companies-listing thead tr {
border-bottom: 2px solid #ccc;
}
.hosting-companies-listing tbody tr {
border-bottom: 1px solid #ccc;
}
.hosting-companies-listing tr:nth-child(even) {
background: #ddd;
}
.hosting-companies-listing th, .hosting-companies-listing td {
text-align: center;
padding: 8px;
}
.hosting-companies-listing a {
cursor: pointer;
}
.hosting-company-data {
display: inline-block;
padding: 30px;
background: #fff;
border-radius: 5px;
min-width: 600px;
}
.hosting-company-data label {
font-weight: 500;
}
.hosting-company-data input.small-fld {
width: 100px;
}
.hosting-company-data input {
font-size: 16px;
padding: 5px;
flex: 1;
width: 100%;
}
var hostingPackageTemplate =
`<div class="d-flex align-items-center mb-1 row hosting-package-details" id="hosting-package-details-%ID%">
<div class="col-md-6">
<input type="text" class="mr-3 hosting-package-name" id="hosting-package-name-%ID%">
</div>
<div class="col-md-3">
<label>Starting from</label>
</div>
<div class="col-md-3">
<input type="text" class="small-fld hosting-package-starting" id="hosting-package-starting-%ID%">
</div>
</div>`;
var hostingLocationTemplate = `
<div class="d-flex align-items-center mb-1 hosting-package-location" id="hosting-location-%ID%">
<input type="text" placeholder="Location Name" class="hosting-package-location-name" id="hosting-location-name-%ID%">
</div>`;
$(document).ready(function () {
var hostingDataWrapper = document.getElementById('hosting-data-wrapper');
var hostingPackagesWrapper = document.getElementById('hosting-packages-wrapper');
var hostingLocationsWrapper = document.getElementById('hosting-locations-wrapper');
var hiddenDataField = document.getElementById('vq_hosting_companies_details');
var hostingCompaniesBody = document.getElementById('hosting-companies-body');
var hostingNameEl = document.getElementById('hosting-company-name');
var hostingSlugEl = document.getElementById('hosting-company-slug');
var hostingInEdit = -1;
resetChanges = function () {
hostingInEdit = -1;
hostingNameEl.value = '';
hostingSlugEl.value = '';
hostingPackagesWrapper.innerHTML = '';
hostingLocationsWrapper.innerHTML = '';
};
addHostingPackages = function () {
const existingPackages = document.getElementsByClassName('hosting-package-details').length;
hostingPackagesWrapper.insertAdjacentHTML('beforeend', hostingPackageTemplate.replace(/%ID%/g, existingPackages.toString()));
};
addHostingLocation = function () {
const existingPackages = document.getElementsByClassName('hosting-package-location').length;
hostingLocationsWrapper.insertAdjacentHTML('beforeend', hostingLocationTemplate.replace(/%ID%/g, existingPackages.toString()));
};
saveHostingCompany = function () {
var hostingInfo = {};
hostingInfo.name = hostingNameEl.value;
hostingInfo.slug = hostingSlugEl.value;
if (!hostingInfo.name || !hostingInfo.slug) {
return alert('Title & Organization is required.');
}
const packages = hostingPackagesWrapper.getElementsByClassName('hosting-package-details');
hostingInfo.packages = [];
for (var i = 0; i < packages.length; i++) {
const name = document.getElementById(`hosting-package-name-${i}`).value;
const price = document.getElementById(`hosting-package-starting-${i}`).value;
hostingInfo.packages.push({title: name, price: price});
}
const locations = hostingLocationsWrapper.getElementsByClassName('hosting-package-location');
hostingInfo.locations = [];
for (var i = 0; i < locations.length; i++) {
const name = locations[i].getElementsByClassName('hosting-package-location-name')[0].value;
hostingInfo.locations.push(name);
}
if (hostingInEdit > -1) {
hostingCompaniesDetails[hostingInEdit] = hostingInfo;
} else {
hostingCompaniesDetails.push(hostingInfo);
}
populateTable();
};
populateTable = function() {
hostingCompaniesBody.innerHTML = '';
hostingCompaniesDetails.forEach(function(company, index) {
var packagesStr = '';
var locationsStr = '';
if (company.packages) {
company.packages.forEach(function (package) {
packagesStr += `<p>${package.title} Starting from $${package.price}</p>`;
})
}
if (company.locations) {
locationsStr = company.locations.join(', ');
}
var row = `<tr>`;
row += `<td>${company.name}</td>`;
row += `<td>${company.slug}</td>`;
row += `<td>${packagesStr}</td>`;
row += `<td>${locationsStr}</td>`;
row += `<td><a onclick="editCompany(${index})">Edit</a> <a class="ml-2 button-link-delete" onclick="removeCompany(${index})">Remove</a></td>`;
row += `</tr>`;
hostingCompaniesBody.innerHTML += row;
});
hiddenDataField.value = JSON.stringify(hostingCompaniesDetails);
resetChanges();
};
removeCompany = function(index) {
if (confirm('Are you sure you want to remove the info of this hosting company?')) {
hostingCompaniesDetails.splice(index, 1);
populateTable();
}
};
editCompany = function(index) {
hostingInEdit = index;
const companyInEdit = hostingCompaniesDetails[hostingInEdit];
hostingNameEl.value = companyInEdit.name;
hostingSlugEl.value = companyInEdit.slug;
hostingPackagesWrapper.innerHTML = '';
if (companyInEdit.packages) {
companyInEdit.packages.forEach(function (pkg, ind) {
hostingPackagesWrapper.insertAdjacentHTML('beforeend', hostingPackageTemplate.replace(/%ID%/g, ind.toString()));
document.getElementById(`hosting-package-name-${ind}`).value = pkg.title;
document.getElementById(`hosting-package-starting-${ind}`).value = pkg.price;
});
}
hostingLocationsWrapper.innerHTML = '';
if (companyInEdit.locations) {
companyInEdit.locations.forEach(function (loc, ind) {
hostingLocationsWrapper.insertAdjacentHTML('beforeend', hostingLocationTemplate.replace(/%ID%/g, ind.toString()));
document.getElementById(`hosting-location-name-${ind}`).value = loc;
});
}
};
populateTable();
});
// document.addEventListener("DOMContentLoaded", function() {
// });
jQuery(document).ready(function($) {
var speedBtn = document.getElementById('homeSpeedButton');
if (speedBtn) {
speedBtn.addEventListener('click', getSpeed);
}
function getSpeed() {
const domainNameEl = document.getElementById('domainNameField');
if (!domainNameEl.value) {
return alert('Please enter a domain');
}
var data = {
'action': 'get_speed_results',
'domain': domainNameEl.value
};
$.post(ajax_url, data, function(response) {
console.log( response );
}, 'json');
}
});
// $(document).ready(function () {
//
// (function ($) {
//
//
// {
// var data = {
// 'action': 'get_speed_results',
// 'post_type': 'POST',
// 'name': 'My First AJAX Request'
// };
//
// jQuery.post("", data, function(response) {
// console.log( response );
// }, 'json');
//
// //
// var xhttp = new XMLHttpRequest();
// xhttp.open("POST", ``, true);
// xhttp.send(JSON.stringify(data));
// // xhttp.onreadystatechange = function() {
// // console.log(this.responseText);
// // // if (this.readyState === 4 && this.status === 200) {
// // // document.getElementById("demo").innerHTML =
// // // this.responseText;
// // // }
// // };
// // // http://176.31.196.92:30001/google.com/2019-12-18T142721+0000/pages/google.com/data/screenshots/1.jpg
//
// // xhttp.setRequestHeader('Content-type', 'application/json');
//
// }
// })(jQuery);
......@@ -22,8 +22,8 @@ echo $page->post_content;
<!-- Top Recent Reviews -->
<?php
$page = get_page_by_title( RECENT_REVIEWS_PAGE);
echo do_shortcode($page->post_content);
//$page = get_page_by_title( RECENT_REVIEWS_PAGE);
//echo do_shortcode($page->post_content);
?>
<div class="container">
<div class="hrBorder"></div>
......@@ -31,8 +31,8 @@ echo do_shortcode($page->post_content);
<!-- Top Blogs Content -->
<?php
$page = get_page_by_title( TOP_BLOG_PAGE);
echo do_shortcode($page->post_content);
//$page = get_page_by_title( TOP_BLOG_PAGE);
//echo do_shortcode($page->post_content);
?>
<?php
......
<?php
function vq_enqueue_theme_resources()
{
$templateUri = get_template_directory_uri();
$assetsFolder = "$templateUri/assets";
wp_enqueue_style('vq_customStyle', "$assetsFolder/css/custom.css", array(), '1.0.0', 'all');
function vq_enqueue_theme_resources() {
$templateUri = get_template_directory_uri();
$assetsFolder = "$templateUri/assets";
wp_enqueue_style( 'vq_customStyle', "$assetsFolder/css/custom.css", array(), '1.0.0', 'all' );
wp_enqueue_script( 'vq_jquery', "https://code.jquery.com/jquery-3.3.1.min.js", array(), '1.0.0' );
wp_enqueue_script( 'vq_indexJs', "$assetsFolder/js/index.js", array( 'vq_jquery' ), '1.0.0' );
}
function vq_enqueue_custom_admin_style() {
$templateUri = get_template_directory_uri();
$assetsFolder = "$templateUri/assets";
wp_enqueue_style( 'vq_adminStyle', "$assetsFolder/css/admin.css", array(), '1.0.0', 'all' );
wp_enqueue_script( 'vq_adminJquery', "https://code.jquery.com/jquery-3.3.1.min.js", array(), '1.0.0' );
wp_enqueue_style( 'vq_adminBootstrap', "$assetsFolder/css/bootstrap-grid.css", '1.0.0', 'all' );
wp_enqueue_script( 'vq_adminJs', "$assetsFolder/js/admin.js", array('vq_adminJquery'), '1.0.0' );
}
function vq_register_theme_supports()
{
add_theme_support('menus');
add_theme_support('custom-background');
add_theme_support('post-thumbnails');
add_theme_support('custom-logo');
function vq_register_theme_supports() {
add_theme_support( 'menus' );
add_theme_support( 'custom-background' );
add_theme_support( 'post-thumbnails' );
add_theme_support( 'custom-logo' );
register_nav_menu('primary', 'Primary Menu');
register_nav_menu('secondary', 'Secondary Menu');
register_nav_menu( 'primary', 'Primary Menu' );
register_nav_menu( 'secondary', 'Secondary Menu' );
}
// Register Settings sin the Customizer API
function vq_theme_customize_register( $wp_customize ) {
// Footer settings
$wp_customize->add_section('vq_footer_section', array(
'title' => __('Footer Settings'),
'priority' => 30
));
$wp_customize->add_setting('vq-copyright-text', array());
$wp_customize->add_control(new WP_Customize_Control(
$wp_customize,
'vq_about_us_title_text',
array(
'label' => __('About Us Title'),
'section' => 'vq_footer_section',
'settings' => 'vq-about-us-title-text',
'priority' => 1
)
)
);
$wp_customize->add_setting('vq-about-company-text', array());
$wp_customize->add_control(new WP_Customize_Control(
$wp_customize,
'vq_about_company_text',
array(
'type' => 'textarea',
'label' => __('About'),
'section' => 'vq_footer_section',
'settings' => 'vq-about-company-text',
'priority' => 2
)
)
);
$wp_customize->add_setting('vq-about-us-title-text', array());
$wp_customize->add_control(new WP_Customize_Control(
$wp_customize,
'vq_copyright_text',
array(
'type' => 'textarea',
'label' => __('Copyright'),
'section' => 'vq_footer_section',
'settings' => 'vq-copyright-text',
'priority' => 3
)
)
);
// Sidebar Sections
$wp_customize->add_section('vq_sidebar_section', array(
'title' => __('Sidebar'),
'priority' => 40
));
$wp_customize->add_setting('vq-speed-test-heading', array());
$wp_customize->add_control(new WP_Customize_Control(
$wp_customize,
'vq_speed_test_heading',
array(
'label' => __('Speed Test'),
'section' => 'vq_sidebar_section',
'settings' => 'vq-speed-test-heading',
'priority' => 1
)
)
);
$wp_customize->add_setting('vq-recent-posts-heading', array());
$wp_customize->add_control(new WP_Customize_Control(
$wp_customize,
'vq_recent_posts_heading',
array(
'label' => __('Recent Posts'),
'section' => 'vq_sidebar_section',
'settings' => 'vq-recent-posts-heading',
'priority' => 2
)
)
);
$wp_customize->add_setting('vq-top-reviews-heading', array());
$wp_customize->add_control(new WP_Customize_Control(
$wp_customize,
'vq_top_reviews_heading',
array(
'label' => __('Top New Reviews'),
'section' => 'vq_sidebar_section',
'settings' => 'vq-top-reviews-heading',
'priority' => 3
)
)
);
$wp_customize->add_setting('vq-top-hosting-heading', array());
$wp_customize->add_control(new WP_Customize_Control(
$wp_customize,
'vq_top_hosting_heading',
array(
'label' => __('Top Hosting'),
'section' => 'vq_sidebar_section',
'settings' => 'vq-top-hosting-heading',
'priority' => 4
)
)
);
$wp_customize->add_setting('vq-newsletter-heading', array());
$wp_customize->add_control(new WP_Customize_Control(
$wp_customize,
'vq_newsletter_heading',
array(
'label' => __('Newsletter'),
'section' => 'vq_sidebar_section',
'settings' => 'vq-newsletter-heading',
'priority' => 5
)
)
);
// Footer settings
$wp_customize->add_section( 'vq_footer_section', array(
'title' => __( 'Footer Settings' ),
'priority' => 30
) );
$wp_customize->add_setting( 'vq-copyright-text', array() );
$wp_customize->add_control( new WP_Customize_Control(
$wp_customize,
'vq_about_us_title_text',
array(
'label' => __( 'About Us Title' ),
'section' => 'vq_footer_section',
'settings' => 'vq-about-us-title-text',
'priority' => 1
)
)
);
$wp_customize->add_setting( 'vq-about-company-text', array() );
$wp_customize->add_control( new WP_Customize_Control(
$wp_customize,
'vq_about_company_text',
array(
'type' => 'textarea',
'label' => __( 'About' ),
'section' => 'vq_footer_section',
'settings' => 'vq-about-company-text',
'priority' => 2
)
)
);
$wp_customize->add_setting( 'vq-about-us-title-text', array() );
$wp_customize->add_control( new WP_Customize_Control(
$wp_customize,
'vq_copyright_text',
array(
'type' => 'textarea',
'label' => __( 'Copyright' ),
'section' => 'vq_footer_section',
'settings' => 'vq-copyright-text',
'priority' => 3
)
)
);
// Sidebar Sections
$wp_customize->add_section( 'vq_sidebar_section', array(
'title' => __( 'Sidebar' ),
'priority' => 40
) );
$wp_customize->add_setting( 'vq-speed-test-heading', array() );
$wp_customize->add_control( new WP_Customize_Control(
$wp_customize,
'vq_speed_test_heading',
array(
'label' => __( 'Speed Test' ),
'section' => 'vq_sidebar_section',
'settings' => 'vq-speed-test-heading',
'priority' => 1
)
)
);
$wp_customize->add_setting( 'vq-recent-posts-heading', array() );
$wp_customize->add_control( new WP_Customize_Control(
$wp_customize,
'vq_recent_posts_heading',
array(
'label' => __( 'Recent Posts' ),
'section' => 'vq_sidebar_section',
'settings' => 'vq-recent-posts-heading',
'priority' => 2
)
)
);
$wp_customize->add_setting( 'vq-top-reviews-heading', array() );
$wp_customize->add_control( new WP_Customize_Control(
$wp_customize,
'vq_top_reviews_heading',
array(
'label' => __( 'Top New Reviews' ),
'section' => 'vq_sidebar_section',
'settings' => 'vq-top-reviews-heading',
'priority' => 3
)
)
);
$wp_customize->add_setting( 'vq-top-hosting-heading', array() );
$wp_customize->add_control( new WP_Customize_Control(
$wp_customize,
'vq_top_hosting_heading',
array(
'label' => __( 'Top Hosting' ),
'section' => 'vq_sidebar_section',
'settings' => 'vq-top-hosting-heading',
'priority' => 4
)
)
);
$wp_customize->add_setting( 'vq-newsletter-heading', array() );
$wp_customize->add_control( new WP_Customize_Control(
$wp_customize,
'vq_newsletter_heading',
array(
'label' => __( 'Newsletter' ),
'section' => 'vq_sidebar_section',
'settings' => 'vq-newsletter-heading',
'priority' => 5
)
)
);
}
add_action( 'customize_register', 'vq_theme_customize_register' );
......@@ -190,9 +197,61 @@ add_action( 'customize_register', 'vq_theme_customize_register' );
// Include Admin
$templateDirectory = get_template_directory();
require_once("$templateDirectory/admin/functions.php");
require_once( "$templateDirectory/admin/functions.php" );
// Actions
add_action('wp_enqueue_scripts', 'vq_enqueue_theme_resources');
add_action('init', 'vq_register_theme_supports');
add_action('init', 'vq_add_theme_default_pages');
add_action( 'wp_enqueue_scripts', 'vq_enqueue_theme_resources' );
add_action( 'init', 'vq_register_theme_supports' );
add_action( 'init', 'vq_add_theme_default_pages' );
add_action( 'wp_ajax_nopriv_get_speed_results', 'vq_get_hosting_speed' );
add_action( 'wp_ajax_get_speed_results', 'vq_get_hosting_speed' );
add_action( 'admin_enqueue_scripts', 'vq_enqueue_custom_admin_style' );
function vq_get_hosting_speed() {
$url = "http://176.31.196.92:30001";
$domain = $_POST['domain'];
$curl = curl_init();
curl_setopt( $curl, CURLOPT_URL, $url );
curl_setopt( $curl, CURLOPT_POST, 1 );
curl_setopt( $curl, CURLOPT_POSTFIELDS, json_encode( [ 'url' => $domain ] ) );
curl_setopt( $curl, CURLOPT_RETURNTRANSFER, true );
curl_setopt( $curl, CURLINFO_HEADER_OUT, true );
curl_setopt( $curl, CURLOPT_HTTPHEADER, [ 'Content-Type: application/json' ] );
$server_output = curl_exec( $curl );
curl_close ($curl);
$result = json_decode($server_output, true);
if ($result['status'] === 'success') {
// Save id DB HERE.
$data = $result['data']['data'];
$pageTimings = $data['browserScripts'][0]['timings']['pageTimings'];
$timestamp = $data['info']['timestamp'];
$videoPath = $data['files']['video'][0];
$screenshotPath = $data['files']['screenshot'][0];
$serverResponseTime = $pageTimings['serverResponseTime'];
$pageLoadTime = $pageTimings['pageLoadTime'];
$newData = [
"domain_addr" => $domain,
"timestamp" => $timestamp,
"video" => $videoPath,
"screen_shot" => $screenshotPath,
"server_response_time" => $serverResponseTime,
"page_load_time" => $pageLoadTime
];
global $wpdb;
$speed_table_name = $wpdb->prefix . "speed_results";
$wpdb->insert($speed_table_name, $newData);
print_r($wpdb->insert_id);
exit;
}
echo json_encode($result);
exit;
}
......@@ -8,10 +8,6 @@
<meta name="author" content="">
<title><?php echo get_bloginfo() ?></title>
<!-- Custom Css Link Start-->
<link rel="stylesheet" type="text/css" href="assets/css/custom.css"/>
<!-- Custom Css Link End-->
<!-- Bootstrap Link Start-->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css"
integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
......@@ -26,6 +22,10 @@
<link href="https://fonts.googleapis.com/css?family=Exo:300,300i,400,500,700,700i,900,900i&display=swap" rel="stylesheet">
<!-- Font Family -->
<?php wp_head(); ?>
<script type="">
var ajax_url = "<?= admin_url('admin-ajax.php'); ?>";
</script>
</head>
<!-- Body Code Start-->
......
......@@ -9,8 +9,12 @@ the_post();
<div class="col-sm-12">
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<?php echo site_url(); ?>"><?php echo get_the_title( get_option('page_on_front') ) ?></a></li>
<li class="breadcrumb-item" aria-current="page"><a href="<?php echo get_post_type_archive_link('hosting_reviews'); ?>"><?php echo REVIEWS_PAGE ?></a></li>
<li class="breadcrumb-item"><a
href="<?php echo site_url(); ?>"><?php echo get_the_title( get_option( 'page_on_front' ) ) ?></a>
</li>
<li class="breadcrumb-item" aria-current="page"><a
href="<?php echo get_post_type_archive_link( 'hosting_reviews' ); ?>"><?php echo REVIEWS_PAGE ?></a>
</li>
<li class="breadcrumb-item active" aria-current="page"><?php the_title(); ?></li>
</ol>
</nav>
......@@ -27,17 +31,17 @@ the_post();
<div class="col-sm-6 borderHolder">
<img class="singleUser" src="images/single-user.png" alt="">
<div class="singleDetail d-inline-block">
<h5><?php the_author_meta('display_name'); ?></h5>
<h5><?php the_author_meta( 'display_name' ); ?></h5>
</div>
</div>
<div class="col-sm-6">
<img class="singleUser" src="images/detail-date.png" alt="">
<div class="singleDetail d-inline-block">
<h5><?php the_time('F j'); ?></h5>
<h5><?php the_time( 'F j' ); ?></h5>
</div>
</div>
</div>
<?php the_content(); ?>
<?php the_content(); ?>
</div>
</div>
......@@ -45,11 +49,14 @@ the_post();
<div class="blueHostSideBar">
<div class="col-sm-12">
<div class="d-flex j-content-center">
<img src="images/siteground-logo.png" alt="">
<img src="<?php echo get_template_directory_uri(); ?>/assets/images/siteground-logo.png"
alt="">
</div>
<div class="cacheSidebar">
<div class="d-flex f-end">
<img class="cursorPointer" src="images/information-icon.png" alt="">
<img class="cursorPointer"
src="<?php echo get_template_directory_uri(); ?>/assets/images/information-icon.png"
alt="">
</div>
<div class="cacheSidebarHeading">
<h4>SiteGround</h4>
......@@ -57,14 +64,37 @@ the_post();
</div>
<button type="button" class="btn btn-primary speedButton">View Full Speed Report</button>
</div>
<?php
$hosting_companies = json_decode( get_option( 'vq_hosting_companies_details' ) );
$selectedSlug = get_post_meta( get_the_ID(), 'vq_review_hosting_company', true );
$reviewHosting = null;
foreach ( $hosting_companies as $company ):
if ( $company->slug === $selectedSlug ):
$reviewHosting = $company;
endif;
endforeach;
// echo "<pre style='color: #fff'>";
// print_r($hosting_companies);
// print_r($selected);
// echo "</pre>";
?>
<div class="d-flex spaceBetween">
<img class="cacheSidebarCornerLeft" src="images/bluehost-sidebar-corner-left.png" alt="">
<img class="cacheSidebarCornerRight" src="images/bluehost-sidebar-corner-right.png" alt="">
<img class="cacheSidebarCornerLeft"
src="<?php echo get_template_directory_uri(); ?>/assets/images/bluehost-sidebar-corner-left.png"
alt="">
<img class="cacheSidebarCornerRight"
src="<?php echo get_template_directory_uri(); ?>/assets/images/bluehost-sidebar-corner-right.png"
alt="">
</div>
<div class="cacheSidebarInfo orange">
<div class="d-flex spaceBetween">
<div class="inline-flex">
<img class="webLocationIcon" src="images/web-location-icon.png" alt="">
<img class="webLocationIcon"
src="<?php echo get_template_directory_uri(); ?>/assets/images/web-location-icon.png"
alt="">
<div class="cacheSidebarHeading">
<h5>US (W)</h5>
</div>
......@@ -76,204 +106,104 @@ the_post();
</div>
</div>
</div>
<div class="d-flex spaceBetween">
<img class="cacheSidebarCornerLeft" src="images/bluehost-sidebar-corner-left.png" alt="">
<img class="cacheSidebarCornerRight" src="images/bluehost-sidebar-corner-right.png" alt="">
</div>
<div class="cacheSidebarInfo orange">
<div class="d-flex spaceBetween">
<div class="inline-flex">
<img class="webLocationIcon" src="images/web-location-icon.png" alt="">
<div class="cacheSidebarHeading">
<h5>London</h5>
</div>
</div>
<div class="inline-flex">
<div class="cacheSidebarHeading">
<h6>69 <span>ms</span></h6>
</div>
</div>
</div>
</div>
<div class="d-flex spaceBetween">
<img class="cacheSidebarCornerLeft" src="images/bluehost-sidebar-corner-left.png" alt="">
<img class="cacheSidebarCornerRight" src="images/bluehost-sidebar-corner-right.png" alt="">
</div>
<div class="cacheSidebarInfo orange">
<div class="d-flex spaceBetween">
<div class="inline-flex">
<img class="webLocationIcon" src="images/web-location-icon.png" alt="">
<div class="cacheSidebarHeading">
<h5>Japan</h5>
</div>
</div>
<div class="inline-flex">
<div class="cacheSidebarHeading">
<h6>95 <span>ms</span></h6>
</div>
</div>
</div>
</div>
</div>
<div class="blueHostSideBar">
<div class="col-sm-12">
<div class="cacheSidebar mb-2 mt-0">
<div class="d-flex f-end">
<img class="cursorPointer" src="images/information-icon.png" alt="">
<img class="cursorPointer"
src="<?php echo get_template_directory_uri(); ?>/assets/images/information-icon.png"
alt="">
</div>
<div class="cacheSidebarHeading">
<h4>Server Location</h4>
</div>
</div>
</div>
<div class="d-flex spaceBetween">
<img class="cacheSidebarCornerLeft" src="images/server-sidebar-corner-left.png" alt="">
<img class="cacheSidebarCornerRight" src="images/server-sidebar-corner-right.png" alt="">
</div>
<div class="cacheSidebarInfo dark">
<div class="d-flex spaceBetween">
<div class="inline-flex">
<img class="webLocationIcon" src="images/server-location-icon.png" alt="">
<div class="serverSidebarHeading">
<h5>Armenia</h5>
</div>
</div>
<div class="inline-flex">
<img src="images/server-location-image.png" alt="">
</div>
</div>
</div>
<div class="d-flex spaceBetween">
<img class="cacheSidebarCornerLeft" src="images/server-sidebar-corner-left.png" alt="">
<img class="cacheSidebarCornerRight" src="images/server-sidebar-corner-right.png" alt="">
</div>
<div class="cacheSidebarInfo dark">
<div class="d-flex spaceBetween">
<div class="inline-flex">
<img class="webLocationIcon" src="images/server-location-icon.png" alt="">
<div class="serverSidebarHeading">
<h5>Australia</h5>
</div>
</div>
<div class="inline-flex">
<img src="images/server-location-image.png" alt="">
</div>
</div>
</div>
<div class="d-flex spaceBetween">
<img class="cacheSidebarCornerLeft" src="images/server-sidebar-corner-left.png" alt="">
<img class="cacheSidebarCornerRight" src="images/server-sidebar-corner-right.png" alt="">
</div>
<div class="cacheSidebarInfo dark">
<div class="d-flex spaceBetween">
<div class="inline-flex">
<img class="webLocationIcon" src="images/server-location-icon.png" alt="">
<div class="serverSidebarHeading">
<h5>China</h5>
</div>
</div>
<div class="inline-flex">
<img src="images/server-location-image.png" alt="">
</div>
</div>
</div>
<div class="d-flex spaceBetween">
<img class="cacheSidebarCornerLeft" src="images/server-sidebar-corner-left.png" alt="">
<img class="cacheSidebarCornerRight" src="images/server-sidebar-corner-right.png" alt="">
</div>
<div class="cacheSidebarInfo dark">
<div class="d-flex spaceBetween">
<div class="inline-flex">
<img class="webLocationIcon" src="images/server-location-icon.png" alt="">
<div class="serverSidebarHeading">
<h5>France</h5>
</div>
</div>
<div class="inline-flex">
<img src="images/server-location-image.png" alt="">
</div>
</div>
</div>
<div class="d-flex spaceBetween">
<img class="cacheSidebarCornerLeft" src="images/server-sidebar-corner-left.png" alt="">
<img class="cacheSidebarCornerRight" src="images/server-sidebar-corner-right.png" alt="">
</div>
<div class="cacheSidebarInfo dark">
<div class="d-flex spaceBetween">
<div class="inline-flex">
<img class="webLocationIcon" src="images/server-location-icon.png" alt="">
<div class="serverSidebarHeading">
<h5>Italy</h5>
<?php
if ( isset( $reviewHosting ) && is_array( $reviewHosting->locations ) ) {
foreach ( $reviewHosting->locations as $loc ):
?>
<div class="d-flex spaceBetween">
<img class="cacheSidebarCornerLeft" src="<?php echo get_template_directory_uri(); ?>/assets/images/server-sidebar-corner-left.png" alt="">
<img class="cacheSidebarCornerRight" src="<?php echo get_template_directory_uri(); ?>/assets/images/server-sidebar-corner-right.png" alt="">
</div>
<div class="cacheSidebarInfo dark">
<div class="d-flex spaceBetween">
<div class="inline-flex">
<img class="webLocationIcon" src="<?php echo get_template_directory_uri(); ?>/assets/images/server-location-icon.png" alt="">
<div class="serverSidebarHeading">
<h5><?php echo $loc ?></h5>
</div>
</div>
</div>
</div>
<div class="inline-flex">
<img src="images/server-location-image.png" alt="">
</div>
</div>
</div>
<?php
endforeach;
}
?>
</div>
<div class="blueHostSideBar">
<div class="col-sm-12">
<div class="cacheSidebar mb-2 mt-0">
<div class="d-flex f-end">
<img class="cursorPointer" src="images/information-icon.png" alt="">
<img class="cursorPointer" src="<?php echo get_template_directory_uri(); ?>/assets/images/information-icon.png" alt="">
</div>
<div class="cacheSidebarHeading">
<h4>Plans &amp; Pricing</h4>
</div>
</div>
</div>
<div class="d-flex spaceBetween">
<img class="cacheSidebarCornerLeft" src="images/server-sidebar-corner-left.png" alt="">
<img class="cacheSidebarCornerRight" src="images/server-sidebar-corner-right.png" alt="">
</div>
<div class="cacheSidebarInfo dark">
<div class="d-flex j-content-center">
<div class="inline-flex">
<img class="webLocationIcon" src="images/shared-icon.png" alt="">
<div class="cacheSidebarHeading">
<h6>Shared Hosting</h6>
</div>
</div>
</div>
</div>
<div class="col-sm-12">
<div class="offerBox">
<img class="boxTopLeftOther top" src="images/box-top-left.png" alt="">
<div class="d-flex f-end">
<img class="bestOffer" src="images/best-offer.png" alt="">
</div>
<div class="offerHeading">
<h4>Starting From</h4>
<h2><span>$</span>3.95</h2>
<?php
if ( isset( $reviewHosting ) && is_array( $reviewHosting->packages ) ) {
foreach ( $reviewHosting->packages as $package ):
?>
<div class="d-flex spaceBetween">
<img class="cacheSidebarCornerLeft" src="<?php echo get_template_directory_uri(); ?>/assets/images/server-sidebar-corner-left.png" alt="">
<img class="cacheSidebarCornerRight" src="<?php echo get_template_directory_uri(); ?>/assets/images/server-sidebar-corner-right.png" alt="">
</div>
<img class="boxTopRightOther right" src="images/box-top-right.png" alt="">
</div>
</div>
<div class="d-flex spaceBetween">
<img class="cacheSidebarCornerLeft" src="images/server-sidebar-corner-left.png" alt="">
<img class="cacheSidebarCornerRight" src="images/server-sidebar-corner-right.png" alt="">
</div>
<div class="cacheSidebarInfo orange">
<div class="d-flex j-content-center">
<div class="inline-flex">
<img class="webLocationIcon" src="images/vps-icon.png" alt="">
<div class="cacheSidebarHeading">
<h6>VPS Hosting</h6>
<div class="cacheSidebarInfo dark">
<div class="d-flex j-content-center">
<div class="inline-flex">
<img class="webLocationIcon" src="<?php echo get_template_directory_uri(); ?>/assets/images/shared-icon.png" alt="">
<div class="cacheSidebarHeading">
<h6><?php echo $package->title ?></h6>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="col-sm-12">
<div class="offerBox">
<img class="boxTopLeftOther top" src="images/box-top-left.png" alt="">
<div class="offerHeading">
<h4>Starting From</h4>
<h2><span>$</span>5.95</h2>
<div class="col-sm-12">
<div class="offerBox">
<img class="boxTopLeftOther top" src="<?php echo get_template_directory_uri(); ?>/assets/images/box-top-left.png" alt="">
<div class="d-flex f-end">
<img class="bestOffer" src="<?php echo get_template_directory_uri(); ?>/assets/images/best-offer.png" alt="">
</div>
<div class="offerHeading">
<h4>Starting From</h4>
<h2><span>$</span><?php echo $package->price ?></h2>
</div>
<img class="boxTopRightOther right" src="<?php echo get_template_directory_uri(); ?>/assets/images/box-top-right.png" alt="">
</div>
</div>
<img class="boxTopRightOther right" src="images/box-top-right.png" alt="">
</div>
</div>
<?php
endforeach;
}
?>
</div>
</div>
</div>
......
<?php
/*
Template Name: Summary Page
*/
?>
<?php get_header();?>
<!-- Summary Section Code Start-->
<!-------------------->
<div class="container">
<div class="row">
<div class="col-sm-12">
<div class="summaryHeading">
<h3 class="orangeColor">Summary</h3>
</div>
</div>
<div class="row m-0">
<div class="col-sm-4">
<img class="summaryHostImage" src="<?php echo get_template_directory_uri(); ?>/assets/images/host-image.jpg">
<div class="hostHeading">
<h5>HostGator</h5>
</div>
<img class="summaryHostImage" src="<?php echo get_template_directory_uri(); ?>/assets/images/summary-video.jpg">
</div>
<div class="col-md-8 mt17">
<div class="row">
<div class="col-sm-4 mb-2">
<div class="summaryBox w-100">
<img class="boxTopLeftOther pTop-0 left-15" src="<?php echo get_template_directory_uri(); ?>/assets/images/box-top-left.png" alt="">
<div class="d-flex j-content-center">
<img class="mr-2" src="<?php echo get_template_directory_uri(); ?>/assets/images/summary-star.png">
<div class="summaryHeading">
<h5>Domain</h5>
</div>
<img class="ml-2" src="<?php echo get_template_directory_uri(); ?>/assets/images/summary-star.png">
</div>
<div class="summaryHeading">
<h4 class="orangeColor">hostgator.com</h4>
</div>
<img class="boxTopRight rightResponsive" src="<?php echo get_template_directory_uri(); ?>/assets/images/box-top-right.png" alt="">
</div>
</div>
<div class="col-sm-4 mb-2">
<div class="summaryBox w-100">
<img class="boxTopLeftOther pTop-0 left-15" src="<?php echo get_template_directory_uri(); ?>/assets/images/box-top-left.png" alt="">
<div class="d-flex j-content-center">
<img class="mr-2" src="<?php echo get_template_directory_uri(); ?>/assets/images/summary-star.png">
<div class="summaryHeading">
<h5>Hosting</h5>
</div>
<img class="ml-2" src="<?php echo get_template_directory_uri(); ?>/assets/images/summary-star.png">
</div>
<div class="summaryHeading">
<h4 class="orangeColor">Amazone Cloud</h4>
</div>
<img class="boxTopRight rightResponsive" src="<?php echo get_template_directory_uri(); ?>/assets/images/box-top-right.png" alt="">
</div>
</div>
<div class="col-sm-4 mb-2">
<div class="summaryBox w-100">
<img class="boxTopLeftOther pTop-0 left-15" src="<?php echo get_template_directory_uri(); ?>/assets/images/box-top-left.png" alt="">
<div class="d-flex j-content-center">
<img class="mr-2" src="<?php echo get_template_directory_uri(); ?>/assets/images/summary-star.png">
<div class="summaryHeading">
<h5>IP</h5>
</div>
<img class="ml-2" src="<?php echo get_template_directory_uri(); ?>/assets/images/summary-star.png">
</div>
<div class="summaryHeading">
<h4 class="orangeColor">588.25.14.15</h4>
</div>
<img class="boxTopRight rightResponsive" src="<?php echo get_template_directory_uri(); ?>/assets/images/box-top-right.png" alt="">
</div>
</div>
</div>
<div class="d-none d-sm-block d-md-block">
<img class="summarySocailIocn" src="<?php echo get_template_directory_uri(); ?>/assets/images/facebook-icon.jpg" alt="">
<img class="summarySocailIocn top-133" src="<?php echo get_template_directory_uri(); ?>/assets/images/twitter-icon.jpg" alt="">
<img class="summarySocailIocn top-177" src="<?php echo get_template_directory_uri(); ?>/assets/images/linked-icon.jpg" alt="">
</div>
<table class="table table-striped radius">
<thead class="orange summaryTable">
<tr>
<th scope="col" class="tableBorder">Locations</th>
<th scope="col" class="tableBorder">Server Response Time</th>
<th scope="col" class="tableBorder">Page Load Time</th>
</tr>
</thead>
<tbody class="tableBody">
<tr>
<td class="summaryTD">US (W)</td>
<td class="summaryTD">2.009 ms</td>
<td class="summaryTD">2.009 ms</td>
</tr>
<tr>
<td class="summaryTD">USE</td>
<td class="summaryTD">2.009 ms</td>
<td class="summaryTD">2.009 ms</td>
</tr>
<tr>
<td class="summaryTD">London</td>
<td class="summaryTD">2.009 ms</td>
<td class="summaryTD">2.009 ms</td>
</tr>
<tr>
<td class="summaryTD">Singapore</td>
<td class="summaryTD">2.009 ms</td>
<td class="summaryTD">2.009 ms</td>
</tr>
</tbody>
</table>
<div class="row m-0">
<div class="col-sm-3 pl-0 summaryPadding">
<img class="boxTopLeftOther top-20 top-7 left-0 " src="<?php echo get_template_directory_uri(); ?>/assets/images/box-top-left.png" alt="">
<div class="summaryAfterBox">
<div class="responseHeading">
<h5>Average Response Time</h5>
<h4>2.009 <span>ms</span></h4>
</div>
</div>
<img class="boxTopRight right-5" src="<?php echo get_template_directory_uri(); ?>/assets/images/box-top-right.png" alt="">
</div>
<div class="col-sm-3 summaryPadding">
<div class="summaryAfterBox">
<img class="boxTopLeftOther top-20 top-7 left-5" src="<?php echo get_template_directory_uri(); ?>/assets/images/box-top-left.png" alt="">
<div class="responseHeading">
<h5>Average Page Load Time</h5>
<h4>2.009 <span>ms</span></h4>
</div>
<img class="boxTopRight right-5" src="<?php echo get_template_directory_uri(); ?>/assets/images/box-top-right.png" alt="">
</div>
</div>
<div class="col-sm-3 summaryPadding">
<div class="summaryAfterBox">
<img class="boxTopLeftOther top-20 top-7 left-5" src="<?php echo get_template_directory_uri(); ?>/assets/images/box-top-left.png" alt="">
<div class="responseHeading">
<h5>Grade</h5>
<h4>A<br></h4>
</div>
<img class="boxTopRight right-5" src="<?php echo get_template_directory_uri(); ?>/assets/images/box-top-right.png" alt="">
</div>
</div>
<div class="col-sm-3 pr-0 summaryPadding">
<div class="summaryAfterBox">
<img class="boxTopLeftOther top-20 top-7 left-5" src="<?php echo get_template_directory_uri(); ?>/assets/images/box-top-left.png" alt="">
<div class="responseHeading">
<h5>Performance</h5>
<h4>X <span>%</span></h4>
</div>
<img class="boxTopRight right-0" src="<?php echo get_template_directory_uri(); ?>/assets/images/box-top-right.png" alt="">
</div>
</div>
</div>
</div>
</div>
<div class="col-sm-12">
<div class="summaryHeading">
<h3 class="orangeColor transform">Problems Detected with your website</h3>
</div>
</div>
<div class="col-sm-8">
<div class="detectedHeading">
<h4>Your server response time is very high. Consider changing your web host.</h4>
</div>
</div>
<div class="col-sm-4">
<button type="button" class="hostsButton dark btn btn-primary">Recommended Web Hosts</button>
</div>
<div class="col-sm-8">
<div class="detectedHeading">
<h4>You are not using any cache plugins. Cache plugins are a must to speed up your website load time.</h4>
</div>
</div>
<div class="col-sm-4">
<button type="button" class="hostsButton dark btn btn-primary">Recommended Cache Plugins</button>
</div>
</div>
</div>
<!-------------------->
<!-- Summary Section Code End-->
<!-- Website Optimize Section Code Start-->
<!-------------------->
<img class="mt-5 optimizeWidth" src="<?php echo get_template_directory_uri(); ?>/assets/images/optimize-top.png" alt="">
<div class="optimizeBackground dark w-100">
<div class="container">
<div class="row">
<div class="col-sm-5">
<img class="w-100 d-none d-sm-block d-md-block" src="<?php echo get_template_directory_uri(); ?>/assets/images/optimize-ipad.png" alt="">
</div>
<div class="col-sm-7">
<img src="<?php echo get_template_directory_uri(); ?>/assets/images/optimize-star.png" alt="">
<div class="optimizeHeading">
<h2>Want your website optimize</h2>
</div>
<button type="button" class="btn btn-primary optimizeHireButton">Hire us now</button>
</div>
</div>
</div>
</div>
<div class="d-flex f-end">
<img class="optimizeWidth" src="<?php echo get_template_directory_uri(); ?>/assets/images/optimize-bottom.png" alt="">
</div>
<!-- Website Optimize Section Code End-->
<!-------------------->
<!-- Server Response Section Code Start-->
<!-------------------->
<div class="container">
<div class="row">
<div class="col-sm-12">
<div class="d-flex j-content-center">
<img class="mt-3" src="<?php echo get_template_directory_uri(); ?>/assets/images/server-star.png" alt="">
</div>
<div class="serverTime">
<h2>Your server response time is slow</h2>
<h4>Please consider one of the following hostings</h4>
</div>
</div>
<div class="col-sm-12">
<div class="table-responsive mt-4 tableShadow">
<table class="table table-striped">
<thead>
<tr>
<th class="borderTop0 textAlignCenter" scope="col">#</th>
<th class="borderTop0" scope="col">Hosting Provider</th>
<th class="borderTop0" scope="col">Top Features</th>
<th class="borderTop0" scope="col">Live Uptime</th>
<th class="borderTop0" scope="col">Average Ping</th>
<th class="borderTop0" scope="col">Overall Rating</th>
<th class="borderTop0 borderRight0" scope="col">Link</th>
</tr>
</thead>
<tbody>
<tr>
<th scope="row" class="textAlignCenter">1</th>
<td><img src="<?php echo get_template_directory_uri(); ?>/assets/images/hosting-logo.jpg"></td>
<td><i class="fa fa-check greenColor mr-1"></i> Best of Wordpress</td>
<td><img class="upTimeIcon" src="<?php echo get_template_directory_uri(); ?>/assets/images/uptime-icon.png"> 100.00%</td>
<td><img class="upTimeIcon" src="<?php echo get_template_directory_uri(); ?>/assets/images/average-icon.png"> 92ms</td>
<td><img src="<?php echo get_template_directory_uri(); ?>/assets/images/table-star.png" alt=""></td>
<td><button class="btn btn-outline-success reviewButton pt-0" type="submit"><i class="fa fa-eye mr-1"></i> Review</button></td>
</tr>
<tr>
<th scope="row" class="textAlignCenter">2</th>
<td><img src="<?php echo get_template_directory_uri(); ?>/assets/images/hosting-logo.jpg"></td>
<td><i class="fa fa-check greenColor mr-1"></i> Best of Wordpress</td>
<td><img class="upTimeIcon" src="<?php echo get_template_directory_uri(); ?>/assets/images/uptime-icon.png"> 100.00%</td>
<td><img class="upTimeIcon" src="<?php echo get_template_directory_uri(); ?>/assets/images/average-icon.png"> 92ms</td>
<td><img src="<?php echo get_template_directory_uri(); ?>/assets/images/table-star.png" alt=""></td>
<td><button class="btn btn-outline-success reviewButton pt-0" type="submit"><i class="fa fa-eye mr-1"></i> Review</button></td>
</tr>
<tr>
<th scope="row" class="textAlignCenter">3</th>
<td><img src="<?php echo get_template_directory_uri(); ?>/assets/images/hosting-logo.jpg"></td>
<td><i class="fa fa-check greenColor mr-1"></i> Best of Wordpress</td>
<td><img class="upTimeIcon" src="<?php echo get_template_directory_uri(); ?>/assets/images/uptime-icon.png"> 100.00%</td>
<td><img class="upTimeIcon" src="<?php echo get_template_directory_uri(); ?>/assets/images/average-icon.png"> 92ms</td>
<td><img src="<?php echo get_template_directory_uri(); ?>/assets/images/table-star.png" alt=""></td>
<td><button class="btn btn-outline-success reviewButton pt-0" type="submit"><i class="fa fa-eye mr-1"></i> Review</button></td>
</tr>
<tr>
<th scope="row" class="textAlignCenter">4</th>
<td><img src="<?php echo get_template_directory_uri(); ?>/assets/images/hosting-logo.jpg"></td>
<td><i class="fa fa-check greenColor mr-1"></i> Best of Wordpress</td>
<td><img class="upTimeIcon" src="<?php echo get_template_directory_uri(); ?>/assets/images/uptime-icon.png"> 100.00%</td>
<td><img class="upTimeIcon" src="<?php echo get_template_directory_uri(); ?>/assets/images/average-icon.png"> 92ms</td>
<td><img src="<?php echo get_template_directory_uri(); ?>/assets/images/table-star.png" alt=""></td>
<td><button class="btn btn-outline-success reviewButton pt-0" type="submit"><i class="fa fa-eye mr-1"></i> Review</button></td>
</tr>
<tr>
<th scope="row" class="textAlignCenter">5</th>
<td><img src="<?php echo get_template_directory_uri(); ?>/assets/images/hosting-logo.jpg"></td>
<td><i class="fa fa-check greenColor mr-1"></i> Best of Wordpress</td>
<td><img class="upTimeIcon" src="<?php echo get_template_directory_uri(); ?>/assets/images/uptime-icon.png"> 100.00%</td>
<td><img class="upTimeIcon" src="<?php echo get_template_directory_uri(); ?>/assets/images/average-icon.png"> 92ms</td>
<td><img src="<?php echo get_template_directory_uri(); ?>/assets/images/table-star.png" alt=""></td>
<td><button class="btn btn-outline-success reviewButton pt-0" type="submit"><i class="fa fa-eye mr-1"></i> Review</button></td>
</tr>
<tr>
<th scope="row" class="textAlignCenter">6</th>
<td><img src="<?php echo get_template_directory_uri(); ?>/assets/images/hosting-logo.jpg"></td>
<td><i class="fa fa-check greenColor mr-1"></i> Best of Wordpress</td>
<td><img class="upTimeIcon" src="<?php echo get_template_directory_uri(); ?>/assets/images/uptime-icon.png"> 100.00%</td>
<td><img class="upTimeIcon" src="<?php echo get_template_directory_uri(); ?>/assets/images/average-icon.png"> 92ms</td>
<td><img src="<?php echo get_template_directory_uri(); ?>/assets/images/table-star.png" alt=""></td>
<td><button class="btn btn-outline-success reviewButton pt-0" type="submit"><i class="fa fa-eye mr-1"></i> Review</button></td>
</tr>
<tr>
<th scope="row" class="textAlignCenter">7</th>
<td><img src="<?php echo get_template_directory_uri(); ?>/assets/images/hosting-logo.jpg"></td>
<td><i class="fa fa-check greenColor mr-1"></i> Best of Wordpress</td>
<td><img class="upTimeIcon" src="<?php echo get_template_directory_uri(); ?>/assets/images/uptime-icon.png"> 100.00%</td>
<td><img class="upTimeIcon" src="<?php echo get_template_directory_uri(); ?>/assets/images/average-icon.png"> 92ms</td>
<td><img src="<?php echo get_template_directory_uri(); ?>/assets/images/table-star.png" alt=""></td>
<td><button class="btn btn-outline-success reviewButton pt-0" type="submit"><i class="fa fa-eye mr-1"></i> Review</button></td>
</tr>
<tr>
<th scope="row" class="textAlignCenter">8</th>
<td><img src="<?php echo get_template_directory_uri(); ?>/assets/images/hosting-logo.jpg"></td>
<td><i class="fa fa-check greenColor mr-1"></i> Best of Wordpress</td>
<td><img class="upTimeIcon" src="<?php echo get_template_directory_uri(); ?>/assets/images/uptime-icon.png"> 100.00%</td>
<td><img class="upTimeIcon" src="<?php echo get_template_directory_uri(); ?>/assets/images/average-icon.png"> 92ms</td>
<td><img src="<?php echo get_template_directory_uri(); ?>/assets/images/table-star.png" alt=""></td>
<td><button class="btn btn-outline-success reviewButton pt-0" type="submit"><i class="fa fa-eye mr-1"></i> Review</button></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<!-- Server Response Section Code End-->
<!-------------------->
<!-- Cache Section Code Start-->
<!-------------------->
<div class="container">
<div class="row">
<div class="col-sm-12">
<div class="d-flex j-content-center">
<img class="mt-5" src="<?php echo get_template_directory_uri(); ?>/assets/images/server-star.png" alt="">
</div>
<div class="serverTime">
<h2>Your website is not using any cache</h2>
<h4>Please consider one of the following plugins</h4>
</div>
</div>
<div class="col-sm-4">
<div class="cacheBox white">
<img class="w-100" src="<?php echo get_template_directory_uri(); ?>/assets/images/cache-image.jpg" alt="">
<div class="d-flex mt-3">
<img class="mr-2" src="<?php echo get_template_directory_uri(); ?>/assets/images/cache-singal-star.png" alt="">
<div class="cacheHeading">
<h4>Layer Slider</h4>
</div>
<img class="ml-2" src="<?php echo get_template_directory_uri(); ?>/assets/images/cache-singal-star.png" alt="">
</div>
<div class="cacheHeading">
<p>All the Lorem Ipsum generators on the Internet tend to repeat predefined chunks as necessary, making this the first true generator on the Internet. </p>
</div>
</div>
<div class="d-flex spaceBetween">
<img src="<?php echo get_template_directory_uri(); ?>/assets/images/cache-left.png" alt="">
<img src="<?php echo get_template_directory_uri(); ?>/assets/images/cache-right.png" alt="">
</div>
<div class="cacheInfo dark">
<img class="mr-2" src="<?php echo get_template_directory_uri(); ?>/assets/images/cache-review.png">
<div class="cacheHeading d-inline-block">
<h5>More Info</h5>
</div>
</div>
</div>
<div class="col-sm-4">
<div class="cacheBox white">
<img class="w-100" src="<?php echo get_template_directory_uri(); ?>/assets/images/cache-image.jpg" alt="">
<div class="d-flex mt-3">
<img class="mr-2" src="<?php echo get_template_directory_uri(); ?>/assets/images/cache-singal-star.png" alt="">
<div class="cacheHeading">
<h4>Layer Slider</h4>
</div>
<img class="ml-2" src="<?php echo get_template_directory_uri(); ?>/assets/images/cache-singal-star.png" alt="">
</div>
<div class="cacheHeading">
<p>All the Lorem Ipsum generators on the Internet tend to repeat predefined chunks as necessary, making this the first true generator on the Internet. </p>
</div>
</div>
<div class="d-flex spaceBetween">
<img src="<?php echo get_template_directory_uri(); ?>/assets/images/cache-left.png" alt="">
<img src="<?php echo get_template_directory_uri(); ?>/assets/images/cache-right.png" alt="">
</div>
<div class="cacheInfo dark">
<img class="mr-2" src="<?php echo get_template_directory_uri(); ?>/assets/images/cache-review.png">
<div class="cacheHeading d-inline-block">
<h5>More Info</h5>
</div>
</div>
</div>
<div class="col-sm-4">
<div class="cacheBox white">
<img class="w-100" src="<?php echo get_template_directory_uri(); ?>/assets/images/cache-image.jpg" alt="">
<div class="d-flex mt-3">
<img class="mr-2" src="<?php echo get_template_directory_uri(); ?>/assets/images/cache-singal-star.png" alt="">
<div class="cacheHeading">
<h4>Layer Slider</h4>
</div>
<img class="ml-2" src="<?php echo get_template_directory_uri(); ?>/assets/images/cache-singal-star.png" alt="">
</div>
<div class="cacheHeading">
<p>All the Lorem Ipsum generators on the Internet tend to repeat predefined chunks as necessary, making this the first true generator on the Internet. </p>
</div>
</div>
<div class="d-flex spaceBetween">
<img src="<?php echo get_template_directory_uri(); ?>/assets/images/cache-left.png" alt="">
<img src="<?php echo get_template_directory_uri(); ?>/assets/images/cache-right.png" alt="">
</div>
<div class="cacheInfo dark">
<img class="mr-2" src="<?php echo get_template_directory_uri(); ?>/assets/images/cache-review.png">
<div class="cacheHeading d-inline-block">
<h5>More Info</h5>
</div>
</div>
</div>
</div>
</div>
<!-- Cache Section Code End-->
<!-------------------->
<?php get_footer();?>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment