WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

WC_Admin_Pointers::enqueue_pointers() public WC 1.0

Enqueue pointers and add script to page.

Это метод класса: WC_Admin_Pointers{}

Хуков нет.

Возвращает

Null. Ничего.

Использование

$WC_Admin_Pointers = new WC_Admin_Pointers();
$WC_Admin_Pointers->enqueue_pointers( $pointers );
$pointers(массив) (обязательный)
Pointers data.

Код WC_Admin_Pointers::enqueue_pointers() WC 4.5.2

woocommerce/includes/admin/class-wc-admin-pointers.php
<?php
public function enqueue_pointers( $pointers ) {
	$pointers = rawurlencode( wp_json_encode( $pointers ) );
	wp_enqueue_style( 'wp-pointer' );
	wp_enqueue_script( 'wp-pointer' );
	wc_enqueue_js(
		"jQuery( function( $ ) {
			var wc_pointers = JSON.parse( decodeURIComponent( '{$pointers}' ) );

			setTimeout( init_wc_pointers, 800 );

			function init_wc_pointers() {
				$.each( wc_pointers.pointers, function( i ) {
					show_wc_pointer( i );
					return false;
				});
			}

			function show_wc_pointer( id ) {
				var pointer = wc_pointers.pointers[ id ];
				var options = $.extend( pointer.options, {
					pointerClass: 'wp-pointer wc-pointer',
					close: function() {
						if ( pointer.next ) {
							show_wc_pointer( pointer.next );
						}
					},
					buttons: function( event, t ) {
						var close   = '" . esc_js( __( 'Dismiss', 'woocommerce' ) ) . "',
							next    = '" . esc_js( __( 'Next', 'woocommerce' ) ) . "',
							button  = $( '<a class=\"close\" href=\"#\">' + close + '</a>' ),
							button2 = $( '<a class=\"button button-primary\" href=\"#\">' + next + '</a>' ),
							wrapper = $( '<div class=\"wc-pointer-buttons\" />' );

						button.bind( 'click.pointer', function(e) {
							e.preventDefault();
							t.element.pointer('destroy');
						});

						button2.bind( 'click.pointer', function(e) {
							e.preventDefault();
							t.element.pointer('close');
						});

						wrapper.append( button );
						wrapper.append( button2 );

						return wrapper;
					},
				} );
				var this_pointer = $( pointer.target ).pointer( options );
				this_pointer.pointer( 'open' );

				if ( pointer.next_trigger ) {
					$( pointer.next_trigger.target ).on( pointer.next_trigger.event, function() {
						setTimeout( function() { this_pointer.pointer( 'close' ); }, 400 );
					});
				}
			}
		});"
	);
}