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
{ | |
"core": null, | |
"plugins": [ | |
"https://downloads.wordpress.org/plugin/woocommerce.zip" | |
], | |
"config": { | |
"WP_DEBUG": true, | |
"SCRIPTS_DEBUG": true, | |
"WP_DEBUG_LOG": false, | |
"WP_DEBUG_DISPLAY": true |
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 | |
function language_detector_admin_notices() { | |
// Get the current language locale | |
$language = get_locale(); | |
// Check if the nag screen has been disabled for this language | |
if ( false === get_option( 'plugin_slug_language_detector_' . $language, false ) ) { | |
// Check if a translation file already exists for this language | |
if ( $loaded = load_plugin_textdomain( 'text_domain', false, plugin_dir_path( __FILE__ ) . '/languages/' ) ) { |
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 | |
/** | |
* Filter for adding wrappers around embedded objects | |
*/ | |
function responsive_embeds( $content ) { | |
$content = preg_replace( "/<object/Si", '<div class="embed-container"><object', $content ); | |
$content = preg_replace( "/<\/object>/Si", '</object></div>', $content ); | |
/** | |
* Added iframe filtering, iframes are bad. |
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 | |
function wp378934573289_js_head_print() { | |
$screen = get_current_screen(); | |
// Only add script in editor views. | |
if ( 'edit' !== $screen->parent_base ) { | |
return; | |
} | |
?> |
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
/** | |
* Load more content over ajax in a nice manner | |
* | |
* This script utilizes Font Awesome to give proper visual feedback | |
* while the new content is being fetched and loaded | |
* | |
* Usage: | |
* - Attach the class 'load-more-content' to any a tag in the DOM | |
* - Give this object a data attribute of data-content-area which indicates | |
* what part of the site is to be loaded in |
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 | |
// Fetch all superadmins on a site. | |
$super_admins = get_super_admins(); | |
// Loop over all super admins | |
foreach ( $super_admins as $admin_slug ) { | |
// Get a user object for this user. | |
$user = get_user_by( 'slug', $admin_slug ); | |
// Fail-safe, maybe the slug somehow couldn't be identified. |
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 WordPress.org Also Viewing | |
// @namespace http://jason.stallin.gs | |
// @description See when another person is viewing the same post. | |
// @author Clorith | |
// @grant none | |
// @include https://*.wordpress.org/support/topic/* | |
// @include https://*.wordpress.org/support/view/* | |
// @include https://wordpress.org/support/topic/* | |
// @include https://wordpress.org/support/view/* |
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
<form id="tamper-wp-topic-highlighter"> | |
<hr> | |
<strong>Topics older than 1 week with no resolution</strong> | |
<br> | |
<div style="display: inline-block; width: 30%;">Background: </div> | |
<div style="display: inline-block;"><input type="text" id="tamper-wp-topic-highlighter-old" value="#ffc173" style="padding: 0 5px;"></div> | |
<br> | |
<div style="display: inline-block; width: 30%;">Text: </div> | |
<div style="display: inline-block;"><input type="text" id="tamper-wp-topic-highlighter-old-text" value="inherit" style="padding: 0 5px;"></div> |
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
/** | |
* Load more content over ajax in a nice manner | |
* | |
* This script utilizes Font Awesome to give proper visual feedback | |
* while the new content is being fetched and loaded | |
* | |
* Usage: | |
* - Attach the class 'load-more-content' to any a tag in the DOM | |
* - Give this object a data attribute of data-content-area which indicates | |
* what part of the site is to be loaded in |
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 | |
function theme_menu_append( $items ) { | |
$prepend = ""; | |
$append = ""; | |
$prepend .= "<li>First item always!</li>"; | |
$append .= "<li>This is the 2nd to last item</li>"; | |
$append .= "<li>This is the very last item</li>"; | |
NewerOlder