' . __( 'Github', 'artiss-transient-cleaner' ) . '' ) ); $links = array_merge( $links, array( '' . __( 'Support', 'artiss-transient-cleaner' ) . '' ) ); } return $links; } add_filter( 'plugin_row_meta', 'tc_set_plugin_meta', 10, 2 ); /** * Add Settings link to plugin list * * Add a Settings link to the options listed against this plugin * * @since 1.3 * * @param string $links Current links * @param string $file File in use * @return string Links, now with settings added */ function tc_add_settings_link( $links, $file ) { static $this_plugin; if ( !$this_plugin ) { $this_plugin = plugin_basename( __FILE__ ); } global $_wp_using_ext_object_cache; if ( defined( 'TC_LITE' ) && TC_LITE ) { $lite = true; } else { $lite = false; } if ( !$_wp_using_ext_object_cache && !$lite && strpos( $file, 'artiss-transient-cleaner.php' ) !== false ) { $settings_link = '' . __( 'Settings', 'artiss-transient-cleaner' ) . ''; array_unshift( $links, $settings_link ); } return $links; } add_filter( 'plugin_action_links', 'tc_add_settings_link', 10, 2 ); /** * Show Admin Messages * * Display messages on the administration screen * * @since 1.2 * */ function tc_show_admin_messages() { global $_wp_using_ext_object_cache; if ( $_wp_using_ext_object_cache ) { echo '
' . __( 'An external object cache is in use so Transient Cleaner is not required. Please disable the plugin.', 'artiss-transient-cleaner' ) . '
' . __( 'Transient housekeeping is now part of WordPress core, as of version 4.9. Please disable the Transient Cleaner plugin.', 'artiss-transient-cleaner' ) . '
' . __( 'This screen allows you to specify the default options for the Transient Cleaner plugin.', 'artiss-transient-cleaner' ) . '
'; $help_text .= '' . __( "In addition, details of recent transient cleans are shown. Tick the 'Run Now' options to perform a clean, whether a full removal of transients or just the removal of expired transients.", 'artiss-transient-cleaner' ) . '
'; $help_text .= '' . __( 'Remember to click the Save Changes button at the bottom of the screen for new settings to take effect.', 'artiss-transient-cleaner' ) . '
'; return $help_text; } /** * Options Help Sidebar * * Add a links sidebar to the options help * * @since 1.5 * * @return string Help Text */ function tc_options_sidebar() { $help_text = '' . __( 'For more information:', 'artiss-transient-cleaner' ) . '
'; $help_text .= ''; $help_text .= ''; return $help_text; }