fix(ui): align action link with Deactivate, rename to Generator, and clean up row meta
This commit is contained in:
+8
-13
@@ -3,7 +3,7 @@
|
||||
* Plugin Name: DummyLab – Dummy Post & Content Generator
|
||||
* Plugin URI: https://apps.masbudi.my.id/dummylab-wp
|
||||
* Description: Advanced dummy content generator for WordPress development with safety controls and bulk purge features.
|
||||
* Version: 1.5.1
|
||||
* Version: 1.5.2
|
||||
* Author: masbudikusuma
|
||||
* Author URI: https://masbudi.my.id
|
||||
* Donate link: https://donate.masbudi.my.id/dummylab-wp
|
||||
@@ -66,25 +66,22 @@ class DummyLab {
|
||||
return $all_plugins;
|
||||
}
|
||||
|
||||
// Menambahkan shortcut link di bagian Meta (sebelah Donate)
|
||||
// Menambahkan Link Donasi bersih di baris meta bawah
|
||||
public function add_plugin_row_meta($links, $file) {
|
||||
if ($file === plugin_basename(__FILE__)) {
|
||||
$locale = get_locale();
|
||||
$dash_label = (strpos($locale, 'id') === 0) ? '🚀 Buka Dashboard' : '🚀 Open Dashboard';
|
||||
$donate_label = (strpos($locale, 'id') === 0) ? '☕ Donasi' : '☕ Donate';
|
||||
|
||||
$links[] = '<a href="' . esc_url(admin_url('tools.php?page=dummylab')) . '" style="font-weight: 600; color: #2271b1;">' . $dash_label . '</a>';
|
||||
$links[] = '<a href="https://donate.masbudi.my.id/dummylab-wp" target="_blank" style="color: #b35900; font-weight: 600;">' . $donate_label . '</a>';
|
||||
$links[] = '<a href="https://donate.masbudi.my.id/dummylab-wp" target="_blank" style="color: #b35900; font-weight: 600;">' . esc_html($donate_label) . '</a>';
|
||||
}
|
||||
return $links;
|
||||
}
|
||||
|
||||
// Menambahkan shortcut link di bagian Action Links (sebelah Deactivate)
|
||||
// Menambahkan link "Generator" di sebelah Deactivate (Rapi & Sejajar)
|
||||
public function add_plugin_action_links($links) {
|
||||
$locale = get_locale();
|
||||
$label = (strpos($locale, 'id') === 0) ? 'Dashboard' : 'Dashboard';
|
||||
$settings_link = '<a href="' . esc_url(admin_url('tools.php?page=dummylab')) . '"><strong>' . $label . '</strong></a>';
|
||||
array_unshift($links, $settings_link);
|
||||
$label = (strpos($locale, 'id') === 0) ? 'Generator' : 'Generator';
|
||||
$generator_link = '<a href="' . esc_url(admin_url('tools.php?page=dummylab')) . '">' . esc_html($label) . '</a>';
|
||||
array_unshift($links, $generator_link);
|
||||
return $links;
|
||||
}
|
||||
|
||||
@@ -184,7 +181,7 @@ class DummyLab {
|
||||
<div class="dummylab-wrap">
|
||||
<div class="dummylab-header">
|
||||
<div>
|
||||
<h1>🧪 DummyLab <span style="font-size: 14px; font-weight: 400; color: #646970;">v1.5.1</span></h1>
|
||||
<h1>🧪 DummyLab <span style="font-size: 14px; font-weight: 400; color: #646970;">v1.5.2</span></h1>
|
||||
<p><?php echo $t['created_by']; ?> <a href="https://masbudi.my.id" target="_blank" style="text-decoration: none; font-weight: 600; color: #2271b1;">masbudikusuma</a> • <a href="https://apps.masbudi.my.id/dummylab-wp" target="_blank" style="text-decoration: none; color: #2271b1;"><?php echo $t['plugin_doc']; ?></a> • <a href="https://donate.masbudi.my.id/dummylab-wp" target="_blank" style="text-decoration: none; font-weight: 600; color: #b35900;">☕ <?php echo $t['link_donate']; ?></a></p>
|
||||
</div>
|
||||
<div class="dummylab-lang-switch">
|
||||
@@ -224,7 +221,6 @@ class DummyLab {
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($current_tab === 'generator'): ?>
|
||||
<!-- GENERATOR TAB CONTENT -->
|
||||
<div class="dummylab-container">
|
||||
<div class="dummylab-main-card">
|
||||
<form id="dummylab-generate-form" method="post" action="<?php echo esc_url(admin_url('admin-post.php')); ?>">
|
||||
@@ -370,7 +366,6 @@ class DummyLab {
|
||||
</div>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<!-- HISTORY TAB CONTENT -->
|
||||
<div class="dummylab-main-card" style="min-width: 100%;">
|
||||
<h2>📜 <?php echo $t['history_title']; ?></h2>
|
||||
<p style="color: #646970; margin-bottom: 20px;"><?php echo $t['history_desc']; ?></p>
|
||||
|
||||
Reference in New Issue
Block a user