Skip to content

Instantly share code, notes, and snippets.

View asharirfan's full-sized avatar

Ashar Irfan asharirfan

View GitHub Profile
@asharirfan
asharirfan / useful-wpcli-commands.sh
Created March 31, 2022 19:28
Some useful WP CLI commands
# Add username to all subsites on a multisite as administrator
for site in $(wp site list --field=url); do wp user set-role myusername administrator --url=$site; done
@asharirfan
asharirfan / index.js
Created September 21, 2020 16:49
Testing Gists
console.log( 'Ashar Irfan' );
@asharirfan
asharirfan / webpack.config.js
Last active April 1, 2020 16:31
Webpack config to extend the default configurations of wp-scripts
/**
* Webpack Custom Config.
*/
const path = require("path");
const postcssPresetEnv = require("postcss-preset-env");
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
const FixStyleOnlyEntriesPlugin = require("webpack-fix-style-only-entries");
const defaultConfig = require("@wordpress/scripts/config/webpack.config");
const { mode, entry, output, resolve, plugins, stats } = defaultConfig;
@asharirfan
asharirfan / guq-cirs-meta-data-youtube-video.php
Created February 11, 2020 10:04
GUQ CIRS Drupal View Export Source YouTube Video Meta Data
$view = new view();
$view->name = 'meta_data_youtube_video';
$view->description = '';
$view->tag = 'default';
$view->base_table = 'node';
$view->human_name = 'Meta Data YouTube Video';
$view->core = 7;
$view->api_version = '3.0';
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
@asharirfan
asharirfan / guq-cirs-meta-data-research-project.php
Last active February 11, 2020 10:03
GUQ CIRS Drupal View Export Source Research Project Meta Data
$view = new view();
$view->name = 'meta_data_research_project';
$view->description = '';
$view->tag = 'default';
$view->base_table = 'node';
$view->human_name = 'Meta Data Research Project';
$view->core = 7;
$view->api_version = '3.0';
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
@asharirfan
asharirfan / guq-cirs-meta-data-publication.php
Created February 11, 2020 09:20
GUQ CIRS Drupal View Export Source Publication Meta Data
$view = new view();
$view->name = 'meta_data_publication';
$view->description = '';
$view->tag = 'default';
$view->base_table = 'node';
$view->human_name = 'Meta Data Publication';
$view->core = 7;
$view->api_version = '3.0';
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
@asharirfan
asharirfan / guq-cirs-meta-data-news-item.php
Created February 11, 2020 08:59
GUQ CIRS Drupal View Export Source News Item Meta Data
$view = new view();
$view->name = 'meta_data_news_item';
$view->description = '';
$view->tag = 'default';
$view->base_table = 'node';
$view->human_name = 'Meta Data News Item';
$view->core = 7;
$view->api_version = '3.0';
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
@asharirfan
asharirfan / guq-cirs-meta-data-event.php
Created February 11, 2020 08:52
GUQ CIRS Drupal View Export Source Event Meta Data
$view = new view();
$view->name = 'meta_data_event';
$view->description = '';
$view->tag = 'default';
$view->base_table = 'node';
$view->human_name = 'Meta Data Event';
$view->core = 7;
$view->api_version = '3.0';
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
@asharirfan
asharirfan / guq-cirs-featured-images-query.sql
Created February 11, 2020 07:52
GUQ CIRS Featured Images Query
@asharirfan
asharirfan / guq-epe-meta-data-testimonials.php
Created February 10, 2020 12:03
GUQ EPE Drupal View Export Source Testimonials Meta Data
$view = new view();
$view->name = 'meta_data_testimonials';
$view->description = '';
$view->tag = 'default';
$view->base_table = 'node';
$view->human_name = 'Meta Data Testimonials';
$view->core = 7;
$view->api_version = '3.0';
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */