id ) { case 'options-permalink' : include( 'class-flash-admin-permalink-settings.php' ); } } /** * Change the admin footer text on Flash Toolkit admin pages. * @param string $footer_text * @return string */ public function admin_footer_text( $footer_text ) { if ( ! current_user_can( 'manage_options' ) || ! function_exists( 'flash_toolkit_get_screen_ids' ) ) { return $footer_text; } $current_screen = get_current_screen(); $ft_pages = flash_toolkit_get_screen_ids(); // Check to make sure we're on a Flash Toolkit admin page. if ( isset( $current_screen->id ) && apply_filters( 'flash_toolkit_display_admin_footer_text', in_array( $current_screen->id, $ft_pages ) ) ) { // Change the footer text. if ( ! get_option( 'flash_toolkit_admin_footer_text_rated' ) ) { $footer_text = sprintf( __( 'If you like Flash Toolkit please leave us a %s★★★★★%s rating. A huge thanks in advance!', 'flash-toolkit' ), '', '' ); flash_toolkit_enqueue_js( " jQuery( 'a.flash-toolkit-rating-link' ).click( function() { jQuery.post( '" . FT()->ajax_url() . "', { action: 'flash_toolkit_rated' } ); jQuery( this ).parent().text( jQuery( this ).data( 'rated' ) ); }); " ); } else { $footer_text = __( 'Thank you for creating with Flash Toolkit.', 'flash-toolkit' ); } } return $footer_text; } } new FT_Admin();