rayviljoen / custom-page-menus Goto Github PK
View Code? Open in Web Editor NEWWordPress plugin allows custom menus to be defined on a per-page basis.
Home Page: http://wordpress.org/extend/plugins/custom-page-menus/
WordPress plugin allows custom menus to be defined on a per-page basis.
Home Page: http://wordpress.org/extend/plugins/custom-page-menus/
Just a quick side-note this time:
I realize there is little to translate and that you already use the core WP translation files where available, but there are still lots of people for which English is a struggle, so it would be very nice and useful if the other few phrases could be translated as well.
Would be great if you'd add the code to enable translation of the plugin and would distribute the .pot file. I'll gladly start you off with a Dutch translation if & when ;-)
Smile,
Juliette
Hi Ray,
File: widget-class.php
To fix: replace line 65:
if ( in_array( $new_instance['sortby'], array( 'post_title', 'menu_order', 'ID' ) ) ) {
with:
if ( in_array( $new_instance['sortby'], array( 'post_title', 'menu_order', 'post_date', 'ID' ) ) ) {
Smile,
Juliette
Hiya Ray,
I just found your plugin and am very happy to have done so, was just about to start writing one myself when I found yours ;-)
I noticed a number of issues though, I'll try and solve most of them and will post my findings here or would you rather I use the WP support forum ?
Anyways, here's a first mini-bug + fix.
File: widget-class.php
Replace line 32:
if ($featured_image && $thumb){
With:
if ( ( isset( $featured_image ) && $featured_image ) && ( isset( $thumb ) && $thumb) ) {
Hope this helps!
Smile,
Juliette
Hi Ray,
Here's the second issue:
The very popular (>700K users) exclude pages plugin gives a WP user the option to exclude a page from default menu listings.
To do so, it hooks into the get_pages() WP function.
As the menus created by your plugin are created by explicitely selecting pages, any 'menu-excluded' pages which are included in a custom page menu, should be shown and not excluded.
Currently however they are excluded as your plugin also uses get_pages().
Getting around this is actually quite easy as the exclude pages plugin provides their own functions for doing so ;-)
Please find the fixes below:
File: widget-class.php
Replace line 24:
$cpMenu = get_pages( 'sort_column='.$sortby.'&include='.$include_IDs );
With:
if( function_exists( 'pause_exclude_pages' ) && function_exists( 'resume_exclude_pages' ) )
pause_exclude_pages();
$cpMenu = get_pages( 'sort_column='.$sortby.'&include='.$include_IDs );
if( function_exists( 'pause_exclude_pages' ) && function_exists( 'resume_exclude_pages' ) )
resume_exclude_pages();
File: template-tag.php
Replace line 34:
$pages = get_pages($r);
With:
if( function_exists( 'pause_exclude_pages' ) && function_exists( 'resume_exclude_pages' ) )
pause_exclude_pages();
$pages = get_pages($r);
if( function_exists( 'pause_exclude_pages' ) && function_exists( 'resume_exclude_pages' ) )
resume_exclude_pages();
Hope this helps!
Smile,
Juliette
Plugin seems to occasionally break javascript page update request in the legendary internet explorer.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.