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 | |
add_action('wpmu_activate_blog','remove_user_from_primary_site',999,5); | |
function remove_user_from_primary_site($blog_id, $user_id, $password, $title, $meta){ | |
remove_user_from_blog($user_id,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 | |
add_action('admin_head', 'custom_admin_css'); | |
function custom_admin_css() { ?> | |
<style> | |
label[for=siteurl], input[name=siteurl], label[for=home], input[name=home], input[name=home] + p.description { | |
display: none; | |
} | |
</style> | |
<?php |
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 View { | |
public static function __callStatic($name,$parameters) { | |
try { | |
//Get template name from method call | |
$fname = TEMPLATES_DIR . implode('/', explode("_",$name) ).'.php'; |
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: Escalate to Super Admin | |
Plugin URI: https://gist.github.com/rohmann/7159907 | |
Description: Tool to convert normal admin to super admin. | |
Place in mu-plugins folder. Then visit /wp-admin with a normal admin account. Next, go to the network dashboard to test it. Finally, delete this plugin to prevent abuse | |
Author: Alexander Rohmann | |
Author URI: https://gist.github.com/rohmann | |
Version: 1.0 | |
*/ |
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 auto_tag_on_sale( $meta_id, $post_id, $meta_key) { | |
if ('mp_is_sale' != $meta_key){ | |
return; | |
} | |
$meta = get_post_custom($post_id); | |
$on_sale = false; |
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
/** | |
* Add the cs-row-flip class to a row, and the column direction will be reversed. | |
*/ | |
.x-container.marginless-columns.cs-row-flip { | |
direction: rtl; | |
} | |
.x-container.marginless-columns.cs-row-flip > .x-column { | |
direction: ltr; |
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
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle' | |
}); |
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
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle', | |
init: function () { | |
this._super(); | |
Ember.run.schedule("afterRender",this,function() { | |
this.send("later"); | |
}); |
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
// instance-initializers/app-view.js | |
// With an instance initializer, we can register a component for Ember to use at the top level. | |
// Not ideal, but it works in the meantime until routable components drop. | |
import Ember from 'ember'; | |
const AppView = Ember.Component.extend({ | |
classNames: ['my-app'], | |
}); |
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
import Ember from 'ember'; | |
export default Ember.Component.extend({ | |
tagName: '', | |
markup: Ember.computed('state',function(){ | |
return `<div><strong>${this.get('state')}</strong><div><!--morph:yield--></div></div>`; | |
}), | |
}); |