Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.
LLMS_Blocks_Visibility::get_post_ids_from_block_attributes( array $attrs )
Parse post ids from block visibility in attributes.
Parameters Parameters
- $attrs
-
(array) (Required) Block attributes.
Return Return
(array)
Source Source
File: libraries/lifterlms-blocks/includes/class-llms-blocks-visibility.php
private function get_post_ids_from_block_attributes( $attrs ) { $ids = array(); if ( 'this' === $attrs['llms_visibility_in'] ) { $ids[] = get_the_ID(); } elseif ( ! empty( $attrs['llms_visibility_posts'] ) ) { $ids = wp_list_pluck( json_decode( $attrs['llms_visibility_posts'] ), 'id' ); } return $ids; }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
1.0.0 | Introduced. |