author | ymh <ymh.work@gmail.com> |
Mon, 09 Dec 2019 11:32:04 +0100 | |
changeset 7 | 81d22971b333 |
parent 0 | 505fe5249d9c |
permissions | -rw-r--r-- |
0
505fe5249d9c
add foundations for pharmakon (bedrock + deploy)
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
1 |
<?php |
505fe5249d9c
add foundations for pharmakon (bedrock + deploy)
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
2 |
function bfa_hor_pages($sort_order = "menu_order", $levels = "", $titles = "No", $exclude = "") { |
505fe5249d9c
add foundations for pharmakon (bedrock + deploy)
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
3 |
|
505fe5249d9c
add foundations for pharmakon (bedrock + deploy)
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
4 |
global $bfa_ata; |
505fe5249d9c
add foundations for pharmakon (bedrock + deploy)
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
5 |
|
505fe5249d9c
add foundations for pharmakon (bedrock + deploy)
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
6 |
$list_pages_string = wp_list_pages('sort_column=' . $sort_order . '&title_li=&depth=' . $levels . '&exclude=' . trim(str_replace(" ", "", |
505fe5249d9c
add foundations for pharmakon (bedrock + deploy)
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
7 |
$exclude)) . '&echo=0&link_before=<span>&link_after=</span>'); |
505fe5249d9c
add foundations for pharmakon (bedrock + deploy)
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
8 |
|
505fe5249d9c
add foundations for pharmakon (bedrock + deploy)
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
9 |
$list_pages_string = preg_replace("/<ul class='children'/","<ul",$list_pages_string); |
505fe5249d9c
add foundations for pharmakon (bedrock + deploy)
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
10 |
|
505fe5249d9c
add foundations for pharmakon (bedrock + deploy)
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
11 |
if ( $bfa_ata['page_menu_1st_level_not_linked'] == "Yes" ) { |
505fe5249d9c
add foundations for pharmakon (bedrock + deploy)
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
12 |
$list_pages_string = preg_replace("/<li class=\"(.*?)><a href=\"(.*?)\"(.*?)\n<ul>/i","<li class=\"rMenu-expand \\1><a href=\"#\" onclick=\"return false\"\\3\n <ul class=\"rMenu-ver\">",$list_pages_string); |
505fe5249d9c
add foundations for pharmakon (bedrock + deploy)
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
13 |
} else { |
505fe5249d9c
add foundations for pharmakon (bedrock + deploy)
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
14 |
$list_pages_string = preg_replace("/<li class=\"(.*?)\n<ul>/i","<li class=\"rMenu-expand \\1\n <ul class=\"rMenu-ver\">",$list_pages_string); |
505fe5249d9c
add foundations for pharmakon (bedrock + deploy)
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
15 |
} |
505fe5249d9c
add foundations for pharmakon (bedrock + deploy)
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
16 |
|
505fe5249d9c
add foundations for pharmakon (bedrock + deploy)
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
17 |
$list_pages_string = preg_replace("/<li class=\"(.*?)\n\t<ul>/i","<li class=\"rMenu-expand \\1\n\t <ul class=\"rMenu-ver\">",$list_pages_string); |
505fe5249d9c
add foundations for pharmakon (bedrock + deploy)
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
18 |
$list_pages_string = preg_replace("/<li class=\"(.*?)\n\t\t<ul>/i","<li class=\"rMenu-expand \\1\n\t\t <ul class=\"rMenu-ver\">",$list_pages_string); |
505fe5249d9c
add foundations for pharmakon (bedrock + deploy)
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
19 |
$list_pages_string = preg_replace("/<li class=\"(.*?)\n\t\t\t<ul>/i","<li class=\"rMenu-expand \\1\n\t\t\t <ul class=\"rMenu-ver\">",$list_pages_string); |
505fe5249d9c
add foundations for pharmakon (bedrock + deploy)
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
20 |
$list_pages_string = preg_replace("/<li class=\"(.*?)\n\t\t\t\t<ul>/i","<li class=\"rMenu-expand \\1\n\t\t\t\t <ul class=\"rMenu-ver\">",$list_pages_string); |
505fe5249d9c
add foundations for pharmakon (bedrock + deploy)
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
21 |
$list_pages_string = preg_replace("/<li class=\"(.*?)\n\t\t\t\t\t<ul>/i","<li class=\"rMenu-expand \\1\n\t\t\t\t\t <ul class=\"rMenu-ver\">",$list_pages_string); |
505fe5249d9c
add foundations for pharmakon (bedrock + deploy)
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
22 |
$list_pages_string = preg_replace("/<li class=\"(.*?)\n\t\t\t\t\t\t<ul>/i","<li class=\"rMenu-expand \\1\n\t\t\t\t\t\t <ul class=\"rMenu-ver\">",$list_pages_string); |
505fe5249d9c
add foundations for pharmakon (bedrock + deploy)
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
23 |
$list_pages_string = preg_replace("/<li class=\"(.*?)\n\t\t\t\t\t\t\t<ul>/i","<li class=\"rMenu-expand \\1\n\t\t\t\t\t\t\t <ul class=\"rMenu-ver\">",$list_pages_string); |
505fe5249d9c
add foundations for pharmakon (bedrock + deploy)
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
24 |
$list_pages_string = preg_replace("/<li class=\"(.*?)\n\t\t\t\t\t\t\t\t<ul>/i","<li class=\"rMenu-expand \\1\n\t\t\t\t\t\t\t\t <ul class=\"rMenu-ver\">",$list_pages_string); |
505fe5249d9c
add foundations for pharmakon (bedrock + deploy)
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
25 |
$list_pages_string = preg_replace("/<li class=\"(.*?)\n\t\t\t\t\t\t\t\t\t<ul>/i","<li class=\"rMenu-expand \\1\n\t\t\t\t\t\t\t\t\t <ul class=\"rMenu-ver\">",$list_pages_string); |
505fe5249d9c
add foundations for pharmakon (bedrock + deploy)
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
26 |
|
505fe5249d9c
add foundations for pharmakon (bedrock + deploy)
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
27 |
if ( $titles == "No" ) { |
505fe5249d9c
add foundations for pharmakon (bedrock + deploy)
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
28 |
$list_pages_string = preg_replace("/title=\"(.*?)\"/i","",$list_pages_string); |
505fe5249d9c
add foundations for pharmakon (bedrock + deploy)
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
29 |
} |
505fe5249d9c
add foundations for pharmakon (bedrock + deploy)
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
30 |
|
505fe5249d9c
add foundations for pharmakon (bedrock + deploy)
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
31 |
return $list_pages_string; |
505fe5249d9c
add foundations for pharmakon (bedrock + deploy)
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
32 |
|
505fe5249d9c
add foundations for pharmakon (bedrock + deploy)
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
33 |
} |
505fe5249d9c
add foundations for pharmakon (bedrock + deploy)
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
34 |
?> |