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 | |
# | |
# This script configures WordPress file permissions based on recommendations | |
# from http://codex.wordpress.org/Hardening_WordPress#File_permissions | |
# | |
# Author: Michael Conigliaro <mike [at] conigliaro [dot] org> | |
# | |
WP_OWNER=www-data # <-- wordpress owner | |
WP_GROUP=www-data # <-- wordpress group | |
WP_ROOT=./ # <-- wordpress root 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
{ | |
"type":"project", | |
"repositories":[ | |
{ | |
"type":"composer", | |
"url":"http://wpackagist.org" | |
}, | |
{ | |
"type": "vcs", |
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
<div class="two-factor-backup-codes-wrapper" style="display:none;"> | |
<ol class="two-factor-backup-codes-unused-codes"></ol> | |
<p class="description"><?php esc_html_e( 'Write these down! Once you navigate away from this page, you will not be able to view these codes again.' ); ?></p> | |
<p> | |
<a class="a" href="javascript:void(0);" id="two-factor-backup-codes-download-link" download="two-factor-backup-codes.txt">Download</a> | |
<button type="button" class="button button-two-factor-backup-codes-download button-secondary hide-if-no-js" download="two-factor-backup-codes2.txt"> | |
<?php esc_html_e( 'Download' ); ?> | |
</button> | |
<p> | |
</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
// Place this in functions.php of your theme | |
function example_mime_types($mimes) { | |
if( ! current_user_can( 'administrator' ) ) { | |
return $mimes; | |
$mimes['svg'] = 'image/svg+xml'; | |
return $mimes; | |
} |
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 | |
/** | |
* test the RSS 2.0 feed by generating a feed, parsing it, and checking that the | |
* parsed contents match the contents of the posts stored in the database. Since | |
* we're using a real XML parser, this confirms that the feed is valid, well formed, | |
* and contains the right stuff. | |
* | |
* @group feed | |
*/ |
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 | |
/** | |
* Gets the current global post type if one is set | |
*/ | |
function x_get_current_post_type() { | |
global $post, $typenow, $current_screen; | |
if( $post && $post->post_type ) | |
$post_type = $post->post_type; | |
elseif( $typenow ) |
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 | |
/** | |
* Customize Image Reloaded Class | |
* | |
* Extend WP_Customize_Image_Control allowing access to uploads made within | |
* the same context | |
* | |
*/ | |
class My_Customize_Image_Reloaded_Control extends WP_Customize_Image_Control { | |
/** |
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 | |
/** | |
* Customize Image Reloaded Class | |
* | |
* Extend WP_Customize_Image_Control allowing access to uploads made within | |
* the same context | |
* | |
*/ | |
class My_Customize_Image_Reloaded_Control extends WP_Customize_Image_Control { | |
/** |
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 | |
define( 'lift_comment_facet_version', 1 ); | |
add_action( 'init', function() { | |
if ( class_exists( 'Lift_Search' ) ) { | |
//field name, field type | |
$comment_field = liftField( 'comment_count', 'uint' ) | |
//add field to parse_request handling so it gets passed to the global WP_Query | |
->addRequestVars( 'comment_count' ) | |
//set the delegate for adding the field value to the document sent to CS |
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 | |
/** | |
** Generic Feature | |
** Version 1.0.0 | |
**/ | |
define( 'GENERIC_FEATURE_VERSION', 1 ); | |
class Generic_Feature { | |
const REVISION = 1; | |
const SCRIPTS_VERSION = 1; |