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 | |
/** | |
* Source https://gist.github.com/ms-studio/7108833 | |
* | |
* Rewriting the WordPress gallery shortcode | |
* | |
* Original WordPress code is located in : wp-includes/media/ | |
* | |
* Customizations: |
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> | |
<title>Site Maintenance</title> | |
<style> | |
body { text-align: center; padding: 150px; } | |
h1 { font-size: 50px; } | |
body { font: 20px Helvetica, sans-serif; color: #333; } | |
article { display: block; text-align: left; width: 650px; margin: 0 auto; } | |
a { color: #dc8100; text-decoration: none; } | |
a:hover { color: #333; text-decoration: none; } | |
</style> |
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 | |
/* | |
* Form Name Shortcode | |
* For usage in confirmation email | |
* Returns name of current form | |
* Use the shortcode like this: [frm-form-name id=[id]] | |
* The [id] parameter will produce the ID of current entry | |
* See https://formidableforms.com/help-desk/using-form_name-shortcode-in-email-notification/ | |
*/ |
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
var casper = require('casper').create({ | |
pageSettings: { | |
webSecurityEnabled: false | |
} | |
}); | |
casper.start(); | |
casper.userAgent('Mozilla/5.0 (Macintosh; Intel Mac OS X)'); |
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: MEM Category Order | |
Plugin URI: https://gist.github.com/ | |
Description: Functionality plugin for https://wordpress.org/support/topic/ordering-post/. | |
Version: 0.1 | |
Author: Manuel Schmalstieg | |
Author URI: https://ms-studio.net | |
*/ |
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
/** | |
* Override WP oEmbed | |
* @version 1.0 | |
*/ | |
add_filter( 'embed_oembed_html', 'mycred_override_video_shortcode', 999, 4 ); | |
function mycred_override_video_shortcode( $original, $url, $attr, $post_ID ) { | |
// If myCRED is not enabled | |
if ( ! function_exists( 'mycred_render_shortcode_video' ) ) return $original; | |
// Get cache |
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
$(".entry-content > p > iframe").each(function() { | |
var $this = $(this); | |
// donner classe video-gallery-item au parent | |
$this.parent().addClass('video-gallery-item'); | |
// corriger le ratio | |
var videoWidth = $this.attr('width'); | |
var videoHeight = $this.attr('height'); | |
var videoRatio = 100*(videoHeight / videoWidth); | |
$this.parent().css( "padding-bottom", videoRatio+"%" ); | |
}); |
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
INITIALISATION | |
============== | |
load wp-config.php | |
set up default constants | |
load wp-content/advanced-cache.php if it exists | |
load wp-content/db.php if it exists | |
connect to mysql, select db | |
load object cache (object-cache.php if it exists, or wp-include/cache.php if not) | |
load wp-content/sunrise.php if it exists (multisite only) |
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
<script> | |
jQuery(document).ready(function($){ | |
$.tablesorter.themes.bootstrap = { | |
// these classes are added to the table. To see other table classes available, | |
// look here: http://getbootstrap.com/css/#tables | |
table : 'table table-bordered table-striped', | |
caption : 'caption', | |
// header class names |