This file contains hidden or 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 | |
<?php | |
/* | |
Plugin Name: Average CMS Wildcard Admin Redirect | |
Plugin URI: https://github.com/cramerdev/acms-wildcard-admin-redirect | |
Description: Redirects the admin pages for a mapped domain to the non-mapped version of the domain. This is required because when FORCE_SSL_ADMIN is enabled, by default the redirect will go the the https version of the URL you're on. If you're using domain mapping, that domain might not have a valid SSL certificate. This plugin redirects to the original, non-mapped domain instead. This plugin MUST be loaded AFTER the wordpress-mu-domain-mapping plugin. One way to do this is to rename this file prefixed with a z_ or something. | |
Version: 0.0.2 | |
Author: Nathan L Smith | |
*/ |
This file contains hidden or 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 wildcard_admin_redirect($location, $status = 302) { | |
$url = parse_url($location); | |
if ($url['scheme'] === 'https' && | |
(preg_match("/\/wp-[login|admin|register]/", $url['path']) > 0)) { | |
$orig = preg_replace("/^https?:\/\//", "", get_original_url($url['host'])); | |
if ($orig && $orig !== $url['host']) { | |
$location = 'https://'.$orig.$url[path]; | |
} | |
} |
This file contains hidden or 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
#!/usr/bin/php | |
<?php | |
$usage = "Automated Wordpress installer\nby Ali Gangji\nUsage: wordpress install_dir -u dbuser -p dbpass -d dbname\nOptions:\n"; | |
$usage .= " -u dbuser Database username\n"; | |
$usage .= " -p dbpass Database password\n"; | |
$usage .= " -d dbname Database name\n"; | |
$usage .= " -h dbhost Database host\n"; | |
$usage .= " --private Hide blog from search engines\n"; | |
$usage .= " --prefix prefix Database prefix\n"; | |
if ($argc < 2) { |
This file contains hidden or 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
<!-- The Basics --> | |
<div class="container"> | |
<div class="row"> | |
<div class="eight columns"> | |
Eight columns | |
</div> | |
<div class="four columns"> | |
Four columns | |
</div> |
This file contains hidden or 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 tumble_layout_main_content_container($args) { | |
$defaults = array ( | |
'before' => '<div id="' . tumble_get_context() . '" class="' .tumble_get_current_page_layout(). '" >', | |
'after' => '</div>', | |
); | |
$args = wp_parse_args( $args, $defaults ); | |
extract( $args, EXTR_SKIP ); |
This file contains hidden or 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 action="/wp-admin/media-upload.php?tab=kaltura_upload&kaction=sendtoeditor&firstedit=true&entryIds%5B0%5D=0_715ta6uz" class="kalturaForm" method="post"> | |
<input type="submit" class="button-secondary" name="tumble2_kaltura-video" value="Add Video"> | |
</form> | |
?> |
This file contains hidden or 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 if (!defined("WP_ADMIN")) die();?> | |
<?php if ($viewData["uiConfId"]): ?> | |
<script type="text/javascript"> | |
var playerWidth = "<?php echo $viewData["playerWidth"]; ?>"; | |
var playerHeight = "<?php echo $viewData["playerHeight"]; ?>"; | |
var uiConfId = "<?php echo $viewData["uiConfId"]; ?>"; | |
var entryId = "<?php echo $viewData["entryId"]; ?>"; | |
var addPermission = "<?php echo $viewData["addPermission"]; ?>"; | |
var editPermission = "<?php echo $viewData["editPermission"]; ?>"; |
This file contains hidden or 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 if (!defined("WP_ADMIN")) die();?> | |
<?php if ($viewData["uiConfId"]): ?> | |
<script type="text/javascript"> | |
var playerWidth = "<?php echo $viewData["playerWidth"]; ?>"; | |
var playerHeight = "<?php echo $viewData["playerHeight"]; ?>"; | |
var uiConfId = "<?php echo $viewData["uiConfId"]; ?>"; | |
var entryId = "<?php echo $viewData["entryId"]; ?>"; | |
var addPermission = "<?php echo $viewData["addPermission"]; ?>"; | |
var editPermission = "<?php echo $viewData["editPermission"]; ?>"; |
This file contains hidden or 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
$(document).ready(function() { | |
$('#button-upload').click(function() { | |
formfield = $('#image-upload').attr('name'); | |
tb_show('', 'media-upload.php&tab=shawn_upload&type=image&TB_iframe=true'); | |
return false; | |
}); | |
window.send_to_editor = function(html) { | |
imgurl = $('img',html).attr('src'); | |
$('#image-upload').val(imgurl); | |
tb_remove(); |
This file contains hidden or 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 add_my_class( $begin, $field, $meta ) { | |
$begin = <<<HTML | |
<div class="field-wrap-{$field['id']}"> | |
HTML; | |
$end = '</div>'; | |
$class = 'rwmb-label'; | |
if ( ! empty( $field['class'] ) ) |