8000 GitHub - pjsinco/elit: EO Elit WordPress theme
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

pjsinco/elit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

###Fri Jan 23 16:55:08 2015 CST

  • grunt + wp

  • register vs. enqueue a script

    • Register all of them

    The reason I register all of my scripts in this function is simple: it helps me keep track. Sure, I could just enqueue them all in this function with conditionals, but sometimes conditionals get confusing, and I like to take advantage of the ability to enqueue in templates, because it’s simple. I could also skip the register function for the scripts I enqueue right away, but again, I do it for organization. I register them there, together, so that I know what I’ve got and I know what I’m loading on every page versus in specific places. I also tend to make notes in comments by the register function to note where I’m enqueuing, if not immediately.

    <?php
    /*
     * WordPress Sample function and action
     * for loading scripts in themes
     */
     
    // Let's hook in our function with the javascript files with the wp_enqueue_scripts hook 
    
    add_action( 'wp_enqueue_scripts', 'wpcandy_load_javascript_files' );
    
    // Register some javascript files, because we love javascript files. Enqueue a couple as well 
    
    function wpcandy_load_javascript_files() {
    
      wp_register_script( 'info-caroufredsel', get_template_directory_uri() . '/js/jquery.carouFredSel-5.5.0-packed.js', array('jquery'), '5.5.0', true );
      wp_register_script( 'info-carousel-instance', get_template_directory_uri() . '/js/info-carousel-instance.js', array('info-caroufredsel'), '1.0', true );
    
      wp_register_script( 'jquery.flexslider', get_template_directory_uri().'/js/jquery.flexslider-min.js', array('jquery'), '1.7', true );
      wp_register_script( 'home-page-main-flex-slider', get_template_directory_uri().'/js/home-page-main-flex-slider.js', array('jquery.flexslider'), '1.0', true );
    
      wp_enqueue_script( 'info-carousel-instance' );
      
      if ( is_front_page() ) {
        wp_enqueue_script('home-page-main-flex-slider');
      }
    
    }
    ?>
  • the new script_loader_tag filter

    • codex
    • we can use it to add 'async' to our scripts
  • html5 boilerplate

###Sat Jan 24 10:30:04 2015 CST

###Sun Jan 25 09:17:51 2015 CST

  • make an svg sprite sheet with icomoon

  • should our make a row of stickers instead of mixing them in?

  • smashing mag on wp custom taxonomies

  • our potential custom taxonomies:

    • school
    • state (region?)
    • specialty
  • Inside the AOA should probably be a separate wp install entirely, like insidetheaoa.osteopathic.org

    • that would be easier to maintain, it seems
    • our 'inside the aoa' listing on the front page could be an rss feed from the blog
  • How do we create a taxonomy for a series?

    • maybe the taxonomy is hierarchical (has descendants), called 'series'

###Mon Jan 26 8:33:12 2015 CST

###Tue Jan 27 10:59:57 2015 CST

###Wed Jan 28 11:23:42 2015 CST

###Thu Jan 29 08:59:37 2015 CST

###Fri Jan 30 07:09:27 2015 CST

  • installed kint debugger ``` Dumping variables is easy:

    d($variable) will output a styled, collapsible container with your variable information
    dd($variable) will do exactly as d() except halt execution of the script
    s($variable) will output a simple, un-styled whitespace container
    sd($variable) will do exactly as s() except halt execution of the script
    Backtrace is also easy:
    
    Kint::trace() The displayed information for each step of the trace includes the source snippet, passed arguments and the object at the time of calling
    We've also baked in a few functions that are WordPress specific:
    
    dump_wp_query()
    dump_wp()
    dump_post()
    ```
    
  • custom field: elit_kicker

    • for adding the kicker to the post
  • removed unusued custom fields

  • How to Display WordPress Post Thumbnails with Captions

    WordPress stores each image as its own post. So the Title of the 
    Image will be the title of the post, Caption will be the excerpt of 
    the post, and Description will be the content of the post.
    
    // ex.
    <?php the_post_thumbnail();  
    echo get_post(get_post_thumbnail_id())->post_excerpt; ?>
  • animating height

###Sat Jan 31 06:53:09 2015 CST

  • TODO AP-Styleify our dates

  • caption reveals on hover

  • 4 things a browser can animate cheaply via html5rocks

    1. position
    2. scale
    3. rotation
    4. opacity
  • TODO we have a problem with double downloads using the RICG Responsive Images plugin

###Sun Feb 1 05:21:36 2015 CST

###Mon Feb 2 07:47:24 2015 CST

###Tue Feb 3 05:07:21 2015 CST

###Wed Feb 4 10:09:37 2015 CST

  • TODO meta box for kicker

  • TODO need credit at bottom of page for standalone feature images

  • scaffolding for a meta box

    /**
     * KICKER META BOX
     *
     */
    add_action( 'load-post.php' , 'elit_kicker_meta_box_setup' );
    add_action( 'load-post-new.php' , 'elit_kicker_meta_box_setup' );
    
    function elit_kicker_meta_box_setup() {
    
    }
    
    function elit_add_kicker_meta_box() {
      
    }
    
    function elit_kicker_meta_box( $object, $box ) {
      
    }
    
    function elit_save_kicker_meta( $post_id, $post ) {
      
    }
    
    /**
     * END KICKER META BOX
     */
  • TODO refactor our meta box creations -- we're repeating tons of code!

###Thu Feb 5 09:24:18 2015 CST

###Fri Feb 6 11:10:25 2015 CST

###Mon Feb 9 18:00:33 2015 CST

###Tue Feb 10 04:57:32 2015 CST

###Wed Feb 11 06:00:27 2015 CST

###Thu Feb 12 06:37:19 2015 CST

###Fri Feb 13 06:37:10 2015 CST

###Sat Feb 14 09:49:19 2015 CST

in functions.php

$some_var = 'foo';

in footer.php (for example)

global $some_var;

###Sun Feb 15 08:52:23 2015 CST

###Mon Feb 16 04:27:42 2015 CST

###Tue Feb 17 03:55:18 2015 CST

###Wed Feb 18 16:02:45 2015 CST

###Thu Feb 19 13:18:15 2015 CST

###Fri Feb 20 04:16:43 2015 CST

###Sat Feb 21 06:31:02 2015 CST

###Sun Feb 22 05:37:07 2015 CST

###Mon Feb 23 06:11:39 2015 CST

###Wed Feb 25 11:58:03 2015 CST

###Thu Feb 26 08:15:41 2015 CST

###Fri Feb 27 08:26:00 2015 CST

###Sat Feb 28 09:35:32 2015 CST

###Sun Mar 1 08:24:06 2015 CST

###Mon Mar 2 10:32:34 2015 CST

###Tue Mar 3 08:44:45 2015 CST

  • https://developers.facebook.com/tools/debug/

  • Social sharing link formats:

    • Facebook
    https://www.facebook.com/sharer/sharer.php?u=URL_TO_SHARE
    • Twitter
    https://twitter.com/intent/tweet?text=TWEET_TO_SHARE&url=URL_TO_SHARE&via=USERNAME_TO_SHARE
    <a href="https://www.linkedin.com/shareArticle
     ?mini=true
     &url=https%3A%2F%2Fjonsuh.com%2F
     &title=Jonathan%20Suh
     &source=https%3A%2F%2Fjonsuh.com%2F
     &summary=Short%20summary
     target="_blank">Share on LinkedIn</a>
    <a href="https://www.pinterest.com/pin/create/button/
     ?url=https%3A%2F%2Fjonsuh.com%2F
     &media=https%3A%2F%2Fjonsuh.com%2Ficon.png
     &description=Short%20description
     &hashtags=web,development" 
     target="_blank">Share on Pinterest</a>

    *[Email](Quick Way to Add “Email This” Button to WordPress Posts)

    <a href="mailto:?subject=<?php the_title();?>&amp;body=<?php the_permalink() ?>" title="Send this article to a friend!">Email this</a>">

###Wed Mar 4 05:38:28 2015 CST

###Thu Mar 5 04:16:46 2015 CST

###Fri Mar 6 04:35:52 2015 CST

###Sat Mar 7 09:33:09 2015 CST

###Sun Mar 8 18:46:02 2015 CDT

###Mon Mar 9 05:59:30 2015 CDT

###Wed Mar 11 09:53:01 2015 CDT

###Thu Mar 12 10:21:31 2015 CDT

###Fri Mar 13 13:54:01 2015 CDT

###Mon Mar 16 17:24:05 2015 CDT

###Tue Mar 17 06:23:31 2015 CDT

###Thu Mar 19 11:20:03 2015 CDT

###Wed Mar 25 14:49:08 2015 CDT

  • how to fix the RSS feed XML error

    • in wp-includes/feed-rss.php:
    // this code is already there
    header('Content-Type: text/xml; charset=' . get_option('blog_charset'), true);
    $more = 1;
    
    // new code block, directly under the one above
    $out = ob_get_contents();
    $out = str_replace(array("\n", "\r", "\t", " "), "", $input);
    ob_end_clean();

###Mon Mar 30 09:12:01 2015 CDT

###Tue Mar 31 10:19:23 2015 CDT

  • This plugin gives an indication of how to see how much of a page is used by the story vs how much is used by comments. It uses jQuery offset() and height():
var display_height = parseInt( $(window).height() );
var page_height = parseInt( $(document).height() );
var comments_top = parseInt( $('#comments').offset().top );
  • So when I get this:
PHP Warning:  require_once(/tmp/wordpress//wp-includes/class-phpmailer.php): failed to open stream: No such file or directory in /srv/www/wordpress-develop/tests/phpunit/includes/mock-mailer.php on line 2
PHP Fatal error:  require_once(): Failed opening required '/tmp/wordpress//wp-includes/class-phpmailer.php' (include_path='/usr/local/src/composer/vendor/phpunit/php-text-template:/usr/local/src/composer/vendor/phpunit/php-timer:/usr/local/src/composer/vendor/phpunit/php-file-iterator:/usr/local/src/composer/vendor/phpunit/phpunit:/usr/local/src/composer/vendor/symfony/yaml:/usr/local/src/composer/vendor/phpunit/php-invoker:.:/usr/share/php:/usr/share/pear') in /srv/www/wordpress-develop/tests/phpunit/includes/mock-mailer.php on line 2
* just re-setup our plugin unit tests (see Feb. 16 entry above)

###Fri Apr 3 08:32:47 2015 CDT

###Fri Apr 10 08:48:33 2015 CDT

  • Post transitions - these are typical statuses a new post goes through

    1. new -> auto-draft [ old_status -> new_status ]
      • new -> inherit [ another possibility ]
    2. auto-draft -> draft
    3. ... -> ...
    4. draft -> publish

###Wed Apr 15 10:39:28 2015 CDT

###Fri Apr 24 10:35:34 2015 CDT

###Mon May 11 11:20:04 2015 CDT

###Thu May 14 17:19:56 2015 CDT

###Mon May 18 16:59:12 2015 CDT

  • Today we added a couple new alternate templates for an article page. These have classes that use "--full-width".

    • '--full-width' items span the full width of article; that means they don't use (7 last of 8) in our grid
  • We added our kicker meta box to the elit_slideshow custom post type, which we're bringing in as a plugin.

  • WPBeginner new: 12 Most Useful WordPress Custom Post Types Tutorials

###Sun Aug 2 12:40:45 2015 CDT

  • Include posts from authors in the search results where either their display name or user login matches the query string Gist

###Fri Aug 28 16:42:39 2015 CDT

###Fri Dec 18 16:32:18 2015 CST

###Thu Sep 1 11:13:05 2016 CDT

###Tue Oct 4 12:36:10 2016 CDT

###Wed Oct 5 12:47:19 2016 CDT

###Thu Oct 27 17:25:26 2016 CDT

About

EO Elit WordPress theme

Resources

Stars

Watchers

Forks

Packages

No packages published
0