Skip to content

Commit

Permalink
Version 1.4.4
Browse files Browse the repository at this point in the history
  • Loading branch information
themefuse committed Oct 24, 2014
1 parent 78e99ef commit fc0cf1b
Show file tree
Hide file tree
Showing 7 changed files with 69 additions and 8 deletions.
7 changes: 4 additions & 3 deletions scratch-parent/framework/core/class-fw-manifest.php
Original file line number Diff line number Diff line change
Expand Up @@ -258,11 +258,12 @@ public function get_name()

/**
* @param string $multi_key
* @return mixed|null
* @param mixed $default_value
* @return mixed
*/
public function get($multi_key)
public function get($multi_key, $default_value = null)
{
return fw_akg($multi_key, $this->manifest);
return fw_akg($multi_key, $this->manifest, $default_value);
}

/**
Expand Down
5 changes: 3 additions & 2 deletions scratch-parent/framework/core/components/theme.php
Original file line number Diff line number Diff line change
Expand Up @@ -234,9 +234,10 @@ public function get_taxonomy_options($taxonomy)
* Return config key value, or entire config array
* Config array is merged from child configs
* @param string|null $key Multi key format accepted: 'a/b/c'
* @param mixed $default_value
* @return mixed|null
*/
final public function get_config($key = null)
final public function get_config($key = null, $default_value = null)
{
$cache_key = self::$cache_key .'/config';

Expand Down Expand Up @@ -268,7 +269,7 @@ final public function get_config($key = null)
FW_Cache::set($cache_key, $config);
}

return $key === null ? $config : fw_akg($key, $config);
return $key === null ? $config : fw_akg($key, $config, $default_value);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ final public function __construct(&$parent, $declared_dir, $declared_source, $UR
}

if (empty($manifest['name'])) {
$manifest['name'] = str_replace(array('_', '-'), ' ', ucfirst($this->get_name()));
$manifest['name'] = fw_id_to_title($this->get_name());
}

$this->manifest = new FW_Extension_Manifest($manifest);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,10 @@ public function _theme_filter_prevent_autop($content)
/**
* Wrap the content in a div to prevent wpautop change/break the html generated by the shortcodes
*/
return '<div class="fw-layout-builder-content">'. $content .'</div>';
return
'<div class="'. esc_attr(apply_filters('fw_ext_layout_builder_content_wrapper_class', 'fw-layout-builder-content')) .'">' .
$content .
'</div>';
}
}

Expand Down
12 changes: 12 additions & 0 deletions scratch-parent/framework/helpers/general.php
Original file line number Diff line number Diff line change
Expand Up @@ -993,3 +993,15 @@ function fw_secure_rand($length)

return $rnd;
}

/**
* Try to make user friendly title from an id
* @param string $id 'hello-world'
* @return string 'Hello world'
*/
function fw_id_to_title($id) {
// mb_ucfirst()
$id = mb_strtoupper(mb_substr($id, 0, 1, 'UTF-8'), 'UTF-8') . mb_substr($id, 1, mb_strlen($id, 'UTF-8'), 'UTF-8');

return str_replace(array('_', '-'), ' ', $id);
}
2 changes: 1 addition & 1 deletion scratch-parent/framework/manifest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

$manifest['name'] = __('Unyson', 'fw');

$manifest['version'] = '1.4.3';
$manifest['version'] = '1.4.4';

$manifest['requirements'] = array(
'wordpress' => array(
Expand Down
44 changes: 44 additions & 0 deletions scratch-parent/framework/static/css/fw.css
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,50 @@
text-transform: capitalize;
}

.fw-text-muted {
color: #777;
}

.fw-text-primary {
color: #428bca;
}

a.fw-text-primary:hover {
color: #3071a9;
}

.fw-text-success {
color: #3c763d;
}

a.fw-text-success:hover {
color: #2b542c;
}

.fw-text-info {
color: #31708f;
}

a.fw-text-info:hover {
color: #245269;
}

.fw-text-warning {
color: #8a6d3b;
}

a.fw-text-warning:hover {
color: #66512c;
}

.fw-text-danger {
color: #a94442;
}

a.fw-text-danger:hover {
color: #843534;
}

.fw-img-responsive {
display: block;
max-width: 100%;
Expand Down

0 comments on commit fc0cf1b

Please sign in to comment.