Advertisement

Get all posts by post meta key and meta value

Most of the times we need to get all all custom fields of all the posts. We can get it with the help of the WP_Query class. Lets check it with simple example.

Show all scheduled events OR corn jobs in WordPress

Description By using the funciton wp_get_schedules () to get all the scheduled events OR corn jobs. Note: Use below code snippet for ONLY debugging/development purpose. Code Snippet Output

Advertisement

Using absint() in WordPress

It convert a value to non-negative integer. Internally this function used abs( intval( $maybeint ) ). You can try below examples yourself. Examples Output var_dump absint( 0 ) 0 int(0) absint( ‘0’ ) 0 int(0) absint( 1 ) 1 int(1) absint( ‘8’ ) 8 int(8) absint( -27 ) 27 int(27) absint( ‘-8’ ) 8 int(8) absint(