• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
Yoast SEO a2z

Yoast SEO a2z

WordPress SEO a2z

  • Home
  • Plugins
  • Blocks
  • Shortcodes
  • APIs
  • Classes
  • Files
  • Hooks
  • Sitemap
  • Blog
Home / APIs / WPSEO_Primary_Term_Admin::get_current_id() – Gets the current post ID.

You appear to be a bot. Output may be restricted

Description

Gets the current post ID.

Usage

$int = WPSEO_Primary_Term_Admin::get_current_id();

Parameters

Returns

int The post ID.

Source

File name: wordpress-seo/admin/class-primary-term-admin.php
Lines:

1 to 8 of 8
  protected function get_current_id() {
    $post_id = filter_input( INPUT_GET, 'post', FILTER_SANITIZE_NUMBER_INT );
    if ( empty( $post_id ) && isset( $GLOBALS['post_ID'] ) ) {
      $post_id = filter_var( $GLOBALS['post_ID'], FILTER_SANITIZE_NUMBER_INT );
    }

    return $post_id;
  }
 

 View on GitHub View on Trac

Published: 27th November 2019 | Last updated: 27th November 2019

Primary Sidebar

Information

Function name: WPSEO_Primary_Term_Admin::get_current_id
Class ref: WPSEO_Primary_Term_Admin
Plugin ref: Yoast SEO
Version: 20.2.1
Sourcefile: admin/class-primary-term-admin.php
File ref: admin/class-primary-term-admin.php
Deprecated?: No
API Letters: A,G,P,T,W

Footer

Yoast SEO a2z
Yoast SEO a2z
WordPress SEO a2z
WordPress 6.1.1
WordPress a2z
WordPress core a2z
Genesis Theme Framework a2z
Jetpack a2z
WordPress develop tests
Easy Digital Downloads a2z
WooCommerce a2z
Yoast SEO a2z
WordPress Blocks

Site:  wordpress-seo.wp-a2z.org
© Copyright Yoast SEO a2z 2017-2023. All rights reserved.


Website designed and developed by Herb Miller
Proudly powered by WordPress and oik plugins

  • Home
  • Blog
  • Sitemap
  • Sites