esc_url( admin_url( 'admin-ajax.php' ) ), 'nonce' => wp_create_nonce( 'hoottheme-welcome-action' ), 'dismiss_action' => 'hoot_dismiss_welcome_notice', 'hoot_processplugin_action' => 'hoot_processplugin', 'hoot_processplugin_btntext' => esc_html__( 'Please Wait. This may take a while...', 'brigsby' ), ) ); } } add_action( 'admin_enqueue_scripts', 'hoot_admin_enqueue_notice_styles' ); /** * Display admin notice */ function hoot_add_welcome_notice() { $slug = hoot_abouttag( 'slug' ); $themename = hoot_abouttag( 'name' ); $imgshot = hoot_abouttag( 'fullshot' ); $issmall = false; if ( ! $imgshot ) { $imgshot = hoot_abouttag( 'shot' ); $issmall = true; } $import_config = apply_filters( 'hootimport_theme_config', array() ); // Hoot Import has been configured for active theme $display_import = ! empty( $import_config ) && ! get_option( "{$slug}-dismiss-import" ); ?>
sanitize_key( wp_unslash( $plugin ) ), 'fields' => array( 'short_description' => false, 'sections' => false, 'requires' => false, 'rating' => false, 'ratings' => false, 'downloaded' => false, 'last_updated' => false, 'added' => false, 'tags' => false, 'compatibility' => false, 'homepage' => false, 'donate_link' => false, ), ) ); if ( is_wp_error( $api ) ) { $response['errorInstall'] = $api->get_error_message(); } else { $skin = new WP_Ajax_Upgrader_Skin(); $upgrader = new Plugin_Upgrader( $skin ); $result = $upgrader->install( $api->download_link ); if ( $result ) { $state = 'installed'; } else { $pluginname = ucwords( str_replace( '-', ' ', $plugin ) ); /* Translators: 1 is line break, 2 is the link start markup, 3 is link markup end, 4 is the plugin name, 5 and 6 are strong tags */ $errormsg = sprintf( esc_html__( 'WordPress encountered an unexpected error during the plugin installation.%1$sPlease %2$sclick this link%3$s to install the %5$s%4$s plugin%6$s directly.', 'brigsby' ), '