Skip to content

Instantly share code, notes, and snippets.

View RomanApunts's full-sized avatar

Roman Ribes (Grupapunts) RomanApunts

View GitHub Profile
@RomanApunts
RomanApunts / wp-query-ref.php
Created July 30, 2021 05:51 — forked from luetkemj/wp-query-ref.php
WP: Query $args
// This gist is now maintained on github at https://github.com/luetkemj/wp-query-ref
<?php
/**
* WordPress Query Comprehensive Reference
* Compiled by luetkemj - luetkemj.github.io
*
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters
* Source: https://core.trac.wordpress.org/browser/tags/4.9.4/src/wp-includes/query.php
*/
@RomanApunts
RomanApunts / upgrade_to_symfony3-lts.md
Created November 19, 2020 08:55 — forked from mickaelandrieu/upgrade_to_symfony3-lts.md
Migration guide to Symfony 3 LTS

Let's migrate a Symfony 2.8 LTS application to Symfony 3 LTS

Handle deprecations

First of all, ensure you don't have any deprecated!

The Symfony documentation explains it well, but let's sum up:

  • install the phpunit bridge ($ composer require --dev symfony/phpunit-bridge)
  • also check all your pages using web profiler and be ensure there is no deprecation error handled
  • found errors and need help about how to fix it ? I did a sort of guide.
@RomanApunts
RomanApunts / composer-teaser.js
Created April 23, 2020 09:34 — forked from stiucsib86/composer-teaser.js
Visual Composer fixes ".vc_teaser-btn-{{ name }}" error fixes
parse: function() {
var value = this.$data_field.val(),
data = !_.isEmpty(value) ? $.parseJSON(value) : [];
if(_.isEmpty(value)) {
data = [{link: "post", name: "title"}, {name: 'image'}, {name: 'text'}];
this.$data_field.val(JSON.stringify(data));
}
_.each(data, function(block_data){
if(_.isString(block_data.name) && block_data.name.indexOf('{{') < 0) {
var $control = $('.vc_teaser-btn-' + block_data.name, this.$toolbar).prop('checked', true);
@RomanApunts
RomanApunts / composer-view.js
Created April 23, 2020 09:34 — forked from stiucsib86/composer-view.js
Visual Composer fixes "html2element" and "render" fixes
html2element:function (html) {
var attributes = {},
$template;
if (_.isString(html)) {
this.template = _.template(html);
} else {
try {
this.template = _.template(html());
} catch (err) {
this.template = html;