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
//Delete all blog comments which are marked as pending | |
wp comment delete $(wp comment list --status=hold --format=ids) --force | |
// Get comments from specific post ID: | |
wp comment list --post_id={POST_ID} --fields=ID,comment_author | |
// Get comments form specifc post from specific comment status | |
wp comment list --post_id={POST_ID} --status=hold --fields=ID,comment_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
// Change server php default version: | |
sudo update-alternatives --set php /usr/bin/php8.1 |
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 | |
//X-robots header | |
header("X-Robots-Tag: noindex, nofollow", true); | |
//fallback url | |
header('Location: https://example.com'); |
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
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Effect": "Allow", | |
"Principal": { | |
"AWS": "*" | |
}, | |
"Action": "es:*", | |
"Resource": "arn:aws:es:<region>:<account_id>:domain/<elasticsearch_domain/*", |
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
mkdir /var/run/mysqld/ | |
chown mysql: /var/run/mysqld/ | |
mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --socket=/var/run/mysqld/mysqld.sock |
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
/** | |
* Check if plugin is active based on text domain | |
* Pass text domain to function, will return if plugin is active | |
* | |
* @param $plugin_text_domain | |
* @return bool | |
*/ | |
function vt_is_plugin_active_by_textdomain( $plugin_text_domain ) { | |
$activated_plugins = []; | |
$active_plugins_option = get_option( '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
Array | |
( | |
[0] => Array | |
( | |
[0] => Array | |
( | |
[message] => We've noticed you've been using Yoast SEO for some time now; we hope you love it! We'd be thrilled if you could give us a 5 stars rating on WordPress.org! | |
If you are experiencing issues, please file a bug report and we'll do our best to help you out. |
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 | |
/* | |
Title: Grouped Post | |
Method: post | |
Message: Grouped Post Created | |
Logged in: true | |
*/ | |
piklist( 'field', array( | |
'type' => 'hidden' |
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
// event on play | |
player.$node.on('play', function(e){ | |
updateDisplay(); | |
//stop play other media | |
$('.app-body video, .app-body audio').each(function() { | |
$(this)[0].pause(); | |
}); | |
}); | |
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 FF_Track { | |
public function __construct { | |
add_action( 'wp_ajax_nopriv_ajax_music', array($this, 'ajax_music') ); | |
add_action( 'wp_ajax_ajax_music', array($this, 'ajax_music') ); | |
add_action( 'wp_ajax_nopriv_ajax_next_music', array($this, 'ajax_next_music') ); | |
add_action( 'wp_ajax_ajax_next_music', array($this, 'ajax_next_music') ); | |
} |
NewerOlder