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 | |
use Search_Filter\Fields\Settings as Fields_Settings; | |
class SearchFilters { | |
public function __construct() { | |
$this->init(); | |
} | |
public function init() { |
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: Generate person images | |
*/ | |
use Treinetic\ImageArtist\lib\Text\Color; | |
use Treinetic\ImageArtist\lib\Overlays\Overlay; | |
use Treinetic\ImageArtist\lib\Text\TextBox; | |
use Treinetic\ImageArtist\lib\Text\Font; | |
use Treinetic\ImageArtist\lib\Image; |
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: CMB2 text_datetime_timestamp_timezone Test | |
* Test file for CMB2 Bug Report: https://github.com/CMB2/CMB2/issues/1465 | |
*/ | |
add_action( | |
'cmb2_admin_init', | |
function() { |
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 | |
/** | |
* MK Manage Plugins | |
* Activates and deactivates plugins for a site or network-wide. | |
* - Make sure to define a WORDPRESS_ENV variable in your wp-config.php | |
* Usage Example: | |
* -- | |
* new MK_Manage_Plugins( | |
* array( | |
* 'post-smtp' => array( |
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 MK_Woocommerce { | |
public function __construct() { | |
$this->init(); | |
} | |
public function init() { | |
add_filter( 'woocommerce_account_menu_items', array( $this, 'manage_menu_items' ), 80 ); |
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
<!-- This sample uses TailwindCSS, it works without but will not have any styling. --> | |
<div class="container mx-auto py-12 font-sans"> | |
<input type="file" class="bg-gray-100 p-5 block border mb-2" /> | |
<div class="duration py-2">Duration:<span class="font-bold px-2"></span></div> | |
<div class="progress py-2"></div> | |
<div class="video-sample w-4/12 bg-gray-200 shadow-md rounded border"> </div> | |
</div> |
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 Sample { | |
public function __construct() { | |
$this->hooks(); | |
} | |
public function hooks() { | |
add_action( 'uo_after_user_row_imported', array( $this, 'add_user_to_multisite' ), 99, 4 ); | |
} |
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
main.querySelectorAll("select").forEach(select => { | |
let options = select.querySelectorAll("option"); | |
Array.from(options) | |
.sort((a, b) => { | |
if (a.text.toUpperCase() > b.text.toUpperCase()) return 1; | |
else if (a.text.toUpperCase() < b.text.toUpperCase()) return -1; | |
else return 0; | |
}) | |
.forEach(el => { | |
select.appendChild(el); |
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 Main { | |
public function remove_fuzzy_hook( $hook_name, $callback, $priority ) { | |
global $wp_filter; | |
// Confirm the hook name exists. | |
if ( isset( $wp_filter[ $hook_name ] ) && is_a( $wp_filter[ $hook_name ], 'WP_Hook' ) ) { |
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_filter('the_content', 'show_a_gif'); | |
function show_a_gif($content) { | |
$content .= '<iframe src="https://giphy.com/embed/jTqfCm1C0BV5fFAYvT" width="480" height="480" frameBorder="0" class="giphy-embed" allowFullScreen></iframe><p><a href="https://giphy.com/gifs/wordpressdotcom-diversity-wordpress-radiate-jTqfCm1C0BV5fFAYvT">via GIPHY</a></p>'; | |
return $content; | |
} |
NewerOlder