absint() WordPress Function
The absint() function is used to convert a value to a non-negative integer.
absint( mixed $maybeint ) #
Convert a value to non-negative integer.
Parameters
- $maybeint
(mixed)(Required)Data you wish to have converted to a non-negative integer.
Return
(int) A non-negative integer.
Source
File: wp-includes/functions.php
function absint( $maybeint ) { return abs( (int) $maybeint ); }
Expand full source codeCollapse full source codeView on TracView on GitHub
Related
Used By
Used By | Description |
---|---|
wp-includes/rest-api/endpoints/class-wp-rest-menu-items-controller.php:WP_REST_Menu_Items_Controller::prepare_item_for_response() | Prepares a single post output for response. |
wp-includes/rest-api/endpoints/class-wp-rest-menu-items-controller.php:WP_REST_Menu_Items_Controller::prepare_item_for_database() | Prepares a single post for create or update. |
wp-includes/rest-api/endpoints/class-wp-rest-pattern-directory-controller.php:WP_REST_Pattern_Directory_Controller::prepare_item_for_response() | Prepare a raw block pattern before it gets output in a REST API response. |
wp-includes/blocks.php:build_query_vars_from_query_block() | Helper function that constructs a WP_Query args array from a |
wp-includes/sitemaps.php:get_sitemap_url() | Retrieves the full URL for a sitemap. |
wp-includes/meta.php:get_metadata_raw() | Retrieves raw metadata value for the specified object. |
wp-includes/media.php:wp_filter_content_tags() | Filters specific tags in post content and modifies their markup. |
wp-includes/sitemaps/class-wp-sitemaps.php:WP_Sitemaps::render_sitemaps() | Renders sitemap templates based on rewrite rules. |
wp-includes/user.php:wp_get_user_request() | Returns the user request object for the specified request ID. |
wp-includes/user.php:wp_validate_user_request_key() | Validates a user request by comparing the key with the request’s key. |
wp-includes/user.php:wp_send_user_request() | Send a confirmation request email to confirm an action. |
wp-admin/includes/class-wp-privacy-requests-table.php:WP_Privacy_Requests_Table::get_views() | Get an associative array ( id => link ) with the list of views available on this table. |
wp-admin/includes/class-wp-privacy-requests-table.php:WP_Privacy_Requests_Table::prepare_items() | Prepare items to output. |
wp-admin/includes/privacy-tools.php:_wp_privacy_resend_request() | Resend an existing request and return the result. |
wp-admin/includes/privacy-tools.php:_wp_privacy_completed_request() | Marks a request as completed by the admin and logs the current timestamp. |
wp-admin/includes/privacy-tools.php:_wp_personal_data_handle_actions() | Handle list table actions. |
wp-includes/class-wp-user.php:WP_User::for_site() | Sets the site to operate on. Defaults to the current site. |
wp-includes/class-wp-customize-manager.php:WP_Customize_Manager::handle_load_themes_request() | Loads themes into the theme browsing/installation UI. |
wp-includes/class-wp-roles.php:WP_Roles::for_site() | Sets the site to operate on. Defaults to the current site. |
wp-admin/includes/class-wp-community-events.php:WP_Community_Events::__construct() | Constructor for WP_Community_Events. |
wp-admin/includes/class-wp-community-events.php:WP_Community_Events::cache_events() | Caches an array of events data from the Events API. |
wp-includes/class-wp-customize-manager.php:WP_Customize_Manager::_validate_header_video() | Callback for validating the header_video value. |
wp-includes/theme.php:get_header_video_url() | Retrieves header video URL for custom header. |
wp-includes/theme.php:get_header_video_settings() | Retrieves header video settings. |
wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php:WP_REST_Users_Controller::prepare_item_for_database() | Prepares a single user for creation or update. |
wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php:WP_REST_Users_Controller::delete_item() | Deletes a single user. |
wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php:WP_REST_Comments_Controller::get_items() | Retrieves a list of comment items. |
wp-includes/class-wp-term-query.php:WP_Term_Query::parse_query() | Parse arguments passed to the term query with default query parameters. |
wp-includes/load.php:get_current_network_id() | Retrieves the current network ID. |
wp-includes/class-wp-network-query.php:WP_Network_Query::get_network_ids() | Used internally to get a list of network IDs matching the query vars. |
wp-includes/script-loader.php:wp_localize_jquery_ui_datepicker() | Localizes the jQuery UI datepicker. |
wp-includes/class-wp-http-requests-response.php:WP_HTTP_Requests_Response::set_status() | Sets the 3-digit HTTP status code. |
wp-includes/class-wp-site-query.php:WP_Site_Query::get_site_ids() | Used internally to get a list of site IDs matching the query vars. |
wp-includes/embed.php:get_oembed_response_data_rich() | Filters the oEmbed response data to return an iframe embed code. |
wp-includes/embed.php:get_post_embed_html() | Retrieves the embed code for a specific post. |
wp-includes/embed.php:get_oembed_response_data() | Retrieves the oEmbed response data for a given post. |
wp-includes/theme.php:get_header_image_tag() | Creates image tag markup for a custom header image. |
wp-includes/media.php:wp_get_attachment_image_srcset() | Retrieves the value for an image attachment’s ‘srcset’ attribute. |
wp-includes/media.php:wp_get_attachment_image_sizes() | Retrieves the value for an image attachment’s ‘sizes’ attribute. |
wp-includes/media.php:wp_calculate_image_sizes() | Creates a ‘sizes’ attribute value for an image. |
wp-includes/media.php:_wp_get_image_size_from_meta() | Get the image size as array from its meta data. |
wp-includes/class-wp-http-response.php:WP_HTTP_Response::set_status() | Sets the 3-digit HTTP status code. |
wp-includes/class-wp-comment-query.php:WP_Comment_Query::get_comment_ids() | Used internally to get a list of comment IDs matching the query vars. |
wp-includes/comment.php:wp_handle_comment_submission() | Handles the submission of a comment, usually posted to wp-comments-post.php via a comment form. |
wp-includes/customize/class-wp-customize-cropped-image-control.php:WP_Customize_Cropped_Image_Control::to_json() | Refresh the parameters passed to the JavaScript via JSON. |
wp-includes/class-wp-customize-nav-menus.php:WP_Customize_Nav_Menus::search_available_items_query() | Performs post queries for available-item searching. |
wp-includes/class-wp-customize-nav-menus.php:WP_Customize_Nav_Menus::ajax_load_available_items() | Ajax handler for loading available menu items. |
wp-includes/class-wp-customize-nav-menus.php:WP_Customize_Nav_Menus::ajax_search_available_items() | Ajax handler for searching available menu items. |
wp-admin/includes/ajax-actions.php:wp_ajax_crop_image() | Ajax handler for cropping an image. |
wp-includes/link-template.php:get_avatar_data() | Retrieves default data about the avatar. |
wp-admin/includes/class-custom-background.php:Custom_Background::ajax_background_add() | Ajax handler for adding custom background context to an attachment. |
wp-admin/includes/class-wp-list-table.php:WP_List_Table::get_pagenum() | Gets the current page number. |
wp-admin/includes/misc.php:wp_check_locked_posts() | Checks lock status for posts displayed on the Posts screen. |
wp-admin/includes/misc.php:wp_refresh_post_lock() | Checks lock status on the New/Edit Post screen and refresh the lock. |
wp-admin/includes/misc.php:wp_refresh_post_nonces() | Checks nonce expiration on the New/Edit Post screen and refresh if needed. |
wp-admin/includes/dashboard.php:wp_dashboard() | Displays the dashboard. |
wp-admin/includes/media.php:get_media_item() | Retrieves HTML form for modifying the image attachment. |
wp-admin/includes/media.php:media_upload_form() | Outputs the legacy media upload form. |
wp-admin/includes/ajax-actions.php:wp_ajax_save_attachment_order() | Ajax handler for saving the attachment order. |
wp-admin/includes/ajax-actions.php:wp_ajax_get_attachment() | Ajax handler for getting an attachment. |
wp-admin/includes/ajax-actions.php:wp_ajax_save_attachment() | Ajax handler for updating attachment attributes. |
wp-admin/includes/ajax-actions.php:wp_ajax_save_attachment_compat() | Ajax handler for saving backward compatible attachment attributes. |
wp-admin/includes/ajax-actions.php:wp_ajax_wp_link_ajax() | Ajax handler for internal linking. |
wp-admin/includes/ajax-actions.php:wp_ajax_get_comments() | Ajax handler for getting comments. |
wp-admin/includes/ajax-actions.php:wp_ajax_replyto_comment() | Ajax handler for replying to a comment. |
wp-admin/includes/revision.php:wp_prepare_revisions_for_js() | Prepare revisions for JavaScript. |
wp-admin/includes/ajax-actions.php:wp_ajax_autocomplete_user() | Ajax handler for user autocomplete. |
wp-admin/includes/class-wp-comments-list-table.php:WP_Comments_List_Table::get_views() | |
wp-admin/includes/class-wp-comments-list-table.php:WP_Comments_List_Table::__construct() | Constructor. |
wp-admin/includes/nav-menu.php:wp_nav_menu_item_post_type_meta_box() | Displays a meta box for a post type menu item. |
wp-admin/includes/nav-menu.php:wp_nav_menu_item_taxonomy_meta_box() | Displays a meta box for a taxonomy menu item. |
wp-admin/includes/comment.php:get_pending_comments_num() | Get the number of pending comments on a post or posts |
wp-admin/includes/class-custom-image-header.php:Custom_Image_Header::get_header_dimensions() | Calculate width and height based on what the currently selected theme supports. |
wp-admin/includes/class-custom-image-header.php:Custom_Image_Header::ajax_header_crop() | Gets attachment uploaded by Media Manager, crops it, then saves it as a new object. Returns JSON-encoded object details. |
wp-admin/includes/class-custom-image-header.php:Custom_Image_Header::ajax_header_add() | Given an attachment ID for a header image, updates its “last used” timestamp to now. |
wp-admin/includes/class-custom-image-header.php:Custom_Image_Header::ajax_header_remove() | Given an attachment ID for a header image, unsets it as a user-uploaded header image for the active theme. |
wp-admin/includes/class-custom-image-header.php:Custom_Image_Header::step_2() | Display second step of custom header image page. |
wp-admin/includes/class-custom-image-header.php:Custom_Image_Header::step_3() | Display third step of custom header image page. |
wp-admin/includes/class-custom-image-header.php:Custom_Image_Header::js_2() | Display JavaScript based on Step 2. |
wp-admin/includes/class-custom-background.php:Custom_Background::wp_set_background_image() | |
wp-includes/class-wp-customize-manager.php:WP_Customize_Manager::register_controls() | Registers some default controls. |
wp-includes/formatting.php:sanitize_option() | Sanitizes various option values based on the nature of the option. |
wp-includes/pluggable.php:wp_rand() | Generates a random number. |
wp-includes/general-template.php:wp_get_archives() | Display archive links based on type and format. |
wp-includes/class-wp-query.php:WP_Query::get_posts() | Retrieves an array of posts based on query variables. |
wp-includes/class-wp-query.php:WP_Query::parse_query() | Parse a query string and set query type booleans. |
wp-includes/class-wp-query.php:WP_Query::parse_tax_query() | Parses various taxonomy related query vars. |
wp-includes/load.php:get_current_blog_id() | Retrieve the current site ID. |
wp-includes/functions.php:get_status_header_desc() | Retrieve the description for the HTTP status. |
wp-includes/functions.php:number_format_i18n() | Convert float number to format based on the locale. |
wp-includes/widgets/class-wp-widget-recent-comments.php:WP_Widget_Recent_Comments::update() | Handles updating settings for the current Recent Comments widget instance. |
wp-includes/widgets/class-wp-widget-recent-comments.php:WP_Widget_Recent_Comments::form() | Outputs the settings form for the Recent Comments widget. |
wp-includes/widgets/class-wp-widget-recent-comments.php:WP_Widget_Recent_Comments::widget() | Outputs the content for the current Recent Comments widget instance. |
wp-includes/widgets/class-wp-widget-recent-posts.php:WP_Widget_Recent_Posts::widget() | Outputs the content for the current Recent Posts widget instance. |
wp-includes/widgets/class-wp-widget-recent-posts.php:WP_Widget_Recent_Posts::form() | Outputs the settings form for the Recent Posts widget. |
wp-includes/link-template.php:get_post_comments_feed_link() | Retrieves the permalink for the post comments feed. |
wp-includes/feed.php:rss_enclosure() | Display the rss enclosure for the current post. |
wp-includes/class-wp-user-query.php:WP_User_Query::prepare_query() | Prepares the query variables. |
wp-includes/media.php:wp_video_shortcode() | Builds the Video shortcode output. |
wp-includes/media.php:wp_get_attachment_image() | Get an HTML img element representing an image attachment. |
wp-includes/media.php:add_image_size() | Register a new image size. |
wp-includes/post.php:set_post_thumbnail() | Sets the post thumbnail (featured image) for the given post. |
wp-includes/post.php:wp_get_recent_posts() | Retrieve a number of recent posts. |
wp-includes/post.php:is_sticky() | Determines whether a post is sticky. |
wp-includes/post.php:get_post_custom() | Retrieve post meta fields, based on post ID. |
wp-includes/rewrite.php:url_to_postid() | Examines a URL and try to determine the post ID it represents. |
wp-includes/class-wp-xmlrpc-server.php:wp_xmlrpc_server::mw_getRecentPosts() | Retrieve list of recent posts. |
wp-includes/class-wp-xmlrpc-server.php:wp_xmlrpc_server::mt_getRecentPostTitles() | Retrieve the post titles of recent posts. |
wp-includes/class-wp-xmlrpc-server.php:wp_xmlrpc_server::blogger_getRecentPosts() | Retrieve list of recent posts. |
wp-includes/class-wp-xmlrpc-server.php:wp_xmlrpc_server::wp_getMediaLibrary() | Retrieves a collection of media library items (or attachments) |
wp-includes/class-wp-xmlrpc-server.php:wp_xmlrpc_server::wp_getComments() | Retrieve comments. |
wp-includes/class-wp-xmlrpc-server.php:wp_xmlrpc_server::wp_newComment() | Create new comment. |
wp-includes/class-wp-xmlrpc-server.php:wp_xmlrpc_server::wp_getPosts() | Retrieve posts. |
wp-includes/class-wp-xmlrpc-server.php:wp_xmlrpc_server::wp_getTerms() | Retrieve all terms for a taxonomy. |
wp-includes/class-wp-xmlrpc-server.php:wp_xmlrpc_server::wp_getUsers() | Retrieve users. |
wp-includes/class-wp-xmlrpc-server.php:wp_xmlrpc_server::_insert_post() | Helper method for wp_newPost() and wp_editPost(), containing shared logic. |
wp-includes/customize/class-wp-customize-header-image-control.php:WP_Customize_Header_Image_Control::enqueue() | |
wp-includes/customize/class-wp-customize-header-image-control.php:WP_Customize_Header_Image_Control::render_content() | |
wp-includes/comment.php:wp_new_comment() | Adds a new comment to the database. |
wp-includes/meta.php:delete_metadata() | Deletes metadata for the specified object. |
wp-includes/meta.php:metadata_exists() | Determines if a meta field with the given key exists for the given object ID. |
wp-includes/class-wp-editor.php:_WP_Editors::wp_link_query() | Performs post queries for internal linking. |
wp-includes/meta.php:add_metadata() | Adds metadata for the specified object. |
wp-includes/meta.php:update_metadata() | Updates metadata for the specified object. If no value already exists for the specified object ID and metadata key, the metadata will be added. |
Changelog
Version | Description |
---|---|
2.5.0 | Introduced. |