WordCamp Москва 2017

12 августа был ежегодный WordCamp в Москве. Традиционный ужин со спикерами и Digital October как всегда были классными.

За прошедший год я стал более открытым (не без помощи коллег на работе конечно же и той замечательной атмосфере у нас в офисе). Самое главным достижением в эти дни я считаю, что оба дня вместо того чтобы просто идти в гостиницу, когда все дела и события завершились, я уходил гулять с Дашей и Дашей 🙂

Посмотрел на Москву еще раз с другой стороны. Теперь закралась мысль, что неплохо бы на недельку заехать.

Слайды с презентации — Страх и ненависть в исходном коде

Advertisements

Configure the form root element with Symfony Forms 3

While creating the forms with Form component from Symfony you can write your own Type classes which builds the forms. It’s pretty simple to add your own fields and all the required stuff for it.

class SignUpType extends AbstractType {
  public function buildForm(FormBuilderInterface $builder, array $options) {
  $builder
    ->add('email', Type\EmailType::class, array(
      'label' => __('Email', Plugin::NAME),
      'required' => false,
      'constraints' => array(
         new Constraints\NotBlank(array(
           'groups' => array('personal', 'company'),
         )),
         new Constraints\Email(array(
           'groups' => array('personal', 'company'),
         )),
      ),
     'validation_groups' => array('personal', 'company'),
     'attr' => array(
       'data-form-element-role' => 'conditional-listener',
       'class' => 'regular-text',
     ),
    ))
    ;
  }
}

But that if you want to configure out the root form element. For example, setup few additional classes and data attributes for your tag? Just add configureOptions() method and fill all the required stuff inside.

class SignUpType extends AbstractType {

  // buidForm here

  public function configureOptions(OptionsResolver $resolver) {
    $resolver->setDefaults(array(
      'attr' => array(
        'data-form-type' => 'conditional-form',
        'id' => 'your-id',
      ),
    ));
  }
}

Import and export WordPress database with utf8mb4 charset

Import and export WordPress database with utf8mb4 charset

Here is a short guide how to export and import your WordPress database without data loss. UTF8MB4 charset is tricky and sometimes your database may looks ok but take your time. Double check everything. I lost some data after migrating site between two servers and afterward spend more time to back all the things. Just my experience.

Continue reading

Theme features. Jetpack Infinite Scroll

Themes features. Jetpack Infinite Scroll Cover

Jetpack and almost all it’s modules works fine right from the box. But some of modules requires additional preparation and developer skills. And today I’ll show you which issues may happened with Infinite Scroll module.

This module is great because it cares about Google Analytics page views and enqueue additional CSS and JS files which can appear on the 2nd or 3rd page. In my personal opinion conditional CSS and JS files is not best way how you can solve your problems with site but in some cases it may helpfull.

Continue reading

YARPP Plugin. Technical review

YARPP Plugin. Technical review

Some time ago I wanted do a review YARPP plugin. From the technical side. But after looking at the code I can say that this plugin is typical WordPress plugin with (maybe) already discovered all bad stuff for me. Unpredictable require states and behaviour without ability to change it at least with the settings on the page…

Can I recommend this? I don’t know. It’s ok but hard to customize and not friendly for customizing I suppose. Here is a small shortlist with few things which I would like to highlight.

Continue reading

Coding standards. CamelCase and snak_case

Coding standards

Hi there. I’m working on some plugins for WordPress and I really love WordPress, it’s standards and being a WordPress Developer but sometimes I feel lost while writing code.

I think this idea is not a priority issue of WordPress community. And also this idea can be perceived as negative, but I really hope you would give it a chance.

After a lot of thinking I realized that only one thing stopping me from being happy: snack_case instead of CamelCase.

Why I think that CamelCase is better? There is few reasons for it.

Continue reading

VVV. The local server for WordPress (on Russian)

VVV

I wrote a long article about local servers. It may be helpfull for developers. Moreover newbies can easily start testing plugins or themes without crushing your production websites.

There I’m discussing old solutions like Mamp Pro, mini servers such as PHP internal server and Grunt (Gulp) webservers for static content. And acquaint readers with VVV (Varying Vagrant Vagrants).

Article explains in details how to work with VVV:

  1. How VVV works and which apps are used (VirtualBox and Vagrant).
  2. How you can start with VVV with a 5 minutes.
  3. Usage of internal tools (XDebug, PHP My Admin).
  4. Adding new sites in VVV with one simple command without downloading zip archives or manual configuring Nginx, MySQL (vv utility).
  5. The folder mounting (great for developers who use repositories for own projects).
  6. How to save your own configuration of VVV (and update it).

Read the full article on Russian →