Commit 719092a03b77f991acdaf4ca598517095c6623df

Authored by Josafá Filho
1 parent 5345e78f
Exists in master and in 1 other branch issue488

pensandoodireito/participacao-sitebase#408

composer.json
1 1 {
2   - "repositories": [
3   - {
4   - "type": "composer",
5   - "url": "http://wpackagist.org"
6   - },
7   - {
8   - "type": "git",
9   - "url": "https://github.com/pensandoodireito/marcocivil-tema"
10   - },
11   - {
12   - "type": "git",
13   - "url": "https://github.com/pensandoodireito/dadospessoais-tema"
14   - },
15   - {
16   - "type": "git",
17   - "url": "https://github.com/pensandoodireito/pensandoodireito-tema"
18   - },
19   - {
20   - "type": "git",
21   - "url": "https://github.com/pensandoodireito/participacao-tema"
22   - },
23   - {
24   - "type": "git",
25   - "url": "https://github.com/pensandoodireito/pensandoodireito-network-functions"
26   - },
27   - {
28   - "type": "git",
29   - "url": "https://github.com/pensandoodireito/wp-side-comments"
30   - },
31   - {
32   - "type": "git",
33   - "url": "https://github.com/pensandoodireito/delibera"
34   - },
35   - {
36   - "type": "git",
37   - "url": "https://github.com/pensandoodireito/debatepublico-tema"
38   - },
39   - {
40   - "type": "git",
41   - "url": "https://github.com/pensandoodireito/blog-tema"
42   - }
43   - ],
44   - "require": {
45   - "php": ">=5.4.0",
46   - "johnpbloch/wordpress": "4.1",
47   - "pensandoodireito/marcocivil-tema" : "dev-master",
48   - "pensandoodireito/dadospessoais-tema" : "dev-master",
49   - "pensandoodireito/pensandoodireito-tema" : "dev-master",
50   - "pensandoodireito/participacao-tema" : "dev-master",
51   - "pensandoodireito/debatepublico-tema" : "dev-master",
52   - "pensandoodireito/pensandoodireito-network-functions" : "dev-master",
53   - "pensandoodireito/blog-tema" : "dev-master",
54   - "pensandoodireito/wp-side-comments" : "dev-master",
55   - "ethymos/delibera" : "dev-master",
56   - "wpackagist-plugin/rich-text-tags": "1.7.3",
57   - "wpackagist-plugin/json-rest-api": "1.1.1",
58   - "wpackagist-plugin/sendpress": ">=1.1.7.21",
59   - "wpackagist-plugin/social-share-button": "2.1",
60   - "wpackagist-plugin/events-manager": "5.5.7.1",
61   - "wpackagist-plugin/mce-table-buttons": "~3.2",
62   - "fancyguy/webroot-installer": "1.0.0",
63   - "composer/installers": "~1.0"
  2 + "repositories": [
  3 + {
  4 + "type": "composer",
  5 + "url": "http://wpackagist.org"
64 6 },
65   - "extra": {
66   - "wordpress-install-dir": "src/wp",
67   - "installer-paths": {
68   - "src/wp-content/plugins/{$name}/": ["type:wordpress-plugin"],
69   - "src/wp-content/mu-plugins/{$name}/": ["type:wordpress-muplugin"],
70   - "src/wp-content/themes/{$name}/": ["type:wordpress-theme"]
71   - }
  7 + {
  8 + "type": "git",
  9 + "url": "https://github.com/pensandoodireito/marcocivil-tema"
72 10 },
73   - "scripts": {
74   - "pre-install-cmd": "/bin/bash ./pre-update.sh",
75   - "pre-update-cmd": "/bin/bash ./pre-update.sh",
76   - "post-update-cmd": "/bin/bash ./post-update.sh",
77   - "post-install-cmd": "/bin/bash ./post-update.sh"
  11 + {
  12 + "type": "git",
  13 + "url": "https://github.com/pensandoodireito/dadospessoais-tema"
  14 + },
  15 + {
  16 + "type": "git",
  17 + "url": "https://github.com/pensandoodireito/pensandoodireito-tema"
  18 + },
  19 + {
  20 + "type": "git",
  21 + "url": "https://github.com/pensandoodireito/participacao-tema"
  22 + },
  23 + {
  24 + "type": "git",
  25 + "url": "https://github.com/pensandoodireito/pensandoodireito-network-functions"
  26 + },
  27 + {
  28 + "type": "git",
  29 + "url": "https://github.com/pensandoodireito/wp-side-comments"
  30 + },
  31 + {
  32 + "type": "git",
  33 + "url": "https://github.com/pensandoodireito/delibera"
  34 + },
  35 + {
  36 + "type": "git",
  37 + "url": "https://github.com/pensandoodireito/debatepublico-tema"
  38 + },
  39 + {
  40 + "type": "git",
  41 + "url": "https://github.com/pensandoodireito/blog-tema"
  42 + }
  43 + ],
  44 + "require": {
  45 + "php": ">=5.4.0",
  46 + "johnpbloch/wordpress": "4.1",
  47 + "pensandoodireito/marcocivil-tema": "dev-master",
  48 + "pensandoodireito/dadospessoais-tema": "dev-master",
  49 + "pensandoodireito/pensandoodireito-tema": "dev-master",
  50 + "pensandoodireito/participacao-tema": "dev-master",
  51 + "pensandoodireito/debatepublico-tema": "dev-master",
  52 + "pensandoodireito/pensandoodireito-network-functions": "dev-master",
  53 + "pensandoodireito/blog-tema": "dev-master",
  54 + "pensandoodireito/wp-side-comments": "dev-master",
  55 + "ethymos/delibera": "dev-master",
  56 + "wpackagist-plugin/rich-text-tags": "1.7.3",
  57 + "wpackagist-plugin/json-rest-api": "1.1.1",
  58 + "wpackagist-plugin/sendpress": ">=1.1.7.21",
  59 + "wpackagist-plugin/social-share-button": "2.1",
  60 + "wpackagist-plugin/events-manager": "5.5.7.1",
  61 + "wpackagist-plugin/mce-table-buttons": "~3.2",
  62 + "fancyguy/webroot-installer": "1.0.0",
  63 + "composer/installers": "~1.0"
  64 + },
  65 + "extra": {
  66 + "wordpress-install-dir": "src/wp",
  67 + "installer-paths": {
  68 + "src/wp-content/plugins/{$name}/": [
  69 + "type:wordpress-plugin"
  70 + ],
  71 + "src/wp-content/mu-plugins/{$name}/": [
  72 + "type:wordpress-muplugin"
  73 + ],
  74 + "src/wp-content/themes/{$name}/": [
  75 + "type:wordpress-theme"
  76 + ]
78 77 }
  78 + },
  79 + "scripts": {
  80 + "pre-install-cmd": "/bin/bash ./pre-update.sh",
  81 + "pre-update-cmd": "/bin/bash ./pre-update.sh",
  82 + "post-update-cmd": "/bin/bash ./post-update.sh",
  83 + "post-install-cmd": "/bin/bash ./post-update.sh"
  84 + }
79 85 }
... ...
config/file-remote.php
1 1 <?php
2 2 $path = $_GET{'src'};
3 3  
4   -$dirs = explode('/', $path);
5   -$img = implode('/', $dirs);
  4 +$dirs = explode( '/', $path );
  5 +$img = implode( '/', $dirs );
6 6  
7   -if(strpos($img, ".jpg") !== false || strpos($img, ".jpeg")){
8   - $contentType = "image/jpeg";
9   -}elseif(strpos($img, ".png") !== false){
10   - $contentType = "image/png";
11   -}else{
12   - $contentType = "image/gif";
  7 +if ( strpos( $img, ".jpg" ) !== false || strpos( $img, ".jpeg" ) ) {
  8 + $contentType = "image/jpeg";
  9 +} elseif ( strpos( $img, ".png" ) !== false ) {
  10 + $contentType = "image/png";
  11 +} else {
  12 + $contentType = "image/gif";
13 13 }
14 14  
15   -header("Content-Type: {$contentType}", true);
  15 +header( "Content-Type: {$contentType}", true );
16 16 ob_start();
17   -if(file_exists($img)){
18   - readfile($img);
19   - die;
20   -}else{
21   - array_pop($dirs);
22   - $localDir = implode('/', $dirs);
23   - if(!file_exists($localDir) || !is_dir($localDir)){
24   - mkdir($localDir, 777, true);
25   - }
26   - $content = file_get_contents("http://pensando.mj.gov.br/{$img}");
27   - file_put_contents($img, $content);
28   - ob_clean();
29   - echo $content;
  17 +if ( file_exists( $img ) ) {
  18 + readfile( $img );
  19 + die;
  20 +} else {
  21 + array_pop( $dirs );
  22 + $localDir = implode( '/', $dirs );
  23 + if ( ! file_exists( $localDir ) || ! is_dir( $localDir ) ) {
  24 + mkdir( $localDir, 777, true );
  25 + }
  26 + $content = file_get_contents( "http://pensando.mj.gov.br/{$img}" );
  27 + file_put_contents( $img, $content );
  28 + ob_clean();
  29 + echo $content;
30 30 }
... ...
config/index-vagrant.php
... ... @@ -11,7 +11,7 @@
11 11 *
12 12 * @var bool
13 13 */
14   -define('WP_USE_THEMES', true);
  14 +define( 'WP_USE_THEMES', true );
15 15  
16 16 /** Loads the WordPress Environment and Template */
17 17 require( dirname( __FILE__ ) . '/wp/wp-blog-header.php' );
... ...
config/wp-config-provision.php
1 1 <?php
2   -/**
  2 +/**
3 3 * As configurações básicas do WordPress.
4 4 *
5 5 * Esse arquivo contém as seguintes configurações: configurações de MySQL, Prefixo de Tabelas,
... ... @@ -16,22 +16,22 @@
16 16  
17 17 // ** Configurações do MySQL - Você pode pegar essas informações com o serviço de hospedagem ** //
18 18 /** O nome do banco de dados do WordPress */
19   -define('DB_NAME', 'participacao');
  19 +define( 'DB_NAME', 'participacao' );
20 20  
21 21 /** Usuário do banco de dados MySQL */
22   -define('DB_USER', 'root');
  22 +define( 'DB_USER', 'root' );
23 23  
24 24 /** Senha do banco de dados MySQL */
25   -define('DB_PASSWORD', 'root');
  25 +define( 'DB_PASSWORD', 'root' );
26 26  
27 27 /** nome do host do MySQL */
28   -define('DB_HOST', 'localhost');
  28 +define( 'DB_HOST', 'localhost' );
29 29  
30 30 /** Conjunto de caracteres do banco de dados a ser usado na criação das tabelas. */
31   -define('DB_CHARSET', 'utf8');
  31 +define( 'DB_CHARSET', 'utf8' );
32 32  
33 33 /** O tipo de collate do banco de dados. Não altere isso se tiver dúvidas. */
34   -define('DB_COLLATE', '');
  34 +define( 'DB_COLLATE', '' );
35 35  
36 36 /**#@+
37 37 * Chaves únicas de autenticação e salts.
... ... @@ -42,14 +42,14 @@ define(&#39;DB_COLLATE&#39;, &#39;&#39;);
42 42 *
43 43 * @since 2.6.0
44 44 */
45   -define('AUTH_KEY', 's!rLRNU4!2]e}H^u+zW-(YC<F?x1HC2 B1_[ZZ-p:X)k1%6+&O+Ttss?*<-+p@L ');
46   -define('SECURE_AUTH_KEY', 'faW;J+> 3.U25blUp2d)}3A}fp>[f@=VuNZ#QLlhDZ4+/sKUg13gdN8Vz%OJm:tM');
47   -define('LOGGED_IN_KEY', 'Y9#zsWMMNUpd/];C]3>wd3=M9j#f+Vz/< |rb3<|(io}JBY>]XJ`X-(+>=Y=q}iw');
48   -define('NONCE_KEY', 'q9v4xp!s+*[OO3W=E#)2DV{AUVDsIPJowH{7meIQk_a7}vB?UJ*fv Mz_eflEcK');
49   -define('AUTH_SALT', 'q0TRGwz,wq,lgr-|w-+$q3[}Tfn^/0zQRdb;<~WM6Y[UEPy)gD?|Q%#FopKxLNSp');
50   -define('SECURE_AUTH_SALT', 'D{~R3*RQd3@aL}2kp(1!&I{c xxLR`j-{vxj!TGNIPZik#rR<r/JppAbeB-_yJKf');
51   -define('LOGGED_IN_SALT', 'Uu0:3Z**!`t4|:3f@x:q2)zM~Y>^Y7THeCOpKst<!3AN?Vwqg>p4q?gJ?fEN|>U!');
52   -define('NONCE_SALT', '}Sf&a$vcvJd|h<MK<1<o+.%PS{,cHrTlGKBF(3,QVF(J.BK1x {6Ub1mi)Ae_u!.');
  45 +define( 'AUTH_KEY', 's!rLRNU4!2]e}H^u+zW-(YC<F?x1HC2 B1_[ZZ-p:X)k1%6+&O+Ttss?*<-+p@L ' );
  46 +define( 'SECURE_AUTH_KEY', 'faW;J+> 3.U25blUp2d)}3A}fp>[f@=VuNZ#QLlhDZ4+/sKUg13gdN8Vz%OJm:tM' );
  47 +define( 'LOGGED_IN_KEY', 'Y9#zsWMMNUpd/];C]3>wd3=M9j#f+Vz/< |rb3<|(io}JBY>]XJ`X-(+>=Y=q}iw' );
  48 +define( 'NONCE_KEY', 'q9v4xp!s+*[OO3W=E#)2DV{AUVDsIPJowH{7meIQk_a7}vB?UJ*fv Mz_eflEcK' );
  49 +define( 'AUTH_SALT', 'q0TRGwz,wq,lgr-|w-+$q3[}Tfn^/0zQRdb;<~WM6Y[UEPy)gD?|Q%#FopKxLNSp' );
  50 +define( 'SECURE_AUTH_SALT', 'D{~R3*RQd3@aL}2kp(1!&I{c xxLR`j-{vxj!TGNIPZik#rR<r/JppAbeB-_yJKf' );
  51 +define( 'LOGGED_IN_SALT', 'Uu0:3Z**!`t4|:3f@x:q2)zM~Y>^Y7THeCOpKst<!3AN?Vwqg>p4q?gJ?fEN|>U!' );
  52 +define( 'NONCE_SALT', '}Sf&a$vcvJd|h<MK<1<o+.%PS{,cHrTlGKBF(3,QVF(J.BK1x {6Ub1mi)Ae_u!.' );
53 53  
54 54 /**#@-*/
55 55  
... ... @@ -59,7 +59,7 @@ define(&#39;NONCE_SALT&#39;, &#39;}Sf&amp;a$vcvJd|h&lt;MK&lt;1&lt;o+.%PS{,cHrTlGKBF(3,QVF(J.BK1x {6
59 59 * Você pode ter várias instalações em um único banco de dados se você der para cada um um único
60 60 * prefixo. Somente números, letras e sublinhados!
61 61 */
62   -$table_prefix = 'wp_';
  62 +$table_prefix = 'wp_';
63 63  
64 64  
65 65 /**
... ... @@ -69,23 +69,24 @@ $table_prefix = &#39;wp_&#39;;
69 69 * é altamente recomendável que os desenvolvedores de plugins e temas usem o WP_DEBUG
70 70 * em seus ambientes de desenvolvimento.
71 71 */
72   -define('WP_DEBUG', true);
  72 +define( 'WP_DEBUG', true );
73 73  
74 74 /* Multisite */
75 75 define( 'WP_ALLOW_MULTISITE', true );
76 76  
77   -define('MULTISITE', true);
78   -define('SUBDOMAIN_INSTALL', false);
79   -define('DOMAIN_CURRENT_SITE', 'participacao.mj.gov.br');
80   -define('PATH_CURRENT_SITE', '/');
81   -define('SITE_ID_CURRENT_SITE', 1);
82   -define('BLOG_ID_CURRENT_SITE', 1);
  77 +define( 'MULTISITE', true );
  78 +define( 'SUBDOMAIN_INSTALL', false );
  79 +define( 'DOMAIN_CURRENT_SITE', 'participacao.mj.gov.br' );
  80 +define( 'PATH_CURRENT_SITE', '/' );
  81 +define( 'SITE_ID_CURRENT_SITE', 1 );
  82 +define( 'BLOG_ID_CURRENT_SITE', 1 );
83 83  
84 84 /* Isto é tudo, pode parar de editar! :) */
85 85  
86 86 /** Caminho absoluto para o diretório WordPress. */
87   -if ( !defined('ABSPATH') )
88   - define('ABSPATH', dirname(__FILE__) . '/');
89   -
  87 +if ( ! defined( 'ABSPATH' ) ) {
  88 + define( 'ABSPATH', dirname( __FILE__ ) . '/' );
  89 +}
  90 +
90 91 /** Configura as variáveis do WordPress e arquivos inclusos. */
91   -require_once(ABSPATH . 'wp-settings.php');
  92 +require_once( ABSPATH . 'wp-settings.php' );
... ...
config/wp-config-vagrant.php
... ... @@ -16,22 +16,22 @@
16 16  
17 17 // ** Configurações do MySQL - Você pode pegar essas informações com o serviço de hospedagem ** //
18 18 /** O nome do banco de dados do WordPress */
19   -define('DB_NAME', 'participacao');
  19 +define( 'DB_NAME', 'participacao' );
20 20  
21 21 /** Usuário do banco de dados MySQL */
22   -define('DB_USER', 'root');
  22 +define( 'DB_USER', 'root' );
23 23  
24 24 /** Senha do banco de dados MySQL */
25   -define('DB_PASSWORD', 'root');
  25 +define( 'DB_PASSWORD', 'root' );
26 26  
27 27 /** nome do host do MySQL */
28   -define('DB_HOST', 'localhost');
  28 +define( 'DB_HOST', 'localhost' );
29 29  
30 30 /** Conjunto de caracteres do banco de dados a ser usado na criação das tabelas. */
31   -define('DB_CHARSET', 'utf8');
  31 +define( 'DB_CHARSET', 'utf8' );
32 32  
33 33 /** O tipo de collate do banco de dados. Não altere isso se tiver dúvidas. */
34   -define('DB_COLLATE', '');
  34 +define( 'DB_COLLATE', '' );
35 35  
36 36 /**#@+
37 37 * Chaves únicas de autenticação e salts.
... ... @@ -42,14 +42,14 @@ define(&#39;DB_COLLATE&#39;, &#39;&#39;);
42 42 *
43 43 * @since 2.6.0
44 44 */
45   -define('AUTH_KEY', 's!rLRNU4!2]e}H^u+zW-(YC<F?x1HC2 B1_[ZZ-p:X)k1%6+&O+Ttss?*<-+p@L ');
46   -define('SECURE_AUTH_KEY', 'faW;J+> 3.U25blUp2d)}3A}fp>[f@=VuNZ#QLlhDZ4+/sKUg13gdN8Vz%OJm:tM');
47   -define('LOGGED_IN_KEY', 'Y9#zsWMMNUpd/];C]3>wd3=M9j#f+Vz/< |rb3<|(io}JBY>]XJ`X-(+>=Y=q}iw');
48   -define('NONCE_KEY', 'q9v4xp!s+*[OO3W=E#)2DV{AUVDsIPJowH{7meIQk_a7}vB?UJ*fv Mz_eflEcK');
49   -define('AUTH_SALT', 'q0TRGwz,wq,lgr-|w-+$q3[}Tfn^/0zQRdb;<~WM6Y[UEPy)gD?|Q%#FopKxLNSp');
50   -define('SECURE_AUTH_SALT', 'D{~R3*RQd3@aL}2kp(1!&I{c xxLR`j-{vxj!TGNIPZik#rR<r/JppAbeB-_yJKf');
51   -define('LOGGED_IN_SALT', 'Uu0:3Z**!`t4|:3f@x:q2)zM~Y>^Y7THeCOpKst<!3AN?Vwqg>p4q?gJ?fEN|>U!');
52   -define('NONCE_SALT', '}Sf&a$vcvJd|h<MK<1<o+.%PS{,cHrTlGKBF(3,QVF(J.BK1x {6Ub1mi)Ae_u!.');
  45 +define( 'AUTH_KEY', 's!rLRNU4!2]e}H^u+zW-(YC<F?x1HC2 B1_[ZZ-p:X)k1%6+&O+Ttss?*<-+p@L ' );
  46 +define( 'SECURE_AUTH_KEY', 'faW;J+> 3.U25blUp2d)}3A}fp>[f@=VuNZ#QLlhDZ4+/sKUg13gdN8Vz%OJm:tM' );
  47 +define( 'LOGGED_IN_KEY', 'Y9#zsWMMNUpd/];C]3>wd3=M9j#f+Vz/< |rb3<|(io}JBY>]XJ`X-(+>=Y=q}iw' );
  48 +define( 'NONCE_KEY', 'q9v4xp!s+*[OO3W=E#)2DV{AUVDsIPJowH{7meIQk_a7}vB?UJ*fv Mz_eflEcK' );
  49 +define( 'AUTH_SALT', 'q0TRGwz,wq,lgr-|w-+$q3[}Tfn^/0zQRdb;<~WM6Y[UEPy)gD?|Q%#FopKxLNSp' );
  50 +define( 'SECURE_AUTH_SALT', 'D{~R3*RQd3@aL}2kp(1!&I{c xxLR`j-{vxj!TGNIPZik#rR<r/JppAbeB-_yJKf' );
  51 +define( 'LOGGED_IN_SALT', 'Uu0:3Z**!`t4|:3f@x:q2)zM~Y>^Y7THeCOpKst<!3AN?Vwqg>p4q?gJ?fEN|>U!' );
  52 +define( 'NONCE_SALT', '}Sf&a$vcvJd|h<MK<1<o+.%PS{,cHrTlGKBF(3,QVF(J.BK1x {6Ub1mi)Ae_u!.' );
53 53  
54 54 /**#@-*/
55 55  
... ... @@ -59,7 +59,7 @@ define(&#39;NONCE_SALT&#39;, &#39;}Sf&amp;a$vcvJd|h&lt;MK&lt;1&lt;o+.%PS{,cHrTlGKBF(3,QVF(J.BK1x {6
59 59 * Você pode ter várias instalações em um único banco de dados se você der para cada um um único
60 60 * prefixo. Somente números, letras e sublinhados!
61 61 */
62   -$table_prefix = 'wp_';
  62 +$table_prefix = 'wp_';
63 63  
64 64  
65 65 /**
... ... @@ -69,42 +69,43 @@ $table_prefix = &#39;wp_&#39;;
69 69 * é altamente recomendável que os desenvolvedores de plugins e temas usem o WP_DEBUG
70 70 * em seus ambientes de desenvolvimento.
71 71 */
72   -define('WP_DEBUG', true);
  72 +define( 'WP_DEBUG', true );
73 73  
74   -define('SMTP_PORT', '25');
  74 +define( 'SMTP_PORT', '25' );
75 75  
76   -define('SMTP_HOST', 'localhost');
  76 +define( 'SMTP_HOST', 'localhost' );
77 77  
78   -define('SMTP_FROM', 'pensandoodireito@mj.gov.br');
  78 +define( 'SMTP_FROM', 'pensandoodireito@mj.gov.br' );
79 79  
80   -define('SMTP_FROMNAME', 'Plataforma de Debate Público Pensando o Direito');
  80 +define( 'SMTP_FROMNAME', 'Plataforma de Debate Público Pensando o Direito' );
81 81  
82   -define('BITLY_LOGIN', '');
  82 +define( 'BITLY_LOGIN', '' );
83 83  
84   -define('BITLY_APIKEY', '');
  84 +define( 'BITLY_APIKEY', '' );
85 85  
86   -define('ANOTATION_SERVER', '');
  86 +define( 'ANOTATION_SERVER', '' );
87 87  
88   -define('USE_CUSTOM_SIGNUP', true);
  88 +define( 'USE_CUSTOM_SIGNUP', true );
89 89  
90 90 /* Multisite */
91 91 define( 'WP_ALLOW_MULTISITE', true );
92 92  
93   -define('MULTISITE', true);
94   -define('SUBDOMAIN_INSTALL', false);
95   -define('DOMAIN_CURRENT_SITE', 'localhost');
96   -define('PATH_CURRENT_SITE', '/');
97   -define('SITE_ID_CURRENT_SITE', 1);
98   -define('BLOG_ID_CURRENT_SITE', 1);
  93 +define( 'MULTISITE', true );
  94 +define( 'SUBDOMAIN_INSTALL', false );
  95 +define( 'DOMAIN_CURRENT_SITE', 'localhost' );
  96 +define( 'PATH_CURRENT_SITE', '/' );
  97 +define( 'SITE_ID_CURRENT_SITE', 1 );
  98 +define( 'BLOG_ID_CURRENT_SITE', 1 );
99 99  
100   -define( 'WP_PLUGIN_DIR', dirname(__FILE__) . '/wp-content/plugins' );
101   -define( 'WP_CONTENT_DIR', dirname(__FILE__) . '/wp-content' );
  100 +define( 'WP_PLUGIN_DIR', dirname( __FILE__ ) . '/wp-content/plugins' );
  101 +define( 'WP_CONTENT_DIR', dirname( __FILE__ ) . '/wp-content' );
102 102  
103 103 /* Isto é tudo, pode parar de editar! :) */
104 104  
105 105 /** Caminho absoluto para o diretório WordPress. */
106   -if ( !defined('ABSPATH') )
107   - define('ABSPATH', dirname(__FILE__) . '/wp/');
  106 +if ( ! defined( 'ABSPATH' ) ) {
  107 + define( 'ABSPATH', dirname( __FILE__ ) . '/wp/' );
  108 +}
108 109  
109 110 /** Configura as variáveis do WordPress e arquivos inclusos. */
110   -require_once(ABSPATH . 'wp-settings.php');
  111 +require_once( ABSPATH . 'wp-settings.php' );
... ...
gulpfile.js
... ... @@ -6,61 +6,61 @@ var gutil = require(&#39;gulp-util&#39;);
6 6 var plumber = require('gulp-plumber');
7 7 var path = require('path');
8 8  
9   -var temas = ['themes/blog-tema','themes/dadospessoais-tema','themes/debatepublico-tema','themes/marcocivil-tema',
10   - 'themes/pensandoodireito-tema','plugins/wp-side-comments/includes'];
  9 +var temas = ['themes/blog-tema', 'themes/dadospessoais-tema', 'themes/debatepublico-tema', 'themes/marcocivil-tema',
  10 + 'themes/pensandoodireito-tema', 'plugins/wp-side-comments/includes'];
11 11  
12 12 var plumberHandler = function (err) {
13   - console.log(err);
14   - this.emit('end');
15   - };
  13 + console.log(err);
  14 + this.emit('end');
  15 +};
16 16  
17   -temas.forEach(function(item){
18   - gulp.task(item, function(){
19   - return gulp.src('src/wp-content/'+item+'/css/less/*.less')
20   - .pipe(plumber({
21   - errorHandler: plumberHandler
22   - }))
23   - .pipe(less())
24   - .pipe(sourcemaps.init())
25   - .pipe(minifyCss())
26   - .pipe(sourcemaps.write())
27   - .pipe(gulp.dest('src/wp-content/'+item+'/css'));
28   - });
  17 +temas.forEach(function (item) {
  18 + gulp.task(item, function () {
  19 + return gulp.src('src/wp-content/' + item + '/css/less/*.less')
  20 + .pipe(plumber({
  21 + errorHandler: plumberHandler
  22 + }))
  23 + .pipe(less())
  24 + .pipe(sourcemaps.init())
  25 + .pipe(minifyCss())
  26 + .pipe(sourcemaps.write())
  27 + .pipe(gulp.dest('src/wp-content/' + item + '/css'));
  28 + });
29 29 });
30 30  
31   -gulp.task('default', temas, function(){
32   - gulp.src('src/wp-content/themes/participacao-tema/css/less/site-global.less')
33   - .pipe(plumber({
34   - errorHandler: plumberHandler
35   - }))
36   - .pipe(less({
37   - paths: [ 'src/wp-content/themes/participacao-tema/css/less' ]
38   - }))
39   - .pipe(sourcemaps.init())
40   - .pipe(minifyCss())
41   - .pipe(sourcemaps.write())
42   - .pipe(gulp.dest('src/wp-content/themes/participacao-tema/css'));
  31 +gulp.task('default', temas, function () {
  32 + gulp.src('src/wp-content/themes/participacao-tema/css/less/site-global.less')
  33 + .pipe(plumber({
  34 + errorHandler: plumberHandler
  35 + }))
  36 + .pipe(less({
  37 + paths: ['src/wp-content/themes/participacao-tema/css/less']
  38 + }))
  39 + .pipe(sourcemaps.init())
  40 + .pipe(minifyCss())
  41 + .pipe(sourcemaps.write())
  42 + .pipe(gulp.dest('src/wp-content/themes/participacao-tema/css'));
43 43  
44   - gulp.src('src/wp-content/themes/participacao-tema/css/less/theme/theme-participacao.less')
45   - .pipe(plumber({
46   - errorHandler: plumberHandler
47   - }))
48   - .pipe(less({
49   - paths: [
50   - 'src/wp-content/themes/participacao-tema/css/less',
51   - ]
52   - }))
53   - .pipe(sourcemaps.init())
54   - .pipe(minifyCss())
55   - .pipe(sourcemaps.write())
56   - .pipe(gulp.dest('src/wp-content/themes/participacao-tema/css'));
  44 + gulp.src('src/wp-content/themes/participacao-tema/css/less/theme/theme-participacao.less')
  45 + .pipe(plumber({
  46 + errorHandler: plumberHandler
  47 + }))
  48 + .pipe(less({
  49 + paths: [
  50 + 'src/wp-content/themes/participacao-tema/css/less',
  51 + ]
  52 + }))
  53 + .pipe(sourcemaps.init())
  54 + .pipe(minifyCss())
  55 + .pipe(sourcemaps.write())
  56 + .pipe(gulp.dest('src/wp-content/themes/participacao-tema/css'));
57 57 });
58 58  
59 59  
60   -gulp.task('watch', function() {
61   - temas.forEach(function(item){
62   - gulp.watch('src/wp-content/themes/'+item+'-tema/css/less/*.less', [item]);
63   - });
  60 +gulp.task('watch', function () {
  61 + temas.forEach(function (item) {
  62 + gulp.watch('src/wp-content/themes/' + item + '-tema/css/less/*.less', [item]);
  63 + });
64 64 });
65 65  
66 66  
... ...