Setka provides beautiful post design with AMP

I am glad to see that our work and integration with AMP used by our clients!

Accelerated Mobile Pages Project

Editor’s note: The following was originally posted on Setka’s blog.

amp-post-3.png

Setka has integrated its WordPress plugin with the AMP WP plugin

Technology company Setka creates products that help publishers and brands easily make beautiful and engaging content. Setka is a WordPress VIP Technical partner.One of those products, Setka Editor, is a WYSIWYG editor that allows users to put together well-designed article pages without having to code. Its team is distributed and based in San Francisco, New York, Berlin, Minsk, and Moscow.

Now, Setka has integrated its WordPress plugin with the AMP WP plugin. When installed on the same website they automatically increase the loading speed for mobile pages while retaining stylistic and branding elements.

Read on to learn more about this improvement, and to see how it worked on RealtimeBoard’s corporate blog.

The challenges of AMP integration

Setka saw several advantages in integrating with AMP clients who…

View original post 768 more words

Advertisements

Thinking about SQL transactions

On this week I have been thinking about SQL transactions and how it can be used in WordPress. Right now we only have functions like update_option() or update_post_meta().

But what if you should insert multiple values at the same time? Of course, you can go through step by step and insert (or update) each part of your data via small portions. It may raise an unexpected system behavior in some cases.

Imagine that your PHP script is executing code which should validate and save some data from an external request. During the process, you can save only half of this data and on the one the next step you can catch an error which signals that data was not saved. Some of the data was already replaced by new values and you should answer with 200 or 400 status code. What you will do? That’s why transactions are important.

I will think about this issue in conjunction with WP Kit Data components. I am interested in refactoring this part of the library but not decided how exactly should new flow of data saving looks like.

WordCamp Москва 2017

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

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

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

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

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