调整目录结构

This commit is contained in:
文派备案 2025-06-01 18:58:35 +08:00
parent 5c4a7cdeac
commit 10a07c42a0
15 changed files with 27 additions and 23 deletions

View file

@ -410,13 +410,18 @@
}
.wpnav-redirect-preview {
border: 2px solid #ddd;
border-radius: 8px;
padding: 20px;
background: #f8f9fa;
margin-top: 20px;
position: relative;
overflow: hidden;
border: 2px solid #ddd;
border-radius: 8px;
padding: 20px;
background: #919191;
margin-top: 20px;
position: relative;
overflow: hidden;
background-image: url(../icons/i-like-food.svg);
background-position: left top;
background-size: auto;
background-repeat: repeat;
background-attachment: fixed;
}
.wpnav-redirect-preview::before {

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 9.6 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 9.6 KiB

View file

Before

Width:  |  Height:  |  Size: 739 B

After

Width:  |  Height:  |  Size: 739 B

Before After
Before After

View file

@ -36,14 +36,14 @@ class WPNAV_Admin {
wp_enqueue_style(
'wpnav-admin-style',
WPNAV_LINKS_PLUGIN_URL . 'admin.css',
WPNAV_LINKS_PLUGIN_URL . 'assets/css/admin.css',
array(),
WPNAV_LINKS_VERSION
);
wp_enqueue_script(
'wpnav-admin-script',
WPNAV_LINKS_PLUGIN_URL . 'admin.js',
WPNAV_LINKS_PLUGIN_URL . 'assets/js/admin.js',
array('jquery'),
WPNAV_LINKS_VERSION,
true
@ -81,7 +81,7 @@ class WPNAV_Admin {
}
public function display_admin_page() {
include WPNAV_LINKS_PLUGIN_DIR . 'admin-page.php';
include WPNAV_LINKS_PLUGIN_DIR . 'admin/admin-page.php';
}
public function ajax_export_stats() {

View file

@ -22,7 +22,7 @@ class WPNAV_Public {
public function enqueue_scripts() {
wp_enqueue_script(
'wpnav-redirect-script',
WPNAV_LINKS_PLUGIN_URL . 'redirect.js',
WPNAV_LINKS_PLUGIN_URL . 'assets/js/redirect.js',
array('jquery'),
WPNAV_LINKS_VERSION,
true

View file

@ -231,7 +231,7 @@ class WPNAV_Links {
private function load_redirect_template($url, $ref) {
wp_enqueue_style(
'wpnav-redirect-style',
WPNAV_LINKS_PLUGIN_URL . 'frontend.css',
WPNAV_LINKS_PLUGIN_URL . 'assets/css/frontend.css',
array(),
WPNAV_LINKS_VERSION
);
@ -239,7 +239,7 @@ class WPNAV_Links {
$template_locations = array(
get_stylesheet_directory() . '/wpnav-redirect-template.php',
get_template_directory() . '/wpnav-redirect-template.php',
WPNAV_LINKS_PLUGIN_DIR . 'redirect-template.php'
WPNAV_LINKS_PLUGIN_DIR . 'templates/redirect-template.php'
);
foreach ($template_locations as $template) {
@ -249,7 +249,7 @@ class WPNAV_Links {
}
}
include WPNAV_LINKS_PLUGIN_DIR . 'redirect-template.php';
include WPNAV_LINKS_PLUGIN_DIR . 'templates/redirect-template.php';
}
public function get_redirect_url($url) {

View file

@ -1,5 +1,5 @@
=== WPNav Links ===
Contributors: wpnavlinks
Contributors: WenPai
Tags: external links, redirect, security, links, SEO
Requires at least: 5.0
Tested up to: 6.4

View file

@ -25,9 +25,9 @@ define('WPNAV_LINKS_PLUGIN_URL', plugin_dir_url(__FILE__));
define('WPNAV_LINKS_DB_VERSION', '1.2.0');
define('WPNAV_LINKS_TABLE', 'nav_link_redirects');
require_once WPNAV_LINKS_PLUGIN_DIR . 'class-wpnav-links.php';
require_once WPNAV_LINKS_PLUGIN_DIR . 'class-admin.php';
require_once WPNAV_LINKS_PLUGIN_DIR . 'class-public.php';
require_once WPNAV_LINKS_PLUGIN_DIR . 'includes/class-wpnav-links.php';
require_once WPNAV_LINKS_PLUGIN_DIR . 'includes/class-admin.php';
require_once WPNAV_LINKS_PLUGIN_DIR . 'includes/class-public.php';
function wpnav_activate_plugin() {
$plugin = new WPNAV_Links();
@ -482,9 +482,8 @@ add_filter('plugin_row_meta', 'wpnav_plugin_row_meta', 10, 2);
function wpnav_plugin_row_meta($links, $file) {
if (plugin_basename(__FILE__) === $file) {
$row_meta = array(
'settings' => '<a href="' . admin_url('tools.php?page=wpnav-links') . '">' . esc_html__('Settings', 'wpnav-links') . '</a>',
'support' => '<a href="https://example.com/support" target="_blank">' . esc_html__('Support', 'wpnav-links') . '</a>',
'docs' => '<a href="https://example.com/docs" target="_blank">' . esc_html__('Documentation', 'wpnav-links') . '</a>',
'support' => '<a href="https://sharecms.com/forums" target="_blank">' . esc_html__('Support', 'wpnav-links') . '</a>',
'document' => '<a href="https://wpnav.com/document/wpnav-links" target="_blank">' . esc_html__('Document', 'wpnav-links') . '</a>',
);
return array_merge($links, $row_meta);
}
@ -512,7 +511,7 @@ function wpnav_enqueue_frontend_styles() {
if (!is_admin()) {
wp_enqueue_style(
'wpnav-external-indicator',
WPNAV_LINKS_PLUGIN_URL . 'external-indicator.css',
WPNAV_LINKS_PLUGIN_URL . 'assets/css/external-indicator.css',
array(),
WPNAV_LINKS_VERSION
);