Title: inBytes's Replies | WordPress.org

---

# inBytes

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

 *   [Profile](https://wordpress.org/support/users/inbytesinc/)
 *   [Topics Started](https://wordpress.org/support/users/inbytesinc/topics/)
 *   [Replies Created](https://wordpress.org/support/users/inbytesinc/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/inbytesinc/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/inbytesinc/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/inbytesinc/engagements/)
 *   [Favorites](https://wordpress.org/support/users/inbytesinc/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: [[Broadcast] "Find unlinked children" not working 100%](https://wordpress.org/support/topic/find-unlinked-children-not-working-100/)
 *  Thread Starter [inBytes](https://wordpress.org/support/users/inbytesinc/)
 * (@inbytesinc)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/find-unlinked-children-not-working-100/#post-7125541)
 * Well, actually, the purpose of this post was only to leave a trace to help others
   with the same problem.
 * So you can mark this topic as resolved, if you think you are not going into the
   WPML “magic”.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Broadcast] "Find unlinked children" not working 100%](https://wordpress.org/support/topic/find-unlinked-children-not-working-100/)
 *  Thread Starter [inBytes](https://wordpress.org/support/users/inbytesinc/)
 * (@inbytesinc)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/find-unlinked-children-not-working-100/#post-7125540)
 * I have a lot of experience in WPML, but mostly as a fireman, xD (I agree with
   you).
 * WPML use to be a headache, when you go further than 1,2,3.
 * I think that you could check if plugin is enabled with something like this:
 * `if ( ! class_exists( 'SitePress', false ) ) {`
 * And then, ask for posts [like this](https://wpml.org/forums/topic/query-posts-of-a-specific-language/):
 *     ```
       global $sitepress;
   
       // Changes to the default language
       $sitepress->switch_lang( $sitepress->get_default_language() );
   
       $args = array(
             'cache_results' => false,
             'name' => $post->post_name,
             'numberposts' => 2,
             'post_type'=> $post->post_type,
             'suppress_filters' => false
       );
   
       $wp_query = new WP_Query( $args );
   
       // Changes to the current language
       $sitepress->switch_lang( ICL_LANGUAGE_CODE );
       ```
   
 * Obviously, you should ask before for the post language, instead of the “default
   language” in the example, and maybe check if this language exists in the destination
   blog.
 * Well, just in case you want to elevate your plugin to the “WPML dark alchemy”
   level, xDDD.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Confirm Publishing Actions] [Plugin: Confirm Publishing Actions] Confirm button only shown when deleting a post](https://wordpress.org/support/topic/plugin-confirm-publishing-actions-confirm-button-only-shown-when-deleting-a-post/)
 *  Plugin Contributor [inBytes](https://wordpress.org/support/users/inbytesinc/)
 * (@inbytesinc)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/plugin-confirm-publishing-actions-confirm-button-only-shown-when-deleting-a-post/page/2/#post-2867304)
 * No hurry. I’ve sent you the files.
 * Thank you.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Confirm Publishing Actions] [Plugin: Confirm Publishing Actions] Confirm button only shown when deleting a post](https://wordpress.org/support/topic/plugin-confirm-publishing-actions-confirm-button-only-shown-when-deleting-a-post/)
 *  Plugin Contributor [inBytes](https://wordpress.org/support/users/inbytesinc/)
 * (@inbytesinc)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/plugin-confirm-publishing-actions-confirm-button-only-shown-when-deleting-a-post/#post-2867302)
 * If you don’t mind, it would be nice to be a contributor.
 * And if you want to include it, I could send you the spanish localization mo/po.
 * Thanks for your rapid response.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Confirm Publishing Actions] [Plugin: Confirm Publishing Actions] Confirm button only shown when deleting a post](https://wordpress.org/support/topic/plugin-confirm-publishing-actions-confirm-button-only-shown-when-deleting-a-post/)
 *  Plugin Contributor [inBytes](https://wordpress.org/support/users/inbytesinc/)
 * (@inbytesinc)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/plugin-confirm-publishing-actions-confirm-button-only-shown-when-deleting-a-post/#post-2867299)
 * That’s nice, donutz!
 * I’m still have a reasonable doubt that my JS code still doesn’t work for every
   language.
 * I mean: if the ‘submit’, ‘publish’ and ‘update’ strings return any kind of UTF8
   codes (for JavaScript), maybe when you do the comparisons, the expressions never
   fits.
 * For example:
    English: “Submit for Review” Spanish: “Enviar para revisión” Sended
   with wp_localize_script: “Enviar para revisi\u00f3n” (UTF8) Needed (I guess):“
   Enviar para revisión”
 * I hope being able to explain myself.
 * Greetings.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Confirm Publishing Actions] [Plugin: Confirm Publishing Actions] Confirm button only shown when deleting a post](https://wordpress.org/support/topic/plugin-confirm-publishing-actions-confirm-button-only-shown-when-deleting-a-post/)
 *  Plugin Contributor [inBytes](https://wordpress.org/support/users/inbytesinc/)
 * (@inbytesinc)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/plugin-confirm-publishing-actions-confirm-button-only-shown-when-deleting-a-post/#post-2867297)
 * Furthermore, you reduce the check in your “cpa.js” file to the english expressions
   of the buttons. But do you think that the value of “Publish” button will be the
   same in, for example, spanish language?
 * So, you have to alter “cpa.php” like this:
 *     ```
       $cpa_l10n_data = array(
       	'confirm_delete' => $d,
       	'confirm_submit' => $s,
       	'confirm_publish' => $p,
       	'confirm_update' => $u,
       	'submit' => __('Submit for Review'),
       	'publish' => __('Publish'),
       	'update' => __('Update')
       );
       ```
   
 * And your “cpa.js” like this:
 *     ```
       $j("input#publish").click(function () { // FIX entire function (inBytes)
               var a = $j(this).val();
               var bConfirmation = true;
               if (a == cpa_l10n_obj.submit) {
                   bConfirmation = confirm(cpa_l10n_obj.confirm_submit)
               }
               if (a == cpa_l10n_obj.publish) {
                   bConfirmation = confirm(cpa_l10n_obj.confirm_publish)
               }
               if (a == cpa_l10n_obj.update) {
                   bConfirmation = confirm(cpa_l10n_obj.confirm_update)
               }
               if(!bConfirmation){
                   $j("#submitpost .spinner").hide();
                   $j("input#publish").removeClass("button-primary-disabled");
               }
   
               return bConfirmation;
           });
       ```
   
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Confirm Publishing Actions] [Plugin: Confirm Publishing Actions] Confirm button only shown when deleting a post](https://wordpress.org/support/topic/plugin-confirm-publishing-actions-confirm-button-only-shown-when-deleting-a-post/)
 *  Plugin Contributor [inBytes](https://wordpress.org/support/users/inbytesinc/)
 * (@inbytesinc)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/plugin-confirm-publishing-actions-confirm-button-only-shown-when-deleting-a-post/#post-2867296)
 * Hello donutz.
 * Your plugin is not working at all, because of l10n.
 * If you want that l10n works, you must do this on “cpa.php” (search for “// FIX(
   inBytes)” text):
 *     ```
       function __construct()
       {
       	$this->plugin_dir_url = trailingslashit( plugins_url( dirname( plugin_basename( __FILE__ ) ) ) );
       	new CPA_Confirm_Publishing_Actions_Options;
   
       	if ( is_admin() )
       	{
       		add_action( 'admin_enqueue_scripts', array( &$this, 'cpa_admin_scripts_enqueue' ) );
       	}
       	add_action('init', array( &$this, 'init' ));  // FIX (inBytes)
       }
       function init()
       {
       	//load_plugin_textdomain( 'pjh-cpa', false, $this->plugin_dir_url . '/inc/lang/' );
       	load_plugin_textdomain( 'pjh-cpa', false, dirname(plugin_basename(__FILE__)) . '/inc/lang/' ); // FIX (inBytes)
       }
       ```
   

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