Skip to content

Instantly share code, notes, and snippets.

View tivnet's full-sized avatar

TIV NET tivnet

View GitHub Profile
@mwidmann
mwidmann / add_local_trusted_ca_for_valid_https.md
Last active July 2, 2024 03:58
Generating trusted SSL keys for development

Generating SSL keys for development

Installation

Thanks to minica it is very easy to create trusted SSL certificates that have a very long expiration date.

In order to get started you have to have the go tools installed and set up correctly in your environment.

Setup

@tivnet
tivnet / makepot--extract--entry_from_call.php
Last active June 8, 2016 01:48
Makepot: Ignore all strings that are not from our textdomain. `node_modules/grunt-wp-i18n/vendor/wp-i18n-tools/extract.php`
<?php
// .../node_modules/grunt-wp-i18n/vendor/wp-i18n-tools/extract.php
public function entry_from_call( $call, $file_name ) {
/**
* Ignore all strings that are not from our textdomain
*/
if ( $call['args'][ count( $call['args'] ) - 1 ] !== 'my-text-domain' ) {
return null;
}
@tivnet
tivnet / woocommerce_category_list.sql
Created May 29, 2014 03:22
WooCommerce category list SQL query
--
-- @author Gregory Karpinsky, http://www.tiv.net/
-- @version 14.05.28
--
SELECT
tp.name Cat,
t.name Subcat
FROM
wp_term_taxonomy tt,
wp_terms t,
@bitfade
bitfade / gist:4555047
Last active January 21, 2022 03:06
WordPress - Remove empty p tags for custom shortcodes
<?php
add_filter("the_content", "the_content_filter");
function the_content_filter($content) {
// array of custom shortcodes requiring the fix
$block = join("|",array("col","shortcode2","shortcode3"));
// opening tag
@Rarst
Rarst / deprecated.md
Last active February 21, 2023 11:21
WordPress coding standards configuration for PhpStorm

Now Native

PhpStorm now bundles WordPress coding style natively, starting from version 8.

  1. Go to Project Settings > Code Style > PHP.
  2. Select Set From... (top right of window) > Predefined Style > WordPress.

No longer need to muck with this import! :)