Changeset 3337085
- Timestamp:
- 07/31/2025 09:06:36 AM (7 months ago)
- Location:
- local-gravatars
- Files:
-
- 4 added
- 2 edited
-
tags/1.1.2 (added)
-
tags/1.1.2/LICENSE (added)
-
tags/1.1.2/local-gravatars.php (added)
-
tags/1.1.2/readme.txt (added)
-
trunk/local-gravatars.php (modified) (3 diffs)
-
trunk/readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
local-gravatars/trunk/local-gravatars.php
r3309681 r3337085 6 6 * Requires at least: 5.3 7 7 * Requires PHP: 5.6 8 * Version: 1.1. 18 * Version: 1.1.2 9 9 * Author: Ari Stathopoulos 10 10 * Text Domain: local-gravatars … … 16 16 namespace Aristath\LocalGravatars; 17 17 18 // If the FAIR plugin is active and the `FAIR\Avatars\bootstrap` function exists,19 // add an admin notice to the dashboard.20 if ( function_exists( 'FAIR\Avatars\bootstrap' ) ) {21 $options = get_option( 'fair_settings', [] );22 $avatar_source = array_key_exists( 'avatar_source', $options ) ? $options['avatar_source'] : 'fair';23 24 // Only add the notice if we're using the Fair avatars.25 if ( 'fair' === $avatar_source ) {26 add_action( 'admin_notices', function() {27 $plugin_file = basename( __DIR__ ) . '/' . basename( __FILE__ );28 $deactivate_url = \wp_nonce_url(29 \add_query_arg(30 [31 'action' => 'deactivate',32 'plugin' => $plugin_file,33 'plugin_status' => 'all',34 'paged' => 1,35 's' => '',36 ],37 \self_admin_url( 'plugins.php' )38 ),39 'deactivate-plugin_' . $plugin_file40 );41 ?>42 <div class="notice notice-warning">43 <p>44 <?php \esc_html_e( 'The FAIR plugin is active. Local Gravatars is not needed, you can deactivate it by clicking the button below.', 'local-gravatars' ); ?>45 </p>46 <p>47 <a href="<?php echo esc_url( $deactivate_url ); ?>" class="button button-small"><?php \esc_html_e( 'Deactivate the "Local Gravatars" plugin', 'local-gravatars' ); ?></a>48 </p>49 </div>50 <?php51 } );52 return;53 }54 }55 56 18 add_filter( 57 19 'get_avatar', … … 77 39 } 78 40 return $avatar; 79 } 41 }, 42 \PHP_INT_MAX 80 43 ); 81 44 -
local-gravatars/trunk/readme.txt
r3309681 r3337085 4 4 Tested up to: 6.8 5 5 Requires PHP: 5.6 6 Stable tag: 1.1. 16 Stable tag: 1.1.2 7 7 License: MIT 8 8 License URI: https://opensource.org/licenses/MIT
Note: See TracChangeset
for help on using the changeset viewer.