mirror of
https://ghproxy.net/https://github.com/elementor/wp2static.git
synced 2025-08-31 12:36:57 +08:00
45 lines
1.2 KiB
PHP
45 lines
1.2 KiB
PHP
|
<?php
|
||
|
/*
|
||
|
Plugin Name: WP Static HTML Output
|
||
|
Plugin URI: https://leonstafford.github.io
|
||
|
Description: WP Static HTML Output Plugin.
|
||
|
Version: 1.1.2
|
||
|
Author: Leon Stafford
|
||
|
Author URI: https://leonstafford.github.io
|
||
|
Text Domain: static-html-output-plugin
|
||
|
|
||
|
Copyright (c) 2011 Leon Stafford
|
||
|
*/
|
||
|
|
||
|
require_once 'library/StaticHtmlOutput/Exception.php';
|
||
|
require_once 'library/StaticHtmlOutput/Options.php';
|
||
|
require_once 'library/StaticHtmlOutput/View.php';
|
||
|
require_once 'library/StaticHtmlOutput/UrlRequest.php';
|
||
|
require_once 'library/StaticHtmlOutput.php';
|
||
|
|
||
|
StaticHtmlOutput::init(__FILE__);
|
||
|
|
||
|
add_filter('plugin_action_links_' . plugin_basename(__FILE__), 'pluginActionLinks');
|
||
|
|
||
|
/**
|
||
|
* Adds link to options page from Plugins list
|
||
|
* @return array
|
||
|
*/
|
||
|
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;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Initializes localization
|
||
|
* @return void
|
||
|
*/
|
||
|
|
||
|
function myplugin_init() {
|
||
|
|
||
|
load_plugin_textdomain( 'static-html-output-plugin', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
|
||
|
}
|
||
|
add_action('plugins_loaded', 'myplugin_init');
|