قائمة الوثائق
البداية
ما هو Opus Growthبدء سريعأضفه إلى الذكاء الاصطناعيكيف يعملالأمان والموافقةالرصيدالخططالأسئلة الشائعةتطبيقات الذكاء الاصطناعي
كل التطبيقاتChatGPTClaudeGrokPerplexityClaude CodeCodexGemini CLIOpenClawCursorVS CodeWindsurfMCP أخرىمنصات الإعلانات
Google AdsMeta AdsLinkedIn AdsMicrosoft AdvertisingTikTok AdsChatGPT Adsالوكالات وMCCمصادر البيانات
Search ConsoleGoogle AnalyticsYouTubeBusiness ProfileTag Managerالمواقع وSEO
AI ServerWordPressSEO Intelligenceالنقرات الاحتياليةمرجع الأدوات
كل الأدواتGoogle AdsMeta AdsTikTok AdsLinkedIn AdsMicrosoft AdvertisingChatGPT AdsSearch ConsoleGoogle AnalyticsYouTubeBusiness ProfileTag ManagerWordPressAI ServerSEO Intelligenceالنقرات الاحتياليةعبر القنواتالحساب والفوترةاللغة
WordPress Code Snippet
Read and write WPCode code snippets on a connected WordPress site — the only way to run PHP on the site without touching theme files.
- النوع
- يُجري تغييرات
- الرصيد
- 1
- المنصة
- WordPress
- الموافقة
- معاينة أولًا، وتُطبَّق بعد موافقتك
ماذا يفعل
Read and write WPCode code snippets on a connected WordPress site — the only way to run PHP on the site without touching theme files. It covers fixes that need a filter or action hook rather than a setting: adding x-default to a multilingual plugin's hreflang output, removing empty heading tags a theme prints on every page, translating a hard-coded string in a template. wordpress_set_tracking only reaches <head> and <body>, which cannot solve those. action: 'list' = every snippet with its code type, location, priority and whether it is active; 'get' (snippet_id) = one snippet with its full code; 'create' = a new snippet; 'update' (snippet_id) = change title, code, type or location; 'toggle' (snippet_id + active) = turn a snippet on or off without deleting it; 'trash' (snippet_id) = move an INACTIVE snippet to the WordPress trash (restorable for 30 days from the WPCode screen; an active snippet is refused and has to be toggled off first). On 'update', leave active unset to keep the snippet's current on/off state and leave location unset to keep its current location — only the fields you pass change. Code is stored byte-for-byte (backslashes in regexes and strings survive). code_type is php | html | js | css | text, location is a slot the site actually defines — 'list' returns the available ones. For a PHP hook use location 'everywhere' (WPCode's "Run Everywhere"; 'frontend_only' and 'admin_only' also exist). There is no 'run_everywhere' slot in WPCode: a snippet stored there is saved and shown active but never runs, so that name is rewritten to 'everywhere', and 'list'/'get' flag any existing snippet parked in it. A location the site does not define is refused with the list of valid locations. A NEW SNIPPET IS CREATED INACTIVE: PHP runs on every page load, so the code is saved first for review and only runs after you toggle it on deliberately. When turning a snippet on, WPCode first runs the code; if it throws, the snippet stays off and the WPCode error is returned in `note`. Nothing is ever permanently deleted — off and trash are both reversible. The stored type and location are read back from the site after every write, so a snippet that was saved but landed without its hook is reported as a warning rather than success. SAFETY: writes need confirm=true; confirm=false returns a preview with the exact code. Needs the site's WPCode plugin active and Connector 0.8.4 or newer; 'trash' and byte-exact code need Connector 0.8.8; on older connectors an update keeps the on/off state by reading it from the site first.
وصف الأداة بالإنجليزية لأنه النص الرسمي الذي يراه الذكاء الاصطناعي.
MCP: wordpress_snippet
كيفية الاستخدام
لا تستدعي الأدوات بأسمائها. اكتب ما تريد في ChatGPT أو Claude أو أي مساعد متصل بـ Opus Growth بكلماتك، وسيختار الذكاء الاصطناعي هذه الأداة عندما تناسب.
المعلمات
| الاسم | النوع | إلزامي | الافتراضي | |
|---|---|---|---|---|
| action | string | اختياري | list | Requested action for the selected resource; choose one of the actions allowed by this schema. |
| snippet_id | integer | اختياري | 0 | Exact snippet identifier to target. Use the ID returned by an Opus Growth list or create operation, not a display name. |
| title | string | اختياري | · | Human-readable title for the resource being created or updated. |
| code | string | اختياري | · | Exact code value for wordpress snippet. Supply text in the provider's required format; when it selects an existing resource, use the exact identifier returned by the relevant list or search operation. |
| code_type | string | اختياري | php | Provider-specific code type accepted by this operation. Use a supported value from the tool documentation or returned provider data. |
| location | string | اختياري | · | Target location, placement, or Business Profile resource for this operation. Use the exact provider-formatted value or ID returned by the relevant list or search tool. |
| priority | integer | اختياري | 0 | Numeric priority value for wordpress snippet. Use the provider's expected unit, range, and precision. |
| auto_insert | boolean | اختياري | true | Whether to enable auto insert for this operation. |
| active | boolean | اختياري | · | Active value for wordpress snippet. Follow the documented provider format and use values returned by Opus Growth discovery tools where possible. |
| site_url | string | اختياري | · | Exact URL of the connected WordPress site to target when more than one site is available. |
| confirm | boolean | اختياري | false | Safety confirmation for a state-changing operation. Leave false to preview or validate; set true only after the user explicitly approves the shown change. |
أدوات ذات صلة
list_wordpress_sitesBulk Find & Replace (WordPress)wordpress_bulk_replaceWordPress WP-CLI Commandwordpress_cliList WordPress Contact Formswordpress_contact_formsWordPress Core Info Fileswordpress_core_filesCreate WordPress Postwordpress_create_postWordPress Critical CSS (status / regenerate)wordpress_critical_cssEdit WordPress Menuwordpress_edit_menuEdit WordPress Page Designwordpress_edit_page_design