ousButtonsPosition'] ) { return $this->get_inside_button( $button_type, $context ); } return $this->get_outside_button( $button_type, $context ); } /** * Returns an HTML button element with an SVG icon for the previous or next button when the buttons are inside the image. * * @param string $button_type The type of button to return. Either "previous" or "next". * @param string $context The context in which the button is being used. * @return string The HTML for the button element. */ protected function get_inside_button( $button_type, $context ) { $previous_button_icon_path = 'M28.1 12L30.5 14L21.3 24L30.5 34L28.1 36L17.3 24L28.1 12Z'; $next_button_icon_path = 'M21.7001 12L19.3 14L28.5 24L19.3 34L21.7001 36L32.5 24L21.7001 12Z'; $icon_path = $previous_button_icon_path; $button_side_class = 'left'; if ( 'next' === $button_type ) { $icon_path = $next_button_icon_path; $button_side_class = 'right'; } return sprintf( '', $button_side_class, $this->get_class_suffix( $context ), $icon_path ); } /** * Returns an HTML button element with an SVG icon for the previous or next button when the buttons are outside the image. * * @param string $button_type The type of button to return. Either "previous" or "next". * @param string $context The context in which the button is being used. * @return string The HTML for the button element. */ protected function get_outside_button( $button_type, $context ) { $next_button_icon_path = 'M1 1.28516L8 8.28516L1 15.2852'; $previous_button_icon_path = 'M9 1.28516L2 8.28516L9 15.2852'; $icon_path = $previous_button_icon_path; $button_side_class = 'left'; if ( 'next' === $button_type ) { $icon_path = $next_button_icon_path; $button_side_class = 'right'; } return sprintf( '', $button_side_class, $this->get_class_suffix( $context ), $icon_path ); } }