Changeset 3297929
- Timestamp:
- 05/21/2025 09:48:59 AM (7 months ago)
- Location:
- businesspress/trunk
- Files:
-
- 3 edited
-
businesspress.php (modified) (2 diffs)
-
plugins/simple-history-clean-up.php (modified) (2 diffs)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
businesspress/trunk/businesspress.php
r3284774 r3297929 4 4 Plugin URI: http://www.foliovision.com 5 5 Description: This plugin secures your site 6 Version: 1. 26 Version: 1.3 7 7 Author: Foliovision 8 8 Author URI: http://foliovision.com … … 15 15 16 16 17 const VERSION = '1. 2';17 const VERSION = '1.3'; 18 18 19 19 -
businesspress/trunk/plugins/simple-history-clean-up.php
r3284756 r3297929 35 35 'admin_head', 36 36 function() { 37 // Target Simple History dashboard page 37 38 if ( ! empty( $_GET['page'] ) && 'simple_history_admin_menu_page' === $_GET['page'] ) { 39 businesspress_remove_simple_history_texts(); 40 38 41 ?> 39 42 <style> 40 .sh-PageHeader { 43 .sh-PageHeader, .sh-NotificationBar, .sh-PremiumFeaturesPostbox-button { 44 display: none; 45 } 46 </style> 47 <?php 48 49 // Target Simple History settings page 50 } else if ( ! empty( $_GET['page'] ) && 'simple_history_settings_page' === $_GET['page'] ) { 51 businesspress_remove_simple_history_texts(); 52 53 ?> 54 <style> 55 .sh-PageHeader-rightLink a[href*=premium], /* Add-ons link in header */ 56 .sh-NotificationBar, /* Yellow bar on top of the page */ 57 .sh-PremiumFeaturesPostbox, /* Right sidebar ad boxes */ 58 .sh-StatsDashboard-dateRangeControls-description, /* Upgrade to Premium to get access to more date ranges. */ 59 .sh-StatsDashboard-card:has(.is-blurred), /* blurred graphs on "Stats & Summaries" page */ 60 .sh-PremiumFeatureBadge, /* Greed "New" badge in header links */ 61 a.sh-ExternalLink[href*=premium_upsell], /* "Upgrade to Simple History Premium to set this to any number of days." link */ 62 .sh-PageNav a[href*=promo_upsell] /* "Upgrade to Premium for more features" link in header */{ 41 63 display: none; 42 64 } … … 46 68 } 47 69 ); 70 71 function businesspress_remove_simple_history_texts() { 72 add_filter( 73 'gettext', 74 function( $translation, $text, $domain ) { 75 if ( 'simple-history' === $domain ) { 76 if ( 77 stripos( $text, 'a nice review at WordPress.org' ) !== false 78 ) { 79 return ''; 80 } 81 } 82 return $translation; 83 }, 84 10, 85 3 86 ); 87 } 88 89 /** 90 * Force Simple History settings to BusinessPress defaults. 91 */ 92 93 // Settings -> "History menu position" should be "Inside dashboard menu item" as by default it's above "Posts" 94 add_filter( 95 'simple_history/admin_menu_location', 96 function( $location ) { 97 return 'inside_dashboard'; 98 } 99 ); 100 101 // Settings -> "Show history" -> "in the admin bar" should be disabled for performance reasons 102 add_filter( 'simple_history_show_in_admin_bar', '__return_false' ); 103 104 add_action( 105 'simple_history/settings_page/general_section_output', 106 function() { 107 ?> 108 <style> 109 .businesspress-simple-history-setting-note { 110 background: var(--sh-color-cream); 111 padding: 2px; 112 border-radius: 5px; 113 margin-top: 10px; 114 } 115 </style> 116 <script> 117 jQuery( function($) { 118 $( '#simple_history_show_in_admin_bar, [name=simple_history_menu_page_location]' ).prop( 'disabled', true ); 119 $( 'label[for=simple_history_show_in_admin_bar]' ).append( '<span class="businesspress-simple-history-setting-note">BusinessPress is disabling this for performance reasons.</span>' ); 120 $( '[name=simple_history_menu_page_location][value=inside_dashboard]' ).parent().append( '<span class="businesspress-simple-history-setting-note">BusinessPress is forcing this setting as the default setting moves it above "Posts" in the admin menu.</span>' ); 121 }); 122 </script> 123 <?php 124 } 125 ); -
businesspress/trunk/readme.txt
r3284760 r3297929 101 101 102 102 == Changelog == 103 104 = 1.3 - 2025-05-21 = 105 106 * Simple History: "History menu position" should be "Inside dashboard menu item" as by default it's above "Posts", so we force this setting 107 * Simple History: Settings -> "Show history" -> "in the admin bar" should be disabled for performance reasons, so we force this setting 108 * Simple History: Clean-up settings screen for version 5.11.0 103 109 104 110 = 1.2 - 2025-04-30 =
Note: See TracChangeset
for help on using the changeset viewer.