Compare commits
7 Commits
v1.0.0-RC.
...
v1.0.0-RC.
| Author | SHA1 | Date | |
|---|---|---|---|
| eeb73fb393 | |||
| 1b137868fb | |||
| 05deb182e8 | |||
| c076620755 | |||
| 388790bbae | |||
| 7de12ffe92 | |||
|
|
7dcbf060c8 |
@@ -93,7 +93,7 @@ upAll(dockerOptions).then(
|
||||
}
|
||||
},
|
||||
err => {
|
||||
process.strerr.write(`Error: ${err.message}\n`);
|
||||
process.stderr.write(`Error: ${err.message}\n`);
|
||||
process.exit(1);
|
||||
},
|
||||
);
|
||||
|
||||
11069
package-lock.json
generated
11069
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
50
package.json
50
package.json
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "windycoys",
|
||||
"version": "1.0.0-RC.6",
|
||||
"version": "1.0.0-RC.8",
|
||||
"description": "Wordpress theme for windycoys.com",
|
||||
"author": "Dan Head <me@danielhead.com>",
|
||||
"license": "MIT",
|
||||
@@ -28,42 +28,42 @@
|
||||
"watch:js": "nodemon -q --watch js -e js --exec npm run js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/cli": "^7.2.3",
|
||||
"@babel/core": "^7.3.4",
|
||||
"@babel/preset-env": "^7.3.4",
|
||||
"@babel/cli": "^7.10.3",
|
||||
"@babel/core": "^7.10.3",
|
||||
"@babel/preset-env": "^7.10.3",
|
||||
"babel-core": "^7.0.0-bridge.0",
|
||||
"babel-jest": "^24.1.0",
|
||||
"babel-jest": "^26.1.0",
|
||||
"browser-sync": "^2.26.7",
|
||||
"cssnano": "^4.1.10",
|
||||
"docker-compose": "^0.12.0",
|
||||
"eslint": "^5.15.0",
|
||||
"eslint-config-airbnb-base": "^13.1.0",
|
||||
"eslint-config-prettier": "^4.1.0",
|
||||
"eslint-plugin-import": "^2.16.0",
|
||||
"eslint-plugin-prettier": "^3.0.1",
|
||||
"eslint": "^5.16.0",
|
||||
"eslint-config-airbnb-base": "^13.2.0",
|
||||
"eslint-config-prettier": "^4.3.0",
|
||||
"eslint-plugin-import": "^2.21.2",
|
||||
"eslint-plugin-prettier": "^3.1.4",
|
||||
"husky": "^1.3.1",
|
||||
"imagemin": "^6.1.0",
|
||||
"imagemin-gifsicle": "^6.0.1",
|
||||
"imagemin-jpegtran": "^6.0.0",
|
||||
"imagemin-pngquant": "^7.0.0",
|
||||
"jest": "^24.1.0",
|
||||
"lint-staged": "^8.1.5",
|
||||
"mysql": "^2.16.0",
|
||||
"nodemon": "^1.18.10",
|
||||
"jest": "^26.1.0",
|
||||
"lint-staged": "^8.2.1",
|
||||
"mysql": "^2.18.1",
|
||||
"nodemon": "^2.0.4",
|
||||
"npm-run-all": "^4.1.5",
|
||||
"postcss-banner": "^3.0.1",
|
||||
"postcss-cli": "^6.1.2",
|
||||
"postcss-banner": "^3.0.2",
|
||||
"postcss-cli": "^7.1.1",
|
||||
"postcss-import": "^12.0.1",
|
||||
"postcss-normalize": "^7.0.1",
|
||||
"postcss-preset-env": "^6.6.0",
|
||||
"prettier": "^1.16.4",
|
||||
"rollup": "^1.4.0",
|
||||
"rollup-plugin-babel": "^4.3.2",
|
||||
"rollup-plugin-uglify": "^6.0.2",
|
||||
"stylelint": "^9.10.1",
|
||||
"stylelint-config-prettier": "^5.0.0",
|
||||
"stylelint-config-standard": "^18.2.0",
|
||||
"stylelint-prettier": "^1.0.6"
|
||||
"postcss-preset-env": "^6.7.0",
|
||||
"prettier": "^1.19.1",
|
||||
"rollup": "^1.32.1",
|
||||
"rollup-plugin-babel": "^4.4.0",
|
||||
"rollup-plugin-uglify": "^6.0.4",
|
||||
"stylelint": "^13.6.1",
|
||||
"stylelint-config-prettier": "^5.3.0",
|
||||
"stylelint-config-standard": "^18.3.0",
|
||||
"stylelint-prettier": "^1.1.2"
|
||||
},
|
||||
"husky": {
|
||||
"hooks": {
|
||||
|
||||
@@ -151,6 +151,23 @@ function windycoys_is_ie() {
|
||||
return false;
|
||||
}
|
||||
|
||||
function windycoys_first_sentence($string) {
|
||||
$sentence = preg_split( '/(\.|!|\?)\s/', $string, 2, PREG_SPLIT_DELIM_CAPTURE );
|
||||
return $sentence['0'] . $sentence['1'];
|
||||
}
|
||||
|
||||
function windycoys_get_description($post_id) {
|
||||
if (get_post_type() == "post") {
|
||||
$post = get_post($post_id);
|
||||
$content = (strlen($post->post_excerpt) === 0) ?
|
||||
strip_tags(windycoys_first_sentence($post->post_content)) :
|
||||
$post->post_excerpt;
|
||||
return $content;
|
||||
} else {
|
||||
return get_bloginfo('description');
|
||||
}
|
||||
}
|
||||
|
||||
function windycoys_jetpack_custom_image($media, $post_id, $args) {
|
||||
if ($media) {
|
||||
return $media;
|
||||
@@ -169,3 +186,11 @@ function windycoys_jetpack_custom_image($media, $post_id, $args) {
|
||||
}
|
||||
}
|
||||
add_filter('jetpack_images_get_images', 'windycoys_jetpack_custom_image', 10, 3);
|
||||
|
||||
function windycoys_strip_scripts(&$scripts) {
|
||||
if(!is_admin()){
|
||||
$scripts->remove('jquery');
|
||||
}
|
||||
}
|
||||
|
||||
add_filter('wp_default_scripts', 'windycoys_strip_scripts');
|
||||
|
||||
@@ -11,6 +11,7 @@ $manifest = get_template_directory_uri() . '/manifest.json';
|
||||
<head>
|
||||
<meta charset="<?php bloginfo('charset'); ?>">
|
||||
<title><?php wp_title(''); ?><?php if(wp_title('', false)) { echo ' « '; } ?> <?php bloginfo('name'); ?></title>
|
||||
<meta name="description" content="<?php echo windycoys_get_description(get_the_id()) ?>">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<meta name="theme-color" content="#201f42">
|
||||
<?php wp_head(); ?>
|
||||
|
||||
Reference in New Issue
Block a user