wordpress/php-fpm/wordpress_files/themes/responsive/admin/admin-functions.php

33 lines
1.2 KiB
PHP
Raw Normal View History

2020-05-22 03:40:23 +02:00
<?php
/**
* Admin Functions.
*
* @package responsive
*/
/**
* Enqueue admin scipts.
*/
function responsive_admin_scripts( $hook ) {
if ( 'appearance_page_responsive' !== $hook ) {
return;
}
wp_enqueue_script( 'responsive-admin-js', get_template_directory_uri() . '/admin/js/plugin-install.js', array( 'jquery' ), true, RESPONSIVE_THEME_VERSION );
wp_enqueue_script( 'updates' );
wp_localize_script(
'responsive-admin-js',
'responsiveAboutPluginInstall',
array(
'activating' => esc_html__( 'Activating ', 'responsive' ),
'verify_network' => esc_html__( 'Not connect. Verify Network.', 'responsive' ),
'page_not_found' => esc_html__( 'Requested page not found. [404]', 'responsive' ),
'internal_server_error' => esc_html__( 'Internal Server Error [500]', 'responsive' ),
'json_parse_failed' => esc_html__( 'Requested JSON parse failed', 'responsive' ),
'timeout_error' => esc_html__( 'Time out error', 'responsive' ),
'ajax_req_aborted' => esc_html__( 'Ajax request aborted', 'responsive' ),
'uncaught_error' => esc_html__( 'Uncaught Error', 'responsive' ),
)
);
}
add_action( 'admin_enqueue_scripts', 'responsive_admin_scripts' );