The popular open-source contract for web designers and developers by Stuff & Nonsense
- Originally published: 23/12/2008
- Revised date: 15/12/2013
- Revised date: 7/30/2015
- Original post
| <?php | |
| class Aristath_Dynamic_CSS { | |
| public $stylesheet_id; | |
| public function __construct() { | |
| add_action( 'customize_save_after', array( $this, 'make_css' ) ); | |
| } |
| <?php | |
| /* ========== | |
| Get Split Nav | |
| include $menu_name for the menu you want and $raw=true if you want to return just the menu objects | |
| ========== */ | |
| function get_split_nav($menu_name=null, $raw=false){ | |
| if($menu_name == null || !is_string($menu_name)){ | |
| return false; | |
| } | |
| $output = new stdClass(); |
| add_filter( 'the_content', 'prefix_insert_post_ads' ); | |
| /** | |
| * Insert code for ads after second paragraph of single post content. | |
| * | |
| * @param string $content Post content | |
| * | |
| * @return string Amended content | |
| */ | |
| function prefix_insert_post_ads( $content ) { | |
| $content_callout = '<h4>Insert code for ads after second paragraph of single post content.</h4>'; |