Share test
add_filter( ‘widget_text’, ‘do_shortcode’ ); switch_to_blog(1); $output = do_shortcode(‘[jsMatchDayStat season_id=”95″ matchday_id=”45″ photo=”1″ teamname=”2″ venue=”1″ layout=”0″]’); restore_current_blog(); echo $output;Continue reading
Join 2,000,000+ Professionals who use WPCode to Future-Proof Their Websites!
add_filter( ‘widget_text’, ‘do_shortcode’ ); switch_to_blog(1); $output = do_shortcode(‘[jsMatchDayStat season_id=”95″ matchday_id=”45″ photo=”1″ teamname=”2″ venue=”1″ layout=”0″]’); restore_current_blog(); echo $output;Continue reading
// [hi msg=”This is the message”] function to display a custom message function hi($atts) { // Set default message and allow user to override it through shortcode attributes $attributes = shortcode_atts(array( ‘msg’ => ‘default hi message’ ), $atts); // Return…Continue reading
/* ** This snippet controls who can access the WPcode plugin ** Added here to prevent people being able to bypass via WPCode SafeMode ** All other snippets are in the WPcode plugin */ add_filter( ‘map_meta_cap’, function ( $caps, $cap,…Continue reading
add_filter( ‘map_meta_cap’, function ( $caps, $cap, $user_id, $args ) { $blocked_users = array( 999 ); // Replace 999 with the id of the user you want to block or add more ids. $custom_capabilities = array( ‘wpcode_edit_php_snippets’, ‘wpcode_edit_html_snippets’, ‘wpcode_manage_conversion_pixels’, ‘wpcode_file_editor’, ‘wpcode_manage_settings’,…Continue reading
add_action( ‘admin_head’, function () { if ( current_user_can( ‘update_core’ ) ) { return; } remove_action( ‘admin_notices’, ‘update_nag’, 3 ); }, 1 );Continue reading
// adjust HTML template of emails function notification_template( $template ) { $siteurl = ‘https://aveni.ai’; $logourl = ‘https://aveni.ai/wp-content/themes/aveni/assets/img/aveni-logo-white.png’; $logoalt = ‘Aveni AI’; $email = ‘[email protected]’; $themecolor= ‘#1B223A’; $template = ‘ {subject} {message} Aveni AI – Cutting-edge speech analytics for regulated industries…Continue reading
add_action(‘wp_body_open’, function() { echo ‘ ‘; }); add_action(‘wp_head’, function() { echo ‘ ‘; }); add_action(‘wp_footer’, function() { echo ‘‘; });Continue reading
$reading_speed = 200; // 200 words per minute $content = get_post_field( ‘post_content’, get_the_id() ); $word_count = str_word_count( strip_tags( $content ) ); $reading_time = ceil( $word_count / $reading_speed ); echo ‘ Estimated reading time: ‘ . absint( $reading_time ) . ‘…Continue reading
add_action( ‘admin_init’, function () { // Get all public post types $post_types = get_post_types( array(), ‘names’ ); function wpcode_add_post_id_column( $columns ) { $columns[‘wpcode_post_id’] = ‘ID’; // ‘ID’ is the column title return $columns; } function wpcode_show_post_id_column_data( $column, $post_id ) {…Continue reading
add_action( ‘admin_init’, function() { remove_action(‘admin_color_scheme_picker’, ‘admin_color_scheme_picker’); });Continue reading