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 | |
/* | |
* Plugin Name: Blog not public admin notice | |
* Description: Because this checkbox costs real people real money | |
* Version: 1.0.0 | |
* Author: daggerhart | |
*/ | |
add_action( 'wp_ajax_dismiss_blog_not_public_notice', function(){ | |
update_option('blog_not_public_notice_dismissed', 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
diff --git a/includes/bootstrap.inc b/includes/bootstrap.inc | |
index 2f18c58..93ffef6 100644 | |
--- a/includes/bootstrap.inc | |
+++ b/includes/bootstrap.inc | |
@@ -912,6 +912,7 @@ function _drupal_bootstrap($phase) { | |
drupal_unset_globals(); | |
// Initialize the configuration | |
conf_init(); | |
+ drupal_request_sanitizer_sanitize(); | |
break; |
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 ($, Drupal) { | |
delete Drupal.behaviors.machineName.transliterate; | |
Drupal.behaviors.machineName.transliterate = function(str) { | |
var transliterated = str.replace(' ', '_').replace(/[^\w]+/g,'').toLowerCase(); | |
var deferred = $.Deferred(); | |
var promise = deferred.promise(); | |
deferred.resolve(transliterated); | |
promise.abort = function() {}; | |
return promise; |
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 Simple_Json_Api | |
*/ | |
class Simple_Json_Api { | |
/** | |
* The top level argument for the endpoint. | |
* ex http://example.com/myjson/post/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 | |
/** | |
* Override the rules ui component row theme function so that we can show much | |
* more information about each parameter. | |
* | |
* - Changed "30" to "200" in the truncate_utf8 function call. | |
* | |
* @ingroup themeable | |
*/ |
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 | |
// get disabled modules, skip 'test' modules | |
$modules = db_query("SELECT `name` FROM {system} WHERE TYPE = 'module' AND `status` = 0 AND `name` NOT LIKE '%test%' ORDER BY `name` DESC")->fetchCol(); | |
// ensure disabled | |
module_disable($modules); | |
// force uninstall | |
foreach ($modules as $module) { |
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 | |
read -p 'Domain: ' DOMAIN | |
openssl req \ | |
-newkey rsa:2048 \ | |
-x509 \ | |
-nodes \ | |
-keyout "$DOMAIN".key \ | |
-new \ |
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 | |
/** | |
* Get a WP_Post object by its slug ( post_name ) | |
* | |
* @param $post_name | |
* | |
* @return WP_Post|null | |
*/ | |
function get_post_by_slug( $post_name ) { |
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: aawp | |
recipe: wordpress | |
config: | |
webroot: wordpress_root | |
php: '7.3' | |
xdebug: true | |
config: | |
php: .lando/php.ini | |
#database: .lando/mysql.cnf | |
#server: .lando/apache.conf |