Skip to content

Commit

Permalink
V2.1
Browse files Browse the repository at this point in the history
- [FIXED] Bug with widget.php
- [FIXED] Bug with wp-dependency
- [NEW] Better system to manage dependencies
- [IMPROVED] Better admin messages
- Various bugfixes
  • Loading branch information
milesimarco committed Jan 6, 2020
1 parent 2388576 commit 59290c2
Show file tree
Hide file tree
Showing 28 changed files with 1,962 additions and 31 deletions.
5 changes: 5 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"require": {
"afragen/wp-dependency-installer": "^2.0"
}
}
91 changes: 91 additions & 0 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

require (get_template_directory() . '/include/widget.php');
require (get_template_directory() . '/include/pagination.php');
require (get_template_directory() . '/github/github-updater.php');
include_once( get_template_directory() . '/vendor/autoload.php' );
WP_Dependency_Installer::instance()->run( __DIR__ );

add_action('init', 'load_modules'); //ocio!

Expand Down
10 changes: 5 additions & 5 deletions include/moduli/pasw2015-destinatari.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,11 @@ function paswdestinatari_func($atts)

$utente_cpt = strtolower(get_term_by( 'slug', $utente, 'paswdestinatari' )->name);

$returner = '<hr>';
$returner = '';
$returner .= '<div class="shortcode-destinatari">';
$returner .= '<h2>' . $tipo_cpt . ' di interesse per ' . $utente_cpt;
$returner .= '<h3>' . $tipo_cpt . ' di interesse per ' . $utente_cpt;

$returner .= '</h2>';
$returner .= '</h3>';

