Garth Mortensen
Forum Replies Created
-
Forum: Plugins
In reply to: [codoforum-sso] What is “must use” SSO by garth mortensen?Hi, I’m Garth Mortensen.
I wrote this plugin years ago when I worked at Bluehost. Since I haven’t worked there for years, I don’t know if the plugin code has changed or not, but when I wrote it, it’s sole purpose was to allow someone to login to their WordPress site from the Bluehost control panel. That’s it. It had nothing to do with updating sites.
I don’t know what the current process is, but last I knew it was completely safe to remove the plugin. However it would be reinstalled if you ever used the WordPress section of the Bluehost control panel.
Like I said, I have no clue how things currently work.
Forum: Fixing WordPress
In reply to: wp-cli post create & media import issuesAlright, here’s a much shorter (and better) solution:
wp post create --post_title='TITLE' --post_content="[gallery ids='$(wp media import ./FILENAME --porcelain)']" --post_status=publish
Forum: Fixing WordPress
In reply to: wp-cli post create & media import issuesSomething like this should do it all at once:
POST_ID=$(wp post create --post_title='TITLE' --post_status=publish --porcelain); ATTACHMENT_ID=$(wp media import ./FILENAME --post_id=$POST_ID --porcelain); wp post update $POST_ID --post_content='[gallery ids="$ATTACHMENT_ID"]'
I think I can make it a bit shorter too. I’ll work on it for a bit and post back when I find something.
UPDATE: Use this instead. I had the quotes messed up, so the bash variable wasn’t being substituted.
POST_ID=$(wp post create --post_title='TITLE' --post_status=publish --porcelain); ATTACHMENT_ID=$(wp media import ./FILENAME --post_id=$POST_ID --porcelain); wp post update $POST_ID --post_content="[gallery ids='${ATTACHMENT_ID}']"; echo $POST_ID && echo $ATTACHMENT_ID
- This reply was modified 7 years, 2 months ago by Garth Mortensen.
- This reply was modified 7 years, 2 months ago by Garth Mortensen.
Forum: Fixing WordPress
In reply to: Locked out of my siteHey bdk437, if you login to your Bluehost account and go here: https://my.bluehost.com/cgi/app#/sites
You’ll see a list of your WordPress sites. If you select the site you need to login to and go to the “Users” section you should be able to click the “Log in” button next the username. Alternatively, you can click the 3 dot menu and select “Reset Password” which will automatically login you in and take you to the password reset page inside wp-admin.
Forum: Plugins
In reply to: [Responsive Menu - Create Mobile-Friendly Menu] unexpected T_FUNCTIONOf course it does! PHP 5.3 is when closure support was added, hence there’s no syntax error and your code works fine. We don’t disagree on PHP 5.2, but for some its still a requirement. If you want to *properly* handle this case, you will update your code. If you don’t, then you’re acknowledging you don’t care about the user experience for those forced into using 5.2.
Forum: Plugins
In reply to: [Responsive Menu - Create Mobile-Friendly Menu] unexpected T_FUNCTIONI’m not passing the buck, and here’s why.
if(version_compare(PHP_VERSION, '5.4', '<')) return; ... /* Internationalise the plugin */ add_action('plugins_loaded', function() { load_plugin_textdomain('responsive-menu', false, basename(dirname(__FILE__)) . '/translations/'); });
Obviously you’re checking the PHP constant here. But PHP syntax errors (which this is) happen before any code is executed. The way for you to fix this error is to put all code that isn’t < 5.4 compatible into another file and do something like this.
if(!version_compare(PHP_VERSION, '5.4', '>')) { return; } else { # load code that would otherwise fatal include_once 'otherfile.php'; }
The one thing that does seem like it *MIGHT* be a Bluehost problem is that the PHP version seemed to not be switching when Joseph was changing it. But that issue seems to have been resolved by Bluehost tech support.
Forum: Plugins
In reply to: [Responsive Menu - Create Mobile-Friendly Menu] unexpected T_FUNCTIONThere is only one “version” of PHP 5.4 on Bluehost servers. The difference is fcgi, single php.ini, or regular. There is obviously something strange going on here for a few reasons.
1) If the Bluehost cpanel says you are on a version of PHP, the only way that can be changed is if you have custom handlers in your .htaccess or changing it in the cpanel interface. If there is a bug in our interface please report it and I will personally investigate it. Please check your .htaccess file and make sure that aren’t any custom PHP handlers overriding Bluehost’s configuration.
2) This plugin supposedly checks the PHP version and deactivates itself if its using less than PHP 5.4. Either the plugin author doesn’t know what they’re doing or there’s just an accidental error in their code. I like to give the benefit of the doubt and assume its an accidental bug.
Either way, please report your findings.
@mylovepets90, if you could repost the code through pastebin, I’d be happy to take a look.
Forum: Fixing WordPress
In reply to: New account for second website?I think you are confused between what is Bluehost and what is WordPress.com.
You can only purchase domains for sites hosted on WordPress.com at this time.–
This is not a message that, to my knowledge, exists on Bluehost.
It is completely possible to have multiple WordPress sites on a Bluehost account (I do it myself). If you already have a second domain, you can assign it to a Bluehost account following these steps: https://my.bluehost.com/cgi/help/84
Then you install WordPress to the second site and you’re good to go (or transfer existing content or whatever you need to do).
Forum: Fixing WordPress
In reply to: Run server side php scriptReplace
var getting = $.post("https://www.gaylordapartments.net/public_html/WebApp/script.php", {
with
var getting = $.post("https://www.gaylordapartments.net/WebApp/script.php", {
Hey vsj101, can you try something for me? Go into you Bluehost control panel and go to the PHP versions section. Sometimes php.ini can get a little wonky, etc, etc. It looks like PHP is having some trouble loading modules (hence all the “Unable to initialize…” errors). Switch down to PHP 5.4 and click save. Then switch back to PHP 5.6. This can reset some of the settings in your php.ini file and fix some issues (don’t worry, out version switcher automatically takes a back up in case you need to revert).
Let me know if this helps at all.
Forum: Fixing WordPress
In reply to: Guidance on sending numerical data to databaseWell, if you’re willing to learn then that’s the way to go. I recommend starting with writing a plugin that will accept the values you need to store. Then you can use the update_user_meta function to store the data and the get_user_meta function to retrieve it. There are plenty of tutorials on writing WordPress plugins just a google search away. Good luck ??
Forum: Themes and Templates
In reply to: [Hemingway] Problem with prepopulated share message on FBIf you shared a link a Facebook previous to the site going live and the Coming Soon page still being active, it could also be that Facebook is caching the results from a previous share. I’ve never used this, but Facebook provides a Debug tool. Maybe it can give you some more information: https://developers.facebook.com/tools/debug
Forum: Plugins
In reply to: [Contact Form DB] Crash on trying to set optionsnshutterbug, I recommend trying to switch to PHP 5.6 first. Worst case, your site still doesn’t work. If PHP 5.6 doesn’t work, then I would try PHP 5.4.
Forum: Networking WordPress
In reply to: Redirect one post on MU subdomainTry this, it may not work exactly, I just kind of threw it together.
RewriteCond %{HTTP_HOST} ^news.mydomain.com$ AND
RewriteCond %{REQUEST_URI} ^/my-page
RewriteRule ^(.*)$ https://culture.mydomain.com/my-page [R=301]