Plugin Directory

Changeset 3246049


Ignore:
Timestamp:
02/24/2025 09:55:02 PM (12 months ago)
Author:
reenhanced
Message:

Release version 1.2.0

Location:
wp-connectr/trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • wp-connectr/trunk/readme.txt

    r3246047 r3246049  
    1313== Description ==
    1414
    15 Integrate your WordPress site with over 1000 services through Microsoft Power Automate.
     15Integrate your WordPress site with over 1000 services through Microsoft Power Automate. This is the official Power Automate connector for WordPress, certified by Microsoft.
    1616Power Automate is a low-code service offered by Microsoft that allows you to automate workflows between your favorite apps and services to synchronize files, get notifications, collect data, and more.
     17
     18Power Automate is Microsoft's version of Zapier, IFTTT, and Integromat. It is the preferred platform for Microsoft integrations.
    1719
    1820This plugin requires a Power Automate premium license to be of any use. You can sign up for a free trial at https://make.powerautomate.com/
     
    4446== Changelog ==
    4547
    46 2025-02-20 - version 1.2.0
    47 * Show all post types and terms as resources (Dangerous! Use with caution)
     482025-02-24 - version 1.2.0
     49* User responses now contain much more data
    4850
    49512025-02-17 - version 1.1.1
  • wp-connectr/trunk/src/DynamicSchemaProvider.php

    r3240765 r3246049  
    77
    88class DynamicSchemaProvider {
    9     const SKIPPED_PROPERTIES = array( 'context' );
    109    const SUPPORTED_TYPES    = array( 'string', 'integer', 'number', 'boolean', 'array', 'object' );
    1110    const SUPPORTED_FORMATS  = array( 'date-time', 'uri', 'email' );
     
    1716
    1817        foreach ( $json_schema as $propname => $props ) {
    19             if ( in_array( $propname, self::SKIPPED_PROPERTIES, true ) ) {
    20                 continue;
    21             }
    22 
    2318            $item = self::_swagger_items_object( $props, $propname, $remove_readonly );
    2419
     
    3227
    3328                    $required[] = '' . $propname;
     29                }
     30
     31                if ( 'context' === $propname ) {
     32                    $properties[ $propname ]['x-ms-visibility'] = 'advanced';
    3433                }
    3534            }
  • wp-connectr/trunk/src/PowerResource/Post/PowerResource.php

    r3246047 r3246049  
    1515        $controllers = array();
    1616
    17         foreach ( get_post_types( array( ), 'objects' ) as $post_type ) {
     17        foreach ( get_post_types( array( 'show_in_rest' => true ), 'objects' ) as $post_type ) {
    1818            if ( 'attachment' !== $post_type->name ) {
    1919                $controller = array(
  • wp-connectr/trunk/src/PowerResource/Terms/PowerResource.php

    r3246047 r3246049  
    1717        $controllers = array();
    1818
    19         foreach ( get_taxonomies( array( ), 'objects' ) as $taxonomy ) {
     19        foreach ( get_taxonomies( array( 'show_in_rest' => true ), 'objects' ) as $taxonomy ) {
    2020            $controller = array(
    2121                'key'  => $taxonomy->name,
  • wp-connectr/trunk/src/PowerResource/User/Controller.php

    r3173902 r3246049  
    7171        return $args;
    7272    }
     73
     74    public function get_fields_for_response($request) {
     75        if ( isset( $request['context'] ) && 'view' === $request['context'] ) {
     76            unset($request['context']);
     77        }
     78
     79        return parent::get_fields_for_response($request);
     80    }
     81
     82    public function filter_response_by_context( $data, $context ) {
     83        return $data;
     84    }
    7385}
  • wp-connectr/trunk/src/ResourceManager.php

    r3240765 r3246049  
    4444        }
    4545
     46        do_action( 'wp-connectr_before_init_resources' );
     47
    4648        // ADD ALL INCLUDED RESOURCES TO THIS LIST
    4749        $resources[] = $this->container->get(UserResource::class);
     
    6062        $this->validate_resources();
    6163
     64        do_action( 'wp-connectr_before_register_resources' );
     65
    6266        // Register all resources
    6367        foreach ( $this->resources as $resource ) {
    6468            $resource->register();
    6569        }
     70
     71        do_action( 'wp-connectr_resources_registered', $this->resources );
    6672    }
    6773
     
    7480    protected function validate_resources() {
    7581        foreach ( $this->resources as $resource ) {
     82            do_action( 'wp-connectr_validate_resource', $resource );
     83
     84            // Allow other plugins to validate the resource and skip our validation
     85            if ( apply_filters( 'wp-connectr_skip_resource_validation', false, $resource ) ) {
     86                continue;
     87            }
     88
    7689            if ( ! $resource instanceof PowerResource\Base ) {
    7790                throw new \Exception( 'Resource must be an instance of PowerResource\Base' );
  • wp-connectr/trunk/vendor/composer/installed.php

    r3246047 r3246049  
    44        'pretty_version' => 'dev-main',
    55        'version' => 'dev-main',
    6         'reference' => '8e3f49f7d66ed7031c168eb92c2659771b735196',
     6        'reference' => '901c00b6da36f13ddfd41c3340de6263910cb486',
    77        'type' => 'wordpress-plugin',
    88        'install_path' => __DIR__ . '/../../',
     
    4444            'pretty_version' => 'dev-main',
    4545            'version' => 'dev-main',
    46             'reference' => '8e3f49f7d66ed7031c168eb92c2659771b735196',
     46            'reference' => '901c00b6da36f13ddfd41c3340de6263910cb486',
    4747            'type' => 'wordpress-plugin',
    4848            'install_path' => __DIR__ . '/../../',
Note: See TracChangeset for help on using the changeset viewer.