$returner .= '<small>Visualizzazione';
if($numero !=""){
Expand All @@ -100,7 +100,7 @@ function paswdestinatari_func($atts)
if ($anno != '') { $returner .= ' inserite nel ' . $anno; }
if ($link == 'si') {
$returner .= ' &bull; <a href="' . add_query_arg( 'post_type', $tipo , get_term_link( $utente, 'paswdestinatari' ) );
$returner .='"><b>Tutti i contenuti per ' . $utente_cpt . ' &raquo;</b></a>';
$returner .='">Tutti i contenuti per ' . $utente_cpt . ' &raquo;</a>';
}
$returner .= '</small>';

Expand All @@ -113,7 +113,7 @@ function paswdestinatari_func($atts)
// $returner .= '<ul>';
$returner .= '<div class="contentdest">';
if (count($arrayposttypes) > 1) {
$returner .= '<h3>' . get_post_type_object( $ciao )->labels->name . '</h3>';
$returner .= '<h4>' . get_post_type_object( $ciao )->labels->name . '</h4>';
}

if (strtolower(get_post_type_object( $ciao )->labels->singular_name) == "pagina") {
Expand Down
34 changes: 17 additions & 17 deletions include/welcome-pasw2015.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,8 @@ function pasw2015_menu() {

function pasw2015_welcome() { ?>
<div class="wrap about-wrap">
<h1>Benvenuto in Pasw 2015 <small><?php echo get_option('pasw2015_version') . version_child(); ?></small></h1>
<div class="about-text">Pasw2015 è il nuovo tema realizzato dalla Comunità di Pratica Porte Aperte sul Web.
<br/>Bello, accessibile e innovativo.</div>
<h1>Pasw 2015 <small><?php echo get_option('pasw2015_version') . version_child(); ?></small></h1>
<div class="about-text">Realizzato dalla Comunità di Pratica Porte Aperte sul Web.</div>
<div class="wp-badge">Pasw2015
<?php
echo get_option('pasw2015_version') . '<br/>';
Expand All @@ -37,8 +36,21 @@ function pasw2015_welcome() { ?>
<a class="add-new-h2" target="_blank" href="https://github.com/PorteAperteSulWeb/pasw2015/releases">Changelog</a>
<br/><br/>
</div>

<h2>Sviluppato da:</h2>
<ul class="wp-people-group ">
<li class="wp-person">
<a href="https://marcomilesi.com"><img src="http://www.gravatar.com/avatar/c70b8e378aa035f77ab7a3ddee83b892.jpg?s=60" class="gravatar"></a>
<a class="web" href="http://marcomilesi.com">Marco Milesi</a> @ <a class="web" href="https://wpgov.it">WPGov.it</a>
<span class="title">San Pellegrino Terme <small>(BG)</small></span>
</li>
<li class="wp-person">
<a href=""><img src="http://www.gravatar.com/avatar/e3ba6cb4b821a6b5b68885bd14dc907b.jpg?s=60" class="gravatar"></a>
<a class="web" href="">Christian Ghellere</a>
<span class="title">Brendola <small>(VI)</small></span>
</li>
</ul>
<h2>In collaborazione con:</h2>
<ul>
<li class="wp-person">
<a href=""><img src="http://www.gravatar.com/avatar/18434072beb69131948d13ec49b43bc3.jpg?s=60" class="gravatar"></a>
<a class="web" href="">Alberto Ardizzone</a>
Expand All @@ -48,11 +60,6 @@ function pasw2015_welcome() { ?>
<a href=""><img src="http://www.gravatar.com/avatar/9474c75c8be90627711a1e69d48f1797.jpg?s=60" class="gravatar"></a>
<a class="web" href="">Andrea Smith</a>
<span class="title">-</span>
</li>
<li class="wp-person">
<a href=""><img src="http://www.gravatar.com/avatar/e3ba6cb4b821a6b5b68885bd14dc907b.jpg?s=60" class="gravatar"></a>
<a class="web" href="">Christian Ghellere</a>
<span class="title">Brendola <small>(VI)</small></span>
</li>
<li class="wp-person">
<a href=""><img src="http://www.gravatar.com/avatar/a6486b6230464a36ff431d3ef655e1e8.jpg?s=60" class="gravatar"></a>
Expand All @@ -64,11 +71,6 @@ function pasw2015_welcome() { ?>
<a class="web" href="">Ignazio Scimone</a>
<span class="title">-</span>
</li>
<li class="wp-person">
<a href="http://marcomilesi.ml"><img src="http://www.gravatar.com/avatar/c70b8e378aa035f77ab7a3ddee83b892.jpg?s=60" class="gravatar"></a>
<a class="web" href="http://marcomilesi.ml">Marco Milesi</a>
<span class="title">San Pellegrino Terme <small>(BG)</small></span>
</li>
<li class="wp-person">
<a href=""><img src="http://www.gravatar.com/avatar/a5294e8762346dbbfa62e6fee71b3614.jpg?s=60" class="gravatar"></a>
<a class="web" href="">Renata Durighello</a>
Expand All @@ -83,11 +85,9 @@ function pasw2015_welcome() { ?>
<p class="wp-credits-list">
Anna Ladu, Antonello Facchetti, Candida Zappacosta, Caterina Toccafondi, Enzo Costantini, Giorgio Galli, Lillo Sciascia, Paolo Mauri, Sergio Cortese
</p>
<center>
<a href="http://www.porteapertesulweb.it" target="_blank" alt="Porte Aperte sul Web">
<img src="<?php echo site_url() . '/wp-content/themes/pasw2015/images/logopab.png'; ?>" />
<img style="width:200px;" src="<?php echo site_url() . '/wp-content/themes/pasw2015/images/logopab.png'; ?>" />
</a>
</center>
</div>
<?php }

Expand Down
4 changes: 2 additions & 2 deletions include/widget.php
Original file line number Diff line number Diff line change
Expand Up @@ -430,9 +430,9 @@ function widget( $args, $instance ) {
$visibilita="p";
else
$visibilita=$visibilita[0];
if (function_exists(Is_Circolare_per_User))
if (function_exists('Is_Circolare_per_User'))
$IsPerUser=((Is_Circolare_per_User($my_query->post->ID) and $visibilita=="d") or $visibilita=="p");
if (function_exists(gcg_Is_Circolare_per_User))
if (function_exists('gcg_Is_Circolare_per_User'))
$IsPerUser=gcg_Is_Circolare_per_User($my_query->post->ID);

if ($IsPerUser){
Expand Down
11 changes: 5 additions & 6 deletions style.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Theme Name: PASW 2015
Description: Pasw2015 è il tema trasparente e accessibile promosso dalla Comunità di Pratica "Porte Aperte sul Web". Bello, accessibile e innovativo, con supporto continuo e volontario offerto dalla comunità.
Author: Porte Aperte sul Web
Author URI: http://www.porteapertesulweb.it
Version: 1.8.2
Version: 2.1
Tags: pasw, scuole, pubblica amministrazione, accessibile, trasparente, personalizzabile
GitHub Theme URI: https://github.com/PorteAperteSulWeb/pasw2015
GitHub Branch: master
Expand Down Expand Up @@ -596,6 +596,8 @@ margin-top: 0px;
#topbar li a {
padding: 5px 10px;
float:left;
border-right:1px solid;
border-right-color:#F0F0F0;
}

#topbar ul li {
Expand All @@ -607,7 +609,6 @@ display:inline;
text-decoration:none;
color:#FFF;
transition: background 0.5s, color 0.2s;
padding: 10px;
}

#topbar ul li a:hover {
Expand All @@ -620,10 +621,6 @@ text-decoration:none!important;
color:#3A291F;
}

.topsearch-div input {
padding: 8px 7px;
margin: 2px;
}
/* Essential Layout (IE7 Fix) */
*+html #topbar li a {
margin-top:-14px;
Expand Down Expand Up @@ -858,7 +855,9 @@ line-height:1.2em;
#searchform #s {
width: 95%;
background: white url(images/search.png) no-repeat center right;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 0.8em;
padding: 5px 2px 4px 10px;
}

/***************** Calendar Styles ******************/
Expand Down
21 changes: 21 additions & 0 deletions vendor/afragen/wp-dependency-installer/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2016 Andy Fragen

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Loading

0 comments on commit 59290c2

Please sign in to comment.