PHPackages                             helsingborg-stad/hbg-trend-omvarlds-analys-2021 - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. helsingborg-stad/hbg-trend-omvarlds-analys-2021

AbandonedArchivedWordpress-theme

helsingborg-stad/hbg-trend-omvarlds-analys-2021
===============================================

3.0 Municipio childtheme for Trend, Omvarld.

1.33.7(5y ago)0105[4 PRs](https://github.com/helsingborg-stad/hbg-trend-omvarlds-analys-2021/pulls)MITPHP

Since Mar 9Pushed 3y agoCompare

[ Source](https://github.com/helsingborg-stad/hbg-trend-omvarlds-analys-2021)[ Packagist](https://packagist.org/packages/helsingborg-stad/hbg-trend-omvarlds-analys-2021)[ RSS](/packages/helsingborg-stad-hbg-trend-omvarlds-analys-2021/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (7)Versions (553)Used By (0)

Municipio 1.0 (for Helsingborg stad)
====================================

[](#municipio-10-for-helsingborg-stad)

Download plugin.
----------------

[](#download-plugin)

To download a complete out of the box working plugin without the need to compile or fetch dependencies.
Go [here](https://github.com/helsingborg-stad/Municipio/releases) and download the `full-release.zip` from the latest version.

Getting started
---------------

[](#getting-started)

To get started you'll need to install the required npm packages. To install these components you will need to have Node.js installed on your system.

```
$ cd [THEME-DIR]
$ npm install
$ composer install

```

Dependencies
------------

[](#dependencies)

Municipio requires [ACF PRO](https://www.advancedcustomfields.com/pro/).

Coding standards
----------------

[](#coding-standards)

For PHP, use PSR-2 and PSR-4 where applicable.

Gulp
----

[](#gulp)

You can use Gulp to compile, concatenate and minify SASS and JavaScript. The compiling of SASS will also automatically add vendor-prefixes where needed.

To compile both js and sass and start the "watch" task run the following command from the theme directory:

```
$ gulp

```

We added support for webpack
----------------------------

[](#we-added-support-for-webpack)

Webpack is a bit faster than gulp. So if you prefer to use webpack instead of gulp, just run the following command:

```
$ npm run watch

```

or just for a single build:

```
$ npm run build

```

Composer
--------

[](#composer)

You can install composer dependencies with.

```
$ composer install

```

Constants
---------

[](#constants)

#### Block author pages

[](#block-author-pages)

Author pages is blocked by default. To "unblock" add the following constant to wp-config (or other suitable place).

```
define('MUNICIPIO_BLOCK_AUTHOR_PAGES', false);

```

#### Load styleguide from a different host

[](#load-styleguide-from-a-different-host)

Constants for setting the base URI to the styleguide. Useful for third-party sites.

```
define('MUNICIPIO_STYLEGUIDE_URI', '//example.com/style/guide');

```

#### Load specific version of styleguide

[](#load-specific-version-of-styleguide)

Constants that lock version of the styleguide. Comes in handy when you want to enshure maximum stability of a site.

```
define('STYLEGUIDE_VERSION', 1.0.32);

```

#### Load specific developement version of styleguide

[](#load-specific-developement-version-of-styleguide)

Constant that load local verrsion of the styleguide.

```
define('DEV_MODE', true);

```

#### CSS class in BEMIT style for theme name

[](#css-class-in-bemit-style-for-theme-name)

Constant that contains the current theme name in BEM format. Usable when you wnat to connect component styling directly to the theme.You cannot change this.

```
MUNICIPIO_BEM_THEME_NAME

```

Actions
-------

[](#actions)

#### Municipio/blog/post\_info

[](#municipioblogpost_info)

Blog post info header (single)

- `@param object $post` - The post object

```
do_action('Municipio/author_display/name', $post);
```

#### Municipio/share\_post/recipients

[](#municipioshare_postrecipients)

Do action on sharing post by email, e.g. send a notification

- `@param object $user` - User object for the sender
- `@param array $recipients` - List with e-mail addresses

```
do_action('Municipio/share_post/recipients', $user, $recipients);
```

#### Municipio/comment/save\_like

[](#municipiocommentsave_like)

Do action on comment like

- `@param object $comment` - Comment object
- `@param int $userId` - Current user ID
- `@param bool $create` - True if a new like is created. False if it's removed

```
do_action('Municipio/comment/save_like', $comment, $userId, $create);
```

Filters
-------

[](#filters)

#### Municipio/theme/key

[](#municipiothemekey)

Filters the theme/styleguide asset key.

- `@param string $key` - The key of the styleguide theme

```
apply_filters('Municipio/theme/key', $key);
```

#### Municipio/author\_display/name

[](#municipioauthor_displayname)

Set the name of the author display

- `@param string $name` - Default name
- `@param string $userId` - The ID of the user

```
apply_filters('Municipio/author_display/name', $name, $userId);
```

#### Municipio/author\_display/title

[](#municipioauthor_displaytitle)

Set the title label for the author name display

- `@param string $title` - Default title

```
apply_filters('Municipio/author_display/title', $title);
```

#### Municipio/ajax\_url\_in\_head

[](#municipioajax_url_in_head)

Set the ajax\_url in the

- `@param string $ajax_url` - Default ajax url

```
apply_filters('Municipio/ajax_url_in_head', $ajax_url);
```

#### Municipio/favicon\_sizes

[](#municipiofavicon_sizes)

Add sizes to theme options for favicon

- `@param array $sizes` - Default favicon sizes

```
apply_filters('Municipio/favicon_sizes', $sizes);
```

#### Municipio/favicon\_tag

[](#municipiofavicon_tag)

Add sizes to theme options for favicon

- `@param string $tag` - The HTML tag(s)
- `@param array $icon` - The icon data

```
apply_filters('Municipio/favicon_tag', $tag, $icon);
```

#### Municipio/header\_grid\_size

[](#municipioheader_grid_size)

Applied to classes string for header sizes.

- `@param string $classes` -

```
apply_filters('Municipio/header_grid_size', $classes);
```

#### Municipio/mobile\_menu\_breakpoint

[](#municipiomobile_menu_breakpoint)

Applied to classes string for mobile hamburger menu breakpoint.

- `@param string $classes` - The default site name

```
apply_filters('Municipio/mobile_menu_breakpoint', $classes);
```

#### Municipio/logotype\_text

[](#municipiologotype_text)

Applied to the text that displays as the logo when now logotype image is uploaded in theme options.

- `@param string $title` - The default site name

```
apply_filters('Municipio/logotype_text', $title);
```

#### Municipio/logotype\_class

[](#municipiologotype_class)

Applied to the logotype class attirbute

- `@param array $classes` - Default class(es)

```
apply_filters('Municipio/logotype_class', $classes);
```

#### Municipio/logotype\_tooltip

[](#municipiologotype_tooltip)

Applied to the logotype class attirbute

- `@param string $tooltip` - Default tooltip text

```
apply_filters('Municipio/logotype_tooltip', $tooltip);
```

#### Municipio/blade/data

[](#municipiobladedata)

Applied to the blade template data. Can be used to send data to a Blade view.

- `@param array $data` - Dafault data

```
apply_filters('Municipio/blade/data', $data);
```

#### Municipio/blade/template\_types

[](#municipiobladetemplate_types)

Applied to the list of Blade template types.

- `@param array $types` - Dafault Blade template types

```
apply_filters('Municipio/blade/template_types', $types);
```

#### Municipio/search\_result/…

[](#municipiosearch_result)

Multiple filters applied to the contents of a search result

- `@param string $var` - The content of the variable
- `@param object $post` - Post object

```
apply_filters('Municipio/search_result/date', $date, $post);
apply_filters('Municipio/search_result/title', $title, $post);
apply_filters('Municipio/search_result/excerpt', $excerpt, $post);
apply_filters('Municipio/search_result/permalink_url', $permalink_url, $post);
apply_filters('Municipio/search_result/permalink_text', $permalink_text, $post);
```

#### Municipio/search\_form/…

[](#municipiosearch_form)

Filters applied to the search form

- `@param string $var` - The content of the variable

```
apply_filters('Municipio/search_form/action', $url);
```

#### Municipio/archive/sort\_keys

[](#municipioarchivesort_keys)

Modify the avaiable sorting keys for archives

- `@param array $keys` - The keys
- `@param string $postType` - The post type

```
apply_filters('Municipio/archive/sort_keys', $keys, $postType);
```

#### Municipio/archive/date\_filter

[](#municipioarchivedate_filter)

Modify the date filter WHERE clause

- `@param string $where` - The sql WHERE clause
- `@param string $from` - The "from" date from querystring
- `@param string $to` - The "to" date from querystring

```
apply_filters('Municipio/archive/date_filter', $where, $from, $to);
```

#### Municipio/Breadcrumbs

[](#municipiobreadcrumbs)

Show/hide (true/false) breadcrumbs

- `@param boolean $bool`- True or false (show or hide)

```
apply_filters('Municipio/Breadcrumbs', $bool, get_queried_object())
```

#### Municipio/Breadcrumbs/Items

[](#municipiobreadcrumbsitems)

Filter the items/links in the breadcrumb

- `@param array $items` - The breadcrumb items

```
apply_filters('Municipio/Breadcrumbs/Items', $items, get_queried_object());
```

#### Municipio/admin/editor\_stylesheet

[](#municipioadmineditor_stylesheet)

Change custom editor stylesheet

- `@param string $url` - The stylesheet url

```
apply_filters('Municipio/admin/editor_stylesheet', $url);
```

#### Municipio/oembed/should\_filter\_markup

[](#municipiooembedshould_filter_markup)

Decide if oembed markup should be filtered to HbgPrime video player (youtube and vimeo) or not.

- `@param string $url` - The resource url
- `@param int $postId` - Id of the current post

```
apply_filters('Municipio/oembed/should_filter_markup', true, $url, $postId);
```

#### Municipio/Menu/Vertical/EnabledSidebars

[](#municipiomenuverticalenabledsidebars)

Dictates what sidebars that sould be active on the current page to show the vertical menu. Simple array containing the sidebar id's.

- `@param array $sidebars` - An flat array with sidebar id's.

```
apply_filters('Municipio/Menu/Vertical/EnabledSidebars', $sidebars);
```

#### Municipio/archive/tax\_query

[](#municipioarchivetax_query)

Additional taxonomy queries.

- `@param array $taxQuery` - Holds the taxonomy query.
- `@param object $query` - Current query object.

```
apply_filters('Municipio/archive/tax_query', $taxQuery, $query);
```

#### Municipio/taxonomy/tag\_style

[](#municipiotaxonomytag_style)

Adds custom style to taxonomy labels.

- `@param string $style` - Custom CSS.
- `@param string $term` - The term.
- `@param string $taxonomy` - Taxonomy.

```
apply_filters('Municipio/taxonomy/tag_style', $style, $term, $taxonomy);
```

#### Municipio/Menu/Vertical/Items

[](#municipiomenuverticalitems)

Items that should be visible in the vertical navigation menus. Represented as dots with hover-labels.

- `@param array $items` - An array with items representing links.

```
apply_filters('Municipio/Menu/Vertical/EnabledSidebars', array(array('title' => 'Page section title', 'link' => '#anchorlink'));
```

Dev mode
--------

[](#dev-mode)

To load assets from local styleguide. Set contant DEV\_MODE to "true"

```
define('DEV_MODE', true);
```

Theme fonts
-----------

[](#theme-fonts)

Municipio is integrated with google web-fonts. It enables smart loading of fonts preventing invisible fonts using Google &amp; Adobe webfont loader.

```
define('WEB_FONT', 'Roboto'); //The google fonts name (without weights)
define('WEB_FONT_REMOTE', true); //Load font kit from cdn
```

Version 2.0
===========

[](#version-20)

The goal of version 2.0 is to restructure the theme frontend and move towards the BEM (IT) standard for markup. More filters will be added in a automatic manner, mutch like ACF doe's it. These will for now, be documented below.

Deprecated functionality (notice phase)
---------------------------------------

[](#deprecated-functionality-notice-phase)

Version 2.0 will introduce some warnings aboute the removal of some prevoius functionality. According to plan, this functionality will be actually be removed in version 3.0. Functions that will be removed in 3.0 are.

- Gravitiforms optimizations
- Honeypot functionality for comments (this will be moved to separate plugin). Will also include google recaptcha.
- Contact widget (replacement avabile in modularity)
- RichText Widget (replacement embedded in core)
- PostType &amp; Taxonomy creator (move to plugin)
- Upload filters (move to plugin)

Filters
-------

[](#filters-1)

### Depricated filters

[](#depricated-filters)

- HbgBlade/data replaced with Municipio/viewData
- Municipio/ajax\_url\_in\_head replaced with Municipio/ajaxUrl
- Modularity/CoreTemplatesSearchPaths

### Blade view filter

[](#blade-view-filter)

All variables sent (created) in a controller will automatically go trough a filter named with the variable key.

```
apply_filters('Municipio/{{KEY}}', $var);
```

Global view filter
------------------

[](#global-view-filter)

You may prefer to get a full array of everything sent to a view. After the filter above has run, a global filter will be applied. This replaces the old filter.

```
apply_filters('Municipio/viewData', $var);
```

Constants
---------

[](#constants-1)

MUNICIPIO\_FRAGMENT\_CACHE - Set to false to remove fragment cache.

Theme view structure
--------------------

[](#theme-view-structure)

```
bem-views
│   [Main folder for  theme views, containing WordPress templates like page.blade.php]
│
└───components
│   │   [Components for the theme like card.blade.php]
│   │
└───partials
│   │   [Big chunks that are reused in templates footer.blade.php]
│   │
└───templates
    │   [General templates that are included in main WordPress views like master.blade.php]
│   │
└───utilities
    │   [Small pieces used by components like button.blade.php]
│   │
└───widgets
    │   [Widgetized components]
    │

```

Image compression
-----------------

[](#image-compression)

Municipio supports image compression with shortpixel. This will enque a cronjob with a slight delay to compress newly uploaded images. Simpley define SHORTPIXEL\_API\_KEY constant in your config file and that's it!

Compression level will be medium/glossy for high quality photos.

Tested with support from BrowserStack
-------------------------------------

[](#tested-with-support-from-browserstack)

This software is tested with the awesome tools from Browserstack.

[![](https://camo.githubusercontent.com/5318348d37eb32d113ae30b463d1cd8e98afbe18ea6046794d2eb8508e00a41a/68747470733a2f2f75747665636b6c696e672e68656c73696e67626f72672e73652f77702d636f6e74656e742f75706c6f6164732f73697465732f31392f323031382f30392f62726f77736572737461636b2d6c6f676f2e706e67)](https://browserstack.com)

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity83

Battle-tested with a long release history

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~3 days

Recently: every ~43 days

Total

548

Last Release

1982d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f46fe64973c3e89d15c745c0bf601c25983bafea81d30e64d4bf813a6f8c8c7c?d=identicon)[sebastianthulin](/maintainers/sebastianthulin)

### Embed Badge

![Health badge](/badges/helsingborg-stad-hbg-trend-omvarlds-analys-2021/health.svg)

```
[![Health](https://phpackages.com/badges/helsingborg-stad-hbg-trend-omvarlds-analys-2021/health.svg)](https://phpackages.com/packages/helsingborg-stad-hbg-trend-omvarlds-analys-2021)
```

###  Alternatives

[elgg/elgg

Elgg is an award-winning social networking engine, delivering the building blocks that enable businesses, schools, universities and associations to create their own fully-featured social networks and applications.

1.7k15.7k5](/packages/elgg-elgg)[pressbooks/pressbooks

Pressbooks is an open source book publishing tool built on a WordPress multisite platform. Pressbooks outputs books in multiple formats, including PDF, EPUB, web, and a variety of XML flavours, using a theming/templating system, driven by CSS.

44643.1k1](/packages/pressbooks-pressbooks)[helsingborg-stad/municipio

A bootstrap theme for creating municipality sites.

4127.7k10](/packages/helsingborg-stad-municipio)[rainlab/blog-plugin

Blog plugin for October CMS

17257.7k](/packages/rainlab-blog-plugin)[rainlab/user-plugin

User plugin for October CMS

11954.3k13](/packages/rainlab-user-plugin)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
