PluginProbe
Cool Timeline (Horizontal & Vertical Timeline) / trunk
Cool Timeline (Horizontal & Vertical Timeline) vtrunk
3.4.0 3.3.6 3.3.5 3.3.4 3.3.3 3.3.2 2.2.3 2.3.3 2.4 2.4.1 2.4.2 2.4.3 2.4.4 2.4.5 2.6.1 2.7.1 2.8.3 2.9.3 2.9.4 2.9.5 2.9.6 2.9.7 2.9.8 2.9.9 3.0.0 All 79 releases
cool-timeline / admin / ctp-getting-started-url.php

ctp-getting-started-url.php in Cool Timeline (Horizontal & Vertical Timeline) trunk, at admin/ctp-getting-started-url.php

42 lines 1.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 // phpcs:disable WordPress.NamingConventions.PrefixAllGlobals -- Legacy helper function name kept stable for compatibility.
3 /**
4 * Shared Getting Started URL for timeline family plugins.
5 *
6 * @package CoolTimeline
7 */
8
9 if ( ! defined( 'ABSPATH' ) ) {
10 exit;
11 }
12
13 if ( ! function_exists( 'ctp_timeline_getting_started_url' ) ) {
14 /**
15 * Build ctl-getting-started URL with the correct onboarding method tab.
16 *
17 * @param string $plugin_key Plugin key: ctl, ctp, twae, tmdivi, ctlb, cptb.
18 * @return string
19 */
20 function ctp_timeline_getting_started_url( $plugin_key = 'ctl' ) {
21 $methods = array(
22 'ctl' => 'block',
23 'ctp' => 'block',
24 'ctlb' => 'block',
25 'cptb' => 'block',
26 'twae' => 'elementor-widget',
27 'tmdivi' => 'divi-module',
28 );
29
30 $method = isset( $methods[ $plugin_key ] ) ? $methods[ $plugin_key ] : 'block';
31
32 return add_query_arg(
33 array(
34 'page' => 'ctl-getting-started',
35 'mode' => 'onboarding',
36 'method' => $method,
37 ),
38 admin_url( 'admin.php' )
39 );
40 }
41 }
42