Plugin Directory

Changeset 1957759


Ignore:
Timestamp:
10/16/2018 10:19:45 PM (7 years ago)
Author:
springthistle
Message:

Added ability to NOT sort by default custom_field for a particulate shortcode instance

Location:
aprils-call-posts/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • aprils-call-posts/trunk/ahs_callposts.php

    r1682856 r1957759  
    44Plugin URI: http://springthistle.com/wordpress/plugin_callposts
    55Description: Via shortcode, lets you call in a list of posts that are filtered, displayed and ordered based on criteria you provide. <a href="options-general.php?page=ahs_callposts_admin.php">Edit Settings</a>.
    6 Version: 2.0.13
     6Version: 2.0.14
    77Author: Aaron Hodge Silver
    88Author URI: http://springthistle.com/
     
    7373    // order by default or by custom field?
    7474    // let shortcode override options default
    75     if ($custom_field===null) $custom_field = get_option('ahscp_customfield');
     75    if ($custom_field===null && $custom_field !== 'false') $custom_field = get_option('ahscp_customfield');
    7676    if (empty($title)) $title = get_option('ahscp_titletype');
    7777    if (empty($orderby)) $orderby = get_option('ahscp_orderby');
  • aprils-call-posts/trunk/ahs_callposts_admin.php

    r1264200 r1957759  
    3636        "id" => "ahscp_customfield",
    3737        'size'=>150,
    38         'help'=>'The shortcode automatically orders posts by most-recent-first. If you\'d like them to be ordered by a custom field, enter the name of the custom field here. You can override this default setting in any individual use of the shortcode by including the option <code>custom_field</code>.'),
     38        'help'=>'The shortcode automatically orders posts by most-recent-first. If you\'d like them to be ordered by a custom field, enter the name of the custom field here. You can override this default setting in any individual use of the shortcode by including the option <code>custom_field</code>. If you set a custom_field value here, but want it to NOT impact a particular shortcode instances, set its value to <code>false</code>.'),
    3939
    4040    /* Templates tab */
  • aprils-call-posts/trunk/readme.html

    r1264955 r1957759  
    1212    <tr><td><code>post_type</code></td><td>Default is <code>post</code>. The only other type you might want is a custom post_type.</td></tr>
    1313    <tr><td><code>category_tax</code></td><td>If you want to retrieve from a different taxonomy (other than category) you can enter specify it with this attribute. Note that this will only work with one item; you cannot enter multiple items separated by commas.</td></tr>
    14     <tr><td><code>custom_field</code></td><td>Default is chosen in Global Settings, if not empty. Otherwise, ignored.</td></tr>
     14    <tr><td><code>custom_field</code></td><td>This is used for sorting also. Default is chosen in Global Settings, if not empty. Otherwise, ignored.</td></tr>
    1515</table>
    1616
  • aprils-call-posts/trunk/readme.txt

    r1682856 r1957759  
    33Tags: posts, shortcode
    44Requires at least: 2.9.1
    5 Tested up to: 4.8.x
    6 Stable tag: 2.0.13
     5Tested up to: 4.9.x
     6Stable tag: 2.0.14
    77
    88Via shortcode, lets you call in a list of posts that are filtered, ordered, and displayed based on criteria you provide.
     
    4040
    4141== Changelog ==
     42
     43= 2.0.14 =
     44* Added option to ignore globally-set custom_field on specific shortcode instances
     45* Updated compatibility version.
    4246
    4347= 2.0.13 =
Note: See TracChangeset for help on using the changeset viewer.