IP : 18.222.240.84Hostname : server86.web-hosting.comKernel : Linux server86.web-hosting.com 4.18.0-513.18.1.lve.el8.x86_64 #1 SMP Thu Feb 22 12:55:50 UTC 2024 x86_64Disable Function : None :) OS : Linux
PATH:
/
home/
servlmvm/
./
spekkshealth.com/
wp-includes/
block-supports/
position.php/
/
<?php /** * Position block support flag. * * @package WordPress * @since 6.2.0 */
/** * Registers the style block attribute for block types that support it. * * @since 6.2.0 * @access private * * @param WP_Block_Type $block_type Block Type. */ function wp_register_position_support( $block_type ) { $has_position_support = block_has_support( $block_type, 'position', false );
// Set up attributes and styles within that if needed. if ( ! $block_type->attributes ) { $block_type->attributes = array(); }
foreach ( $sides as $side ) { $side_value = isset( $style_attribute['position'][ $side ] ) ? $style_attribute['position'][ $side ] : null; if ( null !== $side_value ) { /* * For fixed or sticky top positions, * ensure the value includes an offset for the logged in admin bar. */ if ( 'top' === $side && ( 'fixed' === $position_type || 'sticky' === $position_type ) ) { // Ensure 0 values can be used in `calc()` calculations. if ( '0' === $side_value || 0 === $side_value ) { $side_value = '0px'; }
// Ensure current side value also factors in the height of the logged in admin bar. $side_value = "calc($side_value + var(--wp-admin--admin-bar--position-offset, 0px))"; }
if ( ! empty( $position_styles ) ) { /* * Add to the style engine store to enqueue and render position styles. */ wp_style_engine_get_stylesheet_from_css_rules( $position_styles, array( 'context' => 'block-supports', 'prettify' => false, ) );
// Inject class name to block container markup. $content = new WP_HTML_Tag_Processor( $block_content ); $content->next_tag(); foreach ( $wrapper_classes as $class ) { $content->add_class( $class ); } return (string) $content; }