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
// ==UserScript== | |
// @name YouTubeMusicScript | |
// @description YouTubeMusicScript | |
// @include http://music.youtube.com/* | |
// @autho Nicolas Mollet | |
// @version 1.2 | |
// ==/UserScript== | |
// Observe play-button clicks. |
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 | |
/** | |
* Catch plugin deactivation and write log of cause of deactivation (manual or error). | |
* | |
* Examples: | |
* [29-Sep-2023 07:40:40 UTC] Plugin antispam-bee/antispam_bee.php was disabled manually. | |
* [29-Sep-2023 07:47:29 UTC] Plugin antispam-bee/antispam_bee.php was disabled because Plugin file does not exist. | |
* | |
* @param string $plugin Path to the plugin file relative to the plugins directory. |
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 | |
/** | |
* WooCommerce: override mail params | |
* @param $params | |
* @param WC_Email $email | |
* | |
* @return mixed | |
*/ | |
public function custom_woocommerce_mail_callback_params( $params, \WC_Email $email ){ |
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
# Exclude product variations since they don't include the "total_sales" meta key filled by WooCommerce | |
SELECT ID, post_title, post_status, post_modified, meta_value | |
FROM wp_posts | |
INNER JOIN wp_postmeta ON wp_postmeta.post_id=wp_posts.ID | |
AND wp_postmeta.meta_key='total_sales' | |
WHERE post_type='product' | |
ORDER BY CAST(`wp_postmeta`.`meta_value` as UNSIGNED) DESC; |
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 | |
/** | |
* Core Update: disable wp_version_check single event creation | |
* | |
* @param null|bool|WP_Error $pre Value to return instead. Default null to continue adding the event. | |
* @param stdClass $event { | |
* An object containing an event's data. | |
* | |
* @type string $hook Action hook to execute when the event is run. |
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 | |
/** | |
* Gravity Forms: Use WooCommerce emails templates for notifications. | |
* | |
* @param string $template | |
* | |
* @return string | |
*/ | |
public function custom_gform_html_message_template_pre_send_email( string $template ) { |
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 | |
/** | |
* oEmbed HTML: Adds a "data-nosnippet" on oembed html (only for YouTube) | |
* | |
* @param string|false $data The returned oEmbed HTML (false if unsafe). | |
* @param string $url URL of the content to be embedded. | |
* @param array $args Optional arguments, usually passed from a shortcode. | |
* | |
* @return string | |
*/ |
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: SITENAME | |
recipe: wordpress | |
config: | |
webroot: . | |
env: dev | |
via: apache #nginx doesn't work, don't know why | |
php: 7.3 | |
#xdebug: true | |
database: mysql | |
services: |
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: SITENAME | |
recipe: lemp | |
config: | |
env: dev | |
php: '7.1' | |
composer_version: '1.10.19' | |
database: mysql | |
webroot: . | |
xdebug: false | |
config: |
NewerOlder