Skip to content

Instantly share code, notes, and snippets.

Index: /home/stas/Documente/www/wordpress/wp-includes/class.wp-scripts.php
===================================================================
--- class.wp-scripts.php (revision 15473)
+++ class.wp-scripts.php (working copy)
@@ -60,8 +60,14 @@
$after = $val;
continue;
}
- $data .= "$eol\t$var: \"" . esc_js( $val ) . '"';
- $eol = ",\n";
@stas
stas / gist:664515
Created November 5, 2010 17:46
LFC output log
Checking main.lang ...
Checking line: 1
Checking line: 2
Checking line: 3
Checking line: 4
Checking line: 5
Checking line: 6
Checking line: 7
Checking line: 8
Checking line: 9
@stas
stas / cw_hacks.php
Created February 11, 2011 16:49
Courseware hacks
<?php
/*
Plugin Name: Hide Courseware option and make group admins teacher
Author: stas
*/
function cw_hide_group_profilegroup( $current_group ){
// Check if Courseware is enabled
if( !class_exists( 'BPSP_Roles' ) )
return $current_group;
@stas
stas / cw_hacks.php
Created February 13, 2011 14:21
New Courseware hack to move nav_options elsewhere
<?php
/*
Plugin Name: Hide Courseware nav option and move them elsewhere...
Author: stas
*/
class CW_Hacks {
public static $hide = false;
public static $options = array();
@stas
stas / jquery.cleditor.pastecode.js
Created February 21, 2011 16:16
CLEditor pastecode (pre/code) plugin
// Just append `pastecode` to your controls
(function($) {
$.cleditor.buttons.pastecode = {
name: "pastecode",
image: "",
title: "Code",
command: "inserthtml",
popupName: "pastecode",
popupClass: "cleditorPrompt",
popupContent: "Paste the code:<br /><textarea cols='40' rows='3'></textarea><br /><input type='button' value='Ok' />",
@stas
stas / fprint.diff
Created March 2, 2011 22:28
FPrint Driver for OpenBravo POS
diff --git a/src-pos/com/openbravo/pos/config/JPanelConfigGeneral.java b/src-pos/com/openbravo/pos/config/JPanelConfigGeneral.java
--- a/src-pos/com/openbravo/pos/config/JPanelConfigGeneral.java
+++ b/src-pos/com/openbravo/pos/config/JPanelConfigGeneral.java
@@ -121,6 +121,7 @@
jcboMachinePrinter.addItem("ithaca");
jcboMachinePrinter.addItem("surepos");
jcboMachinePrinter.addItem("javapos");
+ jcboMachinePrinter.addItem("fprint");
jcboMachinePrinter.addItem("Not defined");
@stas
stas / admin.js
Created March 10, 2011 10:48
WordPress pre-tinyMCE calls
edCanvas = $('body').find('textarea')[0];
$('a.thickbox').unbind();
@stas
stas / php5-fpm.vhost
Created May 4, 2011 00:03
nginx v.1.0 compatible vhost
server {
listen 80;
server_name courseware.nerd.ro;
access_log /var/log/nginx/localhost.access.log;
root /home/stas/Documente/www/cw/;
index index.php;
location / {
try_files $uri $uri/ /index.php?q=$uri&$args;
}
@stas
stas / check_template.php
Created June 14, 2011 20:01
Checks if current theme has the template file for this post type
/**
* check_template()
*
* Checks if current theme has the template file for this post type
*/
function check_template() {
$template_name = 'single-event.php';
$source_template_file = dirname( __FILE__ ) .'/templates/' . $template_name;
$theme_folder = get_stylesheet_directory();
if( !file_exists( $theme_folder . '/' . $template_name ) )
diff --git a/bp-core/admin/bp-core-admin.php b/bp-core/admin/bp-core-admin.php
index 4061f84..16ed27c 100644
--- bp-core/admin/bp-core-admin.php
+++ bp-core/admin/bp-core-admin.php
@@ -170,7 +170,10 @@ function bp_core_admin_component_setup_handler() {
// Settings form submitted, now save the settings. First, set active components
if ( isset( $_POST['bp_components'] ) ) {
+ require_once( BP_PLUGIN_DIR . '/bp-core/admin/bp-core-update.php' );
+ // Save settings and upgrade schema