admin_url( 'admin-ajax.php' ), 'path' => plugin_dir_url( __FILE__ ))); } } function save_all_pages(){ update_option( 'wcp_about_me_page', $_REQUEST['pages'] ); } function wcp_about_me_render_template($atts, $content, $the_shortcode){ $allPages = get_option('wcp_about_me_page'); if (isset($allPages) && is_array($allPages)) { foreach ($allPages as $page) { if ($atts['id'] == $page['counter']) { ob_start(); $style = isset($page['abstyle']) ? $page['abstyle'] : "default-style"; wp_enqueue_style( 'bs-styles', plugin_dir_url( __FILE__ ) . 'css/bootstrap.min.css' ); wp_enqueue_style( 'abm-font-all--styles', plugin_dir_url( __FILE__ ) . 'css/all.min.css' ); wp_enqueue_script( 'custom-js-bs', plugin_dir_url( __FILE__ ) . 'js/script.js', array('jquery') ); include AMP_PATH."/styles/$style.php"; return ob_get_clean(); } } } } } ?>