This file contains 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 | |
$taxonomy = 'category'; // set your taxonomy here | |
$terms = get_terms( $taxonomy, [ | |
'hide_empty' => true, | |
'orderby' => 'name', | |
'order' => 'ASC', | |
] ); |
This file contains 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
add_filter( 'get_pages', function ( $pages, $r ) { | |
if ( function_exists( 'get_current_screen' ) && 'options-reading' === get_current_screen()->id ) { | |
$pages = array_merge( $pages, get_posts( ['post_type' => 'post'] ) ); | |
} | |
return $pages; | |
}, 10, 2 ); |
This file contains 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
--- | |
version: 1.0 | |
domains: | |
- www.elected.com.au | |
url_patterns: | |
- www.elected.com.au/* | |
timestamp: '2018-07-31T23:44:01Z' | |
id: BKFt | |
redirect_url: http://www.elected.com.au/oxygen/lets-talk/ | |
shared_via: StyleURL - (https://styleurl.app) import and export CSS changes from Chrome |
This file contains 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
<!-- wp:heading --> | |
<h2>Heading Block (H2)</h2> | |
<!-- /wp:heading --> | |
<!-- wp:heading --> | |
<h3>You are looking at one. (H3)</h3> | |
<!-- /wp:heading --> | |
<!-- wp:heading --> | |
<h2>Subhead Block</h2> |
This file contains 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 | |
/** | |
* Plugin Name: Keyboard Action - Active Plugins | |
* Description: Additional custom Action for Keyboard Action to navigate to the list of active plugins | |
* Version: 0.1.0 | |
* Author: Sridhar Katakam | |
* Author URI: https://sridharkatakam.com/ | |
*/ | |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly |
This file contains 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 | |
/** | |
* Genesis Sample. | |
* | |
* This file adds functions to the Genesis Sample Theme. | |
* | |
* @package Genesis Sample | |
* @author StudioPress | |
* @license GPL-2.0+ | |
* @link http://www.studiopress.com/ |
This file contains 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
// Remove "Select options" button from (variable) products on the main WooCommerce shop page. | |
add_filter( 'woocommerce_loop_add_to_cart_link', function( $product ) { | |
global $product; | |
if ( is_shop() && 'variable' === $product->product_type ) { | |
return ''; | |
} else { | |
sprintf( '<a href="%s" data-quantity="%s" class="%s" %s>%s</a>', | |
esc_url( $product->add_to_cart_url() ), |
This file contains 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
add_filter( 'genesis_seo_title', 'custom_header_inline_logo', 10, 3 ); | |
/** | |
* Add an image inline in the site title element for the logo | |
* | |
* @param string $title Current markup of title. | |
* @param string $inside Markup inside the title. | |
* @param string $wrap Wrapping element for the title. | |
* | |
* @author @_AlphaBlossom | |
* @author @_neilgee |
This file contains 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
add_filter( 'manage_media_columns', 'sk_media_columns_filesize' ); | |
/** | |
* Filter the Media list table columns to add a File Size column. | |
* | |
* @param array $posts_columns Existing array of columns displayed in the Media list table. | |
* @return array Amended array of columns to be displayed in the Media list table. | |
*/ | |
function sk_media_columns_filesize( $posts_columns ) { | |
$posts_columns['filesize'] = __( 'File Size', 'my-theme-text-domain' ); |
This file contains 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
0) Install node via nvm | |
1) npm install -g eslint stylelint stylelint-config-wordpress eslint-config-wordpress | |
2) install SublimeLinter-contrib-stylelint ST package. | |
3) Create file named .stylelintrc in a locaton, say /Users/sridharkatakam/Documents/Websites having https://bbpress.trac.wordpress.org/browser/trunk/.stylelintrc | |
4) In SublimeLinter User Settings, |
NewerOlder