mirror of
https://ghproxy.net/https://github.com/elementor/wp2static.git
synced 2025-08-30 10:40:45 +08:00
parent
e35c12a957
commit
5957cbc1b5
2 changed files with 3 additions and 16 deletions
|
@ -1,10 +1,4 @@
|
|||
<?php
|
||||
/**
|
||||
* @package WP Static HTML Output
|
||||
*
|
||||
* Copyright (c) 2011 Leon Stafford
|
||||
*/
|
||||
|
||||
class StaticHtmlOutput {
|
||||
const VERSION = '1.9';
|
||||
const OPTIONS_KEY = 'wp-static-html-output-options';
|
||||
|
@ -263,7 +257,7 @@ class StaticHtmlOutput {
|
|||
$files = scandir($dir);
|
||||
foreach($files as $item){
|
||||
if($item != '.' && $item != '..'){
|
||||
$ContentType = GuessType($item);
|
||||
$ContentType = GuessMimeType($item);
|
||||
if(is_dir($dir.'/'.$item)) {
|
||||
UploadDirectory($S3, $Bucket, $dir.'/'.$item, $siteroot);
|
||||
} else if(is_file($dir.'/'.$item)) {
|
||||
|
@ -281,13 +275,7 @@ class StaticHtmlOutput {
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* GuessType -
|
||||
*
|
||||
* Make a simple guess as to the file's content type,
|
||||
* and return a MIME type.
|
||||
*/
|
||||
function GuessType($File) {
|
||||
function GuessMimeType($File) {
|
||||
$Info = pathinfo($File, PATHINFO_EXTENSION);
|
||||
switch (strtolower($Info))
|
||||
{
|
||||
|
|
|
@ -18,8 +18,7 @@ require_once 'library/StaticHtmlOutput.php';
|
|||
|
||||
StaticHtmlOutput::init(__FILE__);
|
||||
|
||||
function pluginActionLinks($links)
|
||||
{
|
||||
function pluginActionLinks($links) {
|
||||
$settings_link = '<a href="tools.php?page=wp-static-html-output-options">' . __('Settings', 'static-html-output-plugin') . '</a>';
|
||||
array_unshift( $links, $settings_link );
|
||||
return $links;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue