Description
This filter hook allows you to add to the list of stylesheets in the dropdown list found in the plugin’s options tab. This allows developers and admins to add additional stylesheets a site owner can choose from beyond what is included in the plugin download. Note: you will want to store any additional stylesheets outside of the plugin’s /wp-members/ folder structure so it will not be overwritten when you upgrade the plugin.
Usage
add_filter( 'wpmem_admin_style_list', 'my_styles' ); function my_styles( $list ) { /* * Create an array for the stylesheets you want to add. * The key is what will show in the dropdown, the value * is the path/url to the stylesheet. */ $new_style = array( 'My Stylesheet' => '/wp-content/some-directory/some-sheet.css', 'Some Style' => '/wp-content/some-directory/other-sheet.css', ); /* * Use array_merge to merge the new styles array $new_style * into the dropdown array $list. */ $new_list = array_merge( $list, $new_style ); /* * Return your new list array */ return $new_list; }
Code Snippet Library [Subscriber Content]
See a list of all filter and action hooks