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 KnowitTelltale | |
{ | |
public function hooks(): void | |
{ | |
add_action( | |
'rest_api_init', | |
\Closure::fromCallable([$this, 'registerRestRoutes']) | |
); |
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 | |
public function allowed_block_types( $allowed_blocks, $post ) { | |
$blocks = [ | |
'core/block' => [], | |
'core/template' => [], | |
'core/heading' => [], | |
'core/paragraph' => [], | |
'core/image' => [ | |
'post_types' => [ |
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 | |
$pll = new PLL_Admin( PLL()->links_model ); | |
$pll->add_filters(); | |
$pll_pro = new Polylang_Pro(); | |
$pll_pro->load_modules( $pll ); | |
global $wpdb; | |
$post_type = 'your-post-type'; |
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 | |
/** | |
* Remove product data tabs | |
* | |
* @param array $tabs Array of product tabs. | |
* | |
* @return array | |
*/ | |
function theme_remove_product_tabs( $tabs ) { | |
unset( $tabs['description'] ); |
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 | |
remove_action( 'woocommerce_before_main_content', 'woocommerce_breadcrumb', 20 ); |
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 | |
remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_meta', 40 ); |
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( 'woocommerce_product_options_general_product_data', 'add_my_custom_data' ); | |
public function add_my_custom_data() { | |
global $post; | |
?> | |
<div class="options_group"> | |
<?php | |
woocommerce_wp_text_input( [ |
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 | |
function theme_yoastseo_opengraph_image_size() { | |
return 'large'; | |
} | |
add_filter( 'wpseo_opengraph_image_size', 'theme_yoastseo_opengraph_image_size', 10 ); | |
function theme_yoastseo_twitter_image_size() { | |
return 'large'; |
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
var record = { | |
loss: 0, | |
win: 0 | |
}; | |
var lastResult = false; | |
var currentStreak = 0; | |
jQuery('.record').find('tr').each(function(idx, el) { | |
if (idx > 0) { |
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
var record = {}; | |
jQuery('.record').find('tr').each(function(idx, el) { | |
var row = jQuery(el); | |
var key = (row.find('td:first-child').hasClass('win') || row.find('td:first-child').hasClass('winTitle')) ? 'wins' : 'losses'; | |
var result = row.find('td').eq(5).text(); | |
var result_key = 'ko'; | |
if (idx > 0) { | |
if (result.indexOf('Decision') >= 0) { | |
result_key = 'decision'; |
NewerOlder