I have WP-Blocks 1.4 installed. When I visit Settings > WP-Blocks, no admin page appears.
]]>Hey all!
I have two problem with the WP-blocks both of them in a correlation with a multisite.
1. The blocks arent appearing in the “new” site, that uses the same pages as my parentsite.
2. I cant make new wp-block within the “new” sites plugin?
Hope someone knows what to do. Cause im really in need for a multisite solution. Best regards
]]>Still worked with 3.3.1 but it isn’t happy with 3.3.2
Notice: has_cap was called with an argument that is deprecated since version 2.0! Usage of user levels by plugins and themes is deprecated. Use roles and capabilities instead. in /XXXX/wp-includes/functions.php on line 3551
Notice: wp_tiny_mce is deprecated since version 3.3! Use wp_editor() instead. in /XXXX/wp-includes/functions.php on line 3467
]]>I love this plugin. However, I am having one small issue with it. When I enter an apostrophe, it gives a backslash along with it. So, instead of boy’s it says boy\’s. Any ideas on why this is happening?
]]>would like to know if an update is on the way or if there is a similar plugin that does the same thing
]]>If both the WP-Blocks an WP-Table reloaded are installed then using visual editor causes a problem.
What happens is that when you update the page/post, then it looks like wordpress loses the additions.
In some instances, there are two versions of the page saved, and the older one does keep the newer changes – but it looks like that is only if the page has been auto saved.
Disabling the visual editor solves it, but that’s not good for most users.
Uninstalling either plugin also resolves it.
I hope that saves someone the three hours I spent in trying to locate the issue!
]]>Breaks Jquery/javascript functionality in the backend.
]]>function get_wp_block_shortcode( $atts ) {
extract( shortcode_atts( array(
'name' => '',
), $atts ) );
global $wpdb;
$block_slug = trim($name);
$data = (array)$wpdb->get_row("SELECT * FROM {$wpdb->prefix}wpb_content WHERE name = '{$name}' AND active = TRUE");
if($data) return get_wrapped_block_content($data);
}
add_shortcode('get_wp_block', 'get_wp_block_shortcode');
In a post, page or other content area, use the shortcode [get_wp_block] to insert blocks where ever you need them.
Example:
[get_wp_block name="foo"]
This shouldn’t be WP version specific.
function get_wp_block_random($block_slug_regex) {
global $wpdb;
$block_slug_regex = trim($block_slug_regex);
$data = (array)$wpdb->get_results("SELECT id FROM {$wpdb->prefix}wpb_content WHERE name REGEXP '{$block_slug_regex}' AND active = TRUE");
if (isset($data) && is_array($data) && count($data) > 0)
{
$arrayIndex = array();
foreach ($data as $row)
{
$arrayIndex[] = $row->id;
}
$randomIndex = mt_rand(0, count($arrayIndex) - 1);
return get_wp_block_by_id($arrayIndex[$randomIndex]);
}
}
This will allow you to get a single random block based upon a regex. For example:
<?php get_wp_block_random('^testimonial_'); ?>
Will return a block which has a name starting with testimonial_
Great plug-in, works amazing, thank you.
]]>