Skip to content

Commit

Permalink
ready for publication on wordpress.org
Browse files Browse the repository at this point in the history
  • Loading branch information
bassjobsen committed Dec 26, 2013
1 parent ffd9d38 commit a0e6e8d
Show file tree
Hide file tree
Showing 56 changed files with 3,068 additions and 9,780 deletions.
55 changes: 34 additions & 21 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -179,12 +179,12 @@ function jbst_prepare_wrappers()

/* add path to glyphicons */

add_filter( 'add_extra_less_code', 'add_glyphicons_path');
/*add_filter( 'add_extra_less_code', 'add_glyphicons_path');
function add_glyphicons_path()
{
return '@icon-font-path: "'.get_template_directory_uri().'/library/assets/fonts/";';
}
}*/


add_filter( 'add_extra_less_files', 'add_extra_less_files_live');
Expand All @@ -202,35 +202,48 @@ function add_extra_less_files_live()
return array($customless);
}

add_filter( 'get_theme_mods','get_theme_mods_live');
function get_theme_mods_live()
{
$return = '';
if(get_theme_mod('container_width')=='980') $return .= '@media (min-width: 1200px) {
.container {
max-width: 970px;
}
}';

if(get_theme_mod('gridfloatbreakpoint')=='0')
{
$return .= '@grid-float-breakpoint:0; @grid-float-breakpoint-max:0;';
}
elseif(get_theme_mod('gridfloatbreakpoint')=='992')
{
$return .= '@grid-float-breakpoint:992px; @grid-float-breakpoint-max:991px;';
}
else
{
$return .= '@grid-float-breakpoint:768px; @grid-float-breakpoint-max:767px;';
}
return $return;
}

add_action( 'customize_save_after', 'lesscustomize' );

function lesscustomize($setting)
{
//$setting is no used here
$updatecss = WP_LESS_to_CSS::$instance;
add_filter( 'add_extra_less_code', 'add_extra_less_now_live');

function add_extra_less_now_live($parser)
{
return '';//'a{color:'.get_theme_mod( 'heading_color').'} p{color:orange;}';
}
$updatecss->wpless2csssavecss();
$updatecss->wpless2csssavecss($_SESSION['creds']);
}

function myactivationfunction($oldname, $oldtheme=false)

function kana_init_session()
{
$updatecss = WP_LESS_to_CSS::$instance;
if ( !is_writable( dirname ( $updatecss->folder ) ) ){wp_die("Before activating make sure ".dirname ( $updatecss->folder )." is writable.");}
if( !is_dir( $updatecss->folder ) ) wp_mkdir_p( $updatecss->folder );
$updatecss->wpless2csssavecss();
session_start();
}
add_action("after_switch_theme", "myactivationfunction", 10 , 2);

/*add_action('customize_save', 'updatefiles', 1);
add_action('admin_init', 'kana_init_session', 1);

function updatefiles( $wp_customize ) {
var_dump(WP_Filesystem($_SESSION['creds']));
}
function storecedits( $wp_customize ) {

$in = true;
Expand All @@ -248,4 +261,4 @@ function storecedits( $wp_customize ) {
$_SESSION['creds'] = $creds;

}
add_action('customize_controls_init', 'storecedits', 1);*/
add_action('customize_controls_init', 'storecedits', 1);
1 change: 1 addition & 0 deletions library/assets/css/wpless2css.css

Large diffs are not rendered by default.

Empty file added library/assets/custom.less
Empty file.
67 changes: 0 additions & 67 deletions library/assets/less/alerts.less

This file was deleted.

10 changes: 0 additions & 10 deletions library/assets/less/backgroundimage.less

This file was deleted.

51 changes: 0 additions & 51 deletions library/assets/less/badges.less

This file was deleted.

49 changes: 0 additions & 49 deletions library/assets/less/bootstrap.less

This file was deleted.

Loading

0 comments on commit a0e6e8d

Please sign in to comment.