Support » Plugin: SCF Dummy Content » [Plugin: SCF Dummy Content] Plugin works only if WordPress language is english

  • Hello, I’m having some problems in using this plugin.

    I installed it on my website ( which is a WordPress 3.4.1 with bbPress 2.1.2 with italian localization ), but when clicking to execute, only posts were created ( altought I had selected some custom post types ) with title ‘0 x’ (where x is the incrementing number ) instead of the post type.

    Doing some research in the code to find out what was the problem, I had a look at the scfdc_render_form() and found the problem: the plugin is using the name attribute in the Labels array, which changes upon localizations ( in english is ‘Post’, while in italian is ‘Articoli’ ). This lead to broken post types and post names.

    Solving this problem is quite easy: use the slug of the post_type instead of the name.


    $scf_post_types = $scfdc->scf_registered_post_types();
    foreach ($scf_post_types as $scf_post_type_slug => $scf_post_type ) {
    if ( $scf_post_type_slug == 'attachment' ||
    $scf_post_type_slug == 'revision' ||
    $scf_post_type_slug == 'nav_menu_item' )

    echo '<label>
    <input name="scfdc_options[cpt]['.$scf_post_type_slug.']"
    value="1" ';


    echo '/>


    If you’re hosting your code somewhere I’d be glad to contribute to this plugin.

    Edoardo Tenani

  • The topic ‘[Plugin: SCF Dummy Content] Plugin works only if WordPress language is english’ is closed to new replies.