View kagg-compatibility-error-handler.php
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 | |
/** | |
* Error-handler to be used as a mu-plugin. | |
* | |
* @package kagg/compatibility | |
*/ | |
// phpcs:disable Generic.Commenting.DocComment.MissingShort | |
/** @noinspection PhpIllegalPsrClassPathInspection */ | |
/** @noinspection AutoloadingIssuesInspection */ |
View singleton.php
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 | |
class FooClass { | |
public static function get_instance() { | |
static $instance; | |
if ( ! $instance ) { | |
$variant = 'A'; |
View rest-download-xls.php
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 | |
add_action( | |
'rest_api_init', | |
static function () { | |
$namespace = 'myplugin/v1'; | |
$route = '/file'; | |
$params = [ | |
[ | |
'methods' => 'GET', |
View level_order_traversal.php
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 | |
/** | |
* Level order traversal of a general tree. | |
* | |
* @link https://www.geeksforgeeks.org/generic-tree-level-order-traversal/ | |
* @package traverse-general-tree | |
*/ | |
/** | |
* Node of an n-ary tree. |
View stage.yml
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
name: Deploy to Stage | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
release: | |
name: Deploy to Stage |
View Turnstile.php
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 | |
/** | |
* Turnstile class file. | |
* | |
* @package wtei-core | |
*/ | |
namespace WTEICore; | |
use JsonException; |
View kagg-shortcuts.php
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 | |
/** | |
* Add shortcuts. | |
* | |
* @return void | |
*/ | |
function kagg_shortcuts() { | |
?> | |
<script> |
View Redirect.php
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 | |
/** | |
* Redirect class file. | |
* | |
* @package wtei-core | |
*/ | |
namespace WTEICore; | |
/** |
View uasort
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 | |
$arr = [ | |
[ 'foo' => 1, 'bar' => 7, 'den' => 9 ], | |
[ 'foo' => 11, 'bar' => 4, 'den' => 0 ], | |
[ 'foo' => 1, 'bar' => 12, 'den' => 6 ], | |
[ 'foo' => 1, 'bar' => 10, 'den' => 6 ], | |
]; | |
uasort( $arr, 'cmp' ); |
View class-wpml-element-translation.php
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
public function shutdown_action() { | |
$keys = $this->get_data_keys(); | |
$data = []; | |
foreach ( $keys as $key ) { | |
$this->data[ $key ] = isset( $this->data[ $key ] ) ? $this->data[ $key ] : []; | |
$data[ $key ] = array_replace( $this->data[ $key ], $this->{$key} ); | |
} | |
wp_cache_set( $this->get_cache_key(), $this->maybe_reduce_cache_size( $data ) ); |
NewerOlder