File tree Expand file tree Collapse file tree 6 files changed +19
-10
lines changed
src/themes/WordpressStandard
Resources/assets/scss/base Expand file tree Collapse file tree 6 files changed +19
-10
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,12 @@ final class Assets extends BaseAssets
26
26
*/
27
27
public function assets ()
28
28
{
29
- $ this ->addScript ('app ' );
29
+ if (WP_DEBUG ) {
30
+ $ this ->addStylesheet ('app ' , self ::CSS );
31
+ $ this ->addScript ('app ' );
32
+ } else {
33
+ $ this ->addStylesheet ('app.min ' , self ::CSS );
34
+ $ this ->addScript ('app.min ' , self ::BUILD_JS );
35
+ }
30
36
}
31
37
}
Original file line number Diff line number Diff line change 12
12
namespace WordpressStandard \Configuration ;
13
13
14
14
use LIN3S \WPFoundation \Configuration \Menus \Menus as BaseMenus ;
15
+ use LIN3S \WPFoundation \Configuration \Translations \Translations ;
15
16
16
17
/**
17
18
* Final Menu class. With menus method are registered the different menus.
@@ -29,7 +30,7 @@ final class Menus extends BaseMenus
29
30
public function menus ()
30
31
{
31
32
register_nav_menus ([
32
- self ::MENU_HEADER => 'Header menu '
33
+ self ::MENU_HEADER => Translations:: trans ( 'Header menu ' )
33
34
]);
34
35
}
35
36
}
Original file line number Diff line number Diff line change 12
12
namespace WordpressStandard \Controller ;
13
13
14
14
use Timber ;
15
- use TimberPage ;
15
+ use TimberPost ;
16
16
17
17
/**
18
18
* Basic controller that works in the same way of MVC frameworks like Laravel or Symfony.
@@ -55,7 +55,7 @@ public function notFoundAction()
55
55
public function pageAction ()
56
56
{
57
57
$ context = Timber::get_context ();
58
- $ context ['page ' ] = new TimberPage ();
58
+ $ context ['page ' ] = new TimberPost ();
59
59
60
60
return Timber::render ('pages/default.twig ' , $ context );
61
61
}
Original file line number Diff line number Diff line change 11
11
12
12
namespace WordpressStandard \PostTypes ;
13
13
14
+ use LIN3S \WPFoundation \Configuration \Translations \Translations ;
14
15
use LIN3S \WPFoundation \PostTypes \PostType ;
15
16
16
17
/**
@@ -34,8 +35,8 @@ public function postType()
34
35
register_post_type (self ::NAME ,
35
36
[
36
37
'labels ' => [
37
- 'name ' => 'Example ' ,
38
- 'singular_name ' => 'Example '
38
+ 'name ' => Translations:: trans ( 'Example ' ) ,
39
+ 'singular_name ' => Translations:: trans ( 'Example ' )
39
40
],
40
41
'public ' => true ,
41
42
'has_archive ' => true ,
@@ -51,8 +52,8 @@ public function taxonomyType()
51
52
{
52
53
register_taxonomy (self ::TAXONOMY_TYPE_CATEGORY , self ::NAME , [
53
54
'labels ' => [
54
- 'name ' => 'Example category ' ,
55
- 'singular_name ' => 'Example category '
55
+ 'name ' => Translations:: trans ( 'Example category ' ) ,
56
+ 'singular_name ' => Translations:: trans ( 'Example category ' )
56
57
],
57
58
'sort ' => true ,
58
59
'hierarchical ' => true
Original file line number Diff line number Diff line change 8
8
// @author Gorka Laucirica <gorka.lauzirika@gmail.com>
9
9
10
10
// Allows the use of rem-calc() or lower-bound() in your settings
11
- @import " ../vendor/foundation/scss/foundation/functions" ;
11
+ @import ' ../vendor/foundation/scss/foundation/functions' ;
12
12
13
13
// Full foundation settings list: https://github.com/zurb/foundation/blob/master/scss/foundation/_settings.scss
Original file line number Diff line number Diff line change 11
11
12
12
namespace WordpressStandard \Widgets \Areas ;
13
13
14
+ use LIN3S \WPFoundation \Configuration \Translations \Translations ;
14
15
use LIN3S \WPFoundation \Widgets \Areas \WidgetArea ;
15
16
16
17
/**
@@ -28,7 +29,7 @@ final class ExampleWidgetArea extends WidgetArea
28
29
public function widgetArea ()
29
30
{
30
31
register_sidebar ([
31
- 'name ' => 'Example widgets ' ,
32
+ 'name ' => Translations:: trans ( 'Example widgets ' ) ,
32
33
'id ' => 'example-widgets ' ,
33
34
'before_widget ' => '<section class=""> ' ,
34
35
'after_widget ' => '</section> ' ,
You can’t perform that action at this time.
0 commit comments