🏡 index : ~doyle/koselig.git

author Jordan Doyle <jordan@doyle.wf> 2016-10-15 14:07:32.0 +00:00:00
committer Jordan Doyle <jordan@doyle.wf> 2016-10-15 14:07:32.0 +00:00:00
commit
fe195a8a0cd08c8d6e2c20d8d54028800dca2eb1 [patch]
tree
2a2d9ae7f1150383653a65a962caa25bde860944
parent
3596d31759dcdacd402d1ac16c5698e17d56d324
download
fe195a8a0cd08c8d6e2c20d8d54028800dca2eb1.tar.gz

Meta usability changes



Diff

 src/Models/Meta.php | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/Models/Meta.php b/src/Models/Meta.php
index 887f6ac..4ae6e0f 100644
--- a/src/Models/Meta.php
+++ b/src/Models/Meta.php
@@ -30,13 +30,17 @@ class Meta extends Model
     * or
     * <code>Meta::get(7, 'my_meta_key');</code>
     *
     * @param int|string|null $page page to get meta for (or name of the meta item to get
     *                              if you want to get the current page's meta)
     * @param int|string|null|Post $page page to get meta for (or name of the meta item to get
     *                                   if you want to get the current page's meta)
     * @param string|null $name
     * @return mixed
     */
    public static function get($page = null, $name = null)
    {
        if (is_subclass_of($page, Post::class)) {
            $page = $page->ID;
        }

        if (!ctype_digit((string) $page) && $name === null) {
            $name = $page;
            $page = null;