array(
'sseUrl' => get_rest_url( null, 'admin-debug-tools/v1/debug-log/sse' ),
'debugLogDownloadUrl' => set_url_scheme( add_query_arg( '_adtnonce', wp_create_nonce( '/admin-debug-tools/v1/debug-log/download' ), get_rest_url( null, 'admin-debug-tools/v1/debug-log/download' ) ), 'https' ),
),
),
array( 'style-index', 'index' )
);
}
/**
* Customizes the plugin version footer text on the Admin Debug Tools Admin App.
*
* @since 1.0.0
*
* @param string $footer_text The default footer text.
*
* @return string $text Amended footer text.
*/
public function add_plugin_version_to_footer( $footer_text ) {
if ( ! Utils::is_plugin_page() ) {
return $footer_text;
}
$bug_report_url = 'https://github.com/tjdsneto/admin-debug-tools/issues/new?template=bug_report.md';
$suggest_feature_url = 'https://github.com/tjdsneto/admin-debug-tools/issues/new?template=feature_request.md';
$plugin_data = get_plugin_data( ADMIN_DEBUG_TOOLS_FILE, false, false );
$url = 'https://wordpress.org/plugins/admin-debug-tools/#developers';
$bug_report_link = sprintf( '%2$s', $bug_report_url, __( 'Report a bug', 'admin-debug-tools' ) );
$suggest_feature_link = sprintf( '%2$s', $suggest_feature_url, __( 'Suggest a feature', 'admin-debug-tools' ) );
$plugin_link = sprintf( 'Admin Debug Tools v%2$s', $url, $plugin_data['Version'] );
$footer_text = sprintf( '%s | %s | %s', $bug_report_link, $suggest_feature_link, $plugin_link );
return $footer_text;
}
/**
* Customizes the footer text on the Admin Debug Tools Admin App.
*
* @since 1.0.0
*
* @param string $text The default admin footer text.
*
* @return string $text Amended admin footer text.
*/
public function add_admin_footer_text( $text ) {
if ( ! Utils::is_plugin_page() ) {
return $text;
}
$url = 'https://wordpress.org/support/plugin/admin-debug-tools/reviews?filter=5#new-post';
/* translators: %1$s - Adming Debug Log plugin reviews url - Adming Debug Log is the name of the plugin. */
$text = sprintf( __( 'Thank you for using the Adming Debug Log plugin! Please, let us know how are you liking it on WordPress.org and help us improve.', 'admin-debug-tools' ), $url );
return $text;
}
}