Title: r1bryan's Replies | WordPress.org

---

# r1bryan

  [  ](https://wordpress.org/support/users/r1bryan/)

 *   [Profile](https://wordpress.org/support/users/r1bryan/)
 *   [Topics Started](https://wordpress.org/support/users/r1bryan/topics/)
 *   [Replies Created](https://wordpress.org/support/users/r1bryan/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/r1bryan/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/r1bryan/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/r1bryan/engagements/)
 *   [Favorites](https://wordpress.org/support/users/r1bryan/favorites/)

 Search replies:

## Forum Replies Created

Viewing 7 replies - 1 through 7 (of 7 total)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[User Profile Builder - Beautiful User Registration Forms, User Profiles & User Role Editor] recover-password shortcode does not work](https://wordpress.org/support/topic/recover-password-shortcode-does-not-work/)
 *  Thread Starter [r1bryan](https://wordpress.org/support/users/r1bryan/)
 * (@r1bryan)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/recover-password-shortcode-does-not-work/#post-17493927)
 * Just figured it out yesterday. Your answer is correct. Funny my other site worked
   properly without filling in the field.
 *  Thanks.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Code Snippets] How to turn on/off a snippet from a page](https://wordpress.org/support/topic/how-to-turn-on-off-a-snippet-from-a-page/)
 *  Thread Starter [r1bryan](https://wordpress.org/support/users/r1bryan/)
 * (@r1bryan)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/how-to-turn-on-off-a-snippet-from-a-page/#post-12784557)
 * The plugin is called “code snippets” and when I click on it in the plugin admin
   page there appears checkboxes for running a particular set of code snippets. 
   The code snippet I would like to mark as “on” or “off” from a different location
   than the admin page is shown below:
 * /* Automatically set the image Title, Alt-Text, Caption & Description upon upload
   ———————————————————————–*/
 * add_action( ‘add_attachment’, ‘my_set_image_meta_upon_image_upload’ );
 * function my_set_image_meta_upon_image_upload( $post_ID ) {
    // Check if uploaded
   file is an image, else do nothing if ( wp_attachment_is_image( $post_ID ) ) {//
   $my_image_title = get_post( $post_ID )->post_title; //$filename = basename( get_attached_file(
   $doc_id ) ); $my_image_title = basename( get_attached_file($post_ID ) ); // Sanitize
   the title: remove hyphens, underscores & extra // spaces: $my_image_title = preg_replace(‘%\
   s*[-_\s]+\s*%’, ‘ ‘, $my_image_title ); $my_image_title = preg_replace( ‘/\.jpg
   $/’, ”, $my_image_title ); // Sanitize the title: capitalize first letter of 
   every word // (other letters lower case): $my_image_title = ucwords( strtolower(
   $my_image_title ) ); // //remove begining – category $x = strpos($my_image_title,”
   By “); $x = $x + 3; $my_image_title = substr($my_image_title,$x); //remove date
   at end $my_image_title = substr($my_image_title,0,-9); //save title $x = strpos(
   $my_image_title,” For “); $x = $x + 5; $title = substr($my_image_title,$x); //
   save name $x = strpos($my_image_title,” For “); $name = substr($my_image_title,
   0,$x); // title + name $my_image_title = $title . ” – ” . $name; // // Create
   an array with the image meta (Title, Caption, // Description) to be updated //
   Note: comment out the Excerpt/Caption or Content/Description // lines if not 
   needed $my_image_meta = array( // Specify the image (ID) to be updated ‘ID’ =
   > $post_ID, // Set image Title to sanitized title ‘post_title’ => $my_image_title,//
   remove classification text from title // Set image Caption (Excerpt) to sanitized
   title ‘post_excerpt’ => $my_image_title, // Set image Description (Content) to
   sanitized title ‘post_content’ => $my_image_title, );
 * // Set the image Alt-Text
    update_post_meta( $post_ID, ‘_wp_attachment_image_alt’,
   $my_image_title ); // Set the image meta (e.g. Title, Excerpt, Content) wp_update_post(
   $my_image_meta ); } }
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Media Sync] Possible different import directory?](https://wordpress.org/support/topic/possible-different-import-directory/)
 *  Thread Starter [r1bryan](https://wordpress.org/support/users/r1bryan/)
 * (@r1bryan)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/possible-different-import-directory/#post-12661887)
 * Yes, works perfectly. Thanks erolsk8 for the update – Just what I needed!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Media Sync] Possible different import directory?](https://wordpress.org/support/topic/possible-different-import-directory/)
 *  Thread Starter [r1bryan](https://wordpress.org/support/users/r1bryan/)
 * (@r1bryan)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/possible-different-import-directory/#post-12625952)
 * Your code:
    /wp-admin/upload.php?page=media-sync-page&scan_files=1&sub_dir=contestimages
   worked for operating from contest images sub folder without affecting other parts
   of wordpress. Thanks! rb
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Media Sync] Possible different import directory?](https://wordpress.org/support/topic/possible-different-import-directory/)
 *  Thread Starter [r1bryan](https://wordpress.org/support/users/r1bryan/)
 * (@r1bryan)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/possible-different-import-directory/#post-12624825)
 * Tried adding the code to wp-content and did the trick however it messes with 
   my website images so not workable. Would be nice to quickly browse to a directory
   like “Add to Server” plugin does, but not a deal breaker. Media Sync is almost
   perfect for my needs, thanks for the plugin [@erolsk8](https://wordpress.org/support/users/erolsk8/).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Media Sync] Spins endlessly](https://wordpress.org/support/topic/spins-endlessly/)
 *  [r1bryan](https://wordpress.org/support/users/r1bryan/)
 * (@r1bryan)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/spins-endlessly/#post-12624775)
 * Found that for me when Object Cache is enabled in the W3 Total Cache Plugin, 
   that causes the endless spin of import selected. I dont know anything about Object
   Cache but from the description it appears not to be very important. Disabled 
   Object Cache and now Import is working. YES!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Media Sync] Spins endlessly](https://wordpress.org/support/topic/spins-endlessly/)
 *  [r1bryan](https://wordpress.org/support/users/r1bryan/)
 * (@r1bryan)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/spins-endlessly/#post-12619432)
 * Import selected spins endlessly. Tried disabling all my plugins that didn’t help.
   Changed my wp-config file to add set_time_limit(300), that didn’t help. Changed
   my php.ini file to max_execution_time 300. That didn’t help. Anything else I 
   can try?
    Just what I need if I can get it to work. Thanks Randy.

Viewing 7 replies - 1 through 7 (of 7 total)