Warning: Missing argument 1 for WP_Internal_Pointers::enqueue_scripts()
-
Im getting this warning on my dashboard:
Warning: Missing argument 1 for WP_Internal_Pointers::enqueue_scripts() in /home/#/public_html/wp-admin/includes/template.php on line 2017
Line 2017 looks like this:
public static function enqueue_scripts( $hook_suffix ) {
/*
* Register feature pointers
*
* Format:
* array(
* hook_suffix => pointer callback
* )
*
* Example:
* array(
* ‘themes.php’ => ‘wp390_widgets’
* )
*/$registered_pointers = array(
// None currently
);// Check if screen related pointer is registered
if ( empty( $registered_pointers[ $hook_suffix ] ) )
return;$pointers = (array) $registered_pointers[ $hook_suffix ];
/*
* Specify required capabilities for feature pointers
*
* Format:
* array(
* pointer callback => Array of required capabilities
* )
*
* Example:
* array(
* ‘wp390_widgets’ => array( ‘edit_theme_options’ )
* )
*/
$caps_required = array(
// None currently
);// Get dismissed pointers
$dismissed = explode( ‘,’, (string) get_user_meta( get_current_user_id(), ‘dismissed_wp_pointers’, true ) );$got_pointers = false;
foreach ( array_diff( $pointers, $dismissed ) as $pointer ) {
if ( isset( $caps_required[ $pointer ] ) ) {
foreach ( $caps_required[ $pointer ] as $cap ) {
if ( ! current_user_can( $cap ) )
continue 2;
}
}// Bind pointer print function
add_action( ‘admin_print_footer_scripts’, array( ‘WP_Internal_Pointers’, ‘pointer_’ . $pointer ) );
$got_pointers = true;
}if ( ! $got_pointers )
return;// Add pointers script and style to queue
wp_enqueue_style( ‘wp-pointer’ );
wp_enqueue_script( ‘wp-pointer’ );
}I have enqueued my scripts like this:
/**
* Enqueue scripts and styles.
*/
function starkers_script_enqueuer() {
wp_enqueue_style( ‘bootstrap’, ‘https://netdna.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css’ );wp_enqueue_style( ‘fopp-style’, get_template_directory_uri() . ‘/css/stylesheet.css’ );
wp_enqueue_script( ‘fopp-jquery’, get_template_directory_uri() . ‘/js/jquery.js’, array(), ”, true );
wp_enqueue_script( ‘jquery-easing’, get_template_directory_uri() . ‘/js/jquery.easing.min.js’, array(), ”, true );
wp_enqueue_script( ‘jquery-scroll’, get_template_directory_uri() . ‘/js/scrolling-nav.js’, array(), ”, true );
wp_enqueue_script( ‘jquery’, ‘https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js’, array(‘jquery’), ‘1.9.1’, true);
wp_enqueue_script( ‘bootstrap-js’, ‘https://netdna.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js’, array(‘jquery’), true);
/* Custom JS */
wp_enqueue_script( ‘fopp-custom’, get_template_directory_uri() . ‘/js/custom.js’, array(), ”, true );if ( is_singular() && comments_open() && get_option( ‘thread_comments’ ) ) {
wp_enqueue_script( ‘comment-reply’ );
}
}
add_action( ‘wp_enqueue_scripts’, ‘starkers_script_enqueuer’ );Im using the starkers theme with a locally made theme. On MAMP I had no issues. The website looks fine with no issues but I really want to get rid of this warning from the dashboard.
Any advice would be great!
Thanks
- The topic ‘Warning: Missing argument 1 for WP_Internal_Pointers::enqueue_scripts()’ is closed to new replies.