*/ public $display_types = array( 'posts' ); /** * Update the query with this extension's additional configuration. * * @param \eslin87\AlphaListing\Query $query The query. * @param string $display The display/query type. * @param string $key The name of the attribute. * @param mixed $value The shortcode attribute value. * @param array $attributes The complete set of shortcode attributes. * @return mixed The updated query. */ public function shortcode_query_for_display_and_attribute( $query, string $display, string $key, $value, array $attributes ) { if ( isset( $attributes['get-all-children'] ) && alphalisting_is_truthy( $attributes['get-all-children'] ) ) { $query['child_of'] = $value; } else { $query['post_parent'] = $value; } return $query; } }