Skip to content

Commit

Permalink
See pewresearch/pewresearch-org@6635bef from refs/heads/release/5.0-i…
Browse files Browse the repository at this point in the history
…cons
  • Loading branch information
prcdevgitbot committed Mar 11, 2024
1 parent c76efdc commit 90657b1
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 21 deletions.
10 changes: 9 additions & 1 deletion blocks/form-input-password/build/render.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,15 @@
data-wp-each--condition="context.conditionsList"
data-wp-each-key="context.condition.id"
>
<li data-wp-class--is-valid="context.condition.met"><span data-wp-class--icon-hidden="!context.condition.met"><i class="fa fa-solid fa-check"></i></span><span data-wp-class--icon-hidden="context.condition.met"><i class="fa fa-regular fa-xmark"></i></span><span class="password-analyzer__label" data-wp-text="context.condition.label"></span></li>
<li data-wp-class--is-valid="context.condition.met">
<span data-wp-class--icon-hidden="!context.condition.met">
<?php \PRC\Platform\Icons\Render('solid', 'check'); ?>
</span>
<span data-wp-class--icon-hidden="context.condition.met">
<?php \PRC\Platform\Icons\Render('regular', 'xmark'); ?>
</span>
<span class="password-analyzer__label" data-wp-text="context.condition.label"></span>
</li>
</template>
</ul>
</div>
Expand Down
10 changes: 9 additions & 1 deletion blocks/form-input-password/src/render.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,15 @@
data-wp-each--condition="context.conditionsList"
data-wp-each-key="context.condition.id"
>
<li data-wp-class--is-valid="context.condition.met"><span data-wp-class--icon-hidden="!context.condition.met"><i class="fa fa-solid fa-check"></i></span><span data-wp-class--icon-hidden="context.condition.met"><i class="fa fa-regular fa-xmark"></i></span><span class="password-analyzer__label" data-wp-text="context.condition.label"></span></li>
<li data-wp-class--is-valid="context.condition.met">
<span data-wp-class--icon-hidden="!context.condition.met">
<?php \PRC\Platform\Icons\Render('solid', 'check'); ?>
</span>
<span data-wp-class--icon-hidden="context.condition.met">
<?php \PRC\Platform\Icons\Render('regular', 'xmark'); ?>
</span>
<span class="password-analyzer__label" data-wp-text="context.condition.label"></span>
</li>
</template>
</ul>
</div>
Expand Down
4 changes: 2 additions & 2 deletions blocks/navigation-mega-menu/build/render.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,9 @@ class="wp-block-navigation-item__content wp-block-prc-block-navigation-mega-menu
<?php if ( 'dropdown' === $icon ) {
echo PRC\Platform\Icons\Render('solid', 'caret-down');
} elseif( 'mobile' === $icon ) {
echo '<i class="fa-light fa-bars"></i>';
echo PRC\Platform\Icons\Render('light', 'bars');
} elseif ( 'search' === $icon ) {
echo '<i class="fa-solid fa-magnifying-glass"></i>';
echo PRC\Platform\Icons\Render('solid', 'magnifying-glass');
}?>
</span>
</button>
Expand Down
6 changes: 3 additions & 3 deletions blocks/navigation-mega-menu/src/render.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,9 @@ class="wp-block-navigation-item__content wp-block-prc-block-navigation-mega-menu
<?php if ( 'dropdown' === $icon ) {
echo PRC\Platform\Icons\Render('solid', 'caret-down');
} elseif( 'mobile' === $icon ) {
echo '<i class="fa-light fa-bars"></i>';
echo PRC\Platform\Icons\Render('light', 'bars');
} elseif ( 'search' === $icon ) {
echo '<i class="fa-solid fa-magnifying-glass"></i>';
echo PRC\Platform\Icons\Render('solid', 'magnifying-glass');
}?>
</span>
</button>
Expand All @@ -113,7 +113,7 @@ class="wp-block-prc-block-navigation-mega-menu__container__close-button"
data-wp-on--click="actions.closeMenuOnClick"
type="button"
>
<i class="fa-light fa-circle-minus"></i>
<?php echo PRC\Platform\Icons\Render('light', 'circle-minus');?>
</button>
</div>
</li>
5 changes: 4 additions & 1 deletion blocks/social-share-sheet/build/render.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,11 @@
'data-wp-on--click' => 'actions.onClick',
));

