diff --git a/admin-page.php b/admin/admin-page.php similarity index 100% rename from admin-page.php rename to admin/admin-page.php diff --git a/admin.css b/assets/css/admin.css similarity index 98% rename from admin.css rename to assets/css/admin.css index 7067e27..cce2c7e 100644 --- a/admin.css +++ b/assets/css/admin.css @@ -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 { diff --git a/external-indicator.css b/assets/css/external-indicator.css similarity index 100% rename from external-indicator.css rename to assets/css/external-indicator.css diff --git a/frontend.css b/assets/css/frontend.css similarity index 100% rename from frontend.css rename to assets/css/frontend.css diff --git a/assets/i-like-food.svg b/assets/i-like-food.svg deleted file mode 100644 index 212d82f..0000000 --- a/assets/i-like-food.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/assets/icons/i-like-food.svg b/assets/icons/i-like-food.svg new file mode 100644 index 0000000..8d6cac3 --- /dev/null +++ b/assets/icons/i-like-food.svg @@ -0,0 +1 @@ + diff --git a/assets/leaf.svg b/assets/icons/leaf.svg similarity index 100% rename from assets/leaf.svg rename to assets/icons/leaf.svg diff --git a/admin.js b/assets/js/admin.js similarity index 100% rename from admin.js rename to assets/js/admin.js diff --git a/redirect.js b/assets/js/redirect.js similarity index 100% rename from redirect.js rename to assets/js/redirect.js diff --git a/class-admin.php b/includes/class-admin.php similarity index 96% rename from class-admin.php rename to includes/class-admin.php index b59fd3f..9f99bbe 100644 --- a/class-admin.php +++ b/includes/class-admin.php @@ -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() { diff --git a/class-public.php b/includes/class-public.php similarity index 99% rename from class-public.php rename to includes/class-public.php index 35e3a4a..cff6cf8 100644 --- a/class-public.php +++ b/includes/class-public.php @@ -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 diff --git a/class-wpnav-links.php b/includes/class-wpnav-links.php similarity index 98% rename from class-wpnav-links.php rename to includes/class-wpnav-links.php index 50f9276..64cb85d 100644 --- a/class-wpnav-links.php +++ b/includes/class-wpnav-links.php @@ -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) { diff --git a/readme.txt b/readme.txt index 13f7487..5bf1f83 100644 --- a/readme.txt +++ b/readme.txt @@ -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 diff --git a/redirect-template.php b/templates/redirect-template.php similarity index 100% rename from redirect-template.php rename to templates/redirect-template.php diff --git a/wpnav-links.php b/wpnav-links.php index f6b6758..9d180fc 100644 --- a/wpnav-links.php +++ b/wpnav-links.php @@ -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' => '' . esc_html__('Settings', 'wpnav-links') . '', - 'support' => '' . esc_html__('Support', 'wpnav-links') . '', - 'docs' => '' . esc_html__('Documentation', 'wpnav-links') . '', + 'support' => '' . esc_html__('Support', 'wpnav-links') . '', + 'document' => '' . esc_html__('Document', 'wpnav-links') . '', ); 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 );