Ken

USA

designerken.com

Age: 42

Trying to learn PHP and WP

Sep
5
comment Create an array inside a class with php
Yup that is similar to what I am using. I have the code to get the array. Its in my original post. I just dont know how to use it in a class and then populate the $this->settings[options]
Sep
5
revised Create an array inside a class with php
deleted 112 characters in body
Sep
4
revised Create an array inside a class with php
Added the loop to create the array outside of the class.
Sep
4
comment Create an array inside a class with php
I can get the array I want now. but not in the admin area. I have added it to my original post.
Sep
4
comment Create an array inside a class with php
Not yet. So far I am getting errors with the taxonomy.WP_Error Object ( [errors] => Array ( [invalid_taxonomy] => Array ( [0] => Invalid taxonomy ) ) [error_data] => Array ( ) ) is not finding get_terms('product_cat') which is what it is supposed to find.
Sep
4
comment Create an array inside a class with php
I'm still not following this. I updated my pastebin link above to included more code. to see if that helps.
Sep
4
comment Create an array inside a class with php
Thanks @THT14 but I dont think that is what I am trying to get at. I am trying to populate 'options' key with a value that is an array. I can manually add the key=>value in the array but want to dynamically populate it with the taxonomy of product categories set in woocommerce. I that I can assign it as 'options' => $my_string, But then how do I get the $my_string value populated with the array of product categories?
Aug
29
awarded Editor
Aug
29
revised Create an array inside a class with php
added 94 characters in body
Aug
29
comment Create an array inside a class with php
Sorry gang, I might be in over my head on this one. I'll try to explain a bit more. If you see the above comments in the code the "my-category-slug" and its value of "My Category Name" are taxonomies inserted in woocommerce in another area of the plug-in. I am trying to bring them in here.I can hard-code the array but that is not the best way if the categories change later. Normally I can just create a loop (like at the end of my post) to get the ID's and create the object. but I dont know how I would do that inside of this situation.
Aug
29
asked Create an array inside a class with php
May
21
comment How to show all folders from Wordpress.org SVN plugin repo?
Thanks for the info @VonC. Since it was a new plugin the repo was already set up with the assets/ folder. I also used a SVN client originally to add all my files, but I am looking for GIT client to do both hence Tower. You will note my set up above for the directory set up in Tower. It adds the correct code to the git/config that reads fetch = reftagger-shortcode/trunk:refs/remotes/trunk branches = reftagger-shortcode/branches/*:refs/remotes/* branches = reftagger-shortcode/assets/*:refs/remotes/* tags = reftagger-shortcode/tags/*:refs/remotes/tags/
May
21
awarded Student
May
21
asked How to show all folders from Wordpress.org SVN plugin repo?
May
16
revised How to get my [shortcode] rendered on the home page, other pages are fine
added 128 characters in body
May
16
answered How to get my [shortcode] rendered on the home page, other pages are fine
May
16
asked How to get my [shortcode] rendered on the home page, other pages are fine
Mar
30
awarded Popular Question
Jan
17
comment Date in the URL with The Events Calendar
It's a long shot but you could ask it in the WP support page: wordpress.org/support/plugin/the-events-calendar The other option is to just make the URL unique. That is why the -2,-3, etc. is added it has to be a unique URL for WP. The title of the page can be the same just make the slug have the month-day-year when you create the event. I ran across this with our church website using the events calendar. There are repeated events every month. I just don't feel it's that big of a deal the URL has the number added.
Jan
16
revised Date in the URL with The Events Calendar
added 375 characters in body
1 2 3