$icon = \PRC\Platform\Icons\Render('sharp', 'up-from-bracket');

echo wp_sprintf(
'<a %1$s><span class="wp-block-prc-block-social-share-sheet__label">Share</span><i class="fa-sharp fa-solid fa-up-from-bracket"></i></a>',
'<a %1$s><span class="wp-block-prc-block-social-share-sheet__label">Share</span>%2$s</a>',
$block_wrapper_attrs,
$icon,
$content,
);
5 changes: 4 additions & 1 deletion blocks/social-share-sheet/src/render.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,11 @@
'data-wp-on--click' => 'actions.onClick',
));

$icon = \PRC\Platform\Icons\Render('sharp', 'up-from-bracket');

echo wp_sprintf(
'<a %1$s><span class="wp-block-prc-block-social-share-sheet__label">Share</span><i class="fa-sharp fa-solid fa-up-from-bracket"></i></a>',
'<a %1$s><span class="wp-block-prc-block-social-share-sheet__label">Share</span>%2$s</a>',
$block_wrapper_attrs,
$icon,
$content,
);
14 changes: 3 additions & 11 deletions blocks/taxonomy-list-link/src/render.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,10 @@
$enable_sub_menu = $attributes['enableSubMenu'] ?? false;
$block_template = $enable_sub_menu && !empty($content) ? '<div %1$s>%2$s<div class="wp-block-prc-block-taxonomy-list-link__sub-menu">%3$s</div></div>' : '<div %1$s>%2$s</div>';
$label_template = !empty( $attributes['url'] ) ? '<a href="%1$s" class="wp-block-prc-block-taxonomy-list-link__label">%2$s</a>' : '<span class="wp-block-prc-block-taxonomy-list-link__label">%2$s</span>';
$label_template = $is_sub_heading ? $label_template . '<i class="fa-solid fa-chevron-right fa-xs"></i>' : $label_template;
$label_template = $is_sub_heading ? $label_template . \PRC\Platform\Icons\Render('solid', 'chevron-right') : $label_template;
$label_template = $enable_sub_menu && !empty($content) ? ( empty( $attributes['url'] ) ? '<span class="wp-block-prc-block-taxonomy-list-link__label wp-block-prc-block-taxonomy-list-link__toggle">%2$s</span>%3$s' : '<a href="%1$s" class="wp-block-prc-block-taxonomy-list-link__label">%2$s</a>%3$s' ) : $label_template;

$icon_template = wp_sprintf(
'<i class="%1$s"></i><i class="%2$s"></i>',
'fa-light fa-circle-plus',
'fa-light fa-circle-minus'
);
$icon_template =\PRC\Platform\Icons\Render('light', 'circle-plus') . \PRC\Platform\Icons\Render('light', 'circle-minus');

/**
* Build an array with CSS classes defining the colors
Expand All @@ -36,11 +32,7 @@

if ( array_key_exists('className', $attributes) && 'is-style-sub-expand' === $attributes['className'] ) {
$attributes['label'] = "More";
$icon_template = wp_sprintf(
'<i class="%1$s"></i><i class="%2$s"></i>',
'fa-light fa-plus fa-xs',
'fa-light fa-minus fa-xs'
);
$icon_template = \PRC\Platform\Icons\Render('light', 'plus') . \PRC\Platform\Icons\Render('light', 'minus');
}

$block_id = 'item-' . md5( wp_json_encode( $attributes ) );
Expand Down
2 changes: 1 addition & 1 deletion blocks/yoast-seo-breadcrumbs/yoast-seo-breadcrumbs.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public function enqueue_assets() {
* @hook wpseo_breadcrumb_separator
*/
public function modify_separator($separator) {
return '<i class="fa fa-solid fa-chevron-right"></i>';
return \PRC\Platform\Icons\Render('solid', 'chevron-right');
}

/**
Expand Down

0 comments on commit 90657b1

Please sign in to comment.