Closed markusfinell closed 1 year ago
Enable a php-based config setup. This will support dynamic values like including any post type, and translatable strings.
add_filter( 'splx_config', 'my_splx_config' ); function my_splx_config( $config ) { $allowed_post_types = get_post_type_slugs(); // some function to get post type slugs $config[] = [ 'id' => 'my-example-dynamic', 'title' => __( 'My dynamic posts or pages example', 'splx' ), 'type' => 'dynamic', 'icon' => 'smiley', 'allowed_post_types' => $allowed_post_types, 'allowed_taxonomies' => [ 'category' ], 'number_of_posts' => [ 2, 8 ], ]; return $config; }
Make sure to add this to docs (this is what is left to do on this card)
Note that the implementation of this is sligtly changes since #27
This was done in https://github.com/Aventyret/solarplexus/commit/0596385744e8ef6c6a806f6e3a96d804630c949e
Enable a php-based config setup. This will support dynamic values like including any post type, and translatable strings.