mofo.is.guilty
Forum Replies Created
-
Thanks for the reply and the support. Waiting for the fix in the new release.
Forum: Plugins
In reply to: [Content Blocks (Custom Post Widget)] Custom block shortcode templateHi Johan,
I was browsing this board just to suggest you a very similar upgrade.
Your plugin actually allows template overriding, but only when the content block is added as a widget and not as a shortcode.
I’d suggest you to wrap the template handler you are using in function widget() to something like function cpw_template_handler() so you can call that in function custom_post_widget_shortcode() as well.
bb
mofo- This reply was modified 8 years, 2 months ago by mofo.is.guilty.
Forum: Plugins
In reply to: [ACF qTranslate] WYSIWYG Broken with latest qTranslate-x and ACF Pro@michalszota: you are right, the js part comment is not really necessary, but I pointed it out so someone could look deeper into solving this.
And yes, my fix was intended to work for WP 4.3 and later, as no one running previous versions should be experiencing the problem.
Thanks to you too for the js code.
Forum: Plugins
In reply to: [ACF qTranslate] WYSIWYG Broken with latest qTranslate-x and ACF ProSeems like it’s breaking on WP 4.3 and following.
ACF plugin has something like this in wysiwyg.php
// WP 4.3 if( version_compare($wp_version, '4.3', '>=' ) ) { add_filter( 'acf_the_editor_content', 'format_for_editor', 10, 2 ); $button = 'data-wp-editor-id="' . $id . '"'; // WP < 4.3 } else { $function = ($default_editor === 'html') ? 'wp_htmledit_pre' : 'wp_richedit_pre'; add_filter('acf_the_editor_content', $function, 10, 1); $button = 'onclick="switchEditors.switchto(this);"'; }So here’s a quick and partial fix.
In acf-qtranslate/src/acf_5/fields/wysiwyg.php (line 142)
replace
<?php if( user_can_richedit() && $show_tabs ): ?> <div class="wp-editor-tabs"> <button id="<?php echo $id; ?>-tmce" class="wp-switch-editor switch-tmce" onclick="switchEditors.switchto(this);" type="button"><?php echo __('Visual', 'acf'); ?></button> <button id="<?php echo $id; ?>-html" class="wp-switch-editor switch-html" onclick="switchEditors.switchto(this);" type="button"><?php echo _x( 'Text', 'Name for the Text editor tab (formerly HTML)', 'acf' ); ?></button> </div> <?php endif; ?>with
<?php if( user_can_richedit() && $show_tabs ): ?> <div class="wp-editor-tabs"> <button id="<?php echo $id; ?>-tmce" class="wp-switch-editor switch-tmce" data-wp-editor-id="<?php echo $id; ?>" type="button"><?php echo __('Visual', 'acf'); ?></button> <button id="<?php echo $id; ?>-html" class="wp-switch-editor switch-html" data-wp-editor-id="<?php echo $id; ?>" type="button"><?php echo _x( 'Text', 'Name for the Text editor tab (formerly HTML)', 'acf' ); ?></button> </div> <?php endif; ?>This will restore base functionality.
Then comment line 44 in acf-qtranslate/assets/common.js
// switchEditors.switchto(this);Which is a loop to switch all editor panels to the same mode in every language.
Forum: Networking WordPress
In reply to: Subdomain install without main domain controlSimilar thread:
https://ww.wp.xz.cn/support/topic/wp-multisite-without-access-to-domain-rootAnother one, with tricky (and partial) plugin solution:
https://ww.wp.xz.cn/support/topic/possibility-to-run-multisite-network-without-wordpress-running-the-main-domainForum: Plugins
In reply to: [qTranslate X] Only display one language on a single post/pagemy fix not working anymore since i updated qtranslate-x today…
Forum: Plugins
In reply to: [qTranslate X] Only display one language on a single post/pageI managed to solve it dumping and reloading translations domain this way:
global $q_config; $q_config['language'] = 'en'; //$q_config['url_info']['language'] = 'en'; //$q_config['url_info']['lang_url'] = 'en'; unload_textdomain('domainname'); load_theme_textdomain( 'domainname', get_template_directory() . '/languages/' );bb