Single Element pure CSS Spinners & Loaders
A Pen by Viduthalai Mani on CodePen.
| { | |
| "name": "foundation-libsass-template", | |
| "version": "0.0.1", | |
| "devDependencies": { | |
| "grunt": "^0.4.5", | |
| "grunt-autoprefixer": "^3.0.3", | |
| "grunt-bower-concat": "^0.6.0", | |
| "grunt-contrib-copy": "^0.8.1", | |
| "grunt-contrib-jshint": "^0.11.2", | |
| "grunt-contrib-uglify": "^0.11.0", |
| 'use strict'; | |
| module.exports = function(grunt) { | |
| // load all grunt tasks | |
| require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks); | |
| var jsFoundation = [ | |
| 'bower_components/foundation/js/foundation/foundation.js', | |
| // 'bower_components/foundation/js/foundation/foundation.abide.js', |
| function get_me_the_email_feed_template() { | |
| add_filter('the_content_feed', 'css_tricks_super_awesome_feed_image_magic'); | |
| include(ABSPATH . '/wp-includes/feed-rss2.php' ); | |
| } | |
| function css_tricks_super_awesome_feed_image_magic($content) { | |
| // Weirdness we need to add to strip the doctype with later. | |
| $content = '<div>' . $content . '</div>'; | |
| $doc = new DOMDocument('1.0', 'utf-8'); | |
| $doc->LoadHTML('<?xml encoding="UTF-8">' . $content); |
| <?php | |
| $terms = get_terms( 'sponsor_type', array( | |
| 'orderby' => 'id', | |
| ) ); | |
| ?> | |
| <?php | |
| foreach( $terms as $term ) { | |
| add_action( 'widgets_init', 'dmc_register_sidebars' ); | |
| function dmc_register_sidebars() { | |
| register_sidebar(array( | |
| 'name'=> 'Conferences Sidebar', | |
| 'id' => 'sidebar-conferences', | |
| 'description' => 'Widgets placed here will appear in the sidebar on the Conferences pages', | |
| 'before_widget' => '<article id="%1$s" class="panel widget %2$s">', | |
| 'after_widget' => '</article>', | |
| 'before_title' => '<h4>', |
| if ( ! current_user_can( 'manage_options' ) ) { | |
| add_action( 'admin_menu', 'admin_menu_example' ); | |
| } | |
| function admin_menu_example() { | |
| remove_menu_page( 'index.php' ); //Dashboard | |
| remove_menu_page( 'edit.php' ); //Posts | |
| remove_menu_page( 'upload.php' ); //Media | |
| remove_menu_page( 'edit.php?post_type=page' ); //Pages | |
| remove_menu_page( 'edit-comments.php' ); //Comments |
Single Element pure CSS Spinners & Loaders
A Pen by Viduthalai Mani on CodePen.
| /** | |
| * Dynamically sets the post_per_page limit to -1 (unlimited) on the Partner archive page. | |
| * @param $wp_query | |
| */ | |
| function limit_posts_per_partner_page( $wp_query ) { | |
| if ( $wp_query->is_post_type_archive && !is_admin() && $wp_query->query['post_type'] == 'partners' ) { | |
| set_query_var( 'posts_per_archive_page', -1 ); | |
| } | |
| } | |
| add_filter( 'pre_get_posts', 'limit_posts_per_partner_page' ); |
| /** | |
| * Dynamically sets the post_per_page limit to 4 on the media post category archive | |
| * @param $wp_query | |
| */ | |
| function limit_posts_per_media_category( $wp_query ) { | |
| if ( is_archive( 4 ) ) { | |
| set_query_var( 'posts_per_page', 2 ); | |
| } | |
| } | |
| add_filter( 'pre_get_posts', 'limit_posts_per_media_category' ); |