Forum Replies Created

Viewing 15 replies - 31 through 45 (of 61 total)
  • Good and not good to hear. For me this is a highly needed core feature. If you need a use case: tab systems. Usually you don’t just put text in tab system but images and other stuff within a layout. There are plugin collections that offer tabs with freenestable content but for me the idea about block lab was to build own blocks and not be depended on various other bloated block collections.
    Until now I thought that its just too difficult to implement.

    Forum: Plugins
    In reply to: [Block Lab] blank page
    Thread Starter Insomnia88

    (@insomnia88)

    I think I found the problem. It kinda sucks though but at least I can work with it.
    I deactivated Gutenberg by default and unlocked it again only for my user (admin). This seems to break the plugin. The code I use is the following

    add_filter('use_block_editor_for_post_type', '__return_false', 5);
    add_filter('use_block_editor_for_post', '__return_false', 5);
    function customize_enable_gutenberg($can_edit, $post) {
    	$user_id = get_current_user_id();
    	if ($user_id === 1) {
    		return true;
    	}
    }
    add_filter('use_block_editor_for_post', 'customize_enable_gutenberg', 10, 2);

    I just turned the logic around – deactivating it for all except me – to get it working. Like this (if anyone has the same problem)

    if (is_user_logged_in()) {
    	$user_id = get_current_user_id();
    	if ($user_id !== 1) {
    		add_filter('use_block_editor_for_post_type', '__return_false', 10);
    		add_filter('use_block_editor_for_post', '__return_false', 10);
    	}
    }
    • This reply was modified 5 years, 6 months ago by Insomnia88.
    Forum: Plugins
    In reply to: [Block Lab] blank page
    Thread Starter Insomnia88

    (@insomnia88)

    It’s for new blocks and if I want to edits blocks. What do you mean with fields? This occurs on load of the page, not when I try to save or something.

    Thread Starter Insomnia88

    (@insomnia88)

    I solved this problem by passing the html value of the parsed icon instead of the parameters. Still would be nice to use html inside the labels.

    Thread Starter Insomnia88

    (@insomnia88)

    I build my own block. The block should give the user the opportunity to place an icon. I can do that by just passing the names of the icons but this way the user don’t really know waht he places. That’s why I wanted to display the targeted icons as the labels but the radio-field doesn’t seem to allow/parse html inside the labels so it’s impossible for me to show the icons.

    Thread Starter Insomnia88

    (@insomnia88)

    thanks for your response, this helped.

    Thread Starter Insomnia88

    (@insomnia88)

    @font-face {
      font-family: "Flaticon";
      src: url("/wordpress/wp-content/themes/mytheme/assets/fonts/Flaticon.eot");
      src: url("/wordpress/wp-content/themes/mytheme/assets/fonts/Flaticon.eot?#iefix") format("embedded-opentype"),
           url("/wordpress/wp-content/themes/mytheme/assets/fonts/Flaticon.woff") format("woff"),
           url("/wordpress/wp-content/themes/mytheme/assets/fonts/Flaticon.ttf") format("truetype"),
           url("/wordpress/wp-content/themes/mytheme/assets/fonts/Flaticon.svg#Flaticon") format("svg");
      font-weight: normal;
      font-style: normal;
    }
    
    @media screen and (-webkit-min-device-pixel-ratio:0) {
      @font-face {
        font-family: "Flaticon";
        src: url("/wordpress/wp-content/themes/mytheme/assets/fonts/Flaticon.svg#Flaticon") format("svg");
      }
    }
    
    [class^="sow-icon-flaticon"]:before, [class*=" sow-icon-flaticon"]:before,
    [class^="sow-icon-flaticon"]:after, [class*=" sow-icon-flaticon"]:after {   
        font-family: Flaticon;
        font-style: normal;
        line-height: 1em;
    }
    
    [class^="sow-icon-flaticon"]:before, [class*=" sow-icon-flaticon"]:before {   
        content: attr(data-sow-icon);
    }
    Thread Starter Insomnia88

    (@insomnia88)

    Sure, here you go

    function my_icon_families_filter( $icon_families ) {
        $icon_families['flaticon'] = array(
            'name' => 'Kindergarten Icons',
            'style_uri' => get_theme_file_uri() . '/assets/fonts/flaticon.css',
            'icons' => array(
                'flaticon-abacus' => '',
            ),
        );
        return $icon_families;
    }
    add_filter( 'siteorigin_widgets_icon_families', 'my_icon_families_filter' );
    Thread Starter Insomnia88

    (@insomnia88)

    Thanks for your fast response.

    You were right, it was just the .php extension at the template name. I am ashamed that I havn’t noticed it myself.

    Thread Starter Insomnia88

    (@insomnia88)

    @joyously

    Ok, it seems I missunderstood the way apply_filter works then. I solved my issue with capsuling functions. I just searched for a better way to do it (using wp mechanics)

    • This reply was modified 6 years, 5 months ago by Insomnia88.
    Thread Starter Insomnia88

    (@insomnia88)

    Hi sterndata (I know you from the irc channel),

    that’s good to know. Yeah the last topic is the one I have a problem with.

    You are right, it might be wrong in the section “developing with wordpress” BUT it’s actually no plugin problem so it’s also wrong in the plugin section. He/she moved it to the “fixing wordpress” forum and closed it at the same time. I don’t see the point behind that action. The core question of my topic wasn’t about yoast seo but about add_filter vs apply_filter behaviour.

    • This reply was modified 6 years, 5 months ago by Insomnia88.

    And I still have problems fixing it so for me it is broken, without “. The directories had 777 permissions (for testing) and I still receive this error. How is that possible?

    We also tried entering the directory in open_basedir without any effect. Do you have any other solutions until it’s really fixed?

    Thread Starter Insomnia88

    (@insomnia88)

    Ok, thanks.

    Thread Starter Insomnia88

    (@insomnia88)

    Thanks for the feedback.

    Seems like I got something wrong. Still, it’s like I wrote. I want to change a “dynamic” url with custom parameters to be rewritten to something more readable.

    A more specific example. I want
    https://blubb.enif.uberspace.de/wordpress/project/?foo=bar

    to look like
    https://blubb.enif.uberspace.de/wordpress/project/bar/

    I tried a basic rewriterule in the htaccess file but didn’t get to work it there (maybe my rewrite rules were wrong).

    Damn, 8 mins too late ??
    Same error for me. Renaming the plugin folder should be enough to though.

Viewing 15 replies - 31 through 45 (of 61 total)