Skip to content

Commit

Permalink
Merge branch 'master' of github.com:themosis/framework
Browse files Browse the repository at this point in the history
  • Loading branch information
jlambe committed Sep 14, 2015
2 parents a3109e9 + d6df08e commit da925dc
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/Themosis/Helpers/helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ function tp($value)
*/
function themosis_assets()
{
return get_template_directory_uri().'/app/assets';
return get_template_directory_uri().'/resources/assets';
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/Themosis/Metabox/Meta.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ private static function parse($default)

} else {

if (0 === strpos($value, 'http')) {
if (0 === strpos($value, 'http') && 0 !== strpos($value, 'https')) {

if (static::isFromDomain($value)) {

Expand Down
8 changes: 5 additions & 3 deletions src/Themosis/Page/Option.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,21 @@ class Option
* @throws OptionException
* @return mixed The option value.
*/
public static function get($optionGroup, $name)
public static function get($optionGroup, $name = null)
{
$option = get_option($optionGroup);

if (!empty($option))
{
if (isset($option[$name]))
if (!is_null($name))
{
return $option[$name];
}

return $option;
}

return '';

}
}
}
10 changes: 10 additions & 0 deletions src/Themosis/View/Loop.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,16 @@ public function title()
return get_the_title();
}

/**
* Get the author of the current post.
*
* @return string The author of the current post.
*/
public function author()
{
return get_the_author();
}

/**
* Get the content of the current post.
*
Expand Down
8 changes: 4 additions & 4 deletions src/Themosis/_assets/js/_themosis-core.js
Original file line number Diff line number Diff line change
Expand Up @@ -1286,7 +1286,7 @@
*/
renameId: function(currentId, index)
{
var regex = new RegExp('-([0-9])-');
var regex = new RegExp('-([0-9]+)-');

return currentId.replace(regex, '-' + index + '-');
},
Expand All @@ -1300,7 +1300,7 @@
*/
renameName: function(currentName, index)
{
var regex = new RegExp("([0-9])\]");
var regex = new RegExp("([0-9]+)\]");

return currentName.replace(regex, index + ']');
},
Expand All @@ -1314,7 +1314,7 @@
*/
renameCollectionField: function(field, index)
{
var regex = new RegExp("([0-9])\]"),
var regex = new RegExp("([0-9]+)\]"),
name = field.data('name'),
template = field.find('script#themosis-collection-item-template'),
templateContent = template.html();
Expand Down Expand Up @@ -1416,4 +1416,4 @@
});


})(jQuery);
})(jQuery);

0 comments on commit da925dc

Please sign in to comment.