mycred_sell_content_post_id
Description
This function attempts to get the current posts ID. It can be used inside a bbPress forum loop in which case the function will attempt to get the forum / topic or replies ID. Must be used inside the loop.
This function is only available if the Sell Content add-on is enabled.
Available since version 1.7
Returns
(int | bool) Either the current post objects ID or FALSE
.
Parameters
Param | Type | Required | Description | |
---|---|---|---|---|
function mycred_sell_content_post_id( |
||||
No params | ||||
) { ... } |
Examples
Example 1: Default usage.
$post_id = mycred_sell_content_post_id(); if ( $post_id !== false ) { }