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 | |
/** | |
* Register actions and filters | |
*/ | |
function bootstrap() : void { | |
// Setup script translations | |
add_action( 'wp_enqueue_scripts', __NAMESPACE__ . '\setup_script_translations' ); | |
// Filter the script translation lookup process to avoid linking to relative path names |
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_action( 'init', function() { | |
add_filter( 'wpsimplesaml_force', function( $force ) { | |
if ( YOUR_CONDITION_HERE ) { | |
return false; // Do not force redirection | |
} | |
return $force; | |
}, 11 ); // Priority at 11 to override the admin setting | |
} ); |
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
175,176c175,177 | |
< const fileRealPath = extfs.realpathSync(filePath); | |
< if (!data.files[fileRealPath]) { | |
--- | |
> const { files, totals } = data; | |
> | |
> if ( !totals.errors && !totals.warnings) { | |
179c180,184 | |
< ({ messages } = data.files[fileRealPath]); | |
--- |
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
diff --git a/content/themes/siemens-ingenuity/verbose/js/app/components/header-search.js b/content/themes/siemens-ingenuity/verbose/js/app/components/header-search.js | |
index fcbe02b7..bf12822a 100644 | |
--- a/content/themes/siemens-ingenuity/verbose/js/app/components/header-search.js | |
+++ b/content/themes/siemens-ingenuity/verbose/js/app/components/header-search.js | |
@@ -1,6 +1,7 @@ | |
-import PropTypes from 'prop-types'; | |
-import React from 'react'; | |
-import { __ } from '@wordpress/i18n'; | |
+import PropTypes from 'prop-types'; | |
+import React, { useEffect, useRef, useState } from 'react'; |
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
Vagrant.configure("2") do |config| | |
config.trigger.after :up, | |
name: "Caching vagrant ssh-config for '#{CONF['hosts'].join('\' and \'')}'", | |
ruby: proc{|env,machine| puts `mkdir ~/.ssh/config.d &>/dev/null; vagrant ssh-config | sed 's/Host default/Host #{CONF['hosts'].join(" ")}/' | tee ~/.ssh/config.d/vagrant-#{CONF['hosts'][0]} >/dev/null; bash -c "if ! grep -q 'Include ~/.ssh/config.d/*' ~/.ssh/config; then echo '> Please add the following line to your ~/.ssh/config file: Include ~/.ssh/config.d/*'; fi"`} | |
end |
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
DELETE | |
FROM `{PREFIX}_term_relationships` | |
WHERE `term_taxonomy_id` = 1 AND `object_id` IN | |
( SELECT * FROM | |
( | |
SELECT object_id | |
FROM `{PREFIX}_term_relationships` | |
WHERE `term_taxonomy_id` | |
IN ( SELECT `term_taxonomy_id` | |
FROM `{PREFIX}_term_taxonomy` |
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 | |
namespace MY_R_KEY_DOESNT_WORRRRK_PROPERLY; | |
/** | |
* Download all submissions of a form, between a specific range if provided. | |
* | |
* @action wp_ajax_ninja_forms_export_all_subs | |
*/ | |
function download_all_subs() { | |
$form_id = filter_input( INPUT_GET, 'form_id', FILTER_SANITIZE_NUMBER_INT ); |
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: API easily | |
* Author: Human Made, K.Adam White | |
* Description: Enables easy use of WP API Node.js client ( node-wpapi by @kadamwhite ) within WordPress interfaces | |
*/ | |
function wp_api_easily() { | |
defined( 'WP_API_EASILY_VERSION' ) || define( 'WP_API_EASILY_VERSION', '1.1.1' ); |
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 | |
/** | |
* WordPress Scoped Cache Helper | |
* | |
* This addresses the problem of obsolete cached data for an object after it is updated. | |
* | |
* Sometimes we need to cache specific bits of data related to a certain object, and keep the cached data in sync | |
* with the object's state. This helper makes it easier to tap into object update process to clear ( and optionally | |
* rebuild ) the cache. | |
* |
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
[alias] | |
# Merge the current branch to another one, created back when I needed to merge into three branches before issuing a PR | |
merge-to = "!f() { git checkout $1 && git merge $2 && git checkout $2; }; f" | |
# Commit shorthand family: | |
c = commit | |
cm = commit -m | |
cam = commit -am | |
camp = "!f() { git commit -am \"$1\"; git push; }; f" | |
ca = commit -a |
NewerOlder