function openai_generate_text() { // Get the topic from the AJAX request $prompt = $_POST[‘prompt’]; $prompt =”generate 10 content ideas about ” . $topic; // OpenAI API URL and key $api_url = ‘https://api.openai.com/v1/chat/completions’; $api_key = ‘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’ ; // Replace with your…Continue reading
add_filter(‘preprocess_comment’, ‘remove_links_from_comment_author’); function remove_links_from_comment_author($commentdata) { // Regular expression to detect hyperlinks $pattern = ‘/Continue reading
/** * This snippet removes some options for recurring donation periods with Charitable’s Recurring Donations addon. * This might reset or cause odd things to happen to campaigns who resave settings without updating the period if * they already selected…Continue reading
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