zagreus
Forum Replies Created
-
Great that did it. Thanks for the quick response.
Hi there, I’m not sure it is. I downloaded the new version of the plugin (1.1) and still get the error “invalid backend configuration”.
Thank you. This doesn’t seem to work on the frontend though. I’d like to use
[file_manager_advanced login=”no” roles=”all” path=”/app/” operations=”info” view=”grid” theme=”light” lang =”en”]
and we have a customer running wordpress on widows where we’d like to use a mapped network drive e.g.
[file_manager_advanced login=”no” roles=”all” path=”M:\Videos” operations=”info” view=”grid” theme=”light” lang =”en”]
Forum: Developing with WordPress
In reply to: Creating Webservice of sortsDepending on your use case OAuth can be quite fiddly. You might also want to look at using Json Web Tokens which can be better if you don’t need the full approval / authentication provided by OAuth.
https://www.ads-software.com/plugins/jwt-authentication-for-wp-rest-api/
There’s no way to stop the user from seeing your javascript, however you may like to look at using a NONCE to help to protect from people using your AJAX maliciously.
https://codex.www.ads-software.com/WordPress_Nonces#Verifying_a_nonce_passed_in_an_AJAX_request
Forum: Fixing WordPress
In reply to: loopingI guess you would want to do it with Javascript if you don’t want a page reload to happen to populate the boxes.
You would need to enqueue your javascript with this function:
wp_enqueue_scripts
You can get examples here: https://codex.www.ads-software.com/Plugin_API/Action_Reference/wp_enqueue_scriptsForum: Developing with WordPress
In reply to: User_Query problemeta I replaced the WP_User_Query with get_users and it worked. However, I would love to know what the issue is with the Query object above if anyone knows ..
Forum: Developing with WordPress
In reply to: Timezones in WordPress and MySqlLet me give it a try. Thank you.
Forum: Fixing WordPress
In reply to: Paypal vs Stripe for wordpress?Well, it depends on a few things that you’ve not mentioned in your question.
Are you using WooCommerce? If so, both PayPal and Stripe are pretty easy to set up. Personally I prefer stripe because their onboarding process is pretty easy, whereas I found PayPal to be a royal pain in the a**.
If you’re doing eCommerce you are going to need an SSL whatever you choose really, otherwise you are likely to lose customers because of lack of security.
Depending on your host, you may be able to get a free SSL with Let’s Encrypt.
Forum: Developing with WordPress
In reply to: Trouble with Customizer VariableFor people following this, I found the problem. It’s because I marked the setting as type=>option. I was able to access the value when I removed this and it could default to theme_mod.
Have you tried to echo your SQL statement because when I did it $mydb->postmeta returns nothing so you will have a malformed sql statement.
You don’t need the global statement because you’re not bringing $newdb in from elsewhere.
Note that I’m using Kint to export the values. Much nicer than echo / print_r.
$newdb = new wpdb('wp881', 'wp881', 'wp881-3', 'localhost'); !d($newdb->postmeta); $sql = "SELECT meta_value FROM $newdb->postmeta WHERE meta_key = '_locations' AND post_id = 131"; !d($sql); $result = $newdb->get_var($sql); !d($result);
Returns:
- $newdb->postmeta null
- $sql string (71) “SELECT meta_value FROM WHERE meta_key = ‘_locations’ AND post_id = 131”
- $result null
Forum: Plugins
In reply to: [Custom Post Type UI] Capabilities issues for non-admin usersHi Michael,
Quick question on this, I’ve tried to implement this and for sure modifying the create_posts option works. If i change that then the role no longer can create new items, however the items are not editable at all.
I just have the View option on this list page even though I have all of the other capabilities added.
Here’s what I have called by the cptui filter:
function cptui_arg_filter($args, $post_type) { if (in_array($post_type, array('service', 'staff', 'location'))) { $args['capabilities'] = array( 'edit_post' => 'edit_content', 'read_post' => 'read_content', 'delete_post' => 'delete_content', 'edit_posts' => 'edit_contents', 'edit_others_posts' => 'edit_others_contents', 'publish_posts' => 'publish_contents', 'read_private_posts' => 'read_private_contents', 'create_posts' => 'create_contents', ); } return $args; }
And here’s where I am testing the capabilities of the role:
$role = get_role('editor'); $role->add_cap('edit_content'); $role->add_cap('read_content'); $role->add_cap('delete_content'); $role->add_cap('edit_contents'); $role->add_cap('edit_others_contents'); $role->add_cap('publish_contents'); $role->add_cap('read_private_contents'); $role->remove_cap('create_contents');
- This reply was modified 7 years, 12 months ago by zagreus. Reason: added code examples
Forum: Hacks
In reply to: Retrieve users and roles gives errorMakes sense, thank you all for your comments.
Forum: Networking WordPress
In reply to: Manage Number of Users (based on role)Hi Tim,
Could you elaborate on what you mean with this a little more? Sounds like I’m overlooking something.
That said, a role isn’t as fixed as it seems in the admin interface
Forum: Hacks
In reply to: Custom Post Type TemplatesThanks bcworkz. I appreciate your response.