Jayme Edwards
Forum Replies Created
-
Forum: Developing with WordPress
In reply to: Retrieving roles in gutenberg?Nevermind. I just created a rest API.
If anyone is curious:
namespace MyPlugin\REST; /** * REST endpoint for wordpress roles. */ class RolesController extends \WP_REST_Controller { /** * Create a new instance of the class. */ public function __construct() { $this->namespace = 'myplugin/v1'; $this->resource_name = 'roles'; register_rest_route( $this->namespace, '/' . $this->resource_name, array( array( 'methods' => \WP_Rest_Server::READABLE, 'callback' => array( $this, 'getItems'), 'permission_callback' => function () { return true; } ) ) ); } /** * Get a list of roles from the collection. * * @param WP_REST_Request $request Full data about the request. * @return WP_Error|WP_REST_Response */ public function getItems($request) { $role_list = wp_roles(); // Return the roles in a successful response $response = new \WP_REST_Response($role_list->role_names, 200); return $response; }
- This reply was modified 2 years, 8 months ago by Jayme Edwards.
If you keep everything on a CDN, it is not possible for the plugin to function properly, because it bypasses the redirection from the .htaccess file.
Ah. That’s disappointing. Well thanks for clearing it up for me anyway.
Forum: Plugins
In reply to: [AMP] amp-iframe not allowing http on localhostThanks Weston, that makes sense. Appreciate the detailed explanation.
Forum: Plugins
In reply to: [AMP] amp-iframe not allowing http on localhostPlease review this issue on the AMP project’s github, unless I’m misunderstanding it sounds like it should be possible.
https://github.com/ampproject/amphtml/issues/3154
Admittedly this isn’t in the documentation – so not meaning to say y’all should have easily found this.
Thanks for the workaround. Hopefully this helps.
Forum: Plugins
In reply to: [WP Offload SES Lite] How to recreate tables?I figured it out.
For anyone else who has this problem, find a row in the
wp_options
database table with anoption_name
column value ofwposes_lite_version
and delete it.Then deactivate and reactivate the plugin. The tables will be recreated.
Forum: Plugins
In reply to: [AMP] Exclude native validation with conditions?This is great! Is it possible to skip amp for archive pages too?
Forum: Plugins
In reply to: [AMP] Binding expressions flagged as invalid markup@ryankienstra I just tested this. Yep, it works now. The page passes when re-validated and renders properly.
Forum: Plugins
In reply to: [AMP] Binding expressions flagged as invalid markupI’m not sure if this helps or not, but here’s the full hierarchy of content I have starting from amp-list:
<amp-list class="amp-2col-list" width="auto" height="530" layout="fixed-height" load-more="auto" src="<?php echo site_url('/wp-json/jesite/v1/hsd-episodes?page=1') ?>"> <div placeholder>Loading ...</div> <div fallback>Failed to load Healthy Software Developer Episodes.</div> <template type="amp-mustache"> <div class="list-item post"> <a href="{{url}}"> etc...
Forum: Plugins
In reply to: [AMP] Binding expressions flagged as invalid markupThanks you two!
This plugin is fantastic btw. I’m developing a custom theme locally to launch a new version of my site and so far it’s been a great experience.
Thanks again for the support.
Jayme
Forum: Plugins
In reply to: [AMP] Mega menu extended component not supported?Oops forgot to mark as resolved.
Forum: Plugins
In reply to: [AMP] Mega menu extended component not supported?Sweet! Thanks dude.
Got it working. ??
Forum: Plugins
In reply to: [AMP] rel being stripped from theme pagesThanks Weston! That definitely did the trick.
??
Forum: Plugins
In reply to: [AMP] rel being stripped from theme pagesAAAAH I found it!
It’s the “Glue for Yoast SEO & AMP plugin”!
I’ll have to start on their forums next.
Thanks again for looking into this!
Forum: Plugins
In reply to: [AMP] rel being stripped from theme pagesThanks for checking man. I’m guessing you kept standard mode on for twenty twenty?
This is so frustrating. I went one by one disabling plugins and I can add any other attribute to the link but rel and it keeps it.
Something’s gotta be taking it out!
Appreciate you looking into it, hrmmmmm…
Forum: Plugins
In reply to: [AMP] rel being stripped from theme pagesIt’s just a link in my footer within the theme:
<a href="https://youtube.com/JaymeEdwardsMedia" rel="external noopener" target="_blank" draggable="false" title="Healthy Software Developer on YouTube"><i class="fab fa-youtube"></i>YouTube</a>
When it’s rendered it looks like this:
<a href="https://youtube.com/JaymeEdwardsMedia" target="_blank" draggable="false" title="Healthy Software Developer on YouTube"><i class="fab fa-youtube"></i>YouTube</a>