brveljkovic
Forum Replies Created
-
plugin update seems to have solved the issue.
Forum: Plugins
In reply to: [WooCommerce] Make Product available to a Single User onlyThat’s not quite what I had in mind. More after listing of all users from database, like categories, where I can assign a product to a user.
Forum: Plugins
In reply to: [Image Gallery - Grid Gallery] Strange Overlay Gallery when using FF or IEonce I updated plugin files, all worked well.
Thank you guys for quick support!Forum: Developing with WordPress
In reply to: Sortable fields in plugin settings pagealso, I forget to mention, the output has to reflect whats in the settings. So if I call shortcode with id=”1″ it has to output the ocntent of the first field in the plugin settings. So after reordering it has to output whatever new is on the position “1”. Thats why I need to save the order after reordering
Forum: Developing with WordPress
In reply to: Sortable fields in plugin settings pagedo we have an example?
here is my code<?php add_action( 'admin_menu', 'cmby_add_admin_menu' ); add_action( 'admin_init', 'cmby_settings_init' ); $settingfields = array('NA','HTML Banner','GIF Banner','Booking Form','Udemy Course', 'Test Missile'); function cmby_add_admin_menu( ) { add_options_page( 'Cambrickyard Settings', 'Cambrickyard', 'manage_options', 'cambrickyard', 'cmby_options_page' ); }; function cmby_settings_init( ) { global $settingfields; register_setting( 'pluginPage', 'cmby_settings' ); add_settings_section( "cmby_pluginPage_section", __( "Cambrick Yard Plugin Settings Page", "wordpress" ), "cmby_settings_section_callback", 'pluginPage' ); foreach ($settingfields as $id => $item) { $i=0; add_settings_field( 'cmby_textarea_field_'.$id, __( "Enter widget code", "wordpress" ), 'cmby_textarea_render_field', "pluginPage", "cmby_pluginPage_section", array ( 'indicator' => $id, 'class' => 'ui-state-default' ) ); $i++; } } function cmby_textarea_render_field($args) { $options = get_option( 'cmby_settings' ); echo '<textarea cols="60" rows="5" name="cmby_settings[cmby_textarea_field_'.$args['indicator'].']">'; echo $options['cmby_textarea_field_'.$args['indicator']]; echo '</textarea>'; }; function cmby_settings_section_callback( ) { echo __( 'Use fields below to enter the code to be displayed when shortcode called out', 'wordpress' ); } function cmby_options_page( ) { ?> <div id="sortable"> <form action='options.php' method='post'> <?php settings_fields( 'pluginPage' ); do_settings_sections( 'pluginPage' ); submit_button(); ?> </form> </div> <?php } ?>
- This reply was modified 7 years, 6 months ago by bcworkz. Reason: code fixed
thanks anyway!
this turned out to be fairll simple at the end. Just added indicator
<?php
$options = get_option( ‘cmby_settings’ );
// Output Shortcode
function cmby_list_widgets($atts, $content = null){
static $i=0;
$atts = shortcode_atts(array(
‘title’ => ‘Cambrick Yard Widgets’,
‘special’ => $ran
), $atts);
global $options;
$output = ‘<div class=”widgetcontainer”>’;
$output .= ‘<div class=”widgetblock”>’;
$output .= $options[“cmby_textarea_field_$i”].'<br/></div>’;
$i++;
return $output;}
add_shortcode(‘cambrickyardwidgets’, ‘cmby_list_widgets’);
Forum: Developing with WordPress
In reply to: Plugins Settings Page – Add dynamicallythis worked for me, though I still didnt brush up my code
<?php add_action( 'admin_menu', 'cmby_add_admin_menu' ); add_action( 'admin_init', 'cmby_settings_init' ); $settingfields = array('NA','HTML Banner','GIF Banner','Booking Form','Udemy Course', 'Test Missile'); function cmby_add_admin_menu( ) { add_options_page( 'Cambrickyard Settings', 'Cambrickyard', 'manage_options', 'cambrickyard', 'cmby_options_page' ); }; function cmby_settings_init( ) { global $settingfields; register_setting( 'pluginPage', 'cmby_settings' ); add_settings_section( "cmby_pluginPage_section", __( "Cambrick Yard Plugin Settings Page", "wordpress" ), "cmby_settings_section_callback", 'pluginPage' ); foreach ($settingfields as $id => $item) { $i=0; add_settings_field( 'cmby_textarea_field_'.$id, __( "Enter widget code", "wordpress" ), 'cmby_textarea_render_field', "pluginPage", "cmby_pluginPage_section", array ( 'indicator' => $id ) ); $i++; } } function cmby_textarea_render_field($args) { $options = get_option( 'cmby_settings' ); echo $args['indicator']; echo '<textarea cols="60" rows="5" name="cmby_settings[cmby_textarea_field_'.$args['indicator'].']">'; echo $options['cmby_textarea_field_'.$args['indicator']]; //echo "test"; echo '</textarea>'; }; function cmby_settings_section_callback( ) { echo __( 'Use fields below to enter the code to be displayed when shortcode called out', 'wordpress' ); } function cmby_options_page( ) { ?> <form action='options.php' method='post'> <?php settings_fields( 'pluginPage' ); do_settings_sections( 'pluginPage' ); submit_button(); ?> </form> <?php } ?>
[Moderator note: code fixed. Please wrap code in the backtick character or use the code button.]
Forum: Developing with WordPress
In reply to: Plugins Settings Page – Add dynamicallythanks for reply. I have tried with some custom code, but not very happy with that, specially have problems to call calbackfunction in foreach loop. I would like to do everything according to best code practice. Do we have some examples where I could check on the code.
Basically what I am after is this:
I define a number of textareas in the top of settings.php file and then automatically add that many textareas
thanks againForum: Developing with WordPress
In reply to: Customizer API – allow HTML in textareaok, it was stripping html on echo. Its ok now.
Forum: Hacks
In reply to: Custom Pagination, using global variable value inside a functionthanks for reply. At the end I solved it by not using the function, just outputted the code itself directly.
Forum: Hacks
In reply to: Custom Menu Widget Hackfinally done it. Was some custom js digged up deep into theme files. That was controlling the menu functionality.
thanks for your help @bcworkzForum: Hacks
In reply to: Custom Menu Widget Hackthanks for reply.
I tried with jQuery already. Didnt work as expected. I checked widgets code in wp-includes/widgets/class-wp-nav-menu-widget.php but found nothing interesting. I will go through themes files to see if I can find something interesting.unbelivable, there is a option in woocommerce germanized which run a function, a cron job to delete unactivated user accounts after 7 days.
and that was the issueKey Value
id 40
logger SimpleUserLogger
level notice
date 2015-10-28 01:19:21
message Deleted user {deleted_user_login} ({deleted_user_email})
initiator wp
context_message_key user_deleted
deleted_user_id 118
deleted_user_email [email protected]
deleted_user_login dearhunter
deleted_user_role customer
reassign_user_id
server_http_user_agent WordPress/4.3.1; https://_my_domain_name
_message_key user_deleted
_wp_cron_running 1
_server_remote_addr 217.160.215.95