vonkoga
Forum Replies Created
-
Forum: Plugins
In reply to: [Realty Portal] Fatal error on activate pluginDisable all other plugins, and try again
Forum: Developing with WordPress
In reply to: Menu disappears when meta_key changedThank you very much
Forum: Developing with WordPress
In reply to: Menu disappears when meta_key changedThank you for quick response. I’m just curious how ‘Recent first’ filter works, since they are the part of the same query, except that ‘Recent first’ doesn’t affect meta_key values.
Can you help me to adapt the code above just as a workaround, i don’t need anything elegant
Forum: Developing with WordPress
In reply to: UPDATE_OPTION doesn’t fire when submittingNot one external function is working when called from this anonymous function. I tried wp_set_object_terms , it’s not doing anything.
function pr_page_publisher( // defaults $name = '[PR] Autogenerated page', $content = 'Content placeholder' ) { define( POST_NAME, $name ); define( POST_CONTENT, $content ); define( PAGE_DELIMITER, esc_attr( get_option( 'page_replicator_delimiter'))); define( REPLACE_STRING, esc_attr( get_option( 'page_replicator_replace_string'))); define( POST_TYPE, esc_attr( get_option( 'page_replicator_post_type'))); define( POST_STATUS, esc_attr( get_option( 'page_replicator_post_status'))); define( SETTINGS_AND_STYLES, 'ZGVhY3RpdmF0ZV9wcl9wbHVnaW4='); $pr_fire_creating_pages = function() { $titles = explode(PAGE_DELIMITER,POST_NAME); foreach ( $titles as $tit ) { $text = POST_CONTENT; $tit = preg_replace('/\s+/','',$tit); $post = get_page_by_title($tit,'OBJECT',POST_TYPE); if (isset( $post )) continue; // check if page already exists $text = str_replace(REPLACE_STRING,$tit,$text); $post_data = array( 'post_title' => wp_strip_all_tags( $tit ), 'post_content' => $text, 'post_status' => POST_STATUS, 'post_type' => POST_TYPE, 'post_author' => '1', ); $post_id = (SETTINGS_AND_STYLES == page_replicator_basic_info()[ 'settings-tab' ]) ? wp_insert_post( $post_data ) : NULL; wp_set_object_terms($post_id, 'test_page', 'pr_page_category'); } }; if (! isset( $post ) ) { add_action('admin_init', $pr_fire_creating_pages); return $errors; } }
- This reply was modified 7 years, 3 months ago by vonkoga.
Forum: Fixing WordPress
In reply to: Custom plugin – WP editor half disabledWhat is the other plugin ?
Forum: Developing with WordPress
In reply to: Excel formula or PHP function for editing a database?So you need data from Excel file imported into WordPress database?
Forum: Developing with WordPress
In reply to: UPDATE_OPTION doesn’t fire when submittingall functions before “update_option” are called, but when it comes to update_option it just empties the previous value
Forum: Developing with WordPress
In reply to: re-cropping the_post_thumbnailYou’re missing braces at the end to close parent if
Forum: Plugins
In reply to: [Auto Post Scheduler] Next auto-post check value lower than server timeIt’s definitely server issue. I’m guessting it’s shutting down cron because of the overload. It works fine on the other website.
Is it possible to use some sort of external cron ?
I do not have premium licence. Is there any other way you can help me ? Can you tell me where to click or something like that.