#GIT
- Modificado (modified);
- Preparado (staged/index)
- Consolidado (comitted);
| const { src, dest, watch } = require('gulp'); | |
| const sass = require('gulp-sass'); | |
| const minifyCSS = require('gulp-csso'); | |
| const babel = require('gulp-babel'); | |
| const concat = require('gulp-concat'); | |
| const browserSync = require('browser-sync').create(); | |
| function css() { | |
| return src('./sass/*.scss', { sourcemaps: true }) | |
| .pipe(sass()) |
| "use strict"; | |
| // Load plugins | |
| const autoprefixer = require("autoprefixer"); | |
| const browsersync = require("browser-sync").create(); | |
| const cp = require("child_process"); | |
| const cssnano = require("cssnano"); | |
| const del = require("del"); | |
| const eslint = require("gulp-eslint"); | |
| const gulp = require("gulp"); |
| STEPS: | |
| 1 - If the theme was not developd by you, first create a child theme (How to create a child theme? Read at https://codex.wordpress.org/Child_Themes) or else modifications will be lost when updating your theme. | |
| 2 - Add the following CSS file in your theme/child theme (better if you create a folder to add CSS there). | |
| 3 - Add the following snippet in your functions.php file: | |
| function tpw_enqueue_custom_admin_style() { | |
| echo '<link rel="stylesheet" type="text/css" href="' . get_stylesheet_directory_uri() . '/css/admin/custom-login-styles.css" />'; | |
| } |
| <?xml version="1.0" encoding="UTF-8"?> | |
| <configuration> | |
| <system.webServer> | |
| <defaultDocument> | |
| <files> | |
| <clear /> | |
| <add value="index.php" /> | |
| </files> | |
| </defaultDocument> | |
| <rewrite> |
| //To display an image using ACF, one would set the image custom field to image url and call the img as follows: | |
| <?php if( get_field( 'field_name' ) ): ?> | |
| <?php while( has_sub_field( 'field_name' ) ): ?> | |
| <img src="<?php the_sub_field( 'image' ); ?>" alt=""> | |
| <?php endwhile; ?> |
| <configuration> | |
| <system.webServer> | |
| <rewrite> | |
| <rules> | |
| <rule name="Main Rule" stopProcessing="true"> | |
| <match url=".*" /> | |
| <conditions logicalGrouping="MatchAll"> | |
| <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /> | |
| <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /> | |
| </conditions> |
| <?php | |
| //set up pods::find parameters to limit to 5 items | |
| $param = array( | |
| 'limit' => 5, | |
| ); | |
| //create pods object | |
| $pods = pods('pod_name', $params ); | |
| //check that total values (given limit) returned is greater than zero | |
| if ( $pods->total() > 0 ) { |
| /*! | |
| * install task gulp | |
| * $ npm install -g browser-sync | |
| * $ npm install gulp-ruby-sass gulp-autoprefixer gulp-cssnano gulp-jshint gulp-concat gulp-uglify gulp-imagemin gulp-notify gulp-rename gulp-livereload gulp-cache del --save-dev | |
| */ | |
| // Load plugins | |
| var gulp = require('gulp'), | |
| sass = require('gulp-ruby-sass'), | |
| autoprefixer = require('gulp-autoprefixer'), |
| <!doctype html> | |
| <html amp lang="pt-BR"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <script async src="https://cdn.ampproject.org/v0.js"></script> | |
| <link rel="canonical" href="http://caminho_do_arquivo_original/arquivo.html"> | |
| <title>Página compatvel com AMP</title> | |
| <link rel="canonical" href="http://example.ampproject.org/article-metadata.html" /> | |
| <meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1"> | |
| <style amp-boilerplate>body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes -amp-start{ |