D
D
DimDim77782020-05-15 11:45:18
WordPress
DimDim7778, 2020-05-15 11:45:18

How to set class in php code?

} else {
      $links['register'] = array(
        'label' => esc_html__('Войти', 'woodmart'),
        'url' => $account_link
      );

Tell me how to set a class for the word "Login" in the code above?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Q
QuestYouCraft, 2020-05-23
@QuestYouCraft

Option 1:

<style>
.Log-In {
<!--Здесь прописать какие-либо стили-->
}
</style>

// Здесь был какой-то код..
} else {
      $links['register'] = array(
        'label' => esc_html__('<p class="Log-In">Войти</p>', 'woodmart'),
        'url' => $account_link
      );

Or option 2:
// Здесь был какой-то код..
} else {
      $links['register'] = array(
        'label' => esc_html__('<p style="Здесь прописать какие-либо стили">Войти</p>', 'woodmart'),
        'url' => $account_link
      );

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question