olivier89
Forum Replies Created
-
Forum: Plugins
In reply to: [Slideshow CK] redirect bugMmmh i have a few plugin installed. Maybe one of them is blocking the redirect L192 in slideshow-ck.php. I’ll have to ddebug this then : deactivate all of them, reactivate them one by one and test the redirect ??
The edit page is (obviously) working well. So i think this is the wp_redirect() that is prevented. I’ll post if i find the culprit.
ThanksForum: Plugins
In reply to: [Slideshow CK] redirect bugYes, i’ve installed it a year ago, and did all the upgrade for WP and your plugin. I’m using now WP 4.7.1 and your plugin v 1.0.17
Forum: Plugins
In reply to: [Max Mega Menu] cache problem with the menuYes, i am ??
I’ve just made the update to MMM 1.9.1 that seems to fix things with Polylang. I’ve managed to make it work.
ThanksForum: Plugins
In reply to: [Meteor Slides] Slideshow not displayed in a category (list)ok, i found out !
In my function php i had a custom function filtering query_vars. I just had to add ‘slide’ post type to the list.Forum: Plugins
In reply to: [Meteor Slides] Slideshow not displayed in a category (list)I think the problem is the do_shortcode($diapo); is not correctly performed when the category.php calls the content.php
Why, beats me sofar.Forum: Plugins
In reply to: [Polylang] Insite Sitemap (not autogenerated)This is resolved
Forum: Plugins
In reply to: [Polylang] Insite Sitemap (not autogenerated)Ouch ! I feel stupid there ?? I was looking at the argument settings, i didn’t even though about the rest…
Thanks for the time you took to answer.Forum: Plugins
In reply to: [Polylang] Insite Sitemap (not autogenerated)ok, i understand for $lang.
I use as i wrote
$lang = ( function_exists( 'pll_current_language' )) ? pll_current_language() : 'fr';
to get the current $lang
but even with it the get_post query does not work ( the subquery for child pages)
It retrieves all (!) the root pages (!) for each root pageex:
home home level0-1 level0-2 level0-1 home level0-1 level0-2 level0-2 home level0-1 level0-2
I can’t get why.
But as i said, the wp_list_pages does the trick. It’s just, i like to understand why things work or not ??
$lang = ( function_exists( 'pll_current_language' )) ? pll_current_language() : 'fr'; $args = array( 'post_type' => 'page', 'posts_per_page'=>-1, //works only if i set it 'post_parent' => 0, 'lang' => $lang, 'orderby' => 'menu_order', 'order' => 'ASC', ); //To show the level 0 pages, ordered by the page order ASC, works OK. $pages = get_posts( $args ); echo '<ul class="sitemap">'; foreach( $pages as $p ) { echo '<li><h2><a href="'.get_permalink($p->ID).'">'.$p->post_title.'</a></h2>'; $sub_page_args = array( 'post_type' => 'page', 'posts_per_page'=>-1, 'post_parent' => $p->ID, 'lang' => $lang, 'sort_order' => 'ASC' ); $sub_pages = get_posts( $args ); //Get the children of the page $p->ID, Does not work :( if( ! empty($sub_pages) ) { echo '<ul>'; foreach( $sub_pages as $sub_p ) { echo '<li><h3><a href="'.get_permalink($sub_p->ID).'">'.$sub_p->post_title.'</a></h3></li>'; } echo '</ul>'; } echo '</li>'; } echo '</ul>';
Forum: Plugins
In reply to: [Polylang] Content of widget "menu personnalisé" ("Custom menu") not transledOk for the explanation. Quick and precise. Thanks
Forum: Plugins
In reply to: [Polylang] Insite Sitemap (not autogenerated)Dummy me !
I just needed to use$args = array( 'post_type' => 'page', 'sort_column' => 'menu_order', 'order' => 'ASC', ); add_filter('get_pages', 'custom_wp_list_pages', '', 2); //just to exclude some specific pages wp_list_pages( $args ); remove_filter('get_pages', 'custom_wp_list_pages');
And all was ok !
So my only question remaining here would be about the lang parameter :
what field does it refers to ? I didn’t find it in wp_posts nor wp_postmeta. I would be interested to know if i want to make a direct wp_Query.Thanks for this great plugin
Exactly what i did for the slideshow.js
I also had my slideshow.php switching to one or the other version, and then it was allright.
ThanksForum: Hacks
In reply to: Problem of use of add_filter within a class pluginYou’re right. But this won’t do.
Sorry for thos who looked at my paste , it was the wrong one (for a topic closed).
The real paste for this problem is https://pastebin.com/HY3RCzgMI must add that the upload part is directly taken from the wp-admin/media-upload.php page
I tried to add a
if (isset($_GET[“page”]) && $_GET[“page”] == “myplug_menu”)
add_filter(‘upload_dir’, ‘myplug_upload_dir_outside’);
but this doesn’t work since i use the media-upload page codeForum: Hacks
In reply to: Add help screen to my plugin with $screen->add_help_tabok, i found a solution here
I saw nowhere else in the codex example or in the topics concerning this point that a WP_Screen object had to be used this way :
i saw
$screen = get_current_screen(); $screen->add_help_tab( array( $id, $title, $content, $callback ) );
and not
$screen = WP_Screen::get($hook); $screen->add_help_tab( array( $id, $title, $content, $callback ) );
hope this will help someone else.
Forum: Hacks
In reply to: Add help screen to my plugin with $screen->add_help_tabif i make a dump of $screen->add_help_tab, the data are here. But there is no help menu on the screen
Does it need anything else than
$screen = get_current_screen(); $screen->add_help_tab( array( 'id' => $screen->id, 'title' => __('Submenu help'), 'content' => __('My Submenu Help Content'),));
to display a menu tab ?
Do i need to require some extra file before ?Forum: Hacks
In reply to: Good practice for oop & php5 plugin programmingexcellent, this is exactly what i was looking for. I’m going to dissect your code now.
Thanks to both of you Adam and Mark for your help.