advanced-post-list / advanced-post-list Goto Github PK
View Code? Open in Web Editor NEWA WordPress plugin to create custom post lists
A WordPress plugin to create custom post lists
When I click on 'yes' for Delete database option, hit save settings, then refresh the admin page, the option reverts back to 'no'. I'm not sure if the option is actually being set properly.
In the past, there was little to no standard set in place by WordPress. This will clear many of the poor practices found by Code Sniffer.
$_variable
to $variable
.$varName
to $var_name
.These need to be carried out across all other files that are dependent.
Currently the plugin is in the Settings sub-menu. This would give APL it's own menu to navigate from, allowing sub-menus; which would prevent having to design everything in one page, and prevent having to implement a tab design ( which many had disagreed on ).
Hello from Russia!
I have a problem. If I past shortcode in page - it's work. But if I past shortcode in news or text widget - it isn't work. How can I fix this problem?
I've installed Advanced post plugin and Event Manager (Event registration and booking management for WordPress. Recurring events, locations, google maps, rss, ical, booking registration and more!
Version 5.5.3.1 | Di Marcus Sykes).
Event manager allow a new post tassonomy called event. I setup a rule to show Event postings, ma the result is that no event is taken into account by advanced post ... any suggestion?
Use WordPress Code Sniffer for verifying.
When I hit the save button it changes to say "saving...". It saves properly but the button text never reverts back to its original text.
Hi,
I just changes the post-status to create à list using : "simplePostList_5" added "simplePostList_All5".
I get an error (missing probaly some """ or ",") following screenshot
Trebly
https://wordpress.org/support/topic/lots-of-errors-12
https://wordpress.org/support/topic/error-generating-code-for-default-presets-of-03b8
Hello. I love Advanced Post List! I recently upgraded my wp to ver. 3.8.1 and my Advanced Post List admin page is looking like this now. https://dl.dropboxusercontent.com/u/47620340/Advanced_Post_Lists.png
I also update my theme(Responsive) to ver. 1.9.4.6 at the same time. I don't know what's causing this but my admin page is unusable now. Could someone tell me what could causing this?
Great plugin, chosen for the ability to be responsive.
I have tried setting up a post list that includes the Any / All option and then excluding several categories. This does not seem to work. I have to include every category other than the ones I want to exclude in order to generate a list. I am setting this up for a client and don't want them messing with the settings each time they add a new category.
Can you please provide help?
Thanks
Add support for translations. Fairly simple change, but requires going through a lot of code. JavaScript I'm not sure about.
I18n for WordPress Developers
http://codex.wordpress.org/I18n_for_WordPress_Developers
Suspected or confirmed bugs reports related to this issue/enhancement.
I mentioned earlier my request for a date range setting for post selections, eg. 'the past 30 days', etc. Here's another!
It would be great to have a snippet size setting as well. Currently APL seems to grab 195 to 200 characters from post content.
I'm using APL to generate HTML code for a monthly newsletter, eg. with the page generated at http://transitionbrockville.com/newsletter-content-generator/, I view the source, copy all the APL-generated content, and paste it into a newsletter template containing the CSS code that gives it finer formatting.
Again, thank you for a plugin that's going to save me a lot of time!
Hi,
I use Transposh plugin (semi-automatic translation of posts) and for words that should not be translated e.g. names, it is needed insert words between ...
Your (btw GREAT!) plugin does not recognize it.
Some others like built in into Headway themes - seems to be wroking fine, so I find it usefull to let you know...
Here is the list generated with wp-advanced-post-list:
Tłocznia gazu ziemnego Bogata
Tłocznia gazu ziemnego Bordosiu
Thanks!
Maciej
The info dialog will work on the first accordion (Posts), but doesn't display with other clickable info icons.
Curiously, a list i have been using for several months now has just stopped working coming up with default exit message . Any thoughts as to how might rectify using WP 3.9.1
{"version":"0.3.b8","presetDbObj":{"_preset_db":{"Library":{"_postParents":[],"_postTax":{"post":{"taxonomies":{"category":{"require_taxonomy":false,"require_terms":false,"include_terms":false,"terms":[4,5,6,7,8,9,10,11,12,13,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,78,79,80,81,82,83,84,85,86,87,88,89,90,101,102,105,117,135,148]}}}},"_listCount":-1,"_listOrderBy":"date","_listOrder":"DESC","_postVisibility":["public"],"_postStatus":["publish"],"_userPerm":"readable","_postAuthorOperator":"none","_postAuthorIDs":[],"_listIgnoreSticky":true,"_listExcludePosts":[],"_listExcludeDuplicates":false,"_listExcludeCurrent":true,"_exit":"","_before":"<p><select id=\"postList_dropdown\" style=\"width:200px; margin-right:20px\">","_content":"<option value=\"[post_permalink]\">[post_title], Date: [post_date format=\"d-m-Y\"]<\/option>","_after":"<\/ select> <input type=\"button\" id=\"postList_goBtn\" value=\"SELECT\" onClick=\"javascript:window.location=document.getElementById('postList_dropdown').value\" \/><\/p>"}}}}
Add support for extensions to APL. WordPress offers filter and action hooks where needed.
Note: Could be better organized by adding them to a single file intended to be accessed by others and readable/documented.
These filter/action hooks may include...
Move shortcode functions from Core file to a Class file, including callback functions (internal shortcodes).
Notes
I have a few custom presets that are not working.
For example:
This one:
These presets were working with wordpress 3.6 and 2010 theme. They have not work correctly with 3.7.x or 3.8.x or with any other themes.
For some reason I cannot figure out, if I try to generate a list of FUTURE POSTS, or DRAFTS, the list is properly generated in the Admin PREVIEW section, but the list does not appear on the front end.
I tried the shortcode on a page, and also the sidebar widget, with same result.
I also tried adding PAST PUBLISHED posts in the list, and those display correctly on the front end, but the FUTURE POSTS, and DRAFTS are still missing from the list...
NOTE: if I try to generate a list of FUTURE POSTS and/or DRAFTS, even though they appear correctly in the preview admin, on the front end only the EXIT MESSAGE appears. The EXIT MESSAGE disappears if I add already PUBLISHED posts to the same list (as those will properly be displayed on the front end).
The plugin currently has little to no known issues related to this The issues relating to this were more profound than originally thought, and caused a heavy load on the memory. The code initially was design just to get the job done. The idea in mind is to use the same concept that themes generally use as the end result.
Things to keep in mind when editing:
The class now has repeating functions for setting multiple query_str, and will inject any dynamics beforehand. Before the array of query_str is used for WP_Query, there is a method to slim/consolidate any query_str that compatably match each other. Which reduces the amount of queries.
References, Examples, and/or Links
Design Patterns for WordPress
The widget class file was withdrawn from the code to focus on more relative code that was being modified and/or upgraded. However, the shortcodes have been know to still work within the sidebars.
This should be an easy addition considering the file containing the widget code is just sitting dormant.
Fixed in the enable_widget branch
Add Author from Current Post for displaying related author posts. Intended as a dynamic method for the sidebars/widgets, and a simpler way to maintain content feed from various Author's content.
This would be within the author filter with the rest of the author list, and the current author would be included or excluded depending on the author operator.
WP 3.9.1
Plugin 0.3.b8
Site language Italian
After recent updates, it seems infinite settings doesn't work
List Amount: -1
return nothing!
I'm using your wonderfull plugin for months and this happen for the first time.
Set List Amount to a greater number than the number of posts.
For some reason WP_Query doesn't handle posts_per_page = -1
like it should. I suspect it is partially due to the pagination being disabled. Pagination is a WIP
Which was the case. When combining posts_per_page = -1
and nopaging = FALSE
, WP_Query didn't seem to handle it very well. Technically, there were 2 bugs. Majority experienced a skip bug with empty() vs isset(), but after looking into the matter, I found a ticket which explained the problem in the concept and why it produces errors.
https://core.trac.wordpress.org/ticket/34474
Modify the Preset Object to handle the filter and design separately.
Related to APL_Design Class #9 and APL_Filter
sticky posts outside of requested categories show up in category-based post lists
Hi
I've created an own Post Type (Testimonials) and there are 2 Taxonomies.
It would be great if I could output the "Categories" from the 2 Custom Taxonomies.
Any solution for this?
Thanks, Chris
When I specify Post Status "Public", "Pending Review" I get correct results in the preview, but they do not appear in the post list of the page with the shortcode. Is there something I need to do?
Note: They will appear if I specify a Post Status of "Published" and I change the status of the target pages to "Published".
Thanks and BTW - I really like this plugin! So powerful!
Summary: This is used to Include posts to display in Preset Post Lists.
Any key features that could be included
Featured Content Mockup
Featured Content Core Plugin Update
Featured Content Mock Ups
References, Examples, and/or Links
WP Query $args References
Class for the Design and Style for Preset Post Lists.
Fatal error: Maximum execution time of 30 seconds exceeded in /home/ekojrc6/public_html/wp03/wp-content/plugins/advanced-post-list/includes/class/apl-shortcodes.php on line 238
Hi,
I added to widget_text shortcode like this: [post_list name="blog"].
It work only when I'm logged. Help :)
Redesign the admin page top-down following many of the standards and styles already set in place by WordPress. Eliminate any outside code ( jQuery UI & MultiSelect ).
Design UI/UX as Follows
At Lacking of featureded Image Show The First attached Image
Create a method for handling errors and exceptions within classes/objects. This will handle both known practical errors, as well as catching exceptions (especially when using AJAX, which tends to leave errors hidden).
Thoughts & Ideas (Brainstorming)
Areas of Interest
(Optional) References, Examples, and/or Links [1] Title/Link - Summary of the information gathered. Example-of-doing-something - Summary of the information gathered. Title-and-link - Summary of other links included.
Title
Post Parents is breaking in APL_Query and throwing Errors.
WordPress Version: Unknown
Plugin Version: Possibly 0.3.b8
Theme: Unknown
(Optional) PHP Version: Unknown
(Optional) MySQL Version: Unknown
(Optional) List of Installed Plugins/Dependencies: Unknown
Description
Came across a few websites[1] that APL is breaking and producing an error. It looks like an Issue with the Post Parents, and how the array is handled.
Website[1] displays the following error...
Warning: Invalid argument supplied for foreach() in /home/cabinetdw/www/wp-content/plugins/advanced-post-list/includes/class/APLQuery.php on line 592
Warning: array_unique() [function.array-unique]: The argument should be an array in /home/cabinetdw/www/wp-content/plugins/advanced-post-list/includes/class/APLQuery.php on line 613
Warning: array_values() [function.array-values]: The argument should be an array in /home/cabinetdw/www/wp-content/plugins/advanced-post-list/includes/class/APLQuery.php on line 613
Warning: Invalid argument supplied for foreach() in /home/cabinetdw/www/wp-content/plugins/advanced-post-list/includes/class/APLQuery.php on line 624
Fatal error: __clone method called on non-object in /home/cabinetdw/www/wp-content/plugins/advanced-post-list/includes/class/APLQuery.php on line 178
Website[2] displays the following error...
Warning: Invalid argument supplied for foreach() in /home/nieuwemedialab.nl/public_html/wp-content/plugins/advanced-post-list/includes/class/APLQuery.php on line 592
Warning: array_unique() expects parameter 1 to be array, null given in /home/nieuwemedialab.nl/public_html/wp-content/plugins/advanced-post-list/includes/class/APLQuery.php on line 613
Warning: array_values() expects parameter 1 to be array, null given in /home/nieuwemedialab.nl/public_html/wp-content/plugins/advanced-post-list/includes/class/APLQuery.php on line 613
Warning: Invalid argument supplied for foreach() in /home/nieuwemedialab.nl/public_html/wp-content/plugins/advanced-post-list/includes/class/APLQuery.php on line 624
Fatal error: __clone method called on non-object in /home/nieuwemedialab.nl/public_html/wp-content/plugins/advanced-post-list/includes/class/APLQuery.php on line 178
APLQuery.php
//STEP 1 - Clone the param object (REQUIRED).
//Found out that relying on the param to be seperate from the call
// stack produces the param to be the same object; acing like a pointer?
$preset = clone $presetObj;
//Error Line 178
$preset->_postTax = clone $presetObj->_postTax;
//Used for collecting and returning an array of $query_str; Multi-Dimensional.
//array(array)
$query_str_arrays = array();
APLQuery.php
////////////////////////////////////////////////////////////////////////
//// PAGE PARENTS //////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
//STEP 3 - If the post parent dynamic/'current page' option is checked. Then
// see if the post is hierarchical and add it to post parents array.
$post_post_type = get_post_type($post_ID);
$post_hierarchical = is_post_type_hierarchical($post_post_type);
//Error Line 592
foreach ($presetObj->_postParents as $key => $value)
{
//If dynamic/current post is enabled, zero (0)
if (intval($value) === 0)
{
//If the post is a valid page parent (hierarchical), then
// replace 0 with page ID
if ($post_hierarchical && !empty($post_ID))
{
//Replace Current Page Parent indicator with the (real) page ID
$presetObj->_postParents[$key] = $post_ID;
}
//Otherwise remove the invalid entry (value 0)
else
{
unset($presetObj->_postParents[$key]);
$presetObj->_postParents = array_values($presetObj->_postParents);
}
}
}
//Removes any duplicates by using array_unique()
//Error Line 613
$presetObj->_postParents = array_values(array_unique($presetObj->_postParents));
////////////////////////////////////////////////////////////////////////
//// POST TYPE & TAXONOMIES -> TERMS ///////////////////////////////////
////////////////////////////////////////////////////////////////////////
//STEP 4 - If any include/dynamic taxonomy terms are selected, then add
// the (global) post's values.
$post_taxonomies = get_post_taxonomies($post_ID);
$args_post_terms = array('orderby' => 'term_id',
'order' => 'ASC',
'fields' => 'ids');
//Error Line 624
foreach($presetObj->_postTax as $preset_post_type => $preset_pt_value)
{
if ($post_post_type === $preset_post_type)
{
foreach ($preset_pt_value->taxonomies as $preset_taxonomy => $preset_tax_value)
{
if ($preset_tax_value->include_terms === TRUE)
{
foreach ($post_taxonomies as $post_taxonomy_value)
{
if ($preset_taxonomy === $post_taxonomy_value && !empty($post_ID))
{
//ALTERNATE FOR NEXT 3(5) LINES - Shorter but complex
//$preset_tax_value->terms = array_unique(
// array_merge(
// $preset_tax_value->terms,
// wp_get_object_terms(
// $post_ID,
// $post_taxonomy_value,
// $args_post_terms
// )
// )
//);
$post_taxonomy_terms = wp_get_object_terms($post_ID,
$post_taxonomy_value,
$args_post_terms);
$preset_tax_value->terms = array_merge($preset_tax_value->terms,
(array) $post_taxonomy_terms);
$preset_tax_value->terms = array_unique($preset_tax_value->terms);
}
}
}
}
}
}
How to (Possibly) Reproduce
It looks like the Page Parent functionality is being used with one or more Page Parents, but it is unclear what is being handled (whether it's a native page, or data from a plugin).
(Optional) References, Links, and/or Files
[1] Website - The website that contains the produced error.
[2] Website1 & Website2 - The website that contains the produced error.
I have 2 sites and installed the exact same plugin on both. In one, everything works fine. in the other, when I click on save, the save button says "Saving" but nothing happens and I never get a preview. The only differences are, the one that doesn't work has many post (about 1600) and is in a folder on the site, where the one that works is on the root of the site.
is it posible to filter the amount of each category?
Could we add a theme or something to use the default wordpress theme ?
When installing this plugins some other plugins get the same styles of this plugin : contact forms 7 for exemple :
And by default shoudl look like this :
I think the admin UI needs a UI refactor and not be able to use different jquery themes i don't this is usefull !
I (EkoJr) don't remember seeing this bug any time recently until now. It could be an issue with other plugins modifying or switching the jQuery UI file. Luckily when I found this, I was running on barebones with plugins on a localhost. The taxonomies can still be used, but may be a little difficult to select or see. Plus, it's plain ugly.
One solution that I moved away from is using Google's API database to load jQuery UI and it's CSS file, and I almost decided to add the physical file to APL, but decided not to because I didn't want the plugin's data size to be bulky.
I thought switching the plugin to the platform's jQuery & jQuery UI would be ideal, but ever since then I've seen issues surface from an external source. Plus, using Google's API kept the version the same.
May not be the solution, but it is a thought looking into first. There could still be the same code used previously commented out.
Advanced Post List (of course)
Custom Post Type UI
WordPress, jQuery UI CSS Files?
Version 0.3.b7 - admin panel unusable in https - we have our whole site forced to https so admin panel post-type accordion is not properly styled (very hard to use)
Fix:
in wp-content/plugins/advanced-post-list/includes/class/APLCore.php
line 363 remove 'http:', leaving '//ajax.googleapis.com/ajax...'
and maybe??
in wp-content/plugins/advanced-post-list/includes/js/APL-admin.js
line 782 remove 'http:', leaving loadjscssfile('//ajax.googleapis.com/ajax...'
Adds "yet another broken thing"™ in IE7 (and maybe IE8?) <-- no sympathy, however.
Seems to work in several other browsers.
Notes
I found that if debug is set to true in wp_config, the plugin has a number of errors: The save button does not revert to its correct text and the preview does not work in the admin page. This likely is why my lists were not displaying correctly on the site and was the source of the problem that caused me to make the admin_fix branch.
An error occurs on a 404 page when APL is being utilized on a sidebar.
Notice: Undefined index: post__not_in in ...\advanced-post-list\includes\class\APLQuery.php on line 437
( ! ) Notice: Undefined index: post__not_in in C:\wamp64\www\APL\wp-content\plugins\advanced-post-list\includes\class\APLQuery.php on line 437
Call Stack
# Time Memory Function Location
1 0.0000 234800 {main}( ) ...\index.php:0
2 0.0000 237872 require( 'C:\wamp64\www\APL\wp-blog-header.php' ) ...\index.php:17
3 0.2760 26408064 require_once( 'C:\wamp64\www\APL\wp-includes\template-loader.php' ) ...\wp-blog-header.php:19
4 0.2830 26470152 include( 'C:\wamp64\www\APL\wp-content\themes\customizr\index.php' ) ...\template-loader.php:75
5 0.4480 27068176 do_action( ) ...\index.php:18
6 0.4480 27070232 call_user_func_array:{C:\wamp64\www\APL\wp-includes\plugin.php:525} ( ) ...\plugin.php:525
7 0.4480 27070504 TC_sidebar->tc_sidebar_display( ) ...\plugin.php:525
8 0.4490 27095080 get_sidebar( ) ...\class-content-sidebar.php:98
9 0.4490 27095888 locate_template( ) ...\general-template.php:122
10 0.4500 27096064 load_template( ) ...\template.php:531
11 0.4540 27109752 require_once( 'C:\wamp64\www\APL\wp-content\themes\customizr\sidebar-left.php' ) ...\template.php:572
12 0.4540 27110024 dynamic_sidebar( ) ...\sidebar-left.php:10
13 0.4570 27115000 call_user_func_array:{C:\wamp64\www\APL\wp-includes\widgets.php:738} ( ) ...\widgets.php:738
14 0.4570 27115584 WP_Widget->display_callback( ) ...\widgets.php:738
15 0.4570 27116840 APLWidget->widget( ) ...\class-wp-widget.php:376
16 0.4570 27120368 APLCore->APL_display( ) ...\APLWidget.php:25
17 0.4570 27120792 APLCore->APL_run( ) ...\APLCore.php:1893
18 0.4580 27194112 APLQuery->__construct( ) ...\APLCore.php:1973
19 0.4580 27195128 APLQuery->set_query( ) ...\APLQuery.php:87
20 0.4580 27201320 APLQuery->set_query_base_val( ) ...\APLQuery.php:299
How to (Possibly) Reproduce
Hi,
I decided to provide this info, as there is no new version, so perhaps it may help in taking into account this problem before it is released.
Please, see attached screenshots. While Advanced Post List is active, Magic Memebers control panel is destroyed... It looks like some formatting issue...
Here it is like it should look like (plugin turned off):
Overall your plugin is GREAT and I cannot replace it, so your suport would be nicely welcome...
Regards,
Maciej
[email protected]
Instead of having multiple checkboxes for each taxonomy, switch it to be parallel with post types. There's really no reason to split a filter like that, and if there is, the difference is very small.
This will only work with taxonomies being used, and the page(s) will be required to have them all. Which the All/Any and Include Current Page would include the taxonomy.
jQuery Plugin: GitHub ehynds/jquery-ui-multiselect-widget
Update files and fix any missing alterations. Majority of fixes and modifications have already been merged to Master branch.
I am using this plugin on a secured hosting (https), and it was giving me an error about some content not being delivered securely.
I came to find out that the content that is not being delivered as https is the Google API for the admin stylesheet (apl-admin-ui-css-css).
I was able to fix this issue on my installation by changing line 363 in APLCore.php to https instead of http, but it would be nice if you can change it in the plugin files so that it won't be lost when updated.
'https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.21/themes/' . $APLOptions['jquery_ui_theme'] . '/jquery-ui.css',
Thanks,
Hi There,
It's great plugin! however it has 2 problems for Chinese now.
Hope you can fix it.
Regards
Sam
Hello, EkoJr,
Upgraded, today (23JUN2014), to version 0.3.b8 after upgrading my WP to version 3.9.1. We are using a custom theme.
Now we are seeing these notices on our home page:
Notice: Undefined variable: tax_match_found in /home/swvafb/faswva.org/faswva_wp/wp-content/plugins/advanced-post-list/includes/class/APLQuery.php on line 537
Notice: Undefined variable: APL_post in /home/swvafb/faswva.org/faswva_wp/wp-content/plugins/advanced-post-list/includes/class/APLCore.php on line 1994
Notice: Trying to get property of non-object in /home/swvafb/faswva.org/faswva_wp/wp-content/plugins/advanced-post-list/includes/class/APLCore.php on line 1994
Notice: Undefined variable: APL_post in /home/swvafb/faswva.org/faswva_wp/wp-content/plugins/advanced-post-list/includes/class/APLCore.php on line 1994
Notice: Trying to get property of non-object in /home/swvafb/faswva.org/faswva_wp/wp-content/plugins/advanced-post-list/includes/class/APLCore.php on line 1994
Notice: Undefined variable: APL_post in /home/swvafb/faswva.org/faswva_wp/wp-content/plugins/advanced-post-list/includes/class/APLCore.php on line 1994
Notice: Trying to get property of non-object in /home/swvafb/faswva.org/faswva_wp/wp-content/plugins/advanced-post-list/includes/class/APLCore.php on line 1994
Is this a result of the new APL version, some incompatibility with our custom theme, or something else?
Many thanks for a very useful plugin and for your assistance.
Undefined variable: tax_match_found in .../advanced-post-list/includes/class/APLQuery.php on line 537
if (!$tax_match_found)//APLQuery.php on line 537
{
return FALSE;
}
Notice: Trying to get property of non-object in .../advanced-post-list/includes/class/APLCore.php on line 1994
while ( $wp_query_class->have_posts() )
{
$wp_query_class->the_post();
$this->_remove_duplicates[] = $APL_post->ID; //APLCore.php on line 1994
$output .= APLInternalShortcodeReplace($presetObj->_content,
$wp_query_class->post,
$count);
$count++;
}
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.