krystianj
Forum Replies Created
-
Forum: Plugins
In reply to: [Polylang] Flag instead check iconI resolve my problem by remove all languages and add one extra column with current language:
Maybe can help someone:
function polylang_extra_columns_head($defaults) { $defaults['lang'] = 'Lang'; return $defaults; } function polylang_extra_columns_content($column_name, $post_ID) { if ($column_name == 'lang') { echo strtoupper( pll_get_post_language($post_ID) ); } } add_filter('manage_posts_columns', 'polylang_extra_columns_head'); add_action('manage_posts_custom_column', 'polylang_extra_columns_content', 10, 2);
Forum: Plugins
In reply to: [WP OAuth Server (OAuth Authentication)] Add expires to oauth/meRating added ??
Good work !
Forum: Plugins
In reply to: [WP OAuth Server (OAuth Authentication)] Add expires to oauth/meThank you,
Now I have exactly what I want ??// add user expires token time $infometa = $wpdb->get_results("SELECT expires FROM {$wpdb->prefix}oauth_access_tokens WHERE user_id = ".$user_id.""); foreach ($infometa as $metarow) { $me_data['expires'] = strtotime($metarow->expires); //$metarow->expires; }
- This reply was modified 7 years, 2 months ago by krystianj.
Forum: Plugins
In reply to: [Polylang] Displaying posts in all languagesHi,
For example:
<?php global $post; $args = array( 'lang' => array('en','de','pl','cz'), ); $myposts = get_posts( $args ); foreach ( $myposts as $post ) : setup_postdata( $post ); ?> <li> <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a> </li> <?php endforeach; wp_reset_postdata();?>
- This reply was modified 7 years, 5 months ago by krystianj.
Forum: Plugins
In reply to: [Polylang] Displaying posts in all languagesHi,
In query you must use:$args_menu = array ( ... 'lang' => array('en','de','pl','cz'), ... );
Forum: Plugins
In reply to: [HookPress] Custom post typeHi,
My resolve isfunction publish_post_hook( $post_id, $post, $update ) { $url = $GLOBALS['webhook_url'] . '/post'; if ( $post->post_status === 'publish') { // Only fire when published $response = wp_remote_post( $url, array( 'blocking' => true, 'body' => array( 'id' => $post_id, 'type' => $post->post_type, 'status' => $post->post_status, ) ) ); } } add_action( 'wp_insert_post', 'publish_post_hook', 10, 3 );
Forum: Plugins
In reply to: [WP OAuth Server (OAuth Authentication)] outh/me with array responseOK,
Thank you. Now it’s working.
In next few days I will buy plugin ??Best regards,
Forum: Plugins
In reply to: [WP OAuth Server (OAuth Authentication)] outh/me with array responseYes, I send access_token.
My URL: https://localhost/wordpress1?oauth=me&access_token=8gsceglemi102meq3wuyqwrwcunisrepx3cs043c but I don’t receive data in JSON like this:{ "ID":"1335", "user_login":"[email protected]", "user_nicename":"john", "user_email":"[email protected]", "user_registered":"2014-12-16 19:52:30", "user_status":"0", "display_name":"John Doe" }
only Array
Hi,
Thank you for response. I will wait for this functionality ??Forum: Plugins
In reply to: [Polylang] Biographical Info in only one languageMy solution if anybody will search something similar.
With javascript I change the textarea ID, because the other languages textareas is clone of textarea with id=descriptiondocument.getElementById('description').setAttribute('id', 'description_default');
Forum: Fixing WordPress
In reply to: "Another update is currently in progress."Delete from database table wp_options row with name ‘core_updater’ or ‘core_updater.lock’
Forum: Plugins
In reply to: [WP OAuth Server (OAuth Authentication)] refresh_token missing when renewOK,
I found the solutionadd_filter( 'wo_always_issue_new_refresh_token','__return_true' );
Forum: Plugins
In reply to: [HookPress] Custom post typeI write my own webhooks and now working
Forum: Plugins
In reply to: [Polylang] Large websiteHi,
Of course this plugin can be used with large project. I have similar project with 10 languages and everything working great. This plugin doesn’t add own tables. Everything is saved in default WordPress tables.Personally I recommend this plugin ??
Forum: Plugins
In reply to: [Polylang] update_user_meta to hide language columnI don’t know if this is best method but I resolve my problem by this code:
$languages_list = pll_languages_list(); foreach ($languages_list as &$value) { $value = 'language_'.$value; } unset($value); update_user_meta( $user_id, 'manageedit-postcolumnshidden', $languages_list );
- This reply was modified 7 years, 9 months ago by krystianj.