I think we should have the option "exclude" to show all pages except for the selected pages.
Why to add this feature?
If I want to exclude a page from the menu (e.g. if I use that specific page as my homepage), this way should be the most convenient. If I'll choose the "selected" option I'll have to return to here every time I'm creating a new page to select it.
My solution also suggest a more readable and optimized code than the "selected" option.
How to add this feature? Just 2 find & replace!
in "/wp-content/themes/suffusion/functions.php"
find (line 716):
- Code: Select all
if ($page_all_sel == 'selected') {
$pages_excluded = get_excluded_pages($page_option);
}
else {
$pages_excluded = array();
}
replace with:
- Code: Select all
if ($page_all_sel == 'selected') {
$pages_excluded = get_excluded_pages($page_option);
}
elseif ($page_all_sel == 'exclude') {
global $$page_option;
$pages_excluded = $$page_option;
}
else {
$pages_excluded = array();
}
in "/wp-content/themes/suffusion/admin/theme-options-blog-features.php"
find:
- Code: Select all
"options" => array("all" => "All, ignoring next option", "selected" => "Selections from the next option"),
replace with:
- Code: Select all
"options" => array("all" => "All, ignoring next option", "exclude" => "Exclude the pages selected in the next option", "selected" => "Selections from the next option"),
Of course while implementing this feature you would like to make some changes like to move the "global $$page_option;" upward and maybe change the language...
