Plugin Directory

Changeset 3496110


Ignore:
Timestamp:
04/01/2026 02:52:11 AM (4 days ago)
Author:
jamesdlow
Message:

1.5.5

  • Latest version of restlib library 20260401
Location:
pageapp
Files:
18 added
3 edited

Legend:

Unmodified
Added
Removed
  • pageapp/trunk/inc/restlib.php

    r3495148 r3496110  
    22/*
    33 * File: restlib.php
    4  * Date: 20260331
     4 * Date: 20260401
    55 * Author: James D. Low
    66 * URL: http://jameslow.com
     
    1515    public $is_wordpress = false;
    1616    public $cookie = false;
    17     public $debug = false;
     17    public $private_nokey = true;
     18    public $debug = false; 
    1819
    1920    /* Constructor */
    20     function __construct($apikeys = null, $cache = 60, $prefix = null, $route = 'wordpress', $cookie = false, $debug = false) {
     21    function __construct($apikeys = null, $cache = 60, $prefix = null, $route = 'wordpress', $cookie = false, $private_nokey = true, $debug = false) {
    2122        $this->apikeys = $apikeys ? (is_array($apikeys) ? $apikeys : array($apikeys)) : array();
    2223        $this->cache = $cache !== null ? $cache : $this->cache;
     
    2425        $this->route = $route !== null ? $route : $this->route;
    2526        $this->cookie = $cookie;
     27        $this->private_nokey = $private_nokey;
    2628        $this->debug = $debug;
    2729        $this->add_hooks();
     
    244246            if ($function) {
    245247                if ($function->isPrivate()) {
    246                     $apikey = $this->assert_login();
     248                    if (!$this->private_nokey) {
     249                        $apikey = $this->assert_apikey();
     250                    }
     251                    $this->assert_login();
    247252                    //https://stackoverflow.com/questions/3475601/accessing-a-protected-member-variable-outside-a-class
    248253                    //$prop = ReflectionProperty::setAccessible($this, $method);
     
    253258                    return $reflectionMethod->invoke($this);
    254259                } elseif ($function->isProtected()) {
    255                     $apikey = $this->assert_apikey();
     260                    try {
     261                        $apikey = $this->assert_apikey();
     262                    } catch (Exception $e) {
     263                        if ($this->private_nokey) {
     264                            $this->assert_login();
     265                        }
     266                    }
    256267                    return $this->$method();
    257268                } elseif ($function->isPublic()) {
  • pageapp/trunk/pageapp.php

    r3495148 r3496110  
    44Plugin URI: https://wordpress.org/plugins/pageapp/
    55Description: Extensions to Wordpress wp-json for the PageApp API and mobile framework
    6 Version: 1.5.4
     6Version: 1.5.5
    77Author: PageApp
    88Author URI: https://www.thirteen.com/
  • pageapp/trunk/readme.txt

    r3495148 r3496110  
    44Requires at least: 4.0
    55Tested up to: 6.9
    6 Stable tag: 1.5.4
     6Stable tag: 1.5.5
    77License: MIT
    88Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=K6VKWB3HZB2T2&item_name=Donation%20to%20jameslow%2ecom&currency_code=USD&bn=PP%2dDonationsBF&charset=UTF%2d8
     
    2828
    2929== Changelog ==
     30
     31= 1.5.5 =
     32* Latest version of restlib library 20260401
    3033
    3134= 1.5.4 =
Note: See TracChangeset for help on using the changeset viewer.