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
#!/bin/bash | |
# sync.params file example. | |
# REMOTE_DOMAIN="123.123.123.123" | |
# KEY_FILE="~/.ssh/site.rsa" | |
# REMOTE_PATH="/var/www/site/" | |
# LOCAL_PATH="/mnt/c/laragon/www/site" | |
# REMOTE_URL="https://www.site.org" | |
# LOCAL_URL="https://site.test" | |
# SYNC_PLUGINS="elementor-pro wordpress-seo-premium" |
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
/** | |
* Decode HTML entities in a string. | |
* Do it cycle to decode all possible entities, including cases like `<`. | |
* | |
* @since 1.9.2.3 | |
* | |
* @param string $html HTML. | |
* @param int $flags Flags. | |
* @param string|null $encoding Encoding. | |
* |
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 | |
/** | |
* Check if Block Editor is active. | |
* Must only be used after plugins_loaded action is fired. | |
* | |
* @return bool | |
*/ | |
function is_active() { | |
// Gutenberg plugin is installed and activated. | |
$gutenberg = ! ( false === has_filter( 'replace_editor', 'gutenberg_init' ) ); |
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
/** | |
* Check Quform data with Akismet. | |
* | |
* @param array|mixed $result Result. | |
* @param Quform_Form $form Form. | |
* | |
* @return array | |
* @noinspection PhpUndefinedFunctionInspection | |
* @noinspection PhpPossiblePolymorphicInvocationInspection | |
*/ |
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 | |
/** | |
* Prevent updating plugins under git. | |
* | |
* @param mixed $value Value of site transient. | |
* | |
* @return object | |
*/ | |
function prevent_updating_plugins_under_git( $value ) { |
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 | |
/** | |
* Class to hide file download links and count download number. | |
* | |
* @package kagg-downloader | |
*/ | |
namespace GTS\Quote; | |
/** |
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 | |
/** | |
* List of global WP variables. | |
* | |
* @since 0.3.0 | |
* @since 0.11.0 Changed visibility from public to protected. | |
* @since 0.12.0 Renamed from `$globals` to `$wp_globals` to be more descriptive. | |
* @since 0.12.0 Moved from WordPress_Sniffs_Variables_GlobalVariablesSniff to WordPress_Sniff | |
* | |
* @var array |
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 | |
class FooClass { | |
public static function get_instance() { | |
static $instance; | |
if ( ! $instance ) { | |
$variant = 'A'; |
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 | |
/** | |
* Remove current action or filter from plugin | |
* | |
* @param string $class_name Class name enqueueing the action. | |
* @param null $action_name Action name. | |
*/ | |
function remove_plugin_action( $class_name, $action_name = null ) { | |
global $wp_filter; |
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 | |
/** | |
* Error-handler to be used as a mu-plugin. | |
* | |
* @package kagg/compatibility | |
*/ | |
// phpcs:disable Generic.Commenting.DocComment.MissingShort | |
/** @noinspection PhpIllegalPsrClassPathInspection */ | |
/** @noinspection AutoloadingIssuesInspection */ |
NewerOlder