Giter Club home page Giter Club logo

custom-page-menus's People

Contributors

fubra-api-user avatar rayviljoen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

custom-page-menus's Issues

[Feature request] Internationalization of the plugin

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

[Bug+fix] Menu order post_date will be ignored

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

[Mini-bug+fix] Error notice when no featured image found

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

[Compatibility fix] Making it work with the popular Exclude pages plugin

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

IE Bug

Plugin seems to occasionally break javascript page update request in the legendary internet explorer.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.