Done !
| Server IP : 46.105.57.169 / Your IP : 216.73.216.67 Web Server : Apache System : Linux webm002.cluster120.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64 User : verseaumee ( 152031) PHP Version : 8.5.7 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/verseaumee/www/curators/wp-content/plugins/select-core/shortcodes/anchor-menu/ |
Upload File : |
<?php
namespace MixtapeQode\Modules\Shortcodes\AnchorMenu;
use MixtapeQode\Modules\Shortcodes\Lib\ShortcodeInterface;
class AnchorMenu implements ShortcodeInterface {
private $base;
function __construct() {
$this->base = 'qodef_anchor_menu';
add_action('vc_before_init', array($this, 'vcMap'));
}
public function getBase() {
return $this->base;
}
public function vcMap() {
vc_map(array(
'name' => esc_html__('Anchor Menu','mixtapewp'),
'base' => $this->base,
'icon' => 'icon-wpb-anchor-menu extended-custom-icon',
'category' => esc_html__('by SELECT','mixtapewp'),
'params' => array(
array(
'type' => 'param_group',
'heading' => esc_html__( 'Menu Items', 'mixtapewp' ),
'param_name' => 'menu_items',
'value' => '',
'params' => array(
array(
'type' => 'textfield',
'heading' => esc_html__( 'Number', 'mixtapewp' ),
'param_name' => 'number',
'admin_label' => true,
),
array(
'type' => 'textfield',
'heading' => esc_html__( 'Label', 'mixtapewp' ),
'param_name' => 'label',
'admin_label' => true,
),array(
'type' => 'textfield',
'heading' => esc_html__( 'Link with anchor', 'mixtapewp' ),
'param_name' => 'anchor',
'admin_label' => true,
)
)
)
)
)
);
}
public function render($atts, $content = null) {
$args = array(
'menu_items' => ''
);
$params = shortcode_atts($args, $atts);
extract($params);
$params['menu_items'] = json_decode(urldecode($params['menu_items']), true);
$html = qodef_core_get_shortcode_template_part('templates/anchor-menu-template', 'anchor-menu', '', $params);
return $html;
}
}