/home/u523506497/domains/mymelon.in/public_html/wp-admin/includes UP
<?php
/**
* Administration API: WP_Internal_Pointers class
*
* @package WordPress
* @subpackage Administration
* @since 4.4.0
*/
/**
* Core class used to implement an internal admin pointers API.
*
* @since 3.3.0
*/
#[AllowDynamicProperties]
final class WP_Internal_Pointers {
/**
* Initializes the new feature pointers.
*
* @since 3.3.0
*
* All pointers can be disabled using the following:
* remove_action( 'admin_enqueue_scripts', array( 'WP_Internal_Pointers', 'enqueue_scripts' ) );
*
* Individual pointers (e.g. wp390_widgets) can be disabled using the following:
*
* function yourprefix_remove_pointers() {
* remove_action(
* 'admin_print_footer_scripts',
* array( 'WP_Internal_Pointers', 'pointer_wp390_widgets' )
* );
* }
* add_action( 'admin_enqueue_scripts', 'yourprefix_remove_pointers', 11 );
*
* @param string $hook_suffix The current admin page.
*/
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' );
}
/**
* Prints the pointer JavaScript data.
*
* @since 3.3.0
*
* @param string $pointer_id The pointer ID.
* @param string $selector The HTML elements, on which the pointer should be attached.
* @param array $args Arguments to be passed to the pointer JS (see wp-pointer.js).
*/
private static function print_js( $pointer_id, $selector, $args ) {
if ( empty( $pointer_id ) || empty( $selector ) || empty( $args ) || empty( $args['content'] ) ) {
return;
}
?>
<script>
(function($){
var options = <?php echo wp_json_encode( $args, JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ); ?>, setup;
if ( ! options )
return;
options = $.extend( options, {
close: function() {
$.post( ajaxurl, {
pointer: '<?php echo $pointer_id; ?>',
action: 'dismiss-wp-pointer'
});
}
});
setup = function() {
$('<?php echo $selector; ?>').first().pointer( options ).pointer('open');
};
if ( options.position && options.position.defer_loading )
$(window).bind( 'load.wp-pointers', setup );
else
$( function() {
setup();
} );
})( jQuery );
</script>
<?php
}
public static function pointer_wp330_toolbar() {}
public static function pointer_wp330_media_uploader() {}
public static function pointer_wp330_saving_widgets() {}
public static function pointer_wp340_customize_current_theme_link() {}
public static function pointer_wp340_choose_image_from_library() {}
public static function pointer_wp350_media() {}
public static function pointer_wp360_revisions() {}
public static function pointer_wp360_locks() {}
public static function pointer_wp390_widgets() {}
public static function pointer_wp410_dfw() {}
public static function pointer_wp496_privacy() {}
/**
* Prevents new users from seeing existing 'new feature' pointers.
*
* @since 3.3.0
*
* @param int $user_id User ID.
*/
public static function dismiss_pointers_for_new_users( $user_id ) {
add_user_meta( $user_id, 'dismissed_wp_pointers', '' );
}
}
| admin-filters.php | 8034 | V |
| admin.php | 3628 | V |
| ajax-actions.php | 154215 | V |
| bookmark.php | 11678 | V |
| class-automatic-upgrader-skin.php | 3663 | V |
| class-bulk-plugin-upgrader-skin.php | 2590 | V |
| class-bulk-theme-upgrader-skin.php | 2660 | V |
| class-bulk-upgrader-skin.php | 6661 | V |
| class-core-upgrader.php | 15198 | V |
| class-custom-background.php | 21750 | V |
| class-custom-image-header.php | 49479 | V |
| class-file-upload-upgrader.php | 4163 | V |
| class-ftp-pure.php | 5426 | V |
| class-ftp-sockets.php | 8479 | V |
| class-ftp.php | 27342 | V |
| class-language-pack-upgrader-skin.php | 2870 | V |
| class-language-pack-upgrader.php | 15528 | V |
| class-pclzip.php | 196667 | V |
| class-plugin-installer-skin.php | 11947 | V |
| class-plugin-upgrader-skin.php | 3278 | V |
| class-plugin-upgrader.php | 23249 | V |
| class-theme-installer-skin.php | 12974 | V |
| class-theme-upgrader-skin.php | 4176 | V |
| class-theme-upgrader.php | 26783 | V |
| class-walker-category-checklist.php | 5092 | V |
| class-walker-nav-menu-checklist.php | 5781 | V |
| class-walker-nav-menu-edit.php | 14298 | V |
| class-wp-ajax-upgrader-skin.php | 4193 | V |
| class-wp-application-passwords-list-table.php | 6949 | V |
| class-wp-automatic-updater.php | 61905 | V |
| class-wp-comments-list-table.php | 34620 | V |
| class-wp-community-events.php | 18647 | V |
| class-wp-debug-data.php | 71043 | V |
| class-wp-filesystem-base.php | 25622 | V |
| class-wp-filesystem-direct.php | 19166 | V |
| class-wp-filesystem-ftpext.php | 24926 | V |
| class-wp-filesystem-ftpsockets.php | 20356 | V |
| class-wp-filesystem-ssh2.php | 25815 | V |
| class-wp-importer.php | 8279 | V |
| class-wp-internal-pointers.php | 4593 | V |
| class-wp-links-list-table.php | 10103 | V |
| class-wp-list-table-compat.php | 1497 | V |
| class-wp-list-table.php | 54873 | V |
| class-wp-media-list-table.php | 27786 | V |
| class-wp-ms-sites-list-table.php | 23598 | V |
| class-wp-ms-themes-list-table.php | 30266 | V |
| class-wp-ms-users-list-table.php | 16188 | V |
| class-wp-plugin-install-list-table.php | 25076 | V |
| class-wp-plugins-list-table.php | 61549 | V |
| class-wp-post-comments-list-table.php | 1453 | V |
| class-wp-posts-list-table.php | 68457 | V |
| class-wp-privacy-data-export-requests-list-table.php | 6026 | V |
| class-wp-privacy-data-removal-requests-list-table.php | 6178 | V |
| class-wp-privacy-policy-content.php | 33021 | V |
| class-wp-privacy-requests-table.php | 14806 | V |
| class-wp-screen.php | 37566 | V |
| class-wp-site-health-auto-updates.php | 14337 | V |
| class-wp-site-health-index.php | 146 | V |
| class-wp-site-health.php | 131168 | V |
| class-wp-site-icon-ajax-response.php | 0 | V |
| class-wp-site-icon.php | 6489 | V |
| class-wp-terms-list-table.php | 21584 | V |
| class-wp-theme-install-list-table.php | 15703 | V |
| class-wp-themes-list-table.php | 10339 | V |
| class-wp-upgrader-skin.php | 7064 | V |
| class-wp-upgrader-skins.php | 1477 | V |
| class-wp-upgrader.php | 48367 | V |
| class-wp-users-list-table.php | 19351 | V |
| comment.php | 9457 | V |
| continents-cities.php | 20540 | V |
| credits.php | 5832 | V |
| dashboard.php | 70616 | V |
| deprecated.php | 41960 | V |
| edit-tag-messages.php | 1478 | V |
| error_log | 538 | V |
| export-firewall.php | 0 | V |
| export.php | 25976 | V |
| file.php | 98424 | V |
| image-edit.php | 44147 | V |
| image.php | 45172 | V |
| import.php | 6617 | V |
| list-table.php | 3802 | V |
| media.php | 120241 | V |
| menu.php | 9640 | V |
| meta-boxes.php | 66857 | V |
| misc.php | 46443 | V |
| ms-admin-filters.php | 1296 | V |
| ms-deprecated.php | 3770 | V |
| ms.php | 36007 | V |
| nav-menu.php | 49136 | V |
| network.php | 27038 | V |
| noop.php | 1148 | V |
| options.php | 4303 | V |
| plugin-install.php | 39187 | V |
| plugin.php | 93682 | V |
| post.php | 82838 | V |
| privacy-tools.php | 33732 | V |
| revision.php | 16629 | V |
| schema.php | 45583 | V |
| screen.php | 6390 | V |
| taxonomy.php | 8483 | V |
| template.php | 99830 | V |
| theme-install.php | 7010 | V |
| theme.php | 47533 | V |
| translation-install.php | 11048 | V |
| update-core.php | 86142 | V |
| update.php | 34829 | V |
| upgrade.php | 116674 | V |
| user.php | 23913 | V |
| widgets.php | 10546 | V |