npm v3.10 - ◾
npm install -g npm
# Downgrade to a specific version
npm install -g npm@2
| /* Small Devices, Tablets */ | |
| @media only screen and (max-width : 768px) { | |
| .animated { | |
| /*CSS transitions*/ | |
| -o-transition-property: none !important; | |
| -moz-transition-property: none !important; | |
| -ms-transition-property: none !important; | |
| -webkit-transition-property: none !important; | |
| transition-property: none !important; | |
| /*CSS transforms*/ |
npm install -g npm
# Downgrade to a specific version
npm install -g npm@2
| /** | |
| * This function allows you to retrieve the wp_get_attachment_image_src() | |
| * data for any post's featured image on your network. If you are running | |
| * a multisite network, you can supply another blog's ID to retrieve a post's | |
| * featured image data from another site on your WordPress multisite network. | |
| * | |
| * Does not take care of icon business (at this time). | |
| * | |
| * If successful, this function returns an array of the following: | |
| * [0] => url |
| <? php | |
| //Fix for missing author, entry title, and updated in GSC | |
| ////add hentry data | |
| function add_hentry_data($content) { | |
| $t = get_the_modified_time('F jS, Y'); | |
| $author = get_the_author(); | |
| $title = get_the_title(); | |
| if (is_home() || is_singular() || is_archive() ) { | |
| $content .= '<div class="hentry-extra" style="display:none;visibility:hidden;"><span class="entry-title">'.$title.'</span> was last modified: <span class="updated"> '.$t.'</span> by <span class="author vcard"><span class="fn">'.$author.'</span></span></div>'; | |
| } |
| <?php | |
| // define some vars | |
| require_once '../wp-config.php'; | |
| if ( defined( 'ABSPATH' ) ) | |
| $abspath = ABSPATH; | |
| else | |
| $abspath = '/home/mic/public_html/dev/wptest'; | |
| /* | |
| * define the role of the new user here |
| add_filter('template_include','yoursite_template_include',1); | |
| function yoursite_template_include($template) { | |
| ob_start(); | |
| return $template; | |
| } | |
| add_filter('shutdown','yoursite_shutdown',0); | |
| function yoursite_shutdown() { | |
| $insert = "\n<!--YOUR INSERTED ". get_option('setting_a') ." HTML GOES HERE-->"; | |
| $content = ob_get_clean(); | |
| $content = preg_replace('#<body([^>]*)>#i',"<body$1>{$insert}",$content); |
| *.log | |
| .htaccess | |
| sitemap.xml | |
| sitemap.xml.gz | |
| wp-config.php | |
| wp-content/advanced-cache.php | |
| wp-content/backup-db/ | |
| wp-content/backups/ | |
| wp-content/blogs.dir/ | |
| wp-content/cache/ |
| // Usage: | |
| // get_id_by_slug('any-page-slug','any-post-type'); | |
| function get_id_by_slug($page_slug, $slug_page_type = 'page') { | |
| $find_page = get_page_by_path($page_slug, OBJECT, $slug_page_type); | |
| if ($find_page) { | |
| return $find_page->ID; | |
| } else { | |
| return null; | |
| } |
| <?php | |
| /* ------------------------------------------------------------------*/ | |
| /* PAGINATION */ | |
| /* ------------------------------------------------------------------*/ | |
| //paste this where the pagination must appear | |
| global $wp_query; | |
| $total = $wp_query->max_num_pages; | |
| // only bother with the rest if we have more than 1 page! |