Changeset 3166563
- Timestamp:
- 10/10/2024 12:59:43 PM (16 months ago)
- Location:
- laci-link-cluster
- Files:
-
- 138 added
- 26 deleted
- 25 edited
-
tags/1.0.1 (added)
-
tags/1.0.1/LICENSE.md (added)
-
tags/1.0.1/README.md (added)
-
tags/1.0.1/assets (added)
-
tags/1.0.1/assets/admin (added)
-
tags/1.0.1/assets/admin/css (added)
-
tags/1.0.1/assets/admin/css/admin.css (added)
-
tags/1.0.1/assets/admin/css/free-ver.css (added)
-
tags/1.0.1/assets/admin/css/licenses.css (added)
-
tags/1.0.1/assets/admin/css/link-assistant.css (added)
-
tags/1.0.1/assets/admin/css/settings.css (added)
-
tags/1.0.1/assets/admin/css/wpil-editor-style.css (added)
-
tags/1.0.1/assets/admin/images (added)
-
tags/1.0.1/assets/admin/images/logo-back-parent.png (added)
-
tags/1.0.1/assets/admin/images/logo-entrire.png (added)
-
tags/1.0.1/assets/admin/images/logo-within-cat.png (added)
-
tags/1.0.1/assets/admin/images/logo.png (added)
-
tags/1.0.1/assets/admin/js (added)
-
tags/1.0.1/assets/admin/js/admin.js (added)
-
tags/1.0.1/assets/admin/js/link-assistant.js (added)
-
tags/1.0.1/assets/admin/js/notification.js (added)
-
tags/1.0.1/assets/admin/js/select2.js (added)
-
tags/1.0.1/assets/admin/js/settings.js (added)
-
tags/1.0.1/assets/admin/js/update-database.js (added)
-
tags/1.0.1/assets/lib (added)
-
tags/1.0.1/assets/lib/css (added)
-
tags/1.0.1/assets/lib/css/images (added)
-
tags/1.0.1/assets/lib/css/images/ui-icons_444444_256x240.png (added)
-
tags/1.0.1/assets/lib/css/images/ui-icons_555555_256x240.png (added)
-
tags/1.0.1/assets/lib/css/images/ui-icons_777620_256x240.png (added)
-
tags/1.0.1/assets/lib/css/images/ui-icons_777777_256x240.png (added)
-
tags/1.0.1/assets/lib/css/images/ui-icons_cc0000_256x240.png (added)
-
tags/1.0.1/assets/lib/css/images/ui-icons_ffffff_256x240.png (added)
-
tags/1.0.1/assets/lib/css/jquery-ui.css (added)
-
tags/1.0.1/assets/lib/select2 (added)
-
tags/1.0.1/assets/lib/select2/select2.min.css (added)
-
tags/1.0.1/assets/lib/select2/select2.min.js (added)
-
tags/1.0.1/assets/lib/wp-editor-plugins (added)
-
tags/1.0.1/assets/lib/wp-editor-plugins/advlist (added)
-
tags/1.0.1/assets/lib/wp-editor-plugins/advlist/plugin.min.js (added)
-
tags/1.0.1/assets/lib/wp-editor-plugins/autolink (added)
-
tags/1.0.1/assets/lib/wp-editor-plugins/autolink/plugin.min.js (added)
-
tags/1.0.1/assets/lib/wp-editor-plugins/code (added)
-
tags/1.0.1/assets/lib/wp-editor-plugins/code/plugin.min.js (added)
-
tags/1.0.1/assets/lib/wp-editor-plugins/insertdatetime (added)
-
tags/1.0.1/assets/lib/wp-editor-plugins/insertdatetime/plugin.min.js (added)
-
tags/1.0.1/assets/lib/wp-editor-plugins/searchreplace (added)
-
tags/1.0.1/assets/lib/wp-editor-plugins/searchreplace/plugin.min.js (added)
-
tags/1.0.1/assets/lib/wp-editor-plugins/table (added)
-
tags/1.0.1/assets/lib/wp-editor-plugins/table/plugin.min.js (added)
-
tags/1.0.1/assets/lib/wp-editor-plugins/visualblocks (added)
-
tags/1.0.1/assets/lib/wp-editor-plugins/visualblocks/css (added)
-
tags/1.0.1/assets/lib/wp-editor-plugins/visualblocks/css/visualblocks.css (added)
-
tags/1.0.1/assets/lib/wp-editor-plugins/visualblocks/plugin.min.js (added)
-
tags/1.0.1/i18n (added)
-
tags/1.0.1/i18n/languages (added)
-
tags/1.0.1/includes (added)
-
tags/1.0.1/includes/Ajax.php (added)
-
tags/1.0.1/includes/Controllers (added)
-
tags/1.0.1/includes/Controllers/AdminMenuController.php (added)
-
tags/1.0.1/includes/Controllers/CreatePostListTableController.php (added)
-
tags/1.0.1/includes/Controllers/GoToProController.php (added)
-
tags/1.0.1/includes/Controllers/InternalLinksController.php (added)
-
tags/1.0.1/includes/Controllers/LinkAssistantController.php (added)
-
tags/1.0.1/includes/Controllers/LinkSuggestionsController.php (added)
-
tags/1.0.1/includes/Controllers/MetaBoxAddKeyWordController.php (added)
-
tags/1.0.1/includes/Controllers/MetaBoxInternalLinkInfoController.php (added)
-
tags/1.0.1/includes/Controllers/MetaBoxMainCategoryController.php (added)
-
tags/1.0.1/includes/Controllers/PlacementAssistantController.php (added)
-
tags/1.0.1/includes/Controllers/SettingsController.php (added)
-
tags/1.0.1/includes/Controllers/TableInternalLinkInfoController.php (added)
-
tags/1.0.1/includes/Controllers/WPILCustomTableManager.php (added)
-
tags/1.0.1/includes/Deactivate.php (added)
-
tags/1.0.1/includes/Enqueue (added)
-
tags/1.0.1/includes/Enqueue/AdminEnqueue.php (added)
-
tags/1.0.1/includes/Functions.php (added)
-
tags/1.0.1/includes/Initialize.php (added)
-
tags/1.0.1/includes/Shortcode (added)
-
tags/1.0.1/includes/Shortcode/AddShortcode.php (added)
-
tags/1.0.1/includes/UpdateDatabase.php (added)
-
tags/1.0.1/includes/Utils (added)
-
tags/1.0.1/includes/Utils/ActivePlugin.php (added)
-
tags/1.0.1/includes/Utils/CleanContent.php (added)
-
tags/1.0.1/includes/Utils/Helpers.php (added)
-
tags/1.0.1/includes/Utils/SingletonTrait.php (added)
-
tags/1.0.1/readme.txt (added)
-
tags/1.0.1/templates (added)
-
tags/1.0.1/templates/dashboard (added)
-
tags/1.0.1/templates/dashboard/column-title.php (added)
-
tags/1.0.1/templates/dashboard/dashboard.php (added)
-
tags/1.0.1/templates/dashboard/popup-info.php (added)
-
tags/1.0.1/templates/dashboard/table-report.php (added)
-
tags/1.0.1/templates/licenses (added)
-
tags/1.0.1/templates/licenses/activate-card.php (added)
-
tags/1.0.1/templates/licenses/information-card.php (added)
-
tags/1.0.1/templates/licenses/licenses.php (added)
-
tags/1.0.1/templates/meta-box (added)
-
tags/1.0.1/templates/meta-box/suggestion-table.php (added)
-
tags/1.0.1/templates/placement-assistant (added)
-
tags/1.0.1/templates/placement-assistant/box-content.php (added)
-
tags/1.0.1/templates/placement-assistant/diff-category.php (added)
-
tags/1.0.1/templates/placement-assistant/placement-assistant.php (added)
-
tags/1.0.1/templates/placement-assistant/same-category.php (added)
-
tags/1.0.1/templates/settings (added)
-
tags/1.0.1/templates/settings/import-key-words.php (added)
-
tags/1.0.1/templates/settings/nav-tabs.php (added)
-
tags/1.0.1/templates/settings/related-box-html.php (added)
-
tags/1.0.1/templates/settings/related-box.php (added)
-
tags/1.0.1/templates/settings/settings.php (added)
-
tags/1.0.1/uninstall.php (added)
-
tags/1.0.1/wp-link-and-cluster.php (added)
-
trunk/assets/admin/css/admin.css (modified) (5 diffs)
-
trunk/assets/admin/css/free-ver.css (added)
-
trunk/assets/admin/css/licenses.css (added)
-
trunk/assets/admin/css/link-assistant.css (modified) (4 diffs)
-
trunk/assets/admin/js/admin.js (modified) (5 diffs)
-
trunk/assets/admin/js/link-assistant.js (modified) (19 diffs)
-
trunk/assets/admin/js/settings.js (modified) (2 diffs)
-
trunk/assets/banner-772×250.png (deleted)
-
trunk/assets/screenshot-1.png (deleted)
-
trunk/assets/screenshot-2.png (deleted)
-
trunk/assets/screenshot-3.png (deleted)
-
trunk/assets/screenshot-4.png (deleted)
-
trunk/includes/Ajax.php (added)
-
trunk/includes/Controllers/AdminMenuController.php (added)
-
trunk/includes/Controllers/CreatePostListTableController.php (added)
-
trunk/includes/Controllers/GoToProController.php (added)
-
trunk/includes/Controllers/InternalLinksController.php (added)
-
trunk/includes/Controllers/LACI_AdminMenuController.php (deleted)
-
trunk/includes/Controllers/LACI_CreatePostListTableController.php (deleted)
-
trunk/includes/Controllers/LACI_CustomTableManager.php (deleted)
-
trunk/includes/Controllers/LACI_InternalLinksController.php (deleted)
-
trunk/includes/Controllers/LACI_LinkAssistantController.php (deleted)
-
trunk/includes/Controllers/LACI_LinkSuggestionsController.php (deleted)
-
trunk/includes/Controllers/LACI_MetaBoxAddKeyWordController.php (deleted)
-
trunk/includes/Controllers/LACI_MetaBoxInternalLinkInfoController.php (deleted)
-
trunk/includes/Controllers/LACI_MetaBoxMainCategoryController.php (deleted)
-
trunk/includes/Controllers/LACI_PlacementAssistantController.php (deleted)
-
trunk/includes/Controllers/LACI_SettingsController.php (deleted)
-
trunk/includes/Controllers/LACI_TableInternalLinkInfoController.php (deleted)
-
trunk/includes/Controllers/LinkAssistantController.php (added)
-
trunk/includes/Controllers/LinkSuggestionsController.php (added)
-
trunk/includes/Controllers/MetaBoxAddKeyWordController.php (added)
-
trunk/includes/Controllers/MetaBoxInternalLinkInfoController.php (added)
-
trunk/includes/Controllers/MetaBoxMainCategoryController.php (added)
-
trunk/includes/Controllers/PlacementAssistantController.php (added)
-
trunk/includes/Controllers/SettingsController.php (added)
-
trunk/includes/Controllers/TableInternalLinkInfoController.php (added)
-
trunk/includes/Controllers/WPILCustomTableManager.php (added)
-
trunk/includes/Deactivate.php (modified) (1 diff)
-
trunk/includes/Enqueue/AdminEnqueue.php (added)
-
trunk/includes/Enqueue/LACI_AdminEnqueue.php (deleted)
-
trunk/includes/Functions.php (modified) (1 diff)
-
trunk/includes/Initialize.php (added)
-
trunk/includes/LACI_Ajax.php (deleted)
-
trunk/includes/LACI_Initialize.php (deleted)
-
trunk/includes/LACI_UpdateDatabase.php (deleted)
-
trunk/includes/Shortcode/AddShortcode.php (added)
-
trunk/includes/Shortcode/LACI_AddShortcode.php (deleted)
-
trunk/includes/UpdateDatabase.php (added)
-
trunk/includes/Utils/ActivePlugin.php (added)
-
trunk/includes/Utils/CleanContent.php (added)
-
trunk/includes/Utils/Helpers.php (modified) (1 diff)
-
trunk/includes/Utils/LACI_ActivePlugin.php (deleted)
-
trunk/includes/Utils/LACI_CleanContent.php (deleted)
-
trunk/includes/Utils/LACI_SingletonTrait.php (deleted)
-
trunk/includes/Utils/SingletonTrait.php (added)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/templates/dashboard/column-title.php (modified) (1 diff)
-
trunk/templates/dashboard/dashboard.php (modified) (1 diff)
-
trunk/templates/dashboard/popup-info.php (modified) (5 diffs)
-
trunk/templates/dashboard/table-report.php (modified) (6 diffs)
-
trunk/templates/go-pro (deleted)
-
trunk/templates/licenses (added)
-
trunk/templates/licenses/activate-card.php (added)
-
trunk/templates/licenses/information-card.php (added)
-
trunk/templates/licenses/licenses.php (added)
-
trunk/templates/meta-box/suggestion-table.php (modified) (2 diffs)
-
trunk/templates/placement-assistant/box-content.php (modified) (2 diffs)
-
trunk/templates/placement-assistant/diff-category.php (modified) (3 diffs)
-
trunk/templates/placement-assistant/placement-assistant.php (modified) (2 diffs)
-
trunk/templates/placement-assistant/same-category.php (modified) (3 diffs)
-
trunk/templates/settings/import-key-words.php (modified) (1 diff)
-
trunk/templates/settings/nav-tabs.php (modified) (1 diff)
-
trunk/templates/settings/related-box-html.php (modified) (1 diff)
-
trunk/templates/settings/related-box.php (modified) (11 diffs)
-
trunk/templates/settings/settings.php (modified) (4 diffs)
-
trunk/uninstall.php (modified) (1 diff)
-
trunk/wp-link-and-cluster.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
laci-link-cluster/trunk/assets/admin/css/admin.css
r3165071 r3166563 9 9 } 10 10 11 .wp-internal-links-popup { 11 .laci-notice { 12 display: block !important; 13 } 14 15 .laci-internal-links-popup { 12 16 background: #fff; 13 17 padding: 20px; 14 18 } 15 19 16 . wp-internal-links-popup table {20 .laci-internal-links-popup table { 17 21 width: 100%; 18 22 border-collapse: collapse; 19 23 } 20 24 21 . wp-internal-links-popup th,22 . wp-internal-links-popup td {25 .laci-internal-links-popup th, 26 .laci-internal-links-popup td { 23 27 padding: 10px; 24 28 border: 1px solid #ddd; 25 29 } 26 30 27 . wp-internal-links-popup th {31 .laci-internal-links-popup th { 28 32 background: #f1f1f1; 29 33 text-align: left; … … 159 163 } 160 164 161 .laci-dashboard-page .column- categories,165 .laci-dashboard-page .column-taxonomies, 162 166 .laci-dashboard-page .column-key_words { 163 167 width: 13%; … … 285 289 } 286 290 287 .laci-dashboard-page # categories a,291 .laci-dashboard-page #taxonomies a, 288 292 .laci-dashboard-page #key_words a { 289 293 width: 60%; … … 361 365 } 362 366 363 .button -primary.laci-updating-message::after,367 .button.laci-updating-message::after, 364 368 .laci-loading.laci-updating-message::after { 365 369 color: #e10909; … … 588 592 display: inline-block; 589 593 } 590 591 .laci-link-assistant-item {592 display: none;593 } -
laci-link-cluster/trunk/assets/admin/css/link-assistant.css
r3165071 r3166563 49 49 } 50 50 51 .laci-placement-assistant .column- categories,51 .laci-placement-assistant .column-taxonomies, 52 52 .laci-placement-assistant .column-key_words { 53 53 width: 15%; … … 64 64 } 65 65 66 .laci-placement-assistant # categories {66 .laci-placement-assistant #taxonomies { 67 67 position: relative; 68 68 } … … 318 318 } 319 319 320 .admin_page_ wp-internal-links-assistant .ui-widget-header {320 .admin_page_laci-internal-links-assistant .ui-widget-header { 321 321 border: 1px solid #6bc623; 322 322 background: #6bc623; … … 325 325 } 326 326 327 .admin_page_ wp-internal-links-assistant .ui-widget.ui-widget-content {327 .admin_page_laci-internal-links-assistant .ui-widget.ui-widget-content { 328 328 border: 3px solid #6bc623; 329 329 padding: 0; -
laci-link-cluster/trunk/assets/admin/js/admin.js
r3165071 r3166563 21 21 if (response.success && response.data.html) { 22 22 // Show popup with response.data.html 23 const $popup = $('<div class=" wp-internal-links-popup"></div>').html(response.data.html);23 const $popup = $('<div class="laci-internal-links-popup"></div>').html(response.data.html); 24 24 const title = response.data.title; 25 25 $popup.dialog({ … … 113 113 jQuery('.laci-category-text').toggleClass('laci-display-none'); 114 114 115 jQuery('# categories .laci-categories-title').hide();116 jQuery('# categories .sorting-indicators').hide();115 jQuery('#taxonomies .laci-categories-title').hide(); 116 jQuery('#taxonomies .sorting-indicators').hide(); 117 117 118 118 jQuery('.laci-categories-action-change').show(); … … 126 126 jQuery('.laci-category-text').toggleClass('laci-display-none'); 127 127 128 jQuery('# categories .laci-categories-title').show();129 jQuery('# categories .sorting-indicators').show();128 jQuery('#taxonomies .laci-categories-title').show(); 129 jQuery('#taxonomies .sorting-indicators').show(); 130 130 131 131 jQuery('.laci-categories-action-change').hide(); … … 177 177 jQuery('.laci-category-text').toggleClass('laci-display-none'); 178 178 179 jQuery('# categories .laci-categories-title').show();180 jQuery('# categories .sorting-indicators').show();179 jQuery('#taxonomies .laci-categories-title').show(); 180 jQuery('#taxonomies .sorting-indicators').show(); 181 181 182 182 jQuery('.laci-categories-action-change').hide(); … … 431 431 if (response.success && response.data.html) { 432 432 // Show popup with response.data.html 433 const $popup = $('<div class=" wp-internal-links-popup"></div>').html(response.data.html);433 const $popup = $('<div class="laci-internal-links-popup"></div>').html(response.data.html); 434 434 $popup.dialog({ 435 435 title: 'Update Focus Keywords', -
laci-link-cluster/trunk/assets/admin/js/link-assistant.js
r3165071 r3166563 43 43 jQuery("#laci-current-data").attr('data-currentExcerpt', currentExcerpt); 44 44 45 jQuery('. wp-internal-links-popup').dialog('open');46 jQuery('. wp-internal-links-popup').dialog('option', 'title', title);45 jQuery('.laci-internal-links-popup').dialog('open'); 46 jQuery('.laci-internal-links-popup').dialog('option', 'title', title); 47 47 48 48 if (tinymce.get('popup-editor')) { … … 70 70 jQuery("#laci-current-data").attr('data-currentExcerpt', currentExcerpt); 71 71 72 jQuery('. wp-internal-links-popup').dialog('open');73 jQuery('. wp-internal-links-popup').dialog('option', 'title', title);72 jQuery('.laci-internal-links-popup').dialog('open'); 73 jQuery('.laci-internal-links-popup').dialog('option', 'title', title); 74 74 75 75 if (tinymce.get('popup-editor')) { … … 82 82 }, 83 83 createdPopup($) { 84 $('. wp-internal-links-popup').dialog({84 $('.laci-internal-links-popup').dialog({ 85 85 autoOpen: false, 86 86 title: 'Title', … … 138 138 }, 139 139 error: function(response) { 140 notification.showNotification('Key words can be updated');140 notification.showNotification('Key words can\'t be updated'); 141 141 } 142 142 }); … … 147 147 const keyWord = jQuery('.laci-search-input-control').val(); 148 148 const postId = jQuery('.laci-search-input-control').data('id'); 149 $('.laci-search-button').addClass('laci-updating-message'); 150 $('.laci-search-button').attr('disabled', 'disabled'); 149 151 150 152 jQuery.ajax({ … … 158 160 }, 159 161 success: function(response) { 162 $('.laci-search-button').removeClass('laci-updating-message'); 163 $('.laci-search-button').removeAttr('disabled', 'disabled'); 160 164 if (response.success && response.data) { 161 165 jQuery('.laci-search-results__same-category__content').html(response.data.html_same_cate); … … 212 216 }, 213 217 error: function(response) { 218 $('.laci-search-button').removeClass('laci-updating-message'); 219 $('.laci-search-button').removeAttr('disabled', 'disabled'); 214 220 console.log(response); 215 221 notification.showNotification('Search failed', true); … … 477 483 handleLoadMore($) { 478 484 $('.laci-load-more-same-category').click(function() { 479 let lacCurrentPage = $(this).data('set-paging') || 1;480 const lacMaxPages = $(this).data('max-pages');485 let wpilCurrentPage = $(this).data('set-paging') || 1; 486 const wpilMaxPages = $(this).data('max-pages'); 481 487 const postId = $(this).data('post-id'); 482 488 const keyWord = $(this).data('key-word'); … … 484 490 jQuery('.laci-loading').show(); 485 491 486 lacCurrentPage++;487 $(this).attr('data-set-paging', lacCurrentPage);492 wpilCurrentPage++; 493 $(this).attr('data-set-paging', wpilCurrentPage); 488 494 489 if ( lacCurrentPage <= lacMaxPages) {495 if (wpilCurrentPage <= wpilMaxPages) { 490 496 jQuery('.laci-loading').show(); 491 497 $.ajax({ … … 497 503 post_id: postId, 498 504 key_word: keyWord, 499 page: lacCurrentPage,505 page: wpilCurrentPage, 500 506 }, 501 507 success: function(response) { … … 503 509 if (response.success) { 504 510 $('.laci-search-results__same-category__content').append(response.data.html_same_cate); 505 if ( lacCurrentPage >= lacMaxPages) {511 if (wpilCurrentPage >= wpilMaxPages) { 506 512 jQuery('.laci-search-results__same-category__load-more').addClass('laci-display-none'); 507 513 } … … 517 523 518 524 $('.laci-load-more-diff-category').click(function() { 519 let lacCurrentPage = $(this).data('set-paging') || 1;520 const lacMaxPages = $(this).data('max-pages');525 let wpilCurrentPage = $(this).data('set-paging') || 1; 526 const wpilMaxPages = $(this).data('max-pages'); 521 527 const postId = $(this).data('post-id'); 522 528 const keyWord = $(this).data('key-word'); … … 524 530 jQuery('.laci-loading').show(); 525 531 526 lacCurrentPage++;527 $(this).attr('data-set-paging', lacCurrentPage);532 wpilCurrentPage++; 533 $(this).attr('data-set-paging', wpilCurrentPage); 528 534 529 if ( lacCurrentPage <= lacMaxPages) {535 if (wpilCurrentPage <= wpilMaxPages) { 530 536 jQuery('.laci-loading').show(); 531 537 $.ajax({ … … 537 543 post_id: postId, 538 544 key_word: keyWord, 539 page: lacCurrentPage,545 page: wpilCurrentPage, 540 546 }, 541 547 success: function(response) { … … 543 549 if (response.success) { 544 550 $('.laci-search-results__diff-category__content').append(response.data.html_diff_cate); 545 if ( lacCurrentPage >= lacMaxPages) {551 if (wpilCurrentPage >= wpilMaxPages) { 546 552 jQuery('.laci-search-results__diff-category__load-more').addClass('laci-display-none'); 547 553 } … … 575 581 const relatedPostTitle = $('.laci-placement-assistant-title').data('title'); 576 582 const keywords = $('.laci-search-input-control').val(); 577 583 $(this).addClass('laci-updating-message'); 584 $(this).attr('disabled', 'disabled'); 585 578 586 jQuery.ajax({ 579 587 url: laci_internal_links.ajax_url, … … 588 596 success: function (response) { 589 597 if (response.success === true) { 598 $('.laci-add-related-box').removeClass('laci-updating-message'); 599 $('.laci-add-related-box').removeAttr('disabled'); 590 600 if (response.success && response.data.html) { 591 601 let $popup = $(".laci-add-related-box-popup"); … … 726 736 setTimeout(function() { 727 737 scrollToTarget(); 728 }, 200);738 }, 500); 729 739 } 730 740 }); … … 734 744 } 735 745 }, 746 error: function(response) { 747 $('.laci-add-related-box').removeClass('laci-updating-message'); 748 $('.laci-add-related-box').removeAttr('disabled'); 749 alert('Error: Failed to get content post.'); 750 } 736 751 }); 752 753 737 754 }); 738 755 }, -
laci-link-cluster/trunk/assets/admin/js/settings.js
r3165071 r3166563 1 const lacSettings = {2 lacColorPicker($) {1 const wpilSettings = { 2 wpilColorPicker($) { 3 3 jQuery('#laci-bg-color').wpColorPicker(); 4 4 jQuery('#laci-bd-color').wpColorPicker(); … … 84 84 importKeywords(); 85 85 }); 86 }, 87 uploadImage($) { 88 var wp_media_frame; 89 90 $('#laci-related-box-image-upload').on('click', function(e) { 91 e.preventDefault(); 92 93 // If the media frame already exists, reopen it. 94 if (wp_media_frame) { 95 wp_media_frame.open(); 96 return; 97 } 98 99 // Create the media frame. 100 wp_media_frame = wp.media.frames.wp_media_frame = wp.media({ 101 title: 'Select Image for Related Box', 102 button: { 103 text: 'Use this image', 104 }, 105 multiple: false 106 }); 107 108 // When an image is selected, run a callback. 109 wp_media_frame.on('select', function() { 110 var attachment = wp_media_frame.state().get('selection').first().toJSON(); 111 $('#laci-related-box-image').val(attachment.url); // Set the input value to the image URL 112 }); 113 114 // Finally, open the modal. 115 wp_media_frame.open(); 116 }); 86 117 } 87 118 } 88 119 89 120 jQuery(document).ready(function($){ 90 lacSettings.lacColorPicker($); 91 lacSettings.importKeyWordsRankMath($); 92 lacSettings.importKeyWordsYoast($); 121 wpilSettings.wpilColorPicker($); 122 wpilSettings.importKeyWordsRankMath($); 123 wpilSettings.importKeyWordsYoast($); 124 wpilSettings.uploadImage($); 93 125 }); -
laci-link-cluster/trunk/includes/Deactivate.php
r3165071 r3166563 10 10 11 11 public static function delete_shortcode() { 12 update_option( 'laci_delete_shortcode_in_deactivate', 0 ); 12 $laci_delete_shortcode_in_deactivate = get_option( 'laci_delete_shortcode_in_deactivate', 0 ); 13 if ( $laci_delete_shortcode_in_deactivate ) { 14 laci_delete_shortcode(); 15 } 13 16 } 14 17 } -
laci-link-cluster/trunk/includes/Functions.php
r3165071 r3166563 34 34 } 35 35 } 36 37 if ( ! function_exists( 'laci_delete_shortcode' ) ) { 38 /** 39 * The function `laci_delete_shortcode` removes the shortcode from the post content. 40 * 41 */ 42 function laci_delete_shortcode() { 43 global $wpdb; 44 45 // Pattern to match the entire Gutenberg block containing the shortcode 46 $pattern = '<!-- wp:shortcode -->\s*\[laci_related_post_content[^\]]*\]\s*<!-- \/wp:shortcode -->'; 47 48 // Update the posts' content by removing the matched blocks 49 $wpdb->query( 50 $wpdb->prepare( 51 "UPDATE {$wpdb->posts} SET post_content = REGEXP_REPLACE(post_content, %s, '')", 52 $pattern 53 ) 54 ); 55 } 56 } -
laci-link-cluster/trunk/includes/Utils/Helpers.php
r3165071 r3166563 9 9 10 10 public static function wp_kses_allowed_html( $cus_attr_tags = [] ) { 11 $allowed_html_tags = wp_kses_allowed_html( 'post' ); 12 $allowed_html_tags['style'] = true; 11 $allowed_html_tags = wp_kses_allowed_html( 'post' ); 12 13 $allowed_html_tags['style'] = true; 14 15 $allowed_html_tags['select'] = [ 16 'id' => true, 17 'class' => true, 18 'name' => true, 19 'style' => true, 20 'multiple' => true, 21 'data-id' => true, 22 ]; 23 24 $allowed_html_tags['option'] = [ 25 'value' => true, 26 'selected' => true, 27 'style' => true, 28 'class' => true, 29 'data-id' => true, 30 ]; 31 13 32 $allowed_html_tags['script'] = true; 14 $allowed_html_attr = $cus_attr_tags; 33 34 $allowed_html_attr = $cus_attr_tags; 15 35 16 36 return array_map( -
laci-link-cluster/trunk/readme.txt
r3165075 r3166563 5 5 Tested up to: 6.6 6 6 Requires PHP: 7.1.0 7 Stable tag: 1.0. 07 Stable tag: 1.0.1 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 44 44 = 1.0.0 = 45 45 * Initial release 46 47 == Upgrade Notice == 48 49 = 1.0.0 = 50 This is the initial release of the Link and Cluster plugin. 46 = 1.0.1 = 47 * Update security 51 48 52 49 == Screenshots == -
laci-link-cluster/trunk/templates/dashboard/column-title.php
r3165071 r3166563 11 11 <span class="laci-title-action-item laci-link-assistant-item"> 12 12 <span class="dashicons dashicons-search"></span> 13 <a class="link-assistant" target="_blank" href="<?php echo esc_attr( $link_assistant ); ?>"><?php esc_html_e( 'Internal Link Opportunities', 'l ink-and-cluster-automated-seo-link-builder-for-your-site' ); ?></a>13 <a class="link-assistant" target="_blank" href="<?php echo esc_attr( $link_assistant ); ?>"><?php esc_html_e( 'Internal Link Opportunities', 'laci-link-cluster' ); ?></a> 14 14 </span> 15 15 <span class="laci-title-action-item laci-update-internal-link-item"> 16 16 <span class="dashicons dashicons-image-rotate"></span> 17 <a class="update-internal-link" data-id="<?php echo esc_attr( $item->ID ); ?>"><?php esc_html_e( 'Update Link Count', 'l ink-and-cluster-automated-seo-link-builder-for-your-site' ); ?></a>17 <a class="update-internal-link" data-id="<?php echo esc_attr( $item->ID ); ?>"><?php esc_html_e( 'Update Link Count', 'laci-link-cluster' ); ?></a> 18 18 </span> 19 19 <span class="laci-title-action-item laci-update-focus-keywords"> 20 20 <span class="dashicons dashicons-edit"></span> 21 <a class="laci-action-update-focus-keywords" data-id="<?php echo esc_attr( $item->ID ); ?>"><?php esc_html_e( 'Focus Keywords', 'l ink-and-cluster-automated-seo-link-builder-for-your-site' ); ?></a>21 <a class="laci-action-update-focus-keywords" data-id="<?php echo esc_attr( $item->ID ); ?>"><?php esc_html_e( 'Focus Keywords', 'laci-link-cluster' ); ?></a> 22 22 </span> 23 23 </div> -
laci-link-cluster/trunk/templates/dashboard/dashboard.php
r3165071 r3166563 6 6 <div class="logo"> 7 7 <img src="<?php echo esc_url( LACI_INTERNAL_LINKS_PLUGIN_URL . 'assets/admin/images/logo.png' ); ?>" alt="WP Internal Links"> 8 <h2><?php esc_html_e( 'Report & Cluster Cockpit', 'l ink-and-cluster-automated-seo-link-builder-for-your-site' ); ?></h2>8 <h2><?php esc_html_e( 'Report & Cluster Cockpit', 'laci-link-cluster' ); ?></h2> 9 9 </div> 10 10 -
laci-link-cluster/trunk/templates/dashboard/popup-info.php
r3165071 r3166563 1 1 <?php 2 2 defined( 'ABSPATH' ) || exit; 3 $taxonomy_data = get_option( 'laci_internallinks_taxonomy', 'category' ); 4 $taxonomy_data = get_taxonomy( $taxonomy_data ); 3 5 6 $terms = get_the_term_list( $post_id, $taxonomy_data->name, '', ', ', '' ); 4 7 ?> 5 8 6 <h3><?php echo esc_html__( 'Information for: ', 'l ink-and-cluster-automated-seo-link-builder-for-your-site' ) . esc_html( $post_title ); ?></h3>9 <h3><?php echo esc_html__( 'Information for: ', 'laci-link-cluster' ) . esc_html( $post_title ); ?></h3> 7 10 8 11 <?php … … 12 15 <thead> 13 16 <tr> 14 <th><?php e sc_html_e( 'Category Name', 'link-and-cluster-automated-seo-link-builder-for-your-site'); ?></th>15 <th><?php esc_html_e( 'Linked', 'l ink-and-cluster-automated-seo-link-builder-for-your-site' ); ?></th>17 <th><?php echo esc_html( $taxonomy_data->label ); ?></th> 18 <th><?php esc_html_e( 'Linked', 'laci-link-cluster' ); ?></th> 16 19 </tr> 17 20 </thead> … … 19 22 <?php foreach ( $links as $item ) : ?> 20 23 <tr> 21 <td><?php echo wp_kses_post( $ item['category_name']); ?></td>24 <td><?php echo wp_kses_post( $terms ); ?></td> 22 25 <td><?php echo wp_kses_post( $item['linked'] ); ?></td> 23 26 </tr> … … 31 34 <thead> 32 35 <tr> 33 <th><?php esc_html_e( 'Title', 'l ink-and-cluster-automated-seo-link-builder-for-your-site' ); ?></th>34 <th><?php esc_html_e( 'Type', 'l ink-and-cluster-automated-seo-link-builder-for-your-site' ); ?></th>35 <th><?php e sc_html_e( 'Categories', 'link-and-cluster-automated-seo-link-builder-for-your-site'); ?></th>36 <th><?php esc_html_e( 'Anchor Text', 'l ink-and-cluster-automated-seo-link-builder-for-your-site' ); ?></th>36 <th><?php esc_html_e( 'Title', 'laci-link-cluster' ); ?></th> 37 <th><?php esc_html_e( 'Type', 'laci-link-cluster' ); ?></th> 38 <th><?php echo esc_html( $taxonomy_data->label ); ?></th> 39 <th><?php esc_html_e( 'Anchor Text', 'laci-link-cluster' ); ?></th> 37 40 </tr> 38 41 </thead> … … 42 45 <td><a href="<?php echo esc_url( get_edit_post_link( $item['ID'] ) ); ?>"><?php echo esc_html( $item['title'] ); ?></a></td> 43 46 <td><?php echo esc_html( ucfirst( $item['type'] ) ); ?></td> 44 <td><?php echo wp_kses_post( $ item['categories']); ?></td>47 <td><?php echo wp_kses_post( $terms ); ?></td> 45 48 <td><?php echo wp_kses_post( $item['anchor_text'] ); ?></td> 46 49 </tr> -
laci-link-cluster/trunk/templates/dashboard/table-report.php
r3165071 r3166563 2 2 defined( 'ABSPATH' ) || exit; 3 3 4 use LACI_InternalLinks\Controllers\ LACI_CreatePostListTableController;4 use LACI_InternalLinks\Controllers\CreatePostListTableController; 5 5 6 6 $nonce = isset( $_REQUEST['nonce'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['nonce'] ) ) : ''; 7 if ( ! empty( $nonce ) && ! wp_verify_nonce( $nonce, ' wp-internal-links-nonce' ) ) {7 if ( ! empty( $nonce ) && ! wp_verify_nonce( $nonce, 'laci-internal-links-nonce' ) ) { 8 8 wp_die( 'Security check' ); 9 9 } 10 10 11 $post_list_table = LACI_CreatePostListTableController::get_instance();11 $post_list_table = CreatePostListTableController::get_instance(); 12 12 13 13 $post_list_table->prepare_items(); … … 42 42 <?php 43 43 $links = [ 44 'all' => [ esc_html__( 'All', 'l ink-and-cluster-automated-seo-link-builder-for-your-site' ), $all_count ],45 'page' => [ esc_html__( 'Only Page', 'l ink-and-cluster-automated-seo-link-builder-for-your-site' ), $page_count ],46 'post' => [ esc_html__( 'Only Post', 'l ink-and-cluster-automated-seo-link-builder-for-your-site' ), $post_count ],47 'other' => [ esc_html__( 'Other Post Type', 'l ink-and-cluster-automated-seo-link-builder-for-your-site' ), $other_count ],48 'orphan' => [ esc_html__( 'Only Orphan Page', 'l ink-and-cluster-automated-seo-link-builder-for-your-site' ), $orphan_count ],44 'all' => [ esc_html__( 'All', 'laci-link-cluster' ), $all_count ], 45 'page' => [ esc_html__( 'Only Page', 'laci-link-cluster' ), $page_count ], 46 'post' => [ esc_html__( 'Only Post', 'laci-link-cluster' ), $post_count ], 47 'other' => [ esc_html__( 'Other Post Type', 'laci-link-cluster' ), $other_count ], 48 'orphan' => [ esc_html__( 'Only Orphan Page', 'laci-link-cluster' ), $orphan_count ], 49 49 ]; 50 51 52 50 53 51 foreach ( $links as $key => $label_count ) { 54 52 $class = ( $get_post_type === $key || ( $only_orphan && 'orphan' === $key ) ) ? 'class="current"' : ''; 55 56 $href = add_query_arg( 57 [ 58 'get_post_type' => 'orphan' !== $key ? $key : '', 59 'only_orphan' => 'orphan' === $key ? '1' : '', 60 'page' => 'laci_internal_links_dashboard', 61 ] 53 $href = add_query_arg( 54 array_merge( 55 $_REQUEST, 56 [ 57 'get_post_type' => 'orphan' !== $key ? $key : '', 58 'only_orphan' => 'orphan' === $key ? '1' : '', 59 'page' => 'laci_internal_links_dashboard', 60 ] 61 ) 62 62 ); 63 63 // $href = remove_query_arg( … … 88 88 <input type="hidden" name="only_orphan" value="<?php echo esc_html( $only_orphan ); ?>"> 89 89 <input type="hidden" name="page" value="laci_internal_links_dashboard"> 90 <input type="hidden" name="nonce" value="<?php echo wp_kses_post( wp_create_nonce( ' wp-internal-links-nonce' ) ); ?>">90 <input type="hidden" name="nonce" value="<?php echo wp_kses_post( wp_create_nonce( 'laci-internal-links-nonce' ) ); ?>"> 91 91 <input type="search" id="search_id-search-input" name="s" value="<?php echo esc_html( $search_value ); ?>"> 92 92 <input type="submit" id="search-submit" class="button" value="Search"> 93 <select name="category" id="category"> 94 <option value=""><?php esc_html_e( 'All Category', 'link-and-cluster-automated-seo-link-builder-for-your-site' ); ?></option> 95 <?php 96 $selected_category = isset( $_GET['category'] ) ? sanitize_text_field( wp_unslash( $_GET['category'] ) ) : ''; 97 $categories = get_categories(); 93 <?php 94 $taxonomy_val = get_option( 'laci_internallinks_taxonomy', 'category' ); 98 95 99 foreach ( $categories as $cate_item ) { 100 $selected = strval( $cate_item->term_id ) === $selected_category ? 'selected' : ''; 101 echo '<option value="' . esc_attr( $cate_item->term_id ) . '" ' . esc_attr( $selected ) . '>' . esc_html( $cate_item->name ) . '</option>'; 102 } 103 104 ?> 105 </select> 96 wp_dropdown_categories( 97 [ 98 'taxonomy' => $taxonomy_val, 99 'hide_empty' => false, 100 'name' => 'category', 101 'id' => 'category', 102 'show_option_all' => __( 'All Terms', 'laci-link-cluster' ), 103 'selected' => isset( $_GET['category'] ) ? intval( $_GET['category'] ) : 0, 104 'hierarchical' => true, 105 'value_field' => 'term_id', 106 ] 107 ); 108 ?> 106 109 <input type="submit" value="Filter" class="button"> 107 108 110 <div class="clear"></div> 109 111 <input type="hidden" name="page" value="laci_internal_links_dashboard"> 110 <input type="hidden" name="nonce" value="<?php echo wp_kses_post( wp_create_nonce( ' wp-internal-links-nonce' ) ); ?>">112 <input type="hidden" name="nonce" value="<?php echo wp_kses_post( wp_create_nonce( 'laci-internal-links-nonce' ) ); ?>"> 111 113 <div class="laci-filter-link-group"> 112 114 <div> 113 115 <div class="laci-filter-link-item"> 114 <label class="laci-label-filter-number" for="quantity"><?php esc_html_e( 'INBOUND LINKS ENTIRE SITE', 'l ink-and-cluster-automated-seo-link-builder-for-your-site' ); ?></label>116 <label class="laci-label-filter-number" for="quantity"><?php esc_html_e( 'INBOUND LINKS ENTIRE SITE', 'laci-link-cluster' ); ?></label> 115 117 <input class="laci-filter-link" style="width: 70px" type="number" id="quantity" name="inbound_link_entire_site_quantity_from" min="0" max="9000" value="<?php echo esc_attr( $inbound_link_entire_site_quantity_from ); ?>" placeholder="from"> 116 118 <input class="laci-filter-link" style="width: 70px" type="number" id="quantity" name="inbound_link_entire_site_quantity_to" min="0" max="9000" value="<?php echo esc_attr( $inbound_link_entire_site_quantity_to ); ?>" placeholder="to"> … … 118 120 </div> 119 121 <div class="laci-filter-link-item"> 120 <label class="laci-label-filter-number" for="quantity"><?php esc_html_e( 'OUTBOUND LINKS ENTIRE SITE', 'l ink-and-cluster-automated-seo-link-builder-for-your-site' ); ?></label>122 <label class="laci-label-filter-number" for="quantity"><?php esc_html_e( 'OUTBOUND LINKS ENTIRE SITE', 'laci-link-cluster' ); ?></label> 121 123 <input class="laci-filter-link" style="width: 70px" type="number" id="quantity" name="outbound_link_entire_site_quantity_from" min="0" max="9000" value="<?php echo esc_attr( $outbound_link_entire_site_quantity_from ); ?>" placeholder="from"> 122 124 <input class="laci-filter-link" style="width: 70px" type="number" id="quantity" name="outbound_link_entire_site_quantity_to" min="0" max="9000" value="<?php echo esc_attr( $outbound_link_entire_site_quantity_to ); ?>" placeholder="to"> … … 125 127 <div> 126 128 <div class="laci-filter-link-item"> 127 <label class="laci-label-filter-number" for="quantity"><?php esc_html_e( 'INBOUND LINKS SAME CLUSTER', 'l ink-and-cluster-automated-seo-link-builder-for-your-site' ); ?></label>129 <label class="laci-label-filter-number" for="quantity"><?php esc_html_e( 'INBOUND LINKS SAME CLUSTER', 'laci-link-cluster' ); ?></label> 128 130 <input class="laci-filter-link" style="width: 70px" type="number" id="quantity" name="inbound_links_in_category_quantity_from" min="0" max="9000" value="<?php echo esc_attr( $inbound_links_in_category_quantity_from ); ?>" placeholder="from"> 129 131 <input class="laci-filter-link" style="width: 70px" type="number" id="quantity" name="inbound_links_in_category_quantity_to" min="0" max="9000" value="<?php echo esc_attr( $inbound_links_in_category_quantity_to ); ?>" placeholder="to"> 130 132 </div> 131 133 <div class="laci-filter-link-item"> 132 <label class="laci-label-filter-number" for="quantity"><?php esc_html_e( 'OUTBOUND LINKS SAME CLUSTER', 'l ink-and-cluster-automated-seo-link-builder-for-your-site' ); ?></label>134 <label class="laci-label-filter-number" for="quantity"><?php esc_html_e( 'OUTBOUND LINKS SAME CLUSTER', 'laci-link-cluster' ); ?></label> 133 135 <input class="laci-filter-link" style="width: 70px" type="number" id="quantity" name="outbound_links_in_category_quantity_from" min="0" max="9000" value="<?php echo esc_attr( $outbound_links_in_category_quantity_from ); ?>" placeholder="from"> 134 136 <input class="laci-filter-link" style="width: 70px" type="number" id="quantity" name="outbound_links_in_category_quantity_to" min="0" max="9000" value="<?php echo esc_attr( $outbound_links_in_category_quantity_to ); ?>" placeholder="to"> … … 147 149 <span class="laci-action-update-post-to-db"> 148 150 <span class="dashicons dashicons-update laci-icon-update-post"></span> 149 <?php esc_html_e( 'Update Link Count for the Entire Site', 'l ink-and-cluster-automated-seo-link-builder-for-your-site' ); ?>151 <?php esc_html_e( 'Update Link Count for the Entire Site', 'laci-link-cluster' ); ?> 150 152 </span> 151 153 <span class="laci-percent-updated"><span class="laci-percent-number">0</span><span>% Updated</span></span> 152 154 <?php if ( ! empty( get_option( 'laci_last_updated_date' ) ) && ! empty( get_option( 'laci_last_updated_time' ) ) ) { ?> 153 <span class="laci-time-updated">[<?php esc_html_e( 'Last Update:', 'l ink-and-cluster-automated-seo-link-builder-for-your-site' ); ?> <?php echo esc_html( get_option( 'laci_last_updated_time' ) ); ?> on <?php echo esc_html( get_option( 'laci_last_updated_date' ) ); ?>]</span>155 <span class="laci-time-updated">[<?php esc_html_e( 'Last Update:', 'laci-link-cluster' ); ?> <?php echo esc_html( get_option( 'laci_last_updated_time' ) ); ?> on <?php echo esc_html( get_option( 'laci_last_updated_date' ) ); ?>]</span> 154 156 <?php } ?> 155 157 </div> -
laci-link-cluster/trunk/templates/meta-box/suggestion-table.php
r3165071 r3166563 2 2 defined( 'ABSPATH' ) || exit; 3 3 ?> 4 <style> 5 table { 6 width: 100%; 7 border-collapse: collapse; 8 } 9 10 table th { 11 background-color: #f1f1f1; 12 border: 1px solid #ddd; 13 padding: 8px; 14 text-align: left; 15 } 16 17 table td { 18 border: 1px solid #ddd; 19 padding: 8px; 20 } 21 22 table td.copy { 23 text-align: center; 24 } 25 </style> 4 26 5 27 <table class="laci-table-suggested"> 6 28 <thead> 7 29 <tr> 8 <th><b><?php esc_html_e( 'Phrases In This Post To Link From', 'l ink-and-cluster-automated-seo-link-builder-for-your-site' ); ?></b></th>9 <th><b><?php esc_html_e( 'Suggested Posts To Link To', 'l ink-and-cluster-automated-seo-link-builder-for-your-site' ); ?></b></th>10 <th><b><?php esc_html_e( 'Action', 'l ink-and-cluster-automated-seo-link-builder-for-your-site' ); ?></b></th>30 <th><b><?php esc_html_e( 'Phrases In This Post To Link From', 'laci-link-cluster' ); ?></b></th> 31 <th><b><?php esc_html_e( 'Suggested Posts To Link To', 'laci-link-cluster' ); ?></b></th> 32 <th><b><?php esc_html_e( 'Action', 'laci-link-cluster' ); ?></b></th> 11 33 </tr> 12 34 </thead> … … 19 41 <td> 20 42 <div> 21 <strong><?php esc_html_e( 'Title', 'l ink-and-cluster-automated-seo-link-builder-for-your-site' ); ?></strong>43 <strong><?php esc_html_e( 'Title', 'laci-link-cluster' ); ?></strong> 22 44 <span><i><strong><?php echo esc_html( $suggestion['title_post_outbound'] ); ?></strong></i></span> 23 45 </div> 24 46 <div> 25 <strong><?php esc_html_e( 'Url:', 'l ink-and-cluster-automated-seo-link-builder-for-your-site' ); ?></strong>47 <strong><?php esc_html_e( 'Url:', 'laci-link-cluster' ); ?></strong> 26 48 <span><a href="<?php echo esc_url( $suggestion['url_post_outbound'] ); ?>"><?php echo esc_url( $suggestion['url_post_outbound'] ); ?></a></span> 27 49 </div> 28 50 </td> 29 51 <td> 30 <button class="button button-primary laci-table-suggested-button-copy"><?php esc_html_e( 'Copy', 'l ink-and-cluster-automated-seo-link-builder-for-your-site' ); ?></button>52 <button class="button button-primary laci-table-suggested-button-copy"><?php esc_html_e( 'Copy', 'laci-link-cluster' ); ?></button> 31 53 </td> 32 54 </tr> -
laci-link-cluster/trunk/templates/placement-assistant/box-content.php
r3165071 r3166563 1 1 <?php 2 defined( 'ABSPATH' ) || exit;3 2 $laci_related_box__content = get_option( 'laci_related_box__content', '' ); 4 3 $laci_related_box__title = get_option( 'laci_related_box__title', '0' ); … … 13 12 $list_key_word = explode( ',', $key_words ); 14 13 15 $key_word = $list_key_word[0]; 16 $firt_location = strpos( $post_content, $key_word ) ? strpos( $post_content, $key_word ) : strlen( $post_content ); 14 $key_word = $list_key_word[0]; 15 16 $firt_location = stripos( $post_content, $key_word ) ? stripos( $post_content, $key_word ) : strlen( $post_content ); 17 17 18 18 foreach ( $list_key_word as $item ) { 19 $location = str pos( $post_content, $item);19 $location = stripos( $post_content, trim( $item ) ); 20 20 if ( $location && ( $location < $firt_location ) ) { 21 21 $key_word = $item; -
laci-link-cluster/trunk/templates/placement-assistant/diff-category.php
r3165071 r3166563 2 2 defined( 'ABSPATH' ) || exit; 3 3 4 use LACI_InternalLinks\Controllers\ LACI_CreatePostListTableController;5 use LACI_InternalLinks\Controllers\ LACI_InternalLinksController;4 use LACI_InternalLinks\Controllers\CreatePostListTableController; 5 use LACI_InternalLinks\Controllers\InternalLinksController; 6 6 7 7 if ( empty( $result_diff_cat ) ) { … … 28 28 <div class="laci-left-section"> 29 29 <div class="laci-category"> 30 <h3 style="margin-top:0"><?php e sc_html_e( 'Category: ', 'link-and-cluster-automated-seo-link-builder-for-your-site'); ?></h3>31 <span><?php laci_kses_post_e( LACI_CreatePostListTableController::get_hierarchical_categories( $post_id_data ) ); ?></span>30 <h3 style="margin-top:0"><?php echo esc_html( $taxonomy_data->label ); ?></h3> 31 <span><?php laci_kses_post_e( CreatePostListTableController::get_hierarchical_categories( $post_id_data ) ); ?></span> 32 32 </div> 33 33 </div> … … 47 47 </div> 48 48 <div class="laci-diff-cat-action"> 49 <span class="laci-diff-cat-num-results"><?php echo ( esc_html( $total_results ) . esc_html__( ' - Search Results', 'l ink-and-cluster-automated-seo-link-builder-for-your-site' ) ); ?></span>50 <button class="button laci-diff-cat-content-previous" disabled><?php esc_html_e( '<< Previous', 'l ink-and-cluster-automated-seo-link-builder-for-your-site' ); ?></button>51 <button class="button laci-diff-cat-content-next" <?php echo esc_attr( $total_results < 2 ? 'disabled' : '' ); ?>><?php esc_html_e( 'Next >>', 'l ink-and-cluster-automated-seo-link-builder-for-your-site' ); ?></button>52 <button class="button laci-diff-cat-content-edit"><?php esc_html_e( 'Edit & Place Link', 'l ink-and-cluster-automated-seo-link-builder-for-your-site' ); ?></button>53 <button class="button laci-add-related-box"><?php esc_html_e( 'Add Related Box', 'l ink-and-cluster-automated-seo-link-builder-for-your-site' ); ?></button>49 <span class="laci-diff-cat-num-results"><?php echo ( esc_html( $total_results ) . esc_html__( ' - Search Results', 'laci-link-cluster' ) ); ?></span> 50 <button class="button laci-diff-cat-content-previous" disabled><?php esc_html_e( '<< Previous', 'laci-link-cluster' ); ?></button> 51 <button class="button laci-diff-cat-content-next" <?php echo esc_attr( $total_results < 2 ? 'disabled' : '' ); ?>><?php esc_html_e( 'Next >>', 'laci-link-cluster' ); ?></button> 52 <button class="button laci-diff-cat-content-edit"><?php esc_html_e( 'Edit & Place Link', 'laci-link-cluster' ); ?></button> 53 <button class="button laci-add-related-box"><?php esc_html_e( 'Add Related Box', 'laci-link-cluster' ); ?></button> 54 54 </div> 55 55 </div> 56 56 <div class="laci-right-section"> 57 <div><?php echo esc_html__( 'Outgoing Links to', 'l ink-and-cluster-automated-seo-link-builder-for-your-site' ) . esc_html( $post_title ); ?>: <?php echo esc_html( LACI_InternalLinksController::laci_count_outbound_links_between_posts( $post_id_data, $post_id_main ) ); ?></div>58 <div><?php echo esc_html__( 'Outbound Internal Links:', 'l ink-and-cluster-automated-seo-link-builder-for-your-site' ) . esc_html( count( LACI_InternalLinksController::laci_get_outbound_internal_links( $post_id_data ) ) ); ?></div>59 <div><?php echo esc_html__( 'Inbound Internal Links:', 'l ink-and-cluster-automated-seo-link-builder-for-your-site' ) . esc_html( count( LACI_InternalLinksController::laci_get_inbound_internal_links( $post_id_data ) ) ); ?></div>57 <div><?php echo esc_html__( 'Outgoing Links to', 'laci-link-cluster' ) . esc_html( $post_title ); ?>: <?php echo esc_html( InternalLinksController::count_outbound_links_between_posts( $post_id_data, $post_id_main ) ); ?></div> 58 <div><?php echo esc_html__( 'Outbound Internal Links:', 'laci-link-cluster' ) . esc_html( count( InternalLinksController::get_outbound_internal_links( $post_id_data ) ) ); ?></div> 59 <div><?php echo esc_html__( 'Inbound Internal Links:', 'laci-link-cluster' ) . esc_html( count( InternalLinksController::get_inbound_internal_links( $post_id_data ) ) ); ?></div> 60 60 </div> 61 61 </div> -
laci-link-cluster/trunk/templates/placement-assistant/placement-assistant.php
r3165071 r3166563 1 1 <?php 2 2 defined( 'ABSPATH' ) || exit; 3 use LACI_InternalLinks\Controllers\L ACI_LinkAssistantController;3 use LACI_InternalLinks\Controllers\LinkAssistantController; 4 4 5 $post_table = L ACI_LinkAssistantController::get_instance();5 $post_table = LinkAssistantController::get_instance(); 6 6 $post_table->prepare_items(); 7 7 8 8 $nonce = isset( $_REQUEST['nonce'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['nonce'] ) ) : ''; 9 if ( ! empty( $nonce ) && ! wp_verify_nonce( $nonce, ' wp-internal-links-nonce' ) ) {9 if ( ! empty( $nonce ) && ! wp_verify_nonce( $nonce, 'laci-internal-links-nonce' ) ) { 10 10 wp_die( 'Security check' ); 11 11 } … … 18 18 $key_words_implode = is_array( $key_words ) ? implode( ',', $key_words ) : ''; 19 19 20 $content = ''; 21 $editor_id = 'popup-editor'; 22 $settings = [ 23 'textarea_name' => 'popup-editor', 24 'media_buttons' => true, 25 'teeny' => false, 26 'quicktags' => true, 27 'tinymce' => [ 28 'plugins' => 'wordpress, wplink, wpeditimage, custom_button_add_link', 29 'toolbar1' => 'undo redo | styleselect | bold italic fontsizeselect hr alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | mediaImageLibrary | mediaimagelibrary fullscreen shortcodeList | custom_button_add_link', 30 'height' => 180, 31 'content_css' => LACI_INTERNAL_LINKS_PLUGIN_URL . 'assets/admin/css/laci-editor-style.css', 32 ], 33 ]; 20 $taxonomy_data = get_option( 'laci_internallinks_taxonomy', 'category' ); 21 $taxonomy_data = get_taxonomy( $taxonomy_data ); 34 22 35 23 ?> 36 <div class="wp-internal-links-popup" title="Text Editor" style="display: none;"> 37 <?php wp_editor( $content, $editor_id, $settings ); ?> 38 </div> 39 <div id="laci-current-data" style="display: none;"></div> 24 <div class="laci-laci-placement-assistant-container"> 25 <div class="laci-laci-placement-assistant-update-pro"> 26 <div class="laci-update-pro-text"> 27 <a class="button button-primary laci-buy-pro" href="https://linkandcluster.com/" target="_blank"> 28 <?php esc_html_e( 'Note: This is just a demo. To get it please buy our pro version', 'laci-link-cluster' ); ?> 29 </a> 30 </div> 31 </div> 40 32 41 <div class="laci-placement-assistant"> 42 <div class="wrap"> 43 <div class="laci-placement-assistant-title" data-link="<?php echo esc_attr( $post_link ); ?>" data-title="<?php echo esc_attr( $post_title ); ?>" data-id="<?php echo esc_attr( $post_id_data ); ?>" data-keywords="<?php echo esc_attr( $key_words_implode ); ?>"> 44 <h1><?php echo ( esc_html__( 'Link Assistant to find Link Opportunities for: ', 'link-and-cluster-automated-seo-link-builder-for-your-site' ) . esc_html( $post_title ) ); ?></h1> 45 </div> 46 <div> 47 <?php $post_table->display(); ?> 48 </div> 49 <div class="laci-search-group"> 50 <div class="laci-search-control"> 51 <input type="text" class="laci-search-input-control" placeholder="key_word1, key_word2,..." style="width:100%;height:50px" data-id="<?php echo esc_html( $post_id_data ); ?>"> 52 <p class="laci-insert-main-key-word"><?php esc_html_e( '[ INSERT MAIN KEYWORDS FOR THE POST ]', 'link-and-cluster-automated-seo-link-builder-for-your-site' ); ?></p> 33 <div class="laci-placement-assistant"> 34 <div class="wrap"> 35 <div class="laci-placement-assistant-title" data-link="<?php echo esc_attr( $post_link ); ?>" data-title="<?php echo esc_attr( $post_title ); ?>" data-id="<?php echo esc_attr( $post_id_data ); ?>" data-keywords="<?php echo esc_attr( $key_words_implode ); ?>"> 36 <h1><?php echo ( esc_html__( 'Link Assistant to find Link Opportunities for: ', 'laci-link-cluster' ) . esc_html( $post_title ) ); ?></h1> 53 37 </div> 54 < button class="button laci-search-button"><?php esc_html_e( 'Search', 'link-and-cluster-automated-seo-link-builder-for-your-site' ); ?></button>55 </div>56 <div class="laci-search-text"><?php esc_html_e( 'Search Results:', 'link-and-cluster-automated-seo-link-builder-for-your-site' ); ?></div>57 <div class="laci-search-results-group">58 <div class="laci-search-results__same-category">59 <div class="laci-search-results__same-category__title">60 <p class="laci- text-title"><?php esc_html_e( 'SAME CATEGORY / CLUSTER: IN-TEXT LINK OPPORTUNITIES', 'link-and-cluster-automated-seo-link-builder-for-your-site' ); ?></p>38 <div> 39 <?php $post_table->display(); ?> 40 </div> 41 <div class="laci-search-group"> 42 <div class="laci-search-control"> 43 <input type="text" class="laci-search-input-control" placeholder="key_word1, key_word2,..." style="width:100%;height:50px" data-id="<?php echo esc_html( $post_id_data ); ?>"> 44 <p class="laci-insert-main-key-word"><?php esc_html_e( '[ INSERT MAIN KEYWORDS FOR THE POST ]', 'laci-link-cluster' ); ?></p> 61 45 </div> 62 <div class="laci-search-results__same-category__content"> 63 <?php 64 $post_id_main = isset( $_REQUEST['post_id'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['post_id'] ) ) : ''; 65 //$key_word = isset( $_REQUEST['key_word'] ) ? sanitize_text_field( $_REQUEST['key_word'] ) : ''; 66 $key_word = ''; 67 if ( ! empty( $post_id_main ) && empty( $key_word ) ) { 68 $key_words = get_post_meta( $post_id_main, 'laci_list_key_word', true ); 69 $key_word = is_array( $key_words ) ? implode( ',', $key_words ) : ''; 70 } 46 <button class="button laci-search-button"><?php esc_html_e( 'Search', 'laci-link-cluster' ); ?></button> 47 </div> 48 <div class="laci-search-text"><?php esc_html_e( 'Search Results:', 'laci-link-cluster' ); ?></div> 49 <div class="laci-search-results-group"> 50 <div class="laci-search-results__same-category"> 51 <div class="laci-search-results__same-category__title"> 52 <p class="laci-text-title"> 53 <?php 54 // translators: %s: taxonomy label 55 echo sprintf( esc_html__( 'SAME %s / CLUSTER: IN-TEXT LINK OPPORTUNITIES', 'laci-link-cluster' ), esc_html( strtoupper( $taxonomy_data->label ) ) ); 56 ?> 57 </p> 58 </div> 59 <div class="laci-search-results__same-category__content"> 71 60 72 $key_word = preg_replace( '/,+/', ',', $key_word ); 73 $key_word = rtrim( $key_word, ',' ); 61 </div> 62 <div class="laci-loading laci-updating-message" style="display: none;"></div> 63 <div class="laci-search-results__same-category__load-more <?php echo esc_attr( $class_name ); ?>"> 64 <button class="button laci-load-more-same-category" data-post-id="" data-key-word="" data-max-pages=""><?php esc_html_e( 'Load More', 'laci-link-cluster' ); ?></button> 65 </div> 66 </div> 74 67 75 $result_same_cat = LACI_InternalLinks\Controllers\LACI_PlacementAssistantController::get_posts_with_keyword_in_same_categories( $post_id_main, $key_word ); 76 $result_same_cat ['post_id'] = $post_id_main; 77 $class_name = isset( $result_same_cat['max_pages'] ) && (int) $result_same_cat['max_pages'] > 1 ? '' : 'laci-display-none'; 78 if ( ! empty( $key_word ) && ! empty( $result_same_cat['posts_data'] ) ) { 79 ob_start(); 80 require LACI_INTERNAL_LINKS_PLUGIN_PATH . 'templates/placement-assistant/same-category.php'; 81 $html = ob_get_contents(); 82 ob_end_clean(); 83 laci_kses_post_e( $html ); 84 } else { 85 echo '<p class="laci-text-not-info">' . esc_html__( 'No posts found with the keyword(s) in the same categories', 'link-and-cluster-automated-seo-link-builder-for-your-site' ) . '</p>'; 86 } 87 ?> 68 <div class="laci-search-results__diff-category"> 69 <div class="laci-search-results__diff-category__title"> 70 <p class="laci-text-title"> 71 <?php 72 // translators: %s: taxonomy label 73 echo sprintf( esc_html__( 'OTHER %s / CLUSTER: IN-TEXT LINK OPPORTUNITIES', 'laci-link-cluster' ), esc_html( strtoupper( $taxonomy_data->label ) ) ); 74 ?> 75 </p> 76 </div> 77 <div class="laci-search-results__diff-category__content"> 88 78 89 </div> 90 <div class="laci-loading laci-updating-message" style="display: none;"></div> 91 <div class="laci-search-results__same-category__load-more <?php echo esc_attr( $class_name ); ?>"> 92 <?php if ( isset( $result_same_cat['max_pages'] ) && $result_same_cat['max_pages'] > 1 ) { ?> 93 <button class="button laci-load-more-same-category" data-post-id="<?php echo esc_attr( $post_id_main ); ?>" data-key-word="<?php echo esc_attr( $key_word ); ?>" data-max-pages="<?php echo esc_attr( $result_same_cat['max_pages'] ); ?>"><?php esc_html_e( 'Load More', 'link-and-cluster-automated-seo-link-builder-for-your-site' ); ?></button> 94 <?php } else { ?> 95 <button class="button laci-load-more-same-category" data-post-id="" data-key-word="" data-max-pages=""><?php esc_html_e( 'Load More', 'link-and-cluster-automated-seo-link-builder-for-your-site' ); ?></button> 96 <?php } ?> 97 </div> 98 </div> 99 100 <div class="laci-search-results__diff-category"> 101 <div class="laci-search-results__diff-category__title"> 102 <p class="laci-text-title"><?php esc_html_e( 'OTHER CATEGORY / CLUSTER: IN-TEXT LINK OPPORTUNITIES', 'link-and-cluster-automated-seo-link-builder-for-your-site' ); ?></p> 103 </div> 104 <div class="laci-search-results__diff-category__content"> 105 <?php 106 $post_id_main_diff = isset( $_REQUEST['post_id'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['post_id'] ) ) : ''; 107 //$key_word = isset( $_REQUEST['key_word'] ) ? sanitize_text_field( $_REQUEST['key_word'] ) : ''; 108 109 $key_word = ''; 110 if ( ! empty( $post_id_main_diff ) && empty( $key_word ) ) { 111 $key_words = get_post_meta( $post_id_main, 'laci_list_key_word', true ); 112 $key_word = is_array( $key_words ) ? implode( ',', $key_words ) : ''; 113 } 114 115 $key_word = rtrim( $key_word, ',' ); 116 $key_word = preg_replace( '/,+/', ',', $key_word ); 117 $result_diff_cat = LACI_InternalLinks\Controllers\LACI_PlacementAssistantController::get_posts_with_keyword_in_diff_categories( $post_id_main_diff, $key_word ); 118 $result_diff_cat ['post_id'] = $post_id_main_diff; 119 $class_name_diff = isset( $result_diff_cat['max_pages'] ) && (int) $result_diff_cat['max_pages'] > 1 ? '' : 'laci-display-none'; 120 if ( ! empty( $key_word ) && ! empty( $result_diff_cat['posts_data'] ) ) { 121 ob_start(); 122 require LACI_INTERNAL_LINKS_PLUGIN_PATH . 'templates/placement-assistant/diff-category.php'; 123 $html = ob_get_contents(); 124 ob_end_clean(); 125 laci_kses_post_e( $html ); 126 } else { 127 echo '<p class="laci-text-not-info">' . esc_html__( 'No posts found with the keyword(s) in the same categories', 'link-and-cluster-automated-seo-link-builder-for-your-site' ) . '</p>'; 128 } 129 ?> 130 131 </div> 132 <div class="laci-loading laci-updating-message" style="display: none;"></div> 133 <div class="laci-search-results__diff-category__load-more <?php echo esc_attr( $class_name_diff ); ?>"> 134 <?php if ( isset( $result_diff_cat['max_pages'] ) && $result_diff_cat['max_pages'] > 1 ) { ?> 135 <button class="button laci-load-more-diff-category" data-post-id="<?php echo esc_attr( $post_id_main_diff ); ?>" data-key-word="<?php echo esc_attr( $key_word ); ?>" data-max-pages="<?php echo esc_attr( $result_diff_cat['max_pages'] ); ?>"><?php esc_html_e( 'Load More', 'link-and-cluster-automated-seo-link-builder-for-your-site' ); ?></button> 136 <?php } else { ?> 137 <button class="button laci-load-more-diff-category" data-post-id="" data-key-word="" data-max-pages=""><?php esc_html_e( 'Load More', 'link-and-cluster-automated-seo-link-builder-for-your-site' ); ?></button> 138 <?php } ?> 79 </div> 80 <div class="laci-loading laci-updating-message" style="display: none;"></div> 81 <div class="laci-search-results__diff-category__load-more <?php echo esc_attr( $class_name_diff ); ?>"> 82 <button class="button laci-load-more-diff-category" data-post-id="" data-key-word="" data-max-pages=""><?php esc_html_e( 'Load More', 'laci-link-cluster' ); ?></button> 83 </div> 139 84 </div> 140 85 </div> -
laci-link-cluster/trunk/templates/placement-assistant/same-category.php
r3165071 r3166563 2 2 defined( 'ABSPATH' ) || exit; 3 3 4 use LACI_InternalLinks\Controllers\ LACI_CreatePostListTableController;5 use LACI_InternalLinks\Controllers\ LACI_InternalLinksController;4 use LACI_InternalLinks\Controllers\CreatePostListTableController; 5 use LACI_InternalLinks\Controllers\InternalLinksController; 6 6 7 7 if ( empty( $result_same_cat ) ) { … … 28 28 <div class="laci-left-section"> 29 29 <div class="laci-category"> 30 <h3 style="margin-top:0"><?php e sc_html_e( 'Category: ', 'link-and-cluster-automated-seo-link-builder-for-your-site'); ?></h3>31 <span><?php laci_kses_post_e( LACI_CreatePostListTableController::get_hierarchical_categories( $post_id_data ) ); ?></span>30 <h3 style="margin-top:0"><?php echo esc_html( $taxonomy_data->label ); ?></h3> 31 <span><?php laci_kses_post_e( CreatePostListTableController::get_hierarchical_categories( $post_id_data ) ); ?></span> 32 32 </div> 33 33 </div> … … 47 47 </div> 48 48 <div class="laci-same-cat-action"> 49 <span class="laci-same-cat-num-results"><?php echo ( esc_html( $total_results ) . esc_html__( ' - Search Results', 'l ink-and-cluster-automated-seo-link-builder-for-your-site' ) ); ?></span>50 <button class="button laci-same-cat-content-previous" disabled><?php esc_html_e( '<< Previous', 'l ink-and-cluster-automated-seo-link-builder-for-your-site' ); ?></button>51 <button class="button laci-same-cat-content-next" <?php echo esc_attr( $total_results < 2 ? 'disabled' : '' ); ?>><?php esc_html_e( 'Next >>', 'l ink-and-cluster-automated-seo-link-builder-for-your-site' ); ?></button>52 <button class="button laci-same-cat-content-edit"><?php esc_html_e( 'Edit & Place Link', 'l ink-and-cluster-automated-seo-link-builder-for-your-site' ); ?></button>53 <button class="button laci-add-related-box"><?php esc_html_e( 'Add Related Box', 'l ink-and-cluster-automated-seo-link-builder-for-your-site' ); ?></button>49 <span class="laci-same-cat-num-results"><?php echo ( esc_html( $total_results ) . esc_html__( ' - Search Results', 'laci-link-cluster' ) ); ?></span> 50 <button class="button laci-same-cat-content-previous" disabled><?php esc_html_e( '<< Previous', 'laci-link-cluster' ); ?></button> 51 <button class="button laci-same-cat-content-next" <?php echo esc_attr( $total_results < 2 ? 'disabled' : '' ); ?>><?php esc_html_e( 'Next >>', 'laci-link-cluster' ); ?></button> 52 <button class="button laci-same-cat-content-edit"><?php esc_html_e( 'Edit & Place Link', 'laci-link-cluster' ); ?></button> 53 <button class="button laci-add-related-box"><?php esc_html_e( 'Add Related Box', 'laci-link-cluster' ); ?></button> 54 54 </div> 55 55 </div> 56 56 <div class="laci-right-section"> 57 <div><?php echo esc_html__( 'Outgoing Links to', 'l ink-and-cluster-automated-seo-link-builder-for-your-site' ) . esc_html( $post_title ); ?>: <?php echo esc_html( LACI_InternalLinksController::laci_count_outbound_links_between_posts( $post_id_data, $post_id_main ) ); ?></div>58 <div><?php echo esc_html__( 'Outbound Internal Links:', 'l ink-and-cluster-automated-seo-link-builder-for-your-site' ) . esc_html( count( LACI_InternalLinksController::laci_get_outbound_internal_links( $post_id_data ) ) ); ?></div>59 <div><?php echo esc_html__( 'Inbound Internal Links:', 'l ink-and-cluster-automated-seo-link-builder-for-your-site' ) . esc_html( count( LACI_InternalLinksController::laci_get_inbound_internal_links( $post_id_data ) ) ); ?></div>57 <div><?php echo esc_html__( 'Outgoing Links to', 'laci-link-cluster' ) . esc_html( $post_title ); ?>: <?php echo esc_html( InternalLinksController::count_outbound_links_between_posts( $post_id_data, $post_id_main ) ); ?></div> 58 <div><?php echo esc_html__( 'Outbound Internal Links:', 'laci-link-cluster' ) . esc_html( count( InternalLinksController::get_outbound_internal_links( $post_id_data ) ) ); ?></div> 59 <div><?php echo esc_html__( 'Inbound Internal Links:', 'laci-link-cluster' ) . esc_html( count( InternalLinksController::get_inbound_internal_links( $post_id_data ) ) ); ?></div> 60 60 </div> 61 61 </div> -
laci-link-cluster/trunk/templates/settings/import-key-words.php
r3165071 r3166563 5 5 <table class="form-table"> 6 6 <tr> 7 <th><?php esc_html_e( 'Import from YOAST', 'l ink-and-cluster-automated-seo-link-builder-for-your-site' ); ?></th>7 <th><?php esc_html_e( 'Import from YOAST', 'laci-link-cluster' ); ?></th> 8 8 <td> 9 <button id="import-key-work-yoast" class="button import-key-work-yoast"><?php esc_html_e( 'Import', 'l ink-and-cluster-automated-seo-link-builder-for-your-site' ); ?></button>9 <button id="import-key-work-yoast" class="button import-key-work-yoast"><?php esc_html_e( 'Import', 'laci-link-cluster' ); ?></button> 10 10 </td> 11 11 </tr> 12 12 <tr> 13 <th><?php esc_html_e( 'Import from RankMath', 'l ink-and-cluster-automated-seo-link-builder-for-your-site' ); ?></th>13 <th><?php esc_html_e( 'Import from RankMath', 'laci-link-cluster' ); ?></th> 14 14 <td> 15 <button id="import-key-work-rank-math" class="button import-key-work-rank-math"><?php esc_html_e( 'Import', 'l ink-and-cluster-automated-seo-link-builder-for-your-site' ); ?></button>15 <button id="import-key-work-rank-math" class="button import-key-work-rank-math"><?php esc_html_e( 'Import', 'laci-link-cluster' ); ?></button> 16 16 </td> 17 17 </tr> -
laci-link-cluster/trunk/templates/settings/nav-tabs.php
r3165071 r3166563 11 11 12 12 <div class="wrap"> 13 <h1><?php esc_html_e( 'Settings', 'l ink-and-cluster-automated-seo-link-builder-for-your-site' ); ?></h1>14 <p><?php esc_html_e( 'Welcome to the WP Internal Links plugin settings page.', 'l ink-and-cluster-automated-seo-link-builder-for-your-site' ); ?></p>13 <h1><?php esc_html_e( 'Settings', 'laci-link-cluster' ); ?></h1> 14 <p><?php esc_html_e( 'Welcome to the WP Internal Links plugin settings page.', 'laci-link-cluster' ); ?></p> 15 15 16 16 <div class="laci-settings-container"> 17 17 <h1 class="nav-tab-wrapper hide-if-no-js"> 18 <a href="<?php echo esc_attr( admin_url( 'admin.php?page=wp-internal-links-settings&tab=settings' ) ); ?>" class="nav-tab <?php echo esc_attr( $active_tab_settings ); ?>"><?php esc_html_e( 'Settings', 'link-and-cluster-automated-seo-link-builder-for-your-site' ); ?></a> 19 <a href="<?php echo esc_attr( admin_url( 'admin.php?page=wp-internal-links-settings&tab=cus_related_box' ) ); ?>" class="nav-tab <?php echo esc_attr( $active_tab_cus_related_box ); ?>"><?php esc_html_e( 'Customs For Related Box', 'link-and-cluster-automated-seo-link-builder-for-your-site' ); ?></a> 20 <a href="<?php echo esc_attr( admin_url( 'admin.php?page=wp-internal-links-settings&tab=import_key_words' ) ); ?>" class="nav-tab <?php echo esc_attr( $active_tab_import_key_words ); ?>"><?php esc_html_e( 'Import Key Words', 'link-and-cluster-automated-seo-link-builder-for-your-site' ); ?></a> 18 <a href="<?php echo esc_attr( admin_url( 'admin.php?page=laci-internal-links-settings&tab=settings' ) ); ?>" class="nav-tab <?php echo esc_attr( $active_tab_settings ); ?>"><?php esc_html_e( 'Settings', 'laci-link-cluster' ); ?></a> 21 19 </h1> 22 20 <div class="laci-settings-content"> 23 21 <?php 24 if ( isset( $_GET['tab'] ) && $_GET['tab'] === 'cus_related_box' ) {25 require_once LACI_INTERNAL_LINKS_PLUGIN_PATH . 'templates/settings/related-box.php';26 } elseif ( isset( $_GET['tab'] ) && $_GET['tab'] === 'import_key_words' ) {27 require_once LACI_INTERNAL_LINKS_PLUGIN_PATH . 'templates/settings/import-key-words.php';28 } else {29 22 require_once LACI_INTERNAL_LINKS_PLUGIN_PATH . 'templates/settings/settings.php'; 30 }31 23 ?> 32 24 </div> -
laci-link-cluster/trunk/templates/settings/related-box-html.php
r3165071 r3166563 18 18 $laci_related_box__margin_left = get_option( 'laci_related_box__margin_left', '0' ); 19 19 20 $laci_related_box__image = get_option( 'laci_related_box__image', '' ); 21 $laci_related_box__image_width = get_option( 'laci_related_box__image_width', '100' ); 22 $laci_related_box__image_height = get_option( 'laci_related_box__image_height', '100' ); 20 23 ?> 24 <style> 25 .laci-related-box-container { 26 padding: <?php echo esc_html( $laci_related_box__padding_top ); ?>px <?php echo esc_html( $laci_related_box__padding_right ); ?>px <?php echo esc_html( $laci_related_box__padding_bottom ); ?>px <?php echo esc_html( $laci_related_box__padding_left ); ?>px; 27 background: <?php echo esc_html( $laci_related_box__bg_color ); ?>; 28 border-radius: <?php echo esc_html( $laci_related_box__bd_radius ); ?>px; 29 color: <?php echo esc_html( $laci_related_box__title_color ); ?>; 30 border: 1px solid <?php echo esc_html( $laci_related_box__bd_color ); ?>; 31 } 32 .laci-related-box-text { 33 color: <?php echo esc_html( $laci_related_box__content_color ); ?>; 34 } 21 35 22 <div class="laci-related-box-container"><?php laci_kses_post_e( $laci_related_box__title ); ?> <span class="laci-related-box-text"><?php echo do_shortcode( $laci_related_box__content ); ?></span></div> 36 .laci-related-box-container { 37 display: flex; 38 flex-direction: row; 39 align-items: center; 40 } 41 42 .laci-related-box-image { 43 flex-shrink: 0; 44 padding-right: 20px; 45 } 46 47 .laci-related-box-image img { 48 display: block; 49 max-width: 100%; 50 } 51 52 .laci-related-box-content { 53 flex: 1; 54 } 55 </style> 56 57 <div class="laci-related-box-container"> 58 <?php if ( ! empty( $laci_related_box__image ) ) : ?> 59 <div class="laci-related-box-image"> 60 <img width="<?php echo esc_attr( $laci_related_box__image_width ); ?>" height="<?php echo esc_attr( $laci_related_box__image_height ); ?>" src="<?php echo esc_url( $laci_related_box__image ); ?>" alt="<?php esc_html_e( 'Related Box Image', 'laci-link-cluster' ); ?>" style="max-width: 100%;" /> 61 </div> 62 <?php endif; ?> 63 <div class="laci-related-box-content"> 64 <?php laci_kses_post_e( $laci_related_box__title ); ?> 65 <span class="laci-related-box-text"> 66 <?php echo do_shortcode( $laci_related_box__content ); ?> 67 </span> 68 </div> 69 </div> -
laci-link-cluster/trunk/templates/settings/related-box.php
r3165071 r3166563 1 1 <?php 2 2 defined( 'ABSPATH' ) || exit; 3 use LACI_InternalLinks\Controllers\ LACI_SettingsController;3 use LACI_InternalLinks\Controllers\SettingsController; 4 4 5 5 if ( isset( $_POST['laci-settings-security-token'] ) && wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['laci-settings-security-token'] ) ), 'laci-settings-security-token' ) ) { 6 6 if ( isset( $_POST['reset_to_default'] ) ) { 7 LACI_SettingsController::laci_set_default_value();7 SettingsController::set_default_value(); 8 8 } elseif ( isset( $_POST['submit'] ) ) { 9 $data = [ 10 'laci_title_color' => isset( $_POST['laci_title_color'] ) ? sanitize_hex_color( wp_unslash( $_POST['laci_title_color'] ) ) : '', 11 'laci_content_color' => isset( $_POST['laci_content_color'] ) ? sanitize_hex_color( wp_unslash( $_POST['laci_content_color'] ) ) : '', 12 'laci_bg_color' => isset( $_POST['laci_bg_color'] ) ? sanitize_hex_color( wp_unslash( $_POST['laci_bg_color'] ) ) : '', 13 'laci_bd_color' => isset( $_POST['laci_bd_color'] ) ? sanitize_hex_color( wp_unslash( $_POST['laci_bd_color'] ) ) : '', 14 'laci_bd_radius' => isset( $_POST['laci_bd_radius'] ) ? sanitize_text_field( wp_unslash( $_POST['laci_bd_radius'] ) ) : '', 15 'laci_pd_top' => isset( $_POST['laci_pd_top'] ) ? sanitize_text_field( wp_unslash( $_POST['laci_pd_top'] ) ) : '', 16 'laci_pd_right' => isset( $_POST['laci_pd_right'] ) ? sanitize_text_field( wp_unslash( $_POST['laci_pd_right'] ) ) : '', 17 'laci_pd_bottom' => isset( $_POST['laci_pd_bottom'] ) ? sanitize_text_field( wp_unslash( $_POST['laci_pd_bottom'] ) ) : '', 18 'laci_pd_left' => isset( $_POST['laci_pd_left'] ) ? sanitize_text_field( wp_unslash( $_POST['laci_pd_left'] ) ) : '', 19 'laci_mg_top' => isset( $_POST['laci_mg_top'] ) ? sanitize_text_field( wp_unslash( $_POST['laci_mg_top'] ) ) : '', 20 'laci_mg_right' => isset( $_POST['laci_mg_right'] ) ? sanitize_text_field( wp_unslash( $_POST['laci_mg_right'] ) ) : '', 21 'laci_mg_bottom' => isset( $_POST['laci_mg_bottom'] ) ? sanitize_text_field( wp_unslash( $_POST['laci_mg_bottom'] ) ) : '', 22 'laci_mg_left' => isset( $_POST['laci_mg_left'] ) ? sanitize_text_field( wp_unslash( $_POST['laci_mg_left'] ) ) : '', 23 'custom-related-box-title-editor' => isset( $_POST['custom-related-box-title-editor'] ) ? wp_kses_post( wp_unslash( $_POST['custom-related-box-title-editor'] ) ) : '', 24 'custom-related-box-content-editor' => isset( $_POST['custom-related-box-content-editor'] ) ? wp_kses_post( wp_unslash( $_POST['custom-related-box-content-editor'] ) ) : '', 25 ]; 26 27 LACI_SettingsController::laci_update_option_related_box( $data ); 9 SettingsController::update_option_related_box( $_POST ); 28 10 } 29 11 } 30 31 $laci_related_box__title_color = get_option( 'laci_related_box__title_color', '#ffffff' );32 $laci_related_box__content_color = get_option( 'laci_related_box__content_color', '#ffffff' );33 $laci_related_box__bg_color = get_option( 'laci_related_box__bg_color', '#ffffff' );34 $laci_related_box__bd_color = get_option( 'laci_related_box__bd_color', '#ffffff' );35 $laci_related_box__bd_radius = get_option( 'laci_related_box__bd_radius', '5' );36 37 $laci_related_box__padding_top = get_option( 'laci_related_box__padding_top', '0' );38 $laci_related_box__padding_right = get_option( 'laci_related_box__padding_right', '0' );39 $laci_related_box__padding_bottom = get_option( 'laci_related_box__padding_bottom', '0' );40 $laci_related_box__padding_left = get_option( 'laci_related_box__padding_left', '0' );41 42 $laci_related_box__margin_top = get_option( 'laci_related_box__margin_top', '0' );43 $laci_related_box__margin_right = get_option( 'laci_related_box__margin_right', '0' );44 $laci_related_box__margin_bottom = get_option( 'laci_related_box__margin_bottom', '0' );45 $laci_related_box__margin_left = get_option( 'laci_related_box__margin_left', '0' );46 12 47 13 $laci_related_box__title = wp_unslash( get_option( 'laci_related_box__title', '0' ) ); … … 60 26 'height' => 180, 61 27 'fontsize_formats' => '10px 12px 14px 16px 18px 20px 24px 28px 32px 36px 48px 60px 72px 96px', 62 //'content_css' => LACI_INTERNAL_LINKS_PLUGIN_URL . 'assets/admin/css/laci-editor-style.css',28 'content_css' => LACI_INTERNAL_LINKS_PLUGIN_URL . 'assets/admin/css/laci-editor-style.css', 63 29 ], 64 30 ]; … … 74 40 'height' => 180, 75 41 'fontsize_formats' => '10px 12px 14px 16px 18px 20px 24px 28px 32px 36px 48px 60px 72px 96px', 76 //'content_css' => LACI_INTERNAL_LINKS_PLUGIN_URL . 'assets/admin/css/laci-editor-style.css',42 'content_css' => LACI_INTERNAL_LINKS_PLUGIN_URL . 'assets/admin/css/laci-editor-style.css', 77 43 ], 78 44 ]; … … 82 48 <form class="laci-custom-related-box-form" method="POST"> 83 49 <input type='hidden' name='laci-settings-security-token' value='<?php echo esc_attr( wp_create_nonce( 'laci-settings-security-token' ) ); ?>'> 84 <h2><?php esc_html_e( 'Custom related box', 'l ink-and-cluster-automated-seo-link-builder-for-your-site' ); ?></h2>50 <h2><?php esc_html_e( 'Custom related box', 'laci-link-cluster' ); ?></h2> 85 51 86 52 <table class="form-table"> 87 53 <tr> 88 <th><?php esc_html_e( 'Title color', 'l ink-and-cluster-automated-seo-link-builder-for-your-site' ); ?></th>54 <th><?php esc_html_e( 'Title color', 'laci-link-cluster' ); ?></th> 89 55 <td> 90 56 <input type="text" id="laci-title-color" name="laci_title_color" value="<?php echo esc_attr( get_option( 'laci_related_box__title_color', '#ffffff' ) ); ?>" class="laci-title-color__related-box" /> … … 92 58 </tr> 93 59 <tr> 94 <th><?php esc_html_e( 'Content color', 'l ink-and-cluster-automated-seo-link-builder-for-your-site' ); ?></th>60 <th><?php esc_html_e( 'Content color', 'laci-link-cluster' ); ?></th> 95 61 <td> 96 62 <input type="text" id="laci-content-color" name="laci_content_color" value="<?php echo esc_attr( get_option( 'laci_related_box__content_color', '#ffffff' ) ); ?>" class="laci-content-color__related-box" /> … … 98 64 </tr> 99 65 <tr> 100 <th><?php esc_html_e( 'Background color', 'l ink-and-cluster-automated-seo-link-builder-for-your-site' ); ?></th>66 <th><?php esc_html_e( 'Background color', 'laci-link-cluster' ); ?></th> 101 67 <td> 102 68 <input type="text" id="laci-bg-color" name="laci_bg_color" value="<?php echo esc_attr( get_option( 'laci_related_box__bg_color', '#ffffff' ) ); ?>" class="laci-bg-color__related-box" /> … … 104 70 </tr> 105 71 <tr> 106 <th><?php esc_html_e( 'Border color', 'l ink-and-cluster-automated-seo-link-builder-for-your-site' ); ?></th>72 <th><?php esc_html_e( 'Border color', 'laci-link-cluster' ); ?></th> 107 73 <td> 108 74 <input type="text" id="laci-bd-color" name="laci_bd_color" value="<?php echo esc_attr( get_option( 'laci_related_box__bd_color', '#ffffff' ) ); ?>" class="laci-bd-color__related-box" /> … … 110 76 </tr> 111 77 <tr> 112 <th><?php esc_html_e( 'Border radius (px)', 'l ink-and-cluster-automated-seo-link-builder-for-your-site' ); ?></th>78 <th><?php esc_html_e( 'Border radius (px)', 'laci-link-cluster' ); ?></th> 113 79 <td> 114 80 <input style="width: 50px;" type="number" id="laci-bd-radius" name="laci_bd_radius" value="<?php echo esc_attr( get_option( 'laci_related_box__bd_radius', '5' ) ); ?>" class="laci-bd-radius__related-box" /> … … 116 82 </tr> 117 83 <tr> 118 <th><?php esc_html_e( 'Padding (px)', 'l ink-and-cluster-automated-seo-link-builder-for-your-site' ); ?></th>84 <th><?php esc_html_e( 'Padding (px)', 'laci-link-cluster' ); ?></th> 119 85 <td> 120 86 <div> … … 133 99 </tr> 134 100 <tr> 135 <th><?php esc_html_e( 'Margin (px)', 'l ink-and-cluster-automated-seo-link-builder-for-your-site' ); ?></th>101 <th><?php esc_html_e( 'Margin (px)', 'laci-link-cluster' ); ?></th> 136 102 <td> 137 103 <div> … … 150 116 </tr> 151 117 <tr> 152 <th><?php esc_html_e( 'Title related box', 'link-and-cluster-automated-seo-link-builder-for-your-site' ); ?></th> 118 <th><?php esc_html_e( 'Related box image', 'laci-link-cluster' ); ?></th> 119 <td> 120 <input type="text" id="laci-related-box-image" name="laci_related_box_image" value="<?php echo esc_attr( get_option( 'laci_related_box__image', '' ) ); ?>" style="width: 70%;" /> 121 <button type="button" class="button" id="laci-related-box-image-upload"><?php esc_html_e( 'Select Image', 'laci-link-cluster' ); ?></button> 122 </td> 123 </tr> 124 <tr> 125 <th><?php esc_html_e( 'Image width(px)', 'laci-link-cluster' ); ?></th> 126 <td> 127 <input style="width: 100px;" type="number" id="laci-related-box-image-width" name="laci_related_box_image_width" value="<?php echo esc_attr( get_option( 'laci_related_box__image_width', '100' ) ); ?>" /> 128 </td> 129 </tr> 130 <tr> 131 <th><?php esc_html_e( 'Image height(px)', 'laci-link-cluster' ); ?></th> 132 <td> 133 <input style="width: 100px;" type="number" id="laci-related-box-image-height" name="laci_related_box_image_height" value="<?php echo esc_attr( get_option( 'laci_related_box__image_height', '100' ) ); ?>" /> 134 </td> 135 </tr> 136 <tr> 137 <th><?php esc_html_e( 'Title related box', 'laci-link-cluster' ); ?></th> 153 138 <td><?php wp_editor( $laci_related_box__title, $laci_related_box__title_id, $settings_related_box__title ); ?> 154 139 </td> 155 140 </tr> 156 141 <tr> 157 <th><?php esc_html_e( 'Content related box', 'l ink-and-cluster-automated-seo-link-builder-for-your-site' ); ?></th>142 <th><?php esc_html_e( 'Content related box', 'laci-link-cluster' ); ?></th> 158 143 <td> 159 144 <?php wp_editor( $laci_related_box__content, $laci_related_box__content_id, $settings ); ?> 160 <p style="margin-top: 5px;"> <?php esc_html_e( 'Note: ', 'l ink-and-cluster-automated-seo-link-builder-for-your-site' ); ?><code><?php esc_html_e( 'You can use the shortcode [laci_post_title_link] to display the title of the post.', 'link-and-cluster-automated-seo-link-builder-for-your-site' ); ?></code></p>145 <p style="margin-top: 5px;"> <?php esc_html_e( 'Note: ', 'laci-link-cluster' ); ?><code><?php esc_html_e( 'You can use the shortcode [laci_post_title_link] to display the title of the post.', 'laci-link-cluster' ); ?></code></p> 161 146 </td> 162 147 </tr> 148 163 149 </table> 164 150 <span class="submit"><input type="submit" name="submit" id="submit" class="button button-primary" value="Save Changes"></span> 165 <span class="submit"><input type="submit" name="reset_to_default" id="reset_to_default" class="button button-primary" value="<?php esc_html_e( 'Reset to default', 'link-and-cluster-automated-seo-link-builder-for-your-site' ); ?>"></span> 151 <span class="submit"><input type="submit" name="reset_to_default" id="reset_to_default" class="button button-primary" value="<?php esc_html_e( 'Reset to default', 'laci-link-cluster' ); ?>"></span> 152 <script> 153 jQuery(document).ready(function($) { 154 $('#reset_to_default').on('click', function(e) { 155 var confirmed = confirm('<?php esc_html_e( 'Are you sure you want to reset to default?', 'laci-link-cluster' ); ?>'); 156 if (!confirmed) { 157 e.preventDefault(); // Prevent form submission if the user cancels 158 } 159 }); 160 }); 161 </script> 166 162 </form> 167 163 -
laci-link-cluster/trunk/templates/settings/settings.php
r3165071 r3166563 2 2 defined( 'ABSPATH' ) || exit; 3 3 4 use LACI_InternalLinks\Controllers\ LACI_SettingsController;4 use LACI_InternalLinks\Controllers\SettingsController; 5 5 6 $setting = LACI_SettingsController::get_instance();6 $setting = SettingsController::get_instance(); 7 7 8 8 if ( isset( $_POST['laci-settings-security-token'] ) && wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['laci-settings-security-token'] ) ), 'laci-settings-security-token' ) ) { 9 9 update_option( 'laci_num_item_dash', sanitize_text_field( isset( $_POST['num_item_dash'] ) ? wp_unslash( $_POST['num_item_dash'] ) : '' ) ); 10 update_option( 'laci_num_item_la', sanitize_text_field( isset( $_POST['num_item_la'] ) ? wp_unslash( $_POST['num_item_ dash'] ) : '' ) );10 update_option( 'laci_num_item_la', sanitize_text_field( isset( $_POST['num_item_la'] ) ? wp_unslash( $_POST['num_item_la'] ) : '' ) ); 11 11 update_option( 'laci_delete_shortcode_in_deactivate', isset( $_POST['delete_shortcode_in_deactivate'] ) && sanitize_text_field( wp_unslash( $_POST['delete_shortcode_in_deactivate'] ) ) === 'on' ? 1 : 0 ); 12 12 update_option( 'laci_delete_shortcode_in_delete', isset( $_POST['delete_shortcode_in_delete'] ) && sanitize_text_field( wp_unslash( $_POST['delete_shortcode_in_delete'] ) ) === 'on' ? 1 : 0 ); 13 update_option( ' wpinternallinks_taxonomy', sanitize_text_field( isset( $_POST['wpinternallinks_taxonomy'] ) ? wp_unslash( $_POST['wpinternallinks_taxonomy'] ) : '' ) );13 update_option( 'laci_internallinks_taxonomy', sanitize_text_field( isset( $_POST['laci_internallinks_taxonomy'] ) ? wp_unslash( $_POST['laci_internallinks_taxonomy'] ) : '' ) ); 14 14 } 15 15 … … 18 18 $laci_delete_shortcode_in_deactivate = get_option( 'laci_delete_shortcode_in_deactivate', 0 ); 19 19 $laci_delete_shortcode_in_delete = get_option( 'laci_delete_shortcode_in_delete', 0 ); 20 $taxonomy_data = get_option( ' wpinternallinks_taxonomy', 'category' );20 $taxonomy_data = get_option( 'laci_internallinks_taxonomy', 'category' ); 21 21 $taxonomies = get_taxonomies( [ 'public' => true ], 'objects' ); 22 23 $updated_for_taxonomy = get_option( 'laci_internallinks_updated_for_taxonomy', 'category' ); 24 25 if ( $taxonomy_data !== $updated_for_taxonomy ) { 26 ?> 27 <div class="notice notice-warning laci-notice" style="display: block;"> 28 <p><?php esc_html_e( 'Please note that changing the applicable taxonomy will require', 'laci-link-cluster' ); ?> <a href="<?php echo esc_url( admin_url( 'admin.php?page=laci_internal_links_dashboard' ) ); ?>"><?php esc_html_e( 'updating the link counts', 'laci-link-cluster' ); ?></a> <?php esc_html_e( 'to ensure internal links are properly counted within their respective clusters.', 'laci-link-cluster' ); ?></p> 29 </div> 30 <?php 31 } 22 32 ?> 23 24 33 <form class="laci-settings-form" method="POST"> 25 34 <input type='hidden' name='laci-settings-security-token' value='<?php echo esc_attr( wp_create_nonce( 'laci-settings-security-token' ) ); ?>'> 26 35 <table class="form-table"> 27 <tr >28 <th><?php esc_html_e( 'Taxonomies', 'l ink-and-cluster-automated-seo-link-builder-for-your-site' ); ?></th>36 <tr class="laci-setting-taxonomies"> 37 <th><?php esc_html_e( 'Taxonomies', 'laci-link-cluster' ); ?></th> 29 38 <td> 30 <select name=" wpinternallinks_taxonomy">39 <select name="laci_internallinks_taxonomy"> 31 40 <?php foreach ( $taxonomies as $tax_item ) : ?> 32 41 <option value="<?php echo esc_attr( $tax_item->name ); ?>" <?php selected( $taxonomy_data, $tax_item->name ); ?>> … … 38 47 </tr> 39 48 <tr> 40 <th><?php esc_html_e( 'Number of items per page in the dashboard', 'l ink-and-cluster-automated-seo-link-builder-for-your-site' ); ?></th>49 <th><?php esc_html_e( 'Number of items per page in the dashboard', 'laci-link-cluster' ); ?></th> 41 50 <td> 42 <input name="num_item_dash" type="number" id="num_item_dash" value="<?php echo esc_attr( $laci_num_item_dash ); ?>"> 51 <input name="num_item_dash" type="number" id="num_item_dash" value="<?php echo esc_attr( $laci_num_item_dash ); ?>" min="1" max="900"> 52 </td> 53 </tr> 54 <tr class="laci-setting-item-per-page"> 55 <th><?php esc_html_e( 'Number of items per page in Link Assistant', 'laci-link-cluster' ); ?></th> 56 <td> 57 <input name="num_item_la" type="number" id="num_item_la" value="<?php echo esc_attr( $laci_num_item_la ); ?>" min="1" max="100"> 58 <p style="margin-top: 5px;"> <?php esc_html_e( 'Note: ', 'laci-link-cluster' ); ?><code><?php esc_html_e( 'Max is 100', 'laci-link-cluster' ); ?></code></p> 43 59 </td> 44 60 </tr> 45 61 <tr> 46 <th><?php esc_html_e( 'Number of items per page in Link Assistant', 'link-and-cluster-automated-seo-link-builder-for-your-site' ); ?></th> 47 <td> 48 <input name="num_item_la" type="number" id="num_item_la" value="<?php echo esc_attr( $laci_num_item_la ); ?>"> 49 </td> 50 </tr> 51 <tr> 52 <th><?php esc_html_e( 'Delete shortcode when deactivate the plugin', 'link-and-cluster-automated-seo-link-builder-for-your-site' ); ?></th> 62 <th><?php esc_html_e( 'Delete shortcode when deactivate the plugin', 'laci-link-cluster' ); ?></th> 53 63 <td> 54 64 <label class="laci-switch" for="delete_shortcode_in_deactivate"> … … 59 69 </tr> 60 70 <tr> 61 <th><?php esc_html_e( 'Delete shortcode when delete the plugin', 'l ink-and-cluster-automated-seo-link-builder-for-your-site' ); ?></th>71 <th><?php esc_html_e( 'Delete shortcode when delete the plugin', 'laci-link-cluster' ); ?></th> 62 72 <td> 63 73 <label class="laci-switch" for="delete_shortcode_in_delete"> -
laci-link-cluster/trunk/uninstall.php
r3165071 r3166563 1 1 <?php 2 defined( ' ABSPATH' ) || exit;2 defined( 'WP_UNINSTALL_PLUGIN' ) || exit; 3 3 4 global $wpdb, $wp_version; 5 6 if ( get_option( 'laci_delete_shortcode_in_delete', 0 ) ) { 7 global $wpdb; 8 9 // Pattern to match the entire Gutenberg block containing the shortcode 10 $pattern = '<!-- wp:shortcode -->\s*\[laci_related_post_content[^\]]*\]\s*<!-- \/wp:shortcode -->'; 11 12 // Update the posts' content by removing the matched blocks 13 $wpdb->query( 14 $wpdb->prepare( 15 "UPDATE {$wpdb->posts} SET post_content = REGEXP_REPLACE(post_content, %s, '')", 16 $pattern 17 ) 18 ); 19 } -
laci-link-cluster/trunk/wp-link-and-cluster.php
r3165071 r3166563 7 7 * Author: Link and Cluster 8 8 * Author URI: https://linkandcluster.com/ 9 * Text Domain: l ink-and-cluster-automated-seo-link-builder-for-your-site10 * Domain Path: / i18n/languages/11 * Version: 1.0. 09 * Text Domain: laci-link-cluster 10 * Domain Path: /languages/i18n 11 * Version: 1.0.1 12 12 * License: GPLv2 or later 13 13 * License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 21 21 } 22 22 23 define( 'LACI_INTERNAL_LINKS_VERSION', '1.0.0' ); 24 define( 'LACI_INTERNAL_LINKS_PLUGIN_PATH', plugin_dir_path( __FILE__ ) ); 25 define( 'LACI_INTERNAL_LINKS_PLUGIN_URL', plugin_dir_url( __FILE__ ) ); 26 define( 'LACI_INTERNAL_LINKS_IS_DEVELOPMENT', true ); 27 define( 'LACI_INTERNAL_LINKS_CUSTOM_TABLE_NAME', 'laci_custom_table' ); 23 if ( ! defined( 'LACI_INTERNAL_LINKS_VERSION' ) ) { 24 define( 'LACI_INTERNAL_LINKS_VERSION', '1.0.1' ); 25 } 28 26 29 define( 'LACI_INTERNAL_LINKS_CUSTOM_NUM_ITEM_LA', get_option( 'laci_num_item_la', '50' ) ); 27 if ( ! defined( 'LACI_INTERNAL_LINKS_PLUGIN_PATH' ) ) { 28 define( 'LACI_INTERNAL_LINKS_PLUGIN_PATH', plugin_dir_path( __FILE__ ) ); 29 } 30 30 31 if ( ! defined( 'LACI_INTERNAL_LINKS_PLUGIN_URL' ) ) { 32 define( 'LACI_INTERNAL_LINKS_PLUGIN_URL', plugin_dir_url( __FILE__ ) ); 33 } 34 35 if ( ! defined( 'LACI_INTERNAL_LINKS_PLUGIN_BASENAME' ) ) { 36 define( 'LACI_INTERNAL_LINKS_PLUGIN_BASENAME', plugin_basename( __FILE__ ) ); 37 } 38 39 if ( ! defined( 'LACI_INTERNAL_LINKS_IS_DEVELOPMENT' ) ) { 40 define( 'LACI_INTERNAL_LINKS_IS_DEVELOPMENT', true ); 41 } 42 43 if ( ! defined( 'LACI_INTERNAL_LINKS_CUSTOM_TABLE_NAME' ) ) { 44 define( 'LACI_INTERNAL_LINKS_CUSTOM_TABLE_NAME', 'laci_custom_table' ); 45 } 46 47 if ( ! defined( 'LACI_INTERNAL_LINKS_CUSTOM_NUM_ITEM_LA' ) ) { 48 define( 'LACI_INTERNAL_LINKS_CUSTOM_NUM_ITEM_LA', get_option( 'laci_num_item_la', '50' ) ); 49 } 31 50 32 51 spl_autoload_register( … … 52 71 if ( ! wp_installing() ) { 53 72 if ( ! function_exists( 'LACI_InternalLinks\\init' ) ) { 73 \LACI_InternalLinks\Controllers\AdminMenuController::get_instance(); 54 74 function init() { 55 \LACI_InternalLinks\ LACI_Initialize::get_instance();75 \LACI_InternalLinks\Initialize::get_instance(); 56 76 } 57 77 }
Note: See TracChangeset
for help on using the changeset viewer.