Skip to content
This repository has been archived by the owner on Apr 28, 2023. It is now read-only.

Commit

Permalink
Add port in cases
Browse files Browse the repository at this point in the history
  • Loading branch information
Rafael Nowrotek authored and Rafael Nowrotek committed Aug 12, 2019
1 parent 1c20f89 commit c662deb
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 30 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "benignware/wp-kicks-app-pro",
"version": "0.1.0-beta.17",
"version": "0.1.0-beta.18",
"type": "wordpress-theme",
"license": "MIT",
"description": "Wordpress Kickstarter Theme",
Expand Down
14 changes: 8 additions & 6 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

40 changes: 20 additions & 20 deletions lib/themalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -626,30 +626,30 @@ function get_theme_resources() {
return $theme_resources;
}

if (!is_admin()) {
$theme_resources = load_theme_resources();

if ($theme_resources) {
return $theme_resources;
}
}
// if (!is_admin()) {
// $theme_resources = load_theme_resources();
//
// if ($theme_resources) {
// return $theme_resources;
// }
// }

$url = admin_url( 'admin-ajax.php' ) . '?action=theme_resources';
$urlinfo = parse_url($url);

/*
//
$host = $_SERVER['SERVER_ADDR'];
$url = $urlinfo['scheme'] . '://' . $host . $urlinfo['path'] . ($urlinfo['query'] ? '?' . $urlinfo['query'] : '');
echo $url;
echo '<br/>';
*/

$host = $_SERVER['SERVER_NAME'];
// $host = $_SERVER['SERVER_ADDR'];
$url = $urlinfo['scheme'] . '://' . $host . $urlinfo['path'] . ($urlinfo['query'] ? '?' . $urlinfo['query'] : '');
$port = $_SERVER['SERVER_PORT'] && substr($_SERVER['SERVER_PORT'], 0, 1) !== '8' ? $_SERVER['SERVER_PORT'] : '';

//
$url = $urlinfo['scheme'] . '://' . $host . ($port ? ':' . $port : '') . $urlinfo['path'] . ($urlinfo['query'] ? '?' . $urlinfo['query'] : '');
//
// */
//
// $host = $_SERVER['SERVER_NAME'];
// $host = $_SERVER['SERVER_NAME'];
//
// // $host = $_SERVER['SERVER_ADDR'];
// $url = $urlinfo['scheme'] . '://' . $host . $urlinfo['path'] . ($urlinfo['query'] ? '?' . $urlinfo['query'] : '');

if (function_exists('curl_init')) {
$ch = curl_init();
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "wp-kicks-app-pro",
"version": "0.1.0-beta.17",
"version": "0.1.0-beta.18",
"description": "Wordpress theme",
"private": true,
"main": "dist/main.js",
Expand Down
2 changes: 1 addition & 1 deletion style.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Theme Name: Kicks App Pro
Author: Rafael Nowrotek
Author URI: http://benignware.com
Description: Kickstarter Template
Version: 0.1.0-beta.17
Version: 0.1.0-beta.18
*/

* {
Expand Down

0 comments on commit c662deb

Please sign in to comment.