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 | |
/** | |
* Vary LCP Image Optimizations WordPress Plugin. | |
* | |
* @package VaryLcpImageOptimizations | |
* @author Weston Ruter, Google | |
* @license GPL-2.0-or-later | |
* @copyright 2023 Google Inc. | |
* | |
* @wordpress-plugin |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1" /> | |
<link rel="icon" href="https://glitch.com/favicon.ico" /> | |
<title>image-with-fetchpriority-and-with-preload.html</title> | |
<link |
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 | |
/** | |
* Contact Form 7 Conditional Enqueues WordPress Plugin. | |
* | |
* @package CF7_Conditional_Enqueues | |
* @author Weston Ruter, Google | |
* @license GPL-2.0-or-later | |
* @copyright 2023 Google Inc. | |
* | |
* @wordpress-plugin |
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 | |
/** | |
* Auto-Update Enabler | |
* | |
* Decisions, not options. Inspired by Trac ticket #58389 by | |
* Jos Velasco and an offhanded comment on the fedi by Andy | |
* Fragen. | |
* | |
* @package Auto-Update Enabler | |
* @author Jason Cosper <[email protected]> |
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
/** | |
* Automatically Enable Contact Form 7 Endpoints with Disable WP REST API Plugin | |
* Plugin URI: https://wordpress.org/plugins/disable-wp-rest-api/ | |
*/ | |
function disable_wp_rest_api_enable_contact_form7_endpoints() { | |
$active_plugins = get_option('active_plugins'); | |
// Check if the "Disable WP REST API" plugin is active | |
if (in_array('disable-wp-rest-api/disable-wp-rest-api.php', $active_plugins) | |
// Check if the "Contact Form 7" plugin is active | |
&& in_array('contact-form-7/wp-contact-form-7.php', $active_plugins) |
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
add_filter('seopress_ai_openai_meta_title', 'sp_ai_openai_meta_title', 10, 2); | |
function sp_ai_openai_meta_title($prompt, $post_id) { | |
//$content = get_post_field('post_content', $post_id); | |
//$content = esc_attr(stripslashes_deep(wp_filter_nohtml_kses(wp_strip_all_tags(strip_shortcodes($content))))); | |
//$content = wp_trim_words( $content, 500 ); | |
$language = 'fr_FR'; //example with French locale, replace with your own language code | |
$prompt = 'Generate, in this language ' . $language . ', an engaging SEO title metadata in one sentence of sixty characters maximum for this article: ' . $content; | |
return $prompt; |
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: 'Lighting', options: [ | |
'golden hour, warm glow' | |
'blue hour, twilight, ISO12000' | |
'midday, direct lighting, overhead sunlight' | |
'overcast, whitebox, flat lighting, diffuse' | |
'dreamlike diffuse ethereal lighting' | |
'dramatic lighting, dramatic shadows, illumination' | |
'studio lighting, professional lighting, well-lit' | |
'flash photography' | |
'low-key lighting, dimly lit' |
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
#!/bin/bash | |
# | |
# Declare SITES as an associative array | |
declare -A SITES | |
# Format: SITES[WPMDB profile number]=backup_filename_base | |
SITES[1]=remote_backup_com | |
#SITES[2]=another_site_to_backup | |
#SITES[3]=my_other_blog | |
## These variables will be specific to the WordPress |
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 | |
// Start preparing an array to insert Download Monitor's Download Version (which is a CPT with Download as parent post). | |
$dlm_download_version = array( | |
'post_title' => 'Download #' . $download_id . ' File Version', | |
'post_type' => 'dlm_download_version', | |
'post_status' => 'publish', | |
'post_parent' => $download_id, | |
'post_author' => $attachment->post_author, | |
); |
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
SELECT `p`.`id` AS `order_id`, | |
Cast(`p`.`post_date` AS datetime) AS `order_date`, | |
SUBSTRING(`p`.`post_status`, 4) AS `order_status`, | |
Max(CASE WHEN `pm`.`meta_key` = '_billing_email' AND `p`.`id` = `pm`.`post_id` THEN `pm`.`meta_value` end) AS `billing_email`, | |
Max(CASE WHEN `pm`.`meta_key` = '_billing_first_name' AND `p`.`id` = `pm`.`post_id` THEN `pm`.`meta_value` end) AS `_billing_first_name`, | |
Max(CASE WHEN `pm`.`meta_key` = '_billing_last_name' AND `p`.`id` = `pm`.`post_id` THEN `pm`.`meta_value` end) AS `_billing_last_name`, | |
Max(CASE WHEN `pm`.`meta_key` = '_billing_company' AND `p`.`id` = `pm`.`post_id` THEN `pm`.`meta_value` end) AS `_billing_company`, | |
Max(CASE WHEN `pm`.`meta_key` = '_billing_address_1' AND `p`.`id` = `pm`.`post_id` THEN `pm`.`meta_value` end) |
NewerOlder