This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Go to /wp-admin/edit-tags.php?taxonomy={initial_tax}&post_type={post_type} and paginate in categories to execute script. | |
* You can delete this file once it's done | |
* Class Migrate_Category | |
*/ | |
class Migrate_Category | |
{ | |
const TAXONOMY_COLUMN = 'data'; // Column name |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "multisite", | |
"copyright": "2018", | |
"version": "1.0.0", | |
"dependencies": { | |
"bootstrap-sass": "^3.3.7", | |
"jquery": "^2.1.3", | |
"wp-admin-custom": "4.9.6" | |
}, | |
"devDependencies": { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% set bootstrap_grid_columns = 12 %} | |
{% set column_class = 'col-sm-'~ bootstrap_grid_columns / post.repeater|length %} | |
<div class="row"> | |
{% for item in post.repeater %} | |
<article class="{{column_class}}"> | |
{{ item.title }} | |
</article> | |
{% endfor %} | |
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php if (!empty($items)): ?> | |
<ul> | |
<?php $current_letter = ''; ?> | |
<?php foreach ($items as $item) : ?> | |
<?php $first_letter = mb_substr($item['post_title'], 0, 1, "UTF-8"); ?> | |
<?php if ($first_letter != $current_letter) : ?><li><?php endif; // group list ?> | |
<?php if ($first_letter != $current_letter) : ?> | |
<h2><?php echo $first_letter; ?></h2> | |
<?php $current_letter = $first_letter; ?> | |
<?php endif; ?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Theme\Plugins; | |
class YaostSeo | |
{ | |
public function __construct() | |
{ | |
// Filter to WPSEO title | |
add_filter('wpseo_breadcrumb_single_link_info', [$this, 'breadcrumb_clean_pipe'], 10); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Theme\Twig; | |
class HighLight extends \Twig_Extension | |
{ | |
public function getFilters() | |
{ | |
return [ | |
new \Twig_SimpleFilter('highlight', [$this, 'highlight']), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$templates = ['views/pages/archive.twig']; | |
$context = Timber::get_context(); | |
$context['title'] = 'Archive'; | |
// If is Tax 'Type' | |
if (is_tax('type')) { | |
// We pass the title |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/************************************************** | |
* Get version from source file | |
***************************************************/ | |
if (!function_exists('get_file_data_version')) : | |
/** | |
* @param string $file_path must contain file url | |
* @return string of version number key. | |
*/ | |
function get_file_data_version($file_path) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/************************************************** | |
* Enqueue theme scripts | |
***************************************************/ | |
function enqueue_theme_scripts() { | |
// Will generate the main stylesheet with a random version everytime the style.scss file is compiled | |
// (http://www.b.....com/wp-content/themes/my-theme/style.css?ver=1.1.#{$version}) | |
wp_enqueue_style( 'main-stylesheet', get_stylesheet_uri(), false, wp_get_theme()->get('Version') ); | |
} | |
add_action( 'wp_enqueue_scripts', 'enqueue_theme_scripts' ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var gulp = require('gulp'); | |
var sass = require('gulp-sass'); | |
var sourcemaps = require('gulp-sourcemaps'); | |
var concat = require('gulp-concat'); | |
var uglify = require('gulp-uglify'); | |
var plumber = require('gulp-plumber'); | |
var merge = require('merge-stream'); | |
var util = require("gulp-util"); | |
/************************************* |
NewerOlder