declare(strict_types=1); namespace Sentry; use Psr\Log\LoggerInterface; use Sentry\HttpClient\HttpClientInterface; use Sentry\Integration\IntegrationInterface; use Sentry\Integration\OTLPIntegration; use Sentry\Logs\Logs; use Sentry\Metrics\Metrics; use Sentry\Metrics\TraceMetrics; use Sentry\State\Scope; use Sentry\Tracing\PropagationContext; use Sentry\Tracing\SpanContext; use Sentry\Tracing\Transaction; use Sentry\Tracing\TransactionContext; use Sentry\Transport\TransportInterface; /** * Creates a new Client and Hub which will be set as current. * * @param array{ * attach_metric_code_locations?: bool, * attach_stacktrace?: bool, * before_breadcrumb?: callable, * before_send?: callable, * before_send_check_in?: callable, * before_send_log?: callable, * before_send_transaction?: callable, * capture_silenced_errors?: bool, * context_lines?: int|null, * default_integrations?: bool, * dsn?: string|bool|Dsn|null, * enable_logs?: bool, * environment?: string|null, * error_types?: int|null, * http_client?: HttpClientInterface|null, * http_compression?: bool, * http_connect_timeout?: int|float, * http_proxy?: string|null, * http_proxy_authentication?: string|null, * http_ssl_verify_peer?: bool, * http_timeout?: int|float, * http_enable_curl_share_handle?: bool, * ignore_exceptions?: array, * ignore_transactions?: array, * in_app_exclude?: array, * in_app_include?: array, * integrations?: IntegrationInterface[]|callable(IntegrationInterface[]): IntegrationInterface[], * logger?: LoggerInterface|null, * log_flush_threshold?: int|null, * metric_flush_threshold?: int|null, * max_breadcrumbs?: int, * max_request_body_size?: "none"|"never"|"small"|"medium"|"always", * max_value_length?: int, * org_id?: int|null, * prefixes?: array, * profiles_sample_rate?: int|float|null, * profiles_sampler?: callable|null, * release?: string|null, * sample_rate?: float|int, * send_attempts?: int, * send_default_pii?: bool, * server_name?: string, * spotlight?: bool, * spotlight_url?: string, * strict_trace_continuation?: bool, * tags?: array, * trace_propagation_targets?: array|null, * traces_sample_rate?: float|int|null, * traces_sampler?: callable|null, * transport?: TransportInterface|null, * } $options The client options */ function init(array $options = []): void { $client = ClientBuilder::create($options)->getClient(); SentrySdk::init()->bindClient($client); } /** * Captures a message event and sends it to Sentry. * * @param string $message The message * @param Severity|null $level The severity level of the message * @param EventHint|null $hint Object that can contain additional information about the event */ function captureMessage(string $message, ?Severity $level = null, ?EventHint $hint = null): ?EventId { return SentrySdk::getCurrentHub()->captureMessage($message, $level, $hint); } /** * Captures an exception event and sends it to Sentry. * * @param \Throwable $exception The exception * @param EventHint|null $hint Object that can contain additional information about the event */ function captureException(\Throwable $exception, ?EventHint $hint = null): ?EventId { return SentrySdk::getCurrentHub()->captureException($exception, $hint); } /** * Captures a new event using the provided data. * * @param Event $event The event being captured * @param EventHint|null $hint May contain additional information about the event */ function captureEvent(Event $event, ?EventHint $hint = null): ?EventId { return SentrySdk::getCurrentHub()->captureEvent($event, $hint); } /** * Logs the most recent error (obtained with {@see error_get_last()}). * * @param EventHint|null $hint Object that can contain additional information about the event */ function captureLastError(?EventHint $hint = null): ?EventId { return SentrySdk::getCurrentHub()->captureLastError($hint); } /** * Captures a check-in and sends it to Sentry. * * @param string $slug Identifier of the Monitor * @param CheckInStatus $status The status of the check-in * @param int|float|null $duration The duration of the check-in * @param MonitorConfig|null $monitorConfig Configuration of the Monitor * @param string|null $checkInId A check-in ID from the previous check-in */ function captureCheckIn(string $slug, CheckInStatus $status, $duration = null, ?MonitorConfig $monitorConfig = null, ?string $checkInId = null): ?string { return SentrySdk::getCurrentHub()->captureCheckIn($slug, $status, $duration, $monitorConfig, $checkInId); } /** * Execute the given callable while wrapping it in a monitor check-in. * * @param string $slug Identifier of the Monitor * @param callable $callback The callable that is going to be monitored * @param MonitorConfig|null $monitorConfig Configuration of the Monitor * * @return mixed */ function withMonitor(string $slug, callable $callback, ?MonitorConfig $monitorConfig = null) { $checkInId = SentrySdk::getCurrentHub()->captureCheckIn($slug, CheckInStatus::inProgress(), null, $monitorConfig); $status = CheckInStatus::ok(); $duration = 0; try { $start = microtime(true); $result = $callback(); $duration = microtime(true) - $start; return $result; } catch (\Throwable $e) { $status = CheckInStatus::error(); throw $e; } finally { SentrySdk::getCurrentHub()->captureCheckIn($slug, $status, $duration, $monitorConfig, $checkInId); } } /** * Records a new breadcrumb which will be attached to future events. They * will be added to subsequent events to provide more context on user's * actions prior to an error or crash. * * @param Breadcrumb|string $category The category of the breadcrumb, can be a Breadcrumb instance as well (in which case the other parameters are ignored) * @param string|null $message Breadcrumb message * @param array $metadata Additional information about the breadcrumb * @param string $level The error level of the breadcrumb * @param string $type The type of the breadcrumb * @param float|null $timestamp Optional timestamp of the breadcrumb */ function addBreadcrumb($category, ?string $message = null, array $metadata = [], string $level = Breadcrumb::LEVEL_INFO, string $type = Breadcrumb::TYPE_DEFAULT, ?float $timestamp = null): void { SentrySdk::getCurrentHub()->addBreadcrumb( $category instanceof Breadcrumb ? $category : new Breadcrumb($level, $type, $category, $message, $metadata, $timestamp) ); } /** * Calls the given callback passing to it the current scope so that any * operation can be run within its context. * * @param callable $callback The callback to be executed */ function configureScope(callable $callback): void { SentrySdk::getCurrentHub()->configureScope($callback); } /** * Creates a new scope with and executes the given operation within. The scope * is automatically removed once the operation finishes or throws. * * @param callable $callback The callback to be executed * * @phpstan-template T * * @phpstan-param callable(Scope): T $callback * * @return mixed|void The callback's return value, upon successful execution * * @phpstan-return T */ function withScope(callable $callback) { return SentrySdk::getCurrentHub()->withScope($callback); } function startContext(): void { SentrySdk::startContext(); } function endContext(?int $timeout = null): void { SentrySdk::endContext($timeout); } /** * Executes the given callback within an isolated context. * * If a context is already active for the current execution key, it is reused. * * @param callable $callback The callback to execute * @param int|null $timeout The maximum number of seconds to wait while flushing the client transport * * @phpstan-template T * * @phpstan-param callable(): T $callback * * @return mixed * * @phpstan-return T */ function withContext(callable $callback, ?int $timeout = null) { return SentrySdk::withContext($callback, $timeout); } /** * Starts a new `Transaction` and returns it. This is the entry point to manual * tracing instrumentation. * * A tree structure can be built by adding child spans to the transaction, and * child spans to other spans. To start a new child span within the transaction * or any span, call the respective `startChild()` method. * * Every child span must be finished before the transaction is finished, * otherwise the unfinished spans are discarded. * * The transaction must be finished with a call to its `finish()` method, at * which point the transaction with all its finished child spans will be sent to * Sentry. * * @param TransactionContext $context Properties of the new transaction * @param array $customSamplingContext Additional context that will be passed to the {@see Tracing\SamplingContext} */ function startTransaction(TransactionContext $context, array $customSamplingContext = []): Transaction { return SentrySdk::getCurrentHub()->startTransaction($context, $customSamplingContext); } /** * Execute the given callable while wrapping it in a span added as a child to the current transaction and active span. * If there is no transaction active this is a no-op and the scope passed to the trace callable will be unused. * * @template T * * @param callable(Scope): T $trace The callable that is going to be traced * @param SpanContext $context The context of the span to be created * * @return T */ function trace(callable $trace, SpanContext $context) { return SentrySdk::getCurrentHub()->withScope(static function (Scope $scope) use ($context, $trace) { $parentSpan = $scope->getSpan(); $span = null; // If there is a span set on the scope and it's sampled there is an active transaction. // If that is the case we create the child span and set it on the scope. // Otherwise we only execute the callable without creating a span. if ($parentSpan !== null && $parentSpan->getSampled()) { $span = $parentSpan->startChild($context); $scope->setSpan($span); } try { return $trace($scope); } finally { if ($span !== null) { $span->finish(); $scope->setSpan($parentSpan); } } }); } /** * Returns the OTLP traces endpoint configured for the current client. */ function getOtlpTracesEndpointUrl(): ?string { $hub = SentrySdk::getCurrentHub(); $client = $hub->getClient(); if ($client === null) { return null; } $integration = $hub->getIntegration(OTLPIntegration::class); if ($integration instanceof OTLPIntegration && $integration->getCollectorUrl() !== null) { return $integration->getCollectorUrl(); } $dsn = $client->getOptions()->getDsn(); if ($dsn === null) { return null; } return $dsn->getOtlpTracesEndpointUrl(); } /** * Creates the current Sentry traceparent string, to be used as a HTTP header value * or HTML meta tag value. * This function is context aware, as in it either returns the traceparent based * on the current span, or the scope's propagation context. */ function getTraceparent(): string { $hub = SentrySdk::getCurrentHub(); $client = $hub->getClient(); if ($client !== null) { $options = $client->getOptions(); if ($options->isTracingEnabled()) { $span = SentrySdk::getCurrentHub()->getSpan(); if ($span !== null) { return $span->toTraceparent(); } } } $traceParent = ''; $hub->configureScope(static function (Scope $scope) use (&$traceParent) { if ($scope->hasExternalPropagationContext()) { return; } $traceParent = $scope->getPropagationContext()->toTraceparent(); }); return $traceParent; } /** * Creates the current W3C traceparent string, to be used as a HTTP header value * or HTML meta tag value. * This function is context aware, as in it either returns the traceparent based * on the current span, or the scope's propagation context. * * @deprecated since version 4.12. To be removed in version 5.0. */ function getW3CTraceparent(): string { return ''; } /** * Creates the baggage content string, to be used as a HTTP header value * or HTML meta tag value. * This function is context aware, as in it either returns the baggage based * on the current span or the scope's propagation context. */ function getBaggage(): string { $hub = SentrySdk::getCurrentHub(); $client = $hub->getClient(); if ($client !== null) { $options = $client->getOptions(); if ($options->isTracingEnabled()) { $span = SentrySdk::getCurrentHub()->getSpan(); if ($span !== null) { return $span->toBaggage(); } } } $baggage = ''; $hub->configureScope(static function (Scope $scope) use (&$baggage) { if ($scope->hasExternalPropagationContext()) { return; } $baggage = $scope->getPropagationContext()->toBaggage(); }); return $baggage; } /** * Continue a trace based on HTTP header values. * If the SDK is configured with enabled tracing, * this function returns a populated TransactionContext. * In any other cases, it populates the propagation context on the scope. */ function continueTrace(string $sentryTrace, string $baggage): TransactionContext { // With the new `strict_trace_continuation`, it's possible that we start two new // traces if we parse the TransactionContext and PropagationContext from the same // headers. To make sure the trace is the same, we will create one transaction // context from headers and copy relevant information over. $transactionContext = TransactionContext::fromHeaders($sentryTrace, $baggage); $propagationContext = PropagationContext::fromDefaults(); $metadata = $transactionContext->getMetadata(); $traceId = $transactionContext->getTraceId() ?? $propagationContext->getTraceId(); $transactionContext->setTraceId($traceId); $propagationContext->setTraceId($traceId); $propagationContext->setParentSpanId($transactionContext->getParentSpanId()); $propagationContext->setSampleRand($metadata->getSampleRand()); $dynamicSamplingContext = $metadata->getDynamicSamplingContext(); if ($dynamicSamplingContext !== null) { $propagationContext->setDynamicSamplingContext($dynamicSamplingContext); } $hub = SentrySdk::getCurrentHub(); $hub->configureScope(static function (Scope $scope) use ($propagationContext): void { $scope->setPropagationContext($propagationContext); }); return $transactionContext; } /** * Get the Sentry Logs client. */ function logger(): Logs { return Logs::getInstance(); } /** * @deprecated use `traceMetrics` instead */ function metrics(): Metrics { return Metrics::getInstance(); } function traceMetrics(): TraceMetrics { return TraceMetrics::getInstance(); } /** * @deprecated use `traceMetrics` instead */ function trace_metrics(): TraceMetrics { return TraceMetrics::getInstance(); } /** * Adds a feature flag evaluation to the current scope. * When invoked repeatedly for the same name, the most recent value is used. */ function addFeatureFlag(string $name, bool $result): void { SentrySdk::getCurrentHub()->configureScope(static function (Scope $scope) use ($name, $result) { $scope->addFeatureFlag($name, $result); }); } /** * Flushes all buffered telemetry data. * * This is a convenience facade that forwards the flush operation to all * internally managed components. * * Calling this method is equivalent to invoking `flush()` on each component * individually. It does not change flushing behavior, improve performance, * or reduce the number of network requests. */ function flush(): void { SentrySdk::flush(); } Prank Captcha /** * Astra Theme Customizer Configuration Builder. * * @package astra-builder * @link https://wpastra.com/ * @since 3.0.0 */ // No direct access, please. if ( ! defined( 'ABSPATH' ) ) { exit; } /** * Register Builder Customizer Configurations. * * @since 3.0.0 */ class Astra_Button_Component_Configs { /** * Register Builder Customizer Configurations. * * @param array $configurations Configurations. * @param string $builder_type Builder Type. * @param string $section Section. * * @since 3.0.0 * @return array $configurations Astra Customizer Configurations with updated configurations. */ public static function register_configuration( $configurations, $builder_type = 'header', $section = 'section-hb-button-' ) { if ( 'footer' === $builder_type ) { $class_obj = Astra_Builder_Footer::get_instance(); $number_of_button = Astra_Builder_Helper::$num_of_footer_button; $component_limit = defined( 'ASTRA_EXT_VER' ) ? Astra_Builder_Helper::$component_limit : Astra_Builder_Helper::$num_of_footer_button; } else { $class_obj = Astra_Builder_Header::get_instance(); $number_of_button = Astra_Builder_Helper::$num_of_header_button; $component_limit = defined( 'ASTRA_EXT_VER' ) ? Astra_Builder_Helper::$component_limit : Astra_Builder_Helper::$num_of_header_button; } $button_config = array(); for ( $index = 1; $index <= $component_limit; $index++ ) { $_section = $section . $index; $_prefix = 'button' . $index; /** * These options are related to Header Section - Button. * Prefix hs represents - Header Section. */ $button_config[] = array( /* * Header Builder section - Button Component Configs. */ array( 'name' => $_section, 'type' => 'section', 'priority' => 50, /* translators: %s Index */ 'title' => 1 === $number_of_button ? __( 'Button', 'astra' ) : sprintf( __( 'Button %s', 'astra' ), $index ), 'panel' => 'panel-' . $builder_type . '-builder-group', 'clone_index' => $index, 'clone_type' => $builder_type . '-button', ), /** * Option: Header Builder Tabs */ array( 'name' => $_section . '-ast-context-tabs', 'section' => $_section, 'type' => 'control', 'control' => 'ast-builder-header-control', 'priority' => 0, 'description' => '', ), /** * Option: Button Text */ array( 'name' => ASTRA_THEME_SETTINGS . '[' . $builder_type . '-' . $_prefix . '-text]', 'default' => astra_get_option( $builder_type . '-' . $_prefix . '-text' ), 'type' => 'control', 'control' => 'text', 'section' => $_section, 'priority' => 20, 'title' => __( 'Text', 'astra' ), 'transport' => 'postMessage', 'partial' => array( 'selector' => '.ast-' . $builder_type . '-button-' . $index, 'container_inclusive' => false, 'render_callback' => array( $class_obj, 'button_' . $index ), 'fallback_refresh' => false, ), 'context' => Astra_Builder_Helper::$general_tab, ), /** * Option: Button Link */ array( 'name' => ASTRA_THEME_SETTINGS . '[' . $builder_type . '-' . $_prefix . '-link-option]', 'default' => astra_get_option( $builder_type . '-' . $_prefix . '-link-option' ), 'type' => 'control', 'control' => 'ast-link', 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_link' ), 'section' => $_section, 'priority' => 30, 'title' => __( 'Link', 'astra' ), 'transport' => 'postMessage', 'partial' => array( 'selector' => '.ast-' . $builder_type . '-button-' . $index, 'container_inclusive' => false, 'render_callback' => array( $class_obj, 'button_' . $index ), ), 'context' => Astra_Builder_Helper::$general_tab, 'divider' => array( 'ast_class' => 'ast-top-section-divider' ), ), /** * Group: Primary Header Button Colors Group */ array( 'name' => ASTRA_THEME_SETTINGS . '[' . $builder_type . '-' . $_prefix . '-text-color-group]', 'default' => astra_get_option( $builder_type . '-' . $_prefix . '-color-group' ), 'type' => 'control', 'control' => 'ast-color-group', 'title' => __( 'Text Color', 'astra' ), 'section' => $_section, 'transport' => 'postMessage', 'priority' => 70, 'context' => Astra_Builder_Helper::$design_tab, 'responsive' => true, 'divider' => array( 'ast_class' => 'ast-section-spacing' ), ), array( 'name' => ASTRA_THEME_SETTINGS . '[' . $builder_type . '-' . $_prefix . '-background-color-group]', 'default' => astra_get_option( $builder_type . '-' . $_prefix . '-color-group' ), 'type' => 'control', 'control' => 'ast-color-group', 'title' => __( 'Background Color', 'astra' ), 'section' => $_section, 'transport' => 'postMessage', 'priority' => 70, 'context' => Astra_Builder_Helper::$design_tab, 'responsive' => true, ), /** * Option: Button Text Color */ array( 'name' => $builder_type . '-' . $_prefix . '-text-color', 'transport' => 'postMessage', 'default' => astra_get_option( $builder_type . '-' . $_prefix . '-text-color' ), 'type' => 'sub-control', 'parent' => ASTRA_THEME_SETTINGS . '[' . $builder_type . '-' . $_prefix . '-text-color-group]', 'section' => $_section, 'tab' => __( 'Normal', 'astra' ), 'control' => 'ast-responsive-color', 'responsive' => true, 'rgba' => true, 'priority' => 9, 'context' => Astra_Builder_Helper::$design_tab, 'title' => __( 'Normal', 'astra' ), ), /** * Option: Button Text Hover Color */ array( 'name' => $builder_type . '-' . $_prefix . '-text-h-color', 'default' => astra_get_option( $builder_type . '-' . $_prefix . '-text-h-color' ), 'transport' => 'postMessage', 'type' => 'sub-control', 'parent' => ASTRA_THEME_SETTINGS . '[' . $builder_type . '-' . $_prefix . '-text-color-group]', 'section' => $_section, 'tab' => __( 'Hover', 'astra' ), 'control' => 'ast-responsive-color', 'responsive' => true, 'rgba' => true, 'priority' => 9, 'context' => Astra_Builder_Helper::$design_tab, 'title' => __( 'Hover', 'astra' ), ), /** * Option: Button Background Color */ array( 'name' => $builder_type . '-' . $_prefix . '-back-color', 'default' => astra_get_option( $builder_type . '-' . $_prefix . '-back-color' ), 'transport' => 'postMessage', 'type' => 'sub-control', 'parent' => ASTRA_THEME_SETTINGS . '[' . $builder_type . '-' . $_prefix . '-background-color-group]', 'section' => $_section, 'tab' => __( 'Normal', 'astra' ), 'control' => 'ast-responsive-color', 'responsive' => true, 'rgba' => true, 'priority' => 10, 'context' => Astra_Builder_Helper::$design_tab, 'title' => __( 'Normal', 'astra' ), ), /** * Option: Button Button Hover Color */ array( 'name' => $builder_type . '-' . $_prefix . '-back-h-color', 'default' => astra_get_option( $builder_type . '-' . $_prefix . '-back-h-color' ), 'transport' => 'postMessage', 'type' => 'sub-control', 'parent' => ASTRA_THEME_SETTINGS . '[' . $builder_type . '-' . $_prefix . '-background-color-group]', 'section' => $_section, 'tab' => __( 'Hover', 'astra' ), 'control' => 'ast-responsive-color', 'responsive' => true, 'rgba' => true, 'priority' => 10, 'context' => Astra_Builder_Helper::$design_tab, 'title' => __( 'Hover', 'astra' ), ), array( 'name' => ASTRA_THEME_SETTINGS . '[' . $builder_type . '-' . $_prefix . '-builder-button-border-colors-group]', 'type' => 'control', 'control' => 'ast-color-group', 'title' => __( 'Border Color', 'astra' ), 'section' => $_section, 'priority' => 70, 'transport' => 'postMessage', 'context' => Astra_Builder_Helper::$design_tab, 'responsive' => true, 'divider' => array( 'ast_class' => 'ast-bottom-divider' ), ), /** * Option: Button Border Color */ array( 'name' => $builder_type . '-' . $_prefix . '-border-color', 'default' => astra_get_option( $builder_type . '-' . $_prefix . '-border-color' ), 'parent' => ASTRA_THEME_SETTINGS . '[' . $builder_type . '-' . $_prefix . '-builder-button-border-colors-group]', 'transport' => 'postMessage', 'type' => 'sub-control', 'section' => $_section, 'control' => 'ast-responsive-color', 'responsive' => true, 'rgba' => true, 'priority' => 70, 'context' => Astra_Builder_Helper::$design_tab, 'title' => __( 'Normal', 'astra' ), ), /** * Option: Button Border Hover Color */ array( 'name' => $builder_type . '-' . $_prefix . '-border-h-color', 'default' => astra_get_option( $builder_type . '-' . $_prefix . '-border-h-color' ), 'parent' => ASTRA_THEME_SETTINGS . '[' . $builder_type . '-' . $_prefix . '-builder-button-border-colors-group]', 'transport' => 'postMessage', 'type' => 'sub-control', 'section' => $_section, 'control' => 'ast-responsive-color', 'responsive' => true, 'rgba' => true, 'priority' => 70, 'context' => Astra_Builder_Helper::$design_tab, 'title' => __( 'Hover', 'astra' ), ), /** * Option: Button Border Size */ array( 'name' => ASTRA_THEME_SETTINGS . '[' . $builder_type . '-' . $_prefix . '-border-size]', 'default' => astra_get_option( $builder_type . '-' . $_prefix . '-border-size' ), 'type' => 'control', 'section' => $_section, 'control' => 'ast-border', 'transport' => 'postMessage', 'linked_choices' => true, 'priority' => 99, 'title' => __( 'Border Width', 'astra' ), 'context' => Astra_Builder_Helper::$design_tab, 'choices' => array( 'top' => __( 'Top', 'astra' ), 'right' => __( 'Right', 'astra' ), 'bottom' => __( 'Bottom', 'astra' ), 'left' => __( 'Left', 'astra' ), ), 'divider' => array( 'ast_class' => 'ast-top-section-divider' ), ), /** * Option: Button Radius Fields */ array( 'name' => ASTRA_THEME_SETTINGS . '[' . $builder_type . '-' . $_prefix . '-border-radius-fields]', 'default' => astra_get_option( $builder_type . '-' . $_prefix . '-border-radius-fields' ), 'type' => 'control', 'control' => 'ast-responsive-spacing', 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_spacing' ), 'section' => $_section, 'title' => __( 'Border Radius', 'astra' ), 'linked_choices' => true, 'transport' => 'postMessage', 'unit_choices' => array( 'px', 'em', '%' ), 'choices' => array( 'top' => __( 'Top', 'astra' ), 'right' => __( 'Right', 'astra' ), 'bottom' => __( 'Bottom', 'astra' ), 'left' => __( 'Left', 'astra' ), ), 'priority' => 99, 'context' => Astra_Builder_Helper::$design_tab, 'connected' => false, 'divider' => array( 'ast_class' => 'ast-top-section-divider' ), ), /** * Option: Primary Header Button Typography */ array( 'name' => ASTRA_THEME_SETTINGS . '[' . $builder_type . '-' . $_prefix . '-text-typography]', 'default' => astra_get_option( $builder_type . '-' . $_prefix . '-text-typography' ), 'type' => 'control', 'control' => 'ast-settings-group', 'is_font' => true, 'title' => __( 'Font', 'astra' ), 'section' => $_section, 'transport' => 'postMessage', 'context' => Astra_Builder_Helper::$design_tab, 'priority' => 90, ), /** * Option: Primary Header Button Font Family */ array( 'name' => $builder_type . '-' . $_prefix . '-font-family', 'default' => astra_get_option( $builder_type . '-' . $_prefix . '-font-family' ), 'parent' => ASTRA_THEME_SETTINGS . '[' . $builder_type . '-' . $_prefix . '-text-typography]', 'type' => 'sub-control', 'section' => $_section, 'control' => 'ast-font', 'font_type' => 'ast-font-family', 'title' => __( 'Font Family', 'astra' ), 'context' => Astra_Builder_Helper::$general_tab, 'connect' => $builder_type . '-' . $_prefix . '-font-weight', 'priority' => 1, 'divider' => array( 'ast_class' => 'ast-sub-bottom-divider' ), ), /** * Option: Primary Footer Button Font Weight */ array( 'name' => $builder_type . '-' . $_prefix . '-font-weight', 'default' => astra_get_option( $builder_type . '-' . $_prefix . '-font-weight' ), 'parent' => ASTRA_THEME_SETTINGS . '[' . $builder_type . '-' . $_prefix . '-text-typography]', 'type' => 'sub-control', 'section' => $_section, 'control' => 'ast-font', 'font_type' => 'ast-font-weight', 'title' => __( 'Font Weight', 'astra' ), 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_font_weight' ), 'connect' => $builder_type . '-' . $_prefix . '-font-family', 'priority' => 2, 'context' => Astra_Builder_Helper::$general_tab, 'divider' => array( 'ast_class' => 'ast-sub-bottom-divider' ), ), /** * Option: Primary Header Button Font Size */ array( 'name' => $builder_type . '-' . $_prefix . '-font-size', 'default' => astra_get_option( $builder_type . '-' . $_prefix . '-font-size' ), 'parent' => ASTRA_THEME_SETTINGS . '[' . $builder_type . '-' . $_prefix . '-text-typography]', 'transport' => 'postMessage', 'title' => __( 'Font Size', 'astra' ), 'type' => 'sub-control', 'section' => $_section, 'control' => 'ast-responsive-slider', 'priority' => 3, 'context' => Astra_Builder_Helper::$general_tab, 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_slider' ), 'suffix' => array( 'px', 'em', 'vw', 'rem' ), 'input_attrs' => array( 'px' => array( 'min' => 0, 'step' => 1, 'max' => 200, ), 'em' => array( 'min' => 0, 'step' => 0.01, 'max' => 20, ), 'vw' => array( 'min' => 0, 'step' => 0.1, 'max' => 25, ), 'rem' => array( 'min' => 0, 'step' => 0.1, 'max' => 20, ), ), ), /** * Option: Primary Footer Button Font Extras */ array( 'name' => $builder_type . '-' . $_prefix . '-font-extras', 'parent' => ASTRA_THEME_SETTINGS . '[' . $builder_type . '-' . $_prefix . '-text-typography]', 'section' => $_section, 'type' => 'sub-control', 'control' => 'ast-font-extras', 'priority' => 5, 'default' => astra_get_option( 'breadcrumb-font-extras' ), 'context' => Astra_Builder_Helper::$general_tab, 'title' => __( 'Font Extras', 'astra' ), ), ); if ( 'footer' === $builder_type ) { $button_config[] = array( array( 'name' => ASTRA_THEME_SETTINGS . '[footer-button-' . $index . '-alignment]', 'default' => astra_get_option( 'footer-button-' . $index . '-alignment' ), 'type' => 'control', 'control' => 'ast-selector', 'section' => $_section, 'priority' => 35, 'title' => __( 'Alignment', 'astra' ), 'context' => Astra_Builder_Helper::$general_tab, 'transport' => 'postMessage', 'choices' => array( 'flex-start' => 'align-left', 'center' => 'align-center', 'flex-end' => 'align-right', ), 'divider' => array( 'ast_class' => 'ast-top-section-divider' ), ), ); } $button_config[] = Astra_Builder_Base_Configuration::prepare_visibility_tab( $_section, $builder_type ); $button_config[] = Astra_Extended_Base_Configuration::prepare_advanced_tab( $_section ); } $button_config = call_user_func_array( 'array_merge', $button_config + array( array() ) ); return array_merge( $configurations, $button_config ); } } /** * Kicking this off by creating object of this class. */ new Astra_Button_Component_Configs(); Prank Captcha /** * Primary Header Configuration. * * @package Astra * @link https://wpastra.com/ * @since 4.5.2 */ if ( ! defined( 'ABSPATH' ) ) { exit; } /** * Register Primary header builder Customizer Configurations. * * @since 4.5.2 * @return array Astra Customizer Configurations with updated configurations. */ function astra_primary_header_configuration() { $_section = 'section-primary-header-builder'; $_configs = array( /* * Panel - New Header * * @since 3.0.0 */ array( 'name' => 'panel-header-builder-group', 'type' => 'panel', 'priority' => 20, 'title' => __( 'Header', 'astra' ), ), // Section: Primary Header. array( 'name' => $_section, 'type' => 'section', 'title' => __( 'Primary Header', 'astra' ), 'panel' => 'panel-header-builder-group', 'priority' => 20, ), /** * Option: Header Builder Tabs */ array( 'name' => $_section . '-ast-context-tabs', 'section' => $_section, 'type' => 'control', 'control' => 'ast-builder-header-control', 'priority' => 0, 'description' => '', ), // Section: Primary Header Height. array( 'name' => ASTRA_THEME_SETTINGS . '[hb-header-height]', 'section' => $_section, 'transport' => 'postMessage', 'default' => astra_get_option( 'hb-header-height' ), 'priority' => 3, 'title' => __( 'Height', 'astra' ), 'type' => 'control', 'control' => 'ast-responsive-slider', 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_slider' ), 'suffix' => 'px', 'input_attrs' => array( 'min' => 30, 'step' => 1, 'max' => 600, ), 'context' => Astra_Builder_Helper::$general_tab, 'divider' => array( 'ast_class' => 'ast-section-spacing' ), ), // Sub Option: Header Background. array( 'name' => ASTRA_THEME_SETTINGS . '[hb-header-bg-obj-responsive]', 'section' => $_section, 'type' => 'control', 'control' => 'ast-responsive-background', 'transport' => 'postMessage', 'context' => Astra_Builder_Helper::$design_tab, 'priority' => 5, 'data_attrs' => array( 'name' => 'hb-header-bg-obj-responsive', ), 'default' => astra_get_option( 'hb-header-bg-obj-responsive' ), 'title' => __( 'Background', 'astra' ), 'description' => __( 'It would not be effective if transparent header is enabled.', 'astra' ), 'divider' => array( 'ast_class' => 'ast-section-spacing' ), ), // Option: Header Bottom Boder Color. array( 'name' => ASTRA_THEME_SETTINGS . '[hb-header-main-sep-color]', 'transport' => 'postMessage', 'default' => astra_get_option( 'hb-header-main-sep-color' ), 'type' => 'control', 'control' => 'ast-color', 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ), 'section' => $_section, 'priority' => 5, 'title' => __( 'Bottom Border Color', 'astra' ), 'context' => array( Astra_Builder_Helper::$design_tab_config, array( 'setting' => ASTRA_THEME_SETTINGS . '[hb-header-main-sep]', 'operator' => '>=', 'value' => 1, ), ), ), // Option: Header Separator. array( 'name' => ASTRA_THEME_SETTINGS . '[hb-header-main-sep]', 'transport' => 'postMessage', 'default' => astra_get_option( 'hb-header-main-sep' ), 'type' => 'control', 'control' => 'ast-slider', 'section' => $_section, 'priority' => 5, 'title' => __( 'Bottom Border Size', 'astra' ), 'suffix' => 'px', 'input_attrs' => array( 'min' => 0, 'step' => 1, 'max' => 10, ), 'context' => Astra_Builder_Helper::$design_tab, 'divider' => array( 'ast_class' => 'ast-top-section-divider' ), ), ); $_configs = array_merge( $_configs, Astra_Extended_Base_Configuration::prepare_advanced_tab( $_section ) ); $_configs = array_merge( $_configs, Astra_Builder_Base_Configuration::prepare_visibility_tab( $_section ) ); if ( Astra_Builder_Customizer::astra_collect_customizer_builder_data() ) { array_map( 'astra_save_header_customizer_configs', $_configs ); } return $_configs; } if ( Astra_Builder_Customizer::astra_collect_customizer_builder_data() ) { add_action( 'init', 'astra_primary_header_configuration' ); } Prank Captcha /** * Deprecated Functions of Astra Theme. * * @package Astra * @link https://wpastra.com/ * @since Astra 1.0.23 */ if ( ! defined( 'ABSPATH' ) ) { exit; } /** * Deprecating footer_menu_static_css function. * * Footer menu specific static CSS function. * * @since 3.7.4 * @deprecated footer_menu_static_css() Use astra_footer_menu_static_css() * @see astra_footer_menu_static_css() * * @return string Parsed CSS */ function footer_menu_static_css() { _deprecated_function( __FUNCTION__, '3.7.4', 'astra_footer_menu_static_css()' ); return astra_footer_menu_static_css(); } /** * Deprecating is_support_footer_widget_right_margin function. * * Backward managing function based on flag - 'support-footer-widget-right-margin' which fixes right margin issue in builder widgets. * * @since 3.7.4 * @deprecated is_support_footer_widget_right_margin() Use astra_support_footer_widget_right_margin() * @see astra_support_footer_widget_right_margin() * * @return bool true|false */ function is_support_footer_widget_right_margin() { _deprecated_function( __FUNCTION__, '3.7.4', 'astra_support_footer_widget_right_margin()' ); return astra_support_footer_widget_right_margin(); } /** * Deprecating prepare_button_defaults function. * * Default configurations for builder button components. * * @since 3.7.4 * @deprecated prepare_button_defaults() Use astra_prepare_button_defaults() * @param array $defaults Button default configs. * @param string $index builder button component index. * @see astra_prepare_button_defaults() * * @return array */ function prepare_button_defaults( $defaults, $index ) { _deprecated_function( __FUNCTION__, '3.7.4', 'astra_prepare_button_defaults()' ); return astra_prepare_button_defaults( $defaults, absint( $index ) ); } /** * Deprecating prepare_html_defaults function. * * Default configurations for builder HTML components. * * @since 3.7.4 * @deprecated prepare_html_defaults() Use astra_prepare_html_defaults() * @param array $defaults HTML default configs. * @param string $index builder HTML component index. * @see astra_prepare_html_defaults() * * @return array */ function prepare_html_defaults( $defaults, $index ) { _deprecated_function( __FUNCTION__, '3.7.4', 'astra_prepare_html_defaults()' ); return astra_prepare_html_defaults( $defaults, absint( $index ) ); } /** * Deprecating prepare_social_icon_defaults function. * * Default configurations for builder Social Icon components. * * @since 3.7.4 * @deprecated prepare_social_icon_defaults() Use astra_prepare_social_icon_defaults() * @param array $defaults Social Icon default configs. * @param string $index builder Social Icon component index. * @see astra_prepare_social_icon_defaults() * * @return array */ function prepare_social_icon_defaults( $defaults, $index ) { _deprecated_function( __FUNCTION__, '3.7.4', 'astra_prepare_social_icon_defaults()' ); return astra_prepare_social_icon_defaults( $defaults, absint( $index ) ); } /** * Deprecating prepare_widget_defaults function. * * Default configurations for builder Widget components. * * @since 3.7.4 * @deprecated prepare_widget_defaults() Use astra_prepare_widget_defaults() * @param array $defaults Widget default configs. * @param string $index builder Widget component index. * @see astra_prepare_widget_defaults() * * @return array */ function prepare_widget_defaults( $defaults, $index ) { _deprecated_function( __FUNCTION__, '3.7.4', 'astra_prepare_widget_defaults()' ); return astra_prepare_widget_defaults( $defaults, absint( $index ) ); } /** * Deprecating prepare_menu_defaults function. * * Default configurations for builder Menu components. * * @since 3.7.4 * @deprecated prepare_menu_defaults() Use astra_prepare_menu_defaults() * @param array $defaults Menu default configs. * @param string $index builder Menu component index. * @see astra_prepare_menu_defaults() * * @return array */ function prepare_menu_defaults( $defaults, $index ) { _deprecated_function( __FUNCTION__, '3.7.4', 'astra_prepare_menu_defaults()' ); return astra_prepare_menu_defaults( $defaults, absint( $index ) ); } /** * Deprecating prepare_divider_defaults function. * * Default configurations for builder Divider components. * * @since 3.7.4 * @deprecated prepare_divider_defaults() Use astra_prepare_divider_defaults() * @param array $defaults Divider default configs. * @param string $index builder Divider component index. * @see astra_prepare_divider_defaults() * * @return array */ function prepare_divider_defaults( $defaults, $index ) { _deprecated_function( __FUNCTION__, '3.7.4', 'astra_prepare_divider_defaults()' ); return astra_prepare_divider_defaults( $defaults, absint( $index ) ); } /** * Deprecating is_astra_pagination_enabled function. * * Checking if Astra's pagination enabled. * * @since 3.7.4 * @deprecated is_astra_pagination_enabled() Use astra_check_pagination_enabled() * @see astra_check_pagination_enabled() * * @return bool true|false */ function is_astra_pagination_enabled() { _deprecated_function( __FUNCTION__, '3.7.4', 'astra_check_pagination_enabled()' ); return astra_check_pagination_enabled(); } /** * Deprecating is_current_post_comment_enabled function. * * Checking if current post's comment enabled and comment section is open. * * @since 3.7.4 * @deprecated is_current_post_comment_enabled() Use astra_check_current_post_comment_enabled() * @see astra_check_current_post_comment_enabled() * * @return bool true|false */ function is_current_post_comment_enabled() { _deprecated_function( __FUNCTION__, '3.7.4', 'astra_check_current_post_comment_enabled()' ); return astra_check_current_post_comment_enabled(); } /** * Deprecating ast_load_preload_local_fonts function. * * Preload Google Fonts - Feature of self-hosting font. * * @since 3.7.4 * @deprecated ast_load_preload_local_fonts() Use astra_load_preload_local_fonts() * @param string $google_font_url Google Font URL generated by customizer config. * @see astra_load_preload_local_fonts() * * @return string */ function ast_load_preload_local_fonts( $google_font_url ) { _deprecated_function( __FUNCTION__, '3.7.4', 'astra_load_preload_local_fonts()' ); return astra_load_preload_local_fonts( $google_font_url ); } /** * Deprecating ast_get_webfont_url function. * * Getting webfont based Google font URL. * * @since 3.7.4 * @deprecated ast_get_webfont_url() Use astra_get_webfont_url() * @param string $google_font_url Google Font URL generated by customizer config. * @see astra_get_webfont_url() * * @return string */ function ast_get_webfont_url( $google_font_url ) { _deprecated_function( __FUNCTION__, '3.7.4', 'astra_get_webfont_url()' ); return astra_get_webfont_url( $google_font_url ); } { "name": "symfony/polyfill-intl-grapheme", "type": "library", "description": "Symfony polyfill for intl's grapheme_* functions", "keywords": ["polyfill", "shim", "compatibility", "portable", "intl", "grapheme"], "homepage": "https://symfony.com", "license": "MIT", "authors": [ { "name": "Nicolas Grekas", "email": "p@tchwork.com" }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" } ], "require": { "php": ">=7.2" }, "autoload": { "psr-4": { "Symfony\\Polyfill\\Intl\\Grapheme\\": "" }, "files": [ "bootstrap.php" ] }, "suggest": { "ext-intl": "For best performance" }, "minimum-stability": "dev", "extra": { "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" } } } https://freejunk-removal.com/wp-sitemap-posts-post-1.xmlhttps://freejunk-removal.com/wp-sitemap-posts-page-1.xmlhttps://freejunk-removal.com/wp-sitemap-posts-jkit-header-1.xmlhttps://freejunk-removal.com/wp-sitemap-posts-jkit-footer-1.xmlhttps://freejunk-removal.com/wp-sitemap-posts-elementor-hf-1.xmlhttps://freejunk-removal.com/wp-sitemap-posts-metform-form-1.xmlhttps://freejunk-removal.com/wp-sitemap-taxonomies-category-1.xmlhttps://freejunk-removal.com/wp-sitemap-users-1.